Procuring Entity Operations

Registration of the Tender

Tender registration consist of primary record creation and documentation uploading.

Creating primary Tender record

When registering tender in the database, one has provide all primary tender details (except binary documents) in payload of request.

POST /tenders HTTP/1.1

The response produced will have URL of the tender created in Location header of response, and in data.id of body.

HTTP/1.1 201 Created
Location: /tenders/64e93250be76435397e8c992ed4214d1

Uploading documentation

All tender documentation should be uploaded following requests one request per document. You can see supported request types in Documents Uploading section.

POST /tenders/64e93250be76435397e8c992ed4214d1/documents HTTP/1.1

The response produced will have URL of the tender document uploaded in Location header of response, and in data.id of body.

HTTP/1.1 201 Created
Location: /tenders/64e93250be76435397e8c992ed4214d1/documents/6a7d13bd8ec449e08882aeb92180d938

Example request:

$ http --form POST https://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/documents file@./Notice.pdf
POST /api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/documents HTTP/1.1
Content-Type: multipart/form-data; boundary=2add052250fb42cd8d2736fd34baa7f9



+-----------------------------------------+
| NOTE: binary data not shown in terminal |
+-----------------------------------------+

HTTP/1.1 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/documents/86b33019f2174f37b5d715c924ae6cd4

{
    "data": {
        "dateModified": "2014-12-01T17:39:29.001262+02:00",
        "datePublished": "2014-12-01T17:39:29.001218+02:00",
        "format": "text/plain",
        "id": "86b33019f2174f37b5d715c924ae6cd4",
        "title": "Notice.pdf",
        "url": "http://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/documents/86b33019f2174f37b5d715c924ae6cd4?download=d0267f352f384acca5081a04347fd64d"
    }
}

Changing the Tender

Procuring Entity can change both the primary record and associated documentation.

Changing primary Tender Record

Procuring Entity can change the Tender properties with following request. Data to change should be in payload of the message.

PATCH /tenders/64e93250be76435397e8c992ed4214d1 HTTP/1.1
HTTP/1.1 200 OK

Changing existing documents

Procuring Entity can upload new versions of the tender documentation. You can see supported request types in Documents Uploading section.

PUT /tenders/64e93250be76435397e8c992ed4214d1/documents/6a7d13bd8ec449e08882aeb92180d938 HTTP/1.1
HTTP/1.1 200 OK

Example request:

$ http --form PUT https://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/documents/4b65c046be264da4a430823d4376a757 file@./AwardCriteria-v2.pdf
PUT /api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/documents/4b65c046be264da4a430823d4376a757 HTTP/1.1
Content-Type: multipart/form-data; boundary=fdb76865e76a4140994502a017fd6e14



+-----------------------------------------+
| NOTE: binary data not shown in terminal |
+-----------------------------------------+

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8

{
    "data": {
        "dateModified": "2014-12-01T17:39:33.717002+02:00",
        "datePublished": "2014-12-01T17:39:31.443089+02:00",
        "format": "text/plain",
        "id": "4b65c046be264da4a430823d4376a757",
        "title": "AwardCriteria-v2.pdf",
        "url": "http://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/documents/4b65c046be264da4a430823d4376a757?download=e8300d4763ff4968aef4c71b4e15a297"
    }
}

Uploading additional documents

The same as Uploading documentation.