Procuring Entity Operations

Registration of the Tender

Tender registration consists 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 produced response will contain URL of the created tender 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 with the following request - 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 uploaded document in Location header of response and in data.id of body.

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

Example request:

POST /api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/documents?acc_token=be391cdea4bf4d04b9794dc15d5f4b41 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 186
Content-Type: multipart/form-data; boundary=----------a_BoUnDaRy575636613392$
Host: api-sandbox.openprocurement.org


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/documents/6d900d7c8e584ff99c734991cfbb7137

{
  "data": {
    "title": "Notice.pdf",
    "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/documents/6d900d7c8e584ff99c734991cfbb7137?download=e498e2079def4c68b93b7f08cbb62743",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2016-06-10T15:29:49.569824+03:00",
    "id": "6d900d7c8e584ff99c734991cfbb7137",
    "dateModified": "2016-06-10T15:29:49.569872+03:00"
  }
}

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 the 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:

PUT /api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/documents/2fc2e39b222b4c74b94738702188424d?acc_token=be391cdea4bf4d04b9794dc15d5f4b41 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 196
Content-Type: multipart/form-data; boundary=----------a_BoUnDaRy722822145083$
Host: api-sandbox.openprocurement.org


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

{
  "data": {
    "title": "AwardCriteria-2.pdf",
    "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/documents/2fc2e39b222b4c74b94738702188424d?download=db7e8c19fdcd4c9d87b5d48a20cbaa78",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2016-06-10T15:29:49.993070+03:00",
    "id": "2fc2e39b222b4c74b94738702188424d",
    "dateModified": "2016-06-10T15:29:50.188364+03:00"
  }
}

Uploading additional documents

The same as Uploading documentation.