Welcome to openprocurement.api’s documentation!¶
Please report any problems or suggestions for improvement either via the mailing list or the issue tracker.
Contents:
Overview¶
The Open Procurement API is the only interface to Open Procurement database that is core unit of Open Procurement infrastructure.
The Open Procurement API is REST-ful interface, providing programmatic access to Tender database of Open Procurement system. It provides predictable URLs for accessing resources, and uses built-in HTTP features to receive commands and return responses. This makes it easy to communicate with.
The API accepts JSON or form-encoded content in requests. It returns JSON content in all of its responses, including errors. Only the UTF-8 character encoding is supported for both requests and responses.
Conventions¶
All API POST and PUT requests expect a top-level object with a single element in it named data. Successful responses will mirror this format. The data element should itself be an object, containing the parameters for the request. In the case of creating a new tender, these are the fields we want to set on the tender itself.
If the request was successful, we will get a response code of 201 indicating the object was created. That response will have a data field at its top level, which will contain complete information on the new tender, including its ID.
If something went wrong during the request, we’ll get a different status code and the JSON returned will contain an errors field at the top level containing a list of problems. We look at the first one and print out its message.
Main responsibilities¶
Business logic¶
Project status¶
The project has pre alpha status.
The source repository for this project is on GitHub:
https://github.com/openprocurement/openprocurement.api
You can leave feedback by raising a new issue on the issue tracker (GitHub registration necessary). For general discussion use Open Procurement General maillist.
API stability¶
API is highly unstable, and while API endpoints are expected to remain relatively stable the data exchange formats are expected to be changed a lot. The changes in the API are communicated via Open Procurement API maillist.
Change log¶
0.4¶
Released: 2014-12-01
New Features:
- Filing Complaint on award
- Complaint attachments
- Tender Cancelling
- Question authors visibility
Modifications:
- Tender status codelist harmonized
0.3¶
Released: 2014-11-21
New Features:
- Asking Questions
- Filing Complaint on tender conditions
- Answer Question
- Publish Complaint resolution
- Retrieve Questions and Answers, Complaints and Resolutions
- Auction Scheduler
- Auction Runner
Modifications:
- Data Standard harmonized with Open Contracting 1.0RC
- /bidders/ endpoint renamed into /bids/
- modified property renamed into modificationDate
0.2¶
Released: 2014-11-07
- Tender Listing Batching (optimized for sync operations)
- Documents retrieval
- Change tracking
- Options: Pretty-print, JSONP
- Introduction of state machine and time-based state switching
0.1¶
Released: 2014-10-24
- Set up general build, testing, deployment, and ci framework.
- Creating/modifying tender
- Adding/modifying/cancelling tender proposal
- Awarding/disqualification of tender proposals
Next steps¶
You might find it helpful to look at the Tutorial, or the API Reference.
Responses¶
After processing API is always providing response, reporting either success or failure.
Status Codes¶
In all cases, the API should return an HTTP Status Code that indicates the nature of the failure (below), with a response body in JSON format containing additional information.
- 200
- Success. If data was requested, it will be available in the data field at the top level of the response body.
- 201
- Success (for object creation). Its information is available in the data field at the top level of the response body. The API URL where the object can be retrieved is also returned in the Location header of the response.
- 400
- Invalid request. This usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
- 401
- No authorization. A valid API key was not provided with the request, so the API could not associate a user with the request.
- 403
- Forbidden. The API key and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the party does not have access to.
- 404
- Not found. Either the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
- 429
- Rate Limit Enforced.
- 500
- Server error. There was a problem on OpenProcurement’s end.
Success Response¶
Every successful get, create, update, replace request results in response that contains data attribute. That data attribute contains full JSON object representation after the operation. If some data were generated in the results of processing (like new object IDs, of modified date) they are present in the respose.
The listing requests result in similar responses, but instead of single object in data attribute, the JSON response contains collection of objects.
Example Succes Response¶
Here is response describing tender
HTTP/1.1 200 OK
{
"data":{
"id": "64e93250be76435397e8c992ed4214d1",
"tenderID": "UA-2014-DUS-156",
"modified": "2014-10-27T08:06:58.158Z",
"procuringEntity": {
"id": {
"name": "Державне управління справами",
"scheme": "https://ns.openprocurement.org/ua/edrpou",
"uid": "00037256",
"uri": "http://www.dus.gov.ua/"
},
"address": {
"countryName": "Україна",
"postalCode": "01220",
"region": "м. Київ",
"locality": "м. Київ",
"streetAddress": "вул. Банкова, 11, корпус 1"
}
},
"totalValue": {
"amount": 500,
"currency": "UAH",
"valueAddedTaxIncluded": true
},
"itemsToBeProcured": [
{
"description": "футляри до державних нагород",
"primaryClassification": {
"scheme": "CPV",
"id": "44617100-9",
"description": "Cartons"
},
"additionalClassification": [
{
"scheme": "ДКПП",
"id": "17.21.1",
"description": "папір і картон гофровані, паперова й картонна тара"
}
],
"unitOfMeasure": "item",
"quantity": 5
}
],
"clarificationPeriod": {
"endDate": "2014-10-31T00:00:00"
},
"tenderPeriod": {
"startDate": "2014-11-03T00:00:00",
"endDate": "2014-11-06T10:00:00"
},
"awardPeriod": {
"endDate": "2014-11-13T00:00:00"
},
"deliveryDate": {
"endDate": "2014-11-20T00:00:00"
},
"minimalStep": {
"amount": 35,
"currency", "UAH"
}
}
}
Error Response¶
In the event of an error, the response body will contain an errors field at the top level. This contains an array of at least one error object, described below:
location: | Part of the request causing the error. Possible values are header and body. |
---|---|
name: |
|
description: | Verbose (human readable) description of error. |
Example Error Response¶
Sample below indicate incomplete request.
HTTP/1.1 400 Missing input
{
"status": "error",
"errors": [
{
"location": "body",
"name": "data",
"description": "No JSON object could be decoded"
}
]
}
Options¶
In addition to providing fields and their values in a request, you may also specify options to control how your request is interpreted and how the response is generated. For GET requests, options are specified as URL parameters prefixed with opt_. For POST or PUT requests, options are specified in the body, inside the top-level options object (a sibling of the data object). The option specified in the body overrides the opt_ one from URL parameter.
These options can be used in combination in a single request, though some of them may conflict in their impact on the response.
pretty: | ?opt_pretty options: { pretty: true } Provides the response in “pretty” output. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. |
---|---|
jsonp: | ?opt_jsonp=myCallback Returns the output in JSON-P format instead of plain JSON, to allow requests to come from within browsers and work around the “same origin policy.” The function named as the value of the opt_jsonp parameter will be called with a single argument, a JavaScript object representing the response. |
fields: | ?opt_fields=comma,separated,field,list List of extra fields to include in response. |
Documents Uploading¶
All of the document uploading API endpoints follow the same set of rules.
Content-Type: multipart/form-data¶
This is standard approach of HTML form file uploading defined by RFC 1867. The requirements are:
- Form element should have name file
- Only one document can be uploaded.
The cURL example:
curl --form file=@page.pdf http://api-sandbox.openprocurement.org/api/0/tenders/f6882fa63d5141bcabec54a4766eec61/documents
HTTPie example:
http -f POST http://api-sandbox.openprocurement.org/api/0/tenders/f6882fa63d5141bcabec54a4766eec61/documents file@page.pdf
The request itself should look like:
POST /api/0.2/tenders/f6882fa63d5141bcabec54a4766eec61/documents HTTP/1.1
Content-Type: multipart/form-data; boundary=28e02f7d4a3c4da19c4e2589329ad36f
Host: api-sandbox.openprocurement.org
--28e02f7d4a3c4da19c4e2589329ad36f
Content-Disposition: form-data; name="file"; filename="page.pdf"
..Contents of PDF goes here...
--28e02f7d4a3c4da19c4e2589329ad36f--
Tutorial¶
Exploring basic rules¶
Let’s try exploring the /tenders endpoint:
$ http https://api-sandbox.openprocurement.org/api/0/tenders
GET /api/0/tenders HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
"data": [],
"next_page": {
"offset": "2014-12-01T17:39:19.104103+02:00",
"path": "/api/0/tenders?offset=2014-12-01T17%3A39%3A19.104103%2B02%3A00",
"uri": "http://api-sandbox.openprocurement.org/api/0/tenders?offset=2014-12-01T17%3A39%3A19.104103%2B02%3A00"
}
}
Just invoking it reveals empty set.
Now let’s attempt creating some tender:
$ http POST https://api-sandbox.openprocurement.org/api/0/tenders
POST /api/0/tenders HTTP/1.1
HTTP/1.1 415 Unsupported Media Type
Content-Type: application/json; charset=UTF-8
{
"errors": [
{
"description": "Content-Type header should be one of ['application/json']",
"location": "header",
"name": "Content-Type"
}
],
"status": "error"
}
Error states that only accepted Content-Type is application/json.
Let’s satisfy the Content-type requirement:
$ http -j POST https://api-sandbox.openprocurement.org/api/0/tenders
POST /api/0/tenders HTTP/1.1
Content-Type: application/json; charset=utf-8
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json; charset=UTF-8
{
"errors": [
{
"description": "No JSON object could be decoded",
"location": "body",
"name": "data"
}
],
"status": "error"
}
Error states that no data found in JSON body.
Creating tender¶
Let’s provide the data attribute in the body submitted:
$ http -j POST https://api-sandbox.openprocurement.org/api/0/tenders data:={}
POST /api/0/tenders HTTP/1.1
Content-Type: application/json; charset=utf-8
{
"data": {}
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/0/tenders/779630aecd87417097dcfb48871b6990
{
"access": {
"token": "8f36838c54af4d79bf33cf00915926d1"
},
"data": {
"dateModified": "2014-12-01T17:39:21.504836+02:00",
"enquiryPeriod": {
"startDate": "2014-12-01T17:39:21.504836+02:00"
},
"id": "779630aecd87417097dcfb48871b6990",
"status": "active.enquiries",
"tenderID": "UA-779630aecd87417097dcfb48871b6990"
}
}
Success! Now we can see that new object was created. Response code is 201 and Location response header reports the location of object created. The body of response reveals the information about tender created, its internal id (that matches the Location segment), its official tenderID and modified datestamp stating the moment in time when tender was last modified. Note that tender is created with active.enquiries status.
Let’s access the URL of object created (the Location header of the response):
$ http https://api-sandbox.openprocurement.org/api/0/tenders/779630aecd87417097dcfb48871b6990
GET /api/0/tenders/779630aecd87417097dcfb48871b6990 HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
"data": {
"dateModified": "2014-12-01T17:39:21.504836+02:00",
"enquiryPeriod": {
"startDate": "2014-12-01T17:39:21.504836+02:00"
},
"id": "779630aecd87417097dcfb48871b6990",
"status": "active.enquiries",
"tenderID": "UA-779630aecd87417097dcfb48871b6990"
}
}
We can see the same response we got after creating tender.
Let’s see what listing of tenders reveals us:
$ http https://api-sandbox.openprocurement.org/api/0/tenders
GET /api/0/tenders HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
"data": [
{
"dateModified": "2014-12-01T17:39:23.440187+02:00",
"id": "779630aecd87417097dcfb48871b6990"
}
],
"next_page": {
"offset": "2014-12-01T17:39:24.322407+02:00",
"path": "/api/0/tenders?offset=2014-12-01T17%3A39%3A24.322407%2B02%3A00",
"uri": "http://api-sandbox.openprocurement.org/api/0/tenders?offset=2014-12-01T17%3A39%3A24.322407%2B02%3A00"
}
}
We do see the internal id of a tender (that can be used to construct full URL by prepending http://api-sandbox.openprocurement.org/api/0/tenders/) and its modified datestamp.
Let’s try creating tender with more data, passing the procuringEntity of a tender:
$ http -j POST https://api-sandbox.openprocurement.org/api/0/tenders data:=@./school-tender.json
POST /api/0/tenders HTTP/1.1
Content-Type: application/json; charset=utf-8
{
"data": {
"procuringEntity": {
"address": {
"countryName": "Україна",
"locality": "м. Вінниця",
"postalCode": "21027",
"region": "м. Вінниця",
"streetAddress": "вул. Стахурського. 22"
},
"identifier": {
"id": "21725150",
"legalName": "Заклад \"Загальноосвітня школа І-ІІІ ступенів № 10 Вінницької міської ради\"",
"scheme": "https://ns.openprocurement.org/ua/edrpou",
"uri": "http://sch10.edu.vn.ua/"
},
"name": "ЗОСШ #10 м.Вінниці"
}
}
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3
{
"access": {
"token": "4668a63ccfd443e8b848e856952e9a2b"
},
"data": {
"dateModified": "2014-12-01T17:39:25.289180+02:00",
"enquiryPeriod": {
"startDate": "2014-12-01T17:39:25.289180+02:00"
},
"id": "327c00d16cff4c37be5bd4915cdff8a3",
"procuringEntity": {
"address": {
"countryName": "Україна",
"locality": "м. Вінниця",
"postalCode": "21027",
"region": "м. Вінниця",
"streetAddress": "вул. Стахурського. 22"
},
"identifier": {
"id": "21725150",
"legalName": "Заклад \"Загальноосвітня школа І-ІІІ ступенів № 10 Вінницької міської ради\"",
"scheme": "https://ns.openprocurement.org/ua/edrpou",
"uri": "http://sch10.edu.vn.ua/"
},
"name": "ЗОСШ #10 м.Вінниці"
},
"status": "active.enquiries",
"tenderID": "UA-327c00d16cff4c37be5bd4915cdff8a3"
}
}
And again we have 201 Created response code, Location header and body wth extra id, tenderID, and modified properties.
Let’s check what tender registry contains:
$ http https://api-sandbox.openprocurement.org/api/0/tenders
GET /api/0/tenders HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
"data": [
{
"dateModified": "2014-12-01T17:39:23.440187+02:00",
"id": "779630aecd87417097dcfb48871b6990"
},
{
"dateModified": "2014-12-01T17:39:25.289180+02:00",
"id": "327c00d16cff4c37be5bd4915cdff8a3"
}
],
"next_page": {
"offset": "2014-12-01T17:39:26.138720+02:00",
"path": "/api/0/tenders?offset=2014-12-01T17%3A39%3A26.138720%2B02%3A00",
"uri": "http://api-sandbox.openprocurement.org/api/0/tenders?offset=2014-12-01T17%3A39%3A26.138720%2B02%3A00"
}
}
And indeed we have 2 tenders now.
Modifying tender¶
Let’s update tender by providing it with all other essential properties:
$ http -j PATCH https://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3 data:=@./school-tender-patch.json
PATCH /api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3 HTTP/1.1
Content-Type: application/json; charset=utf-8
{
"data": {
"enquiryPeriod": {
"endDate": "2015-05-29T00:00:00"
},
"items": [
{
"additionalClassifications": [
{
"description": "Послуги шкільних їдалень",
"id": "55.51.10.300",
"scheme": "ДКПП"
}
],
"classification": {
"description": "Послуги з харчування у школах",
"id": "55523100-3",
"scheme": "CPV"
},
"description": "Послуги шкільних їдалень",
"quantity": 5,
"unit": {
"name": "item"
}
}
],
"minimalStep": {
"amount": 35000,
"currency": "UAH",
"valueAddedTaxIncluded": true
},
"tenderPeriod": {
"endDate": "2015-06-07T10:00:00",
"startDate": "2014-11-03T00:00:00"
},
"value": {
"amount": 500000,
"currency": "UAH",
"valueAddedTaxIncluded": true
}
}
}
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
"data": {
"dateModified": "2014-12-01T17:39:26.929784+02:00",
"enquiryPeriod": {
"endDate": "2015-05-29T00:00:00+02:02",
"startDate": "2014-12-01T17:39:25.289180+02:00"
},
"id": "327c00d16cff4c37be5bd4915cdff8a3",
"items": [
{
"additionalClassifications": [
{
"description": "Послуги шкільних їдалень",
"id": "55.51.10.300",
"scheme": "ДКПП"
}
],
"classification": {
"description": "Послуги з харчування у школах",
"id": "55523100-3",
"scheme": "CPV"
},
"description": "Послуги шкільних їдалень",
"quantity": 5,
"unit": {
"name": "item"
}
}
],
"minimalStep": {
"amount": 35000.0,
"currency": "UAH",
"valueAddedTaxIncluded": true
},
"procuringEntity": {
"address": {
"countryName": "Україна",
"locality": "м. Вінниця",
"postalCode": "21027",
"region": "м. Вінниця",
"streetAddress": "вул. Стахурського. 22"
},
"identifier": {
"id": "21725150",
"legalName": "Заклад \"Загальноосвітня школа І-ІІІ ступенів № 10 Вінницької міської ради\"",
"scheme": "https://ns.openprocurement.org/ua/edrpou",
"uri": "http://sch10.edu.vn.ua/"
},
"name": "ЗОСШ #10 м.Вінниці"
},
"status": "active.enquiries",
"tenderID": "UA-327c00d16cff4c37be5bd4915cdff8a3",
"tenderPeriod": {
"endDate": "2015-06-07T10:00:00+02:02",
"startDate": "2014-11-03T00:00:00+02:02"
},
"value": {
"amount": 500000.0,
"currency": "UAH",
"valueAddedTaxIncluded": true
}
}
}
We see the added properies merged with existing data of tender. Additionally the modified property updated to reflect the last modification datestamp.
Checking the listing again reflects the new modification date:
$ http https://api-sandbox.openprocurement.org/api/0/tenders
GET /api/0/tenders HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
"data": [
{
"dateModified": "2014-12-01T17:39:23.440187+02:00",
"id": "779630aecd87417097dcfb48871b6990"
},
{
"dateModified": "2014-12-01T17:39:26.929784+02:00",
"id": "327c00d16cff4c37be5bd4915cdff8a3"
}
],
"next_page": {
"offset": "2014-12-01T17:39:27.728690+02:00",
"path": "/api/0/tenders?offset=2014-12-01T17%3A39%3A27.728690%2B02%3A00",
"uri": "http://api-sandbox.openprocurement.org/api/0/tenders?offset=2014-12-01T17%3A39%3A27.728690%2B02%3A00"
}
}
Uploading documentation¶
Procuring entity can upload PDF files into tender created. Uploading should follow the Documents Uploading rules.
$ 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"
}
}
201 Created response code and Location header confirm document creation. We can additionally query the documents collection API endpoint to confirm the action:
$ http https://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/documents
GET /api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/documents HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
"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"
}
]
}
The single array element describes the document uploaded. We can upload more documents:
$ http --form POST https://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/documents file@./AwardCriteria.pdf
POST /api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/documents HTTP/1.1
Content-Type: multipart/form-data; boundary=dbae19b2722a47c481e3072c8ed958d4
+-----------------------------------------+
| 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/4b65c046be264da4a430823d4376a757
{
"data": {
"dateModified": "2014-12-01T17:39:31.443132+02:00",
"datePublished": "2014-12-01T17:39:31.443089+02:00",
"format": "text/plain",
"id": "4b65c046be264da4a430823d4376a757",
"title": "AwardCriteria.pdf",
"url": "http://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/documents/4b65c046be264da4a430823d4376a757?download=d0ef7d53169041ed8093172c6ba6870c"
}
}
And again we can confirm that there are two documents uploaded.
$ http https://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/documents
GET /api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/documents HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
"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"
},
{
"dateModified": "2014-12-01T17:39:31.443132+02:00",
"datePublished": "2014-12-01T17:39:31.443089+02:00",
"format": "text/plain",
"id": "4b65c046be264da4a430823d4376a757",
"title": "AwardCriteria.pdf",
"url": "http://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/documents/4b65c046be264da4a430823d4376a757?download=d0ef7d53169041ed8093172c6ba6870c"
}
]
}
In case we made an error, we can reupload the document over the older version:
$ 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"
}
}
And we can see that it is overriding the original version:
$ http https://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/documents
GET /api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/documents HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
"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"
},
{
"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"
}
]
}
Enquiries¶
When tender is in active.enquiry status, interested parties can ask questions:
$ http -j POST https://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/questions data:=@./question.json
POST /api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/questions HTTP/1.1
Content-Type: application/json; charset=utf-8
{
"data": {
"author": {
"address": {
"countryName": "Україна",
"locality": "м. Вінниця",
"postalCode": "21100",
"region": "м. Вінниця",
"streetAddress": "вул. Островського, 33"
},
"contactPoint": {
"email": "soleksuk@gmail.com",
"name": "Сергій Олексюк",
"telephone": "+380 (432) 21-69-30"
},
"identifier": {
"id": "13313462",
"legalName": "Державне комунальне підприємство громадського харчування «Школяр»",
"scheme": "https://ns.openprocurement.org/ua/edrpou",
"uri": "http://sch10.edu.vn.ua/"
},
"name": "ДКП «Школяр»"
},
"description": "Просимо додати таблицю потрібної калорійності харчування по місяцях",
"title": "Калорійність по місяцях"
}
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/questions/74fb1c83ec7549e0abd7284e05287b8b
{
"data": {
"author": {
"address": {
"countryName": "Україна",
"locality": "м. Вінниця",
"postalCode": "21100",
"region": "м. Вінниця",
"streetAddress": "вул. Островського, 33"
},
"contactPoint": {
"email": "soleksuk@gmail.com",
"name": "Сергій Олексюк",
"telephone": "+380 (432) 21-69-30"
},
"identifier": {
"id": "13313462",
"legalName": "Державне комунальне підприємство громадського харчування «Школяр»",
"scheme": "https://ns.openprocurement.org/ua/edrpou",
"uri": "http://sch10.edu.vn.ua/"
},
"name": "ДКП «Школяр»"
},
"date": "2014-12-01T17:39:35.616161+02:00",
"description": "Просимо додати таблицю потрібної калорійності харчування по місяцях",
"id": "74fb1c83ec7549e0abd7284e05287b8b",
"title": "Калорійність по місяцях"
}
}
Bidder is answering them:
$ http -j PATCH https://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/questions/74fb1c83ec7549e0abd7284e05287b8b data:=@./answer.json
PATCH /api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/questions/74fb1c83ec7549e0abd7284e05287b8b HTTP/1.1
Content-Type: application/json; charset=utf-8
{
"data": {
"answer": "Таблицю додано в файлі \"Kalorijnist.xslx\""
}
}
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
"data": {
"answer": "Таблицю додано в файлі \"Kalorijnist.xslx\"",
"date": "2014-12-01T17:39:35.616161+02:00",
"description": "Просимо додати таблицю потрібної калорійності харчування по місяцях",
"id": "74fb1c83ec7549e0abd7284e05287b8b",
"title": "Калорійність по місяцях"
}
}
And one can retrieve the questions list:
$ http -j https://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/questions
GET /api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/questions HTTP/1.1
Content-Type: application/json; charset=utf-8
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
"data": [
{
"answer": "Таблицю додано в файлі \"Kalorijnist.xslx\"",
"date": "2014-12-01T17:39:35.616161+02:00",
"description": "Просимо додати таблицю потрібної калорійності харчування по місяцях",
"id": "74fb1c83ec7549e0abd7284e05287b8b",
"title": "Калорійність по місяцях"
}
]
}
And individual answer:
$ http -j https://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/questions/74fb1c83ec7549e0abd7284e05287b8b
GET /api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/questions/74fb1c83ec7549e0abd7284e05287b8b HTTP/1.1
Content-Type: application/json; charset=utf-8
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
"data": {
"answer": "Таблицю додано в файлі \"Kalorijnist.xslx\"",
"date": "2014-12-01T17:39:35.616161+02:00",
"description": "Просимо додати таблицю потрібної калорійності харчування по місяцях",
"id": "74fb1c83ec7549e0abd7284e05287b8b",
"title": "Калорійність по місяцях"
}
}
Registering bid¶
When Tender.tenderingPeriod.startDate comes Tender switches to tendering status that allows registration of bids.
Bidder can register a bid:
$ http -j POST https://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/bids data:=@./catering-bid.json
POST /api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/bids HTTP/1.1
Content-Type: application/json; charset=utf-8
{
"data": {
"tenderers": [
{
"address": {
"countryName": "Україна",
"locality": "м. Вінниця",
"postalCode": "21100",
"region": "м. Вінниця",
"streetAddress": "вул. Островського, 33"
},
"contactPoint": {
"email": "soleksuk@gmail.com",
"name": "Сергій Олексюк",
"telephone": "+380 (432) 21-69-30"
},
"identifier": {
"id": "13313462",
"legalName": "Державне комунальне підприємство громадського харчування «Школяр»",
"scheme": "https://ns.openprocurement.org/ua/edrpou",
"uri": "http://sch10.edu.vn.ua/"
},
"name": "ДКП «Школяр»"
}
],
"value": {
"amount": 475000
}
}
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/bids/9b2c1ec83e1646edb2ce6056d653d390
{
"data": {
"date": "2014-12-01T17:39:39.940339+02:00",
"id": "9b2c1ec83e1646edb2ce6056d653d390",
"tenderers": [
{
"address": {
"countryName": "Україна",
"locality": "м. Вінниця",
"postalCode": "21100",
"region": "м. Вінниця",
"streetAddress": "вул. Островського, 33"
},
"contactPoint": {
"email": "soleksuk@gmail.com",
"name": "Сергій Олексюк",
"telephone": "+380 (432) 21-69-30"
},
"identifier": {
"id": "13313462",
"legalName": "Державне комунальне підприємство громадського харчування «Школяр»",
"scheme": "https://ns.openprocurement.org/ua/edrpou",
"uri": "http://sch10.edu.vn.ua/"
},
"name": "ДКП «Школяр»"
}
],
"value": {
"amount": 475000.0,
"currency": "UAH",
"valueAddedTaxIncluded": true
}
}
}
And upload proposal document:
$ http --form POST https://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/bids/9b2c1ec83e1646edb2ce6056d653d390/documents file@./Proposal.pdf
POST /api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/bids/9b2c1ec83e1646edb2ce6056d653d390/documents HTTP/1.1
Content-Type: multipart/form-data; boundary=77f84476a6c44bceb5d66b90b906ed1e
+-----------------------------------------+
| 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/bids/9b2c1ec83e1646edb2ce6056d653d390/documents/316aecfb5cd9407ebc2ae980d86812d8
{
"data": {
"dateModified": "2014-12-01T17:39:41.114476+02:00",
"datePublished": "2014-12-01T17:39:41.114422+02:00",
"format": "text/plain",
"id": "316aecfb5cd9407ebc2ae980d86812d8",
"title": "Proposal.pdf",
"url": "http://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/bids/9b2c1ec83e1646edb2ce6056d653d390/documents/316aecfb5cd9407ebc2ae980d86812d8?download=efad340688de454486f267f8575477dc"
}
}
It is possible to check documents uploaded:
$ http https://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/bids/9b2c1ec83e1646edb2ce6056d653d390/documents
GET /api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/bids/9b2c1ec83e1646edb2ce6056d653d390/documents HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
"data": [
{
"dateModified": "2014-12-01T17:39:41.114476+02:00",
"datePublished": "2014-12-01T17:39:41.114422+02:00",
"format": "text/plain",
"id": "316aecfb5cd9407ebc2ae980d86812d8",
"title": "Proposal.pdf",
"url": "http://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/bids/9b2c1ec83e1646edb2ce6056d653d390/documents/316aecfb5cd9407ebc2ae980d86812d8?download=efad340688de454486f267f8575477dc"
}
]
}
For best effect (biggest economy) Tender should have multiple bidders registered:
$ http -j POST https://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/bids data:=@./catering2-bid.json
POST /api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/bids HTTP/1.1
Content-Type: application/json; charset=utf-8
{
"data": {
"tenderers": [
{
"address": {
"countryName": "Україна",
"locality": "м. Вінниця",
"postalCode": "21018",
"region": "м. Вінниця",
"streetAddress": "вул. Юності, 30"
},
"contactPoint": {
"email": "alla.myhailova@i.ua",
"name": "Алла Михайлова",
"telephone": "+380 (432) 460-665"
},
"identifier": {
"id": "13306232",
"legalName": "Державне комунальне підприємство громадського харчування «Меридіан»",
"scheme": "https://ns.openprocurement.org/ua/edrpou",
"uri": "http://sch10.edu.vn.ua/"
},
"name": "ДКП «Меридіан»"
}
],
"value": {
"amount": 480000
}
}
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/bids/007f0144404c47829ba5b0a5eb9b9f17
{
"data": {
"date": "2014-12-01T17:39:42.828066+02:00",
"id": "007f0144404c47829ba5b0a5eb9b9f17",
"tenderers": [
{
"address": {
"countryName": "Україна",
"locality": "м. Вінниця",
"postalCode": "21018",
"region": "м. Вінниця",
"streetAddress": "вул. Юності, 30"
},
"contactPoint": {
"email": "alla.myhailova@i.ua",
"name": "Алла Михайлова",
"telephone": "+380 (432) 460-665"
},
"identifier": {
"id": "13306232",
"legalName": "Державне комунальне підприємство громадського харчування «Меридіан»",
"scheme": "https://ns.openprocurement.org/ua/edrpou",
"uri": "http://sch10.edu.vn.ua/"
},
"name": "ДКП «Меридіан»"
}
],
"value": {
"amount": 480000.0,
"currency": "UAH",
"valueAddedTaxIncluded": true
}
}
}
Confirming qualification¶
Qualification comission registers its decision via following call:
$ http -j POST http://api-sandbox.openprocurement.org/api/0/tenders/d2d03d6abc5e49708e73b97236b61945/awards data:={"awardStatus":"pending"}
POST /api/0/tenders/d2d03d6abc5e49708e73b97236b61945/awards HTTP/1.1
Content-Type: application/json; charset=utf-8
{
"data": {
"awardStatus": "pending"
}
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=UTF-8
{
"data": {
"awardDate": "2014-11-18T14:06:41.505869+00:00",
"awardID": "4bf007cb7e424ec09c71ccc809393e10",
"awardStatus": "pending"
}
}
Canceling tender¶
Tender creator can cancel tender anytime:
$ http -j PATCH https://api-sandbox.openprocurement.org/api/0/tenders/779630aecd87417097dcfb48871b6990 data:={"status":"cancelled"}
PATCH /api/0/tenders/779630aecd87417097dcfb48871b6990 HTTP/1.1
Content-Type: application/json; charset=utf-8
{
"data": {
"status": "cancelled"
}
}
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
"data": {
"dateModified": "2014-12-01T17:39:23.440187+02:00",
"enquiryPeriod": {
"startDate": "2014-12-01T17:39:21.504836+02:00"
},
"id": "779630aecd87417097dcfb48871b6990",
"status": "cancelled",
"tenderID": "UA-779630aecd87417097dcfb48871b6990"
}
}
Data Standard¶
Data standard is modelled along the Open Contracting Standard with extensions in areas that were not covered by it.
Tender¶
Schema¶
title: | string, multilingual The name of the tender, displayed in listings. You can include following items:
|
---|---|
description: | string, multilingual Detailed description of tender |
tenderID: | string, autogenerated, read-only the tender identifier to refer tender to in “paper” documentation. OpenContracting Description: TenderID should always be the same as the OCID. It is included to make the flattened data structure more convenient. |
procuringEntity: | |
Organization conducting the tender. OpenContracting Description: The entity managing the procurement, which may be different from the buyer who is paying / using the items being procured. |
|
value: |
Total available tender budget. Bids greater then value will be rejected OpenContracting Description: The total estimated value of the procurement. |
items: | list of Item objects List containing single item being procured. OpenContracting Description: The goods and services to be purchased, broken into line items wherever possible. Items should not be duplicated, but a quantity of 2 specified instead. |
documents: | List of Document objects OpenContracting Description: All documents and attachments related to the tender. |
deliveryDate: |
The expected delivery dates for a tendered goods or services. |
questions: | List of Question objects Questions to procuringEntity and answers to them. |
complaints: | List of Complaint objects Complaints to tender conditions and their resolutions. |
bids: | List of Bid objects A list of all bids placed in the tender altogether with information about tenderers and their proposal and other qualification documentation. OpenContracting Description: A list of all the companies who entered submissions for the tender. |
minimalStep: |
The minimal step of auction (reduction). |
awards: | List of Award objects All qualifications (disqualifications and awards). |
enquiryPeriod: |
Period when questions are allowed. OpenContracting Description: The period during which enquiries may be made and will be answered. |
tenderPeriod: |
Period when bids can be submitted. OpenContracting Description: The period when the tender is open for submissions. The end date is the closing date for tender submissions. |
auctionPeriod: | Period, read-only Period when Auction is conducted. |
awardPeriod: | Period, read-only Period that Awarding process took. OpenContracting Description: The date or period on which an award is anticipated to be made. |
status: | ‘ative.enquiries’, ‘active.tendering’, ‘active.auction’, ‘active.qualification’, ‘active.awarded’, ‘unsuccessful’, ‘complete’, ‘cancelled’ Status of the Tender. |
revisions: | List of Revision objects, autogenerated Historical changes to Tender object properties. |
Organization¶
Schema¶
name: | string, multilingual |
---|---|
identifier: | Identifier |
additionalIdentifiers: | |
List of Identifier objects | |
address: | Address |
contactPoint: | ContactPoint |
Identifier¶
Schema¶
scheme: | string OpenContracting Description: Organization identifiers be drawn from an existing identification scheme. This field is used to indicate the scheme or codelist in which the identifier will be found. This value should be drawn from the Organization Identifier Scheme. |
---|---|
id: | string OpenContracting Description: The identifier of the organization in the selected scheme. |
legalName: | string, multilingual OpenContracting Description: The legally registered name of the organization. |
uri: | uri OpenContracting Description: A URI to identify the organization, such as those provided by Open Corporates or some other relevant URI provider. This is not for listing the website of the organization: that can be done through the url field of the Organization contact point. |
Address¶
Schema¶
streetAddress: | string |
---|---|
locality: | string |
region: | string |
postalCode: | string |
countryName: | string |
ContactPoint¶
Schema¶
name: | string, multilingual |
---|---|
email: | |
telephone: | string |
faxNumber: | string |
url: | url |
Item¶
Schema¶
description: | string, multilingual OpenContracting Description: A description of the goods, services to be provided. |
---|---|
classification: |
OpenContracting Description: The primary classification for the item. See the itemClassificationScheme to identify preferred classification lists, including CPV and GSIN. |
additionalClassifications: | |
List of Classification objects OpenContracting Description: An array of additional classifications for the item. See the itemClassificationScheme codelist for common options to use in OCDS. This may also be used to present codes from an internal classification scheme. |
|
unit: |
OpenContracting Description: Description of the unit which the good comes in e.g. hours, kilograms. Made up of a unit name, and the value of a single unit. |
quantity: | integer OpenContracting Description: The number of units required |
Classification¶
Schema¶
scheme: | string OpenContracting Description: A classification should be drawn from an existing scheme or list of codes. This field is used to indicate the scheme/codelist from which the classification is drawn. For line item classifications, this value should represent a known Item Classification Scheme wherever possible. |
---|---|
id: | string OpenContracting Description: The classification code drawn from the selected scheme. |
description: | string OpenContracting Description: A textual description or title for the code. |
uri: | uri OpenContracting Description: A URI to identify the code. In the event individual URIs are not available for items in the identifier scheme this value should be left blank. |
Document¶
Schema¶
id: | string, autogenerated |
---|---|
classification: | string Possible values are:
|
title: | string, multilingual |
description: | string, multilingual |
format: | string |
url: | string, autogenerated |
datePublished: | string, Date |
dateModified: | string, Date |
language: | string |
Bid¶
Schema¶
tenderers: | List of Organization objects |
---|---|
date: | string, Date |
id: | uid, autogenerated |
status: | string Possible values are:
|
value: | |
documents: | List of Document objects |
Question¶
Complaint¶
Schema¶
id: | uid, autogenerated |
---|---|
author: |
Organization filing complaint (contactPoint - person, identification - organization that person represents) |
title: | string, required Title of complaint |
description: | Description of the question |
date: | string, Date, autogenerated Date of posting |
status: | string Possible values are:
|
resolution: | string |
documents: | List of Document objects |
Period¶
Date¶
Date/time in Date Format: ISO 8601.
Retrieving Tender Information¶
Getting list of all tenders¶
GET /tenders HTTP/1.1
HTTP/1.1 200 OK
Sorting¶
Tenders retuned are sorted by modification time.
Limiting number of Tenders returned¶
You can control the number of data entries in the tenders feed (batch size) with limit parameter. If not specified, data is being returned in batches of 100 elements.
Batching¶
The response contains next_page element with following properties:
offset: | This is the parameter you have to add to the original request you made to get next page. |
---|---|
path: | This is path section of URL with original parameters and offset parameter added/replaced above. |
url: | The full version of URL for next page. |
If next page request returns no data (i.e. empty array) then there is little sense in fetching further pages.
Synchronizing¶
It is often necessary to be able to syncronize central database changes to other database (we’ll call it “local”). The default sorting “by modification date” altogether by Batching mechanism allows one to implement synchronization effectively. The synchronization process can go page by page until there is no new data returned. Then the synchronizer have to pause for a while to let central database register some changes and attempt fetching subsequent page. The next_page guarantees to have all changes from the last request to be included in new batch.
The safe frequency of synchronization requests is once per 5 minutes.
Reading the individual tender information¶
GET /tenders/64e93250be76435397e8c992ed4214d1 HTTP/1.1
HTTP/1.1 200 OK
Reading the tender documents list¶
GET /tenders/64e93250be76435397e8c992ed4214d1/documents HTTP/1.1
HTTP/1.1 200 OK
Example request:
$ http https://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/documents
GET /api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/documents HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
"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"
},
{
"dateModified": "2014-12-01T17:39:31.443132+02:00",
"datePublished": "2014-12-01T17:39:31.443089+02:00",
"format": "text/plain",
"id": "4b65c046be264da4a430823d4376a757",
"title": "AwardCriteria.pdf",
"url": "http://api-sandbox.openprocurement.org/api/0/tenders/327c00d16cff4c37be5bd4915cdff8a3/documents/4b65c046be264da4a430823d4376a757?download=d0ef7d53169041ed8093172c6ba6870c"
}
]
}
Reading the tender document¶
The document can be retrieved by requesting the url returned in structures from document list request in data[*].url. It is safe to provide the download URL to end user for download.
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.
Bidder Operations¶
Registration of Bid proposal¶
POST /tenders/64e93250be76435397e8c992ed4214d1/bidders/ HTTP/1.1
HTTP/1.1 201 Created
Location: /tenders/64e93250be76435397e8c992ed4214d1/bidders/4879d3f8ee2443169b5fbbc9f89fa607
Uploading Bid documents¶
POST /tenders/64e93250be76435397e8c992ed4214d1/bidders/4879d3f8ee2443169b5fbbc9f89fa607/documents HTTP/1.1
HTTP/1.1 201 Created
Location: /tenders/64e93250be76435397e8c992ed4214d1/bidders/4879d3f8ee2443169b5fbbc9f89fa607/documents/bd2e4c64179445cab93987fff3d58d23
Update of proposal¶
PUT /tenders/64e93250be76435397e8c992ed4214d1/bidders/4879d3f8ee2443169b5fbbc9f89fa607 HTTP/1.1
HTTP/1.1 200 OK
Updating Bid documents¶
POST /tenders/64e93250be76435397e8c992ed4214d1/bidders/4879d3f8ee2443169b5fbbc9f89fa607/documents HTTP/1.1
HTTP/1.1 201 Created
Location: /tenders/64e93250be76435397e8c992ed4214d1/bidders/4879d3f8ee2443169b5fbbc9f89fa607/documents/bd2e4c64179445cab93987fff3d58d23
Cancelling the proposal¶
DELETE /tenders/64e93250be76435397e8c992ed4214d1/bidders/4879d3f8ee2443169b5fbbc9f89fa607 HTTP/1.1
HTTP/1.1 200 OK
Retrieving the proposal¶
GET /tenders/64e93250be76435397e8c992ed4214d1/bidders/4879d3f8ee2443169b5fbbc9f89fa60 HTTP/1.1
HTTP/1.1 200 OK
Qualification Operations¶
Contract Awarding¶
POST /tenders/64e93250be76435397e8c992ed4214d1/awards HTTP/1.1
{
"data":{
"awardStatus": "pending"
}
}
HTTP/1.1 201 Created
Location: /tenders/64e93250be76435397e8c992ed4214d1/awards/ea36a10ad89649ccac253f23d8e0e80d HTTP/1.1
Disqualification¶
POST /tenders/64e93250be76435397e8c992ed4214d1/awards HTTP/1.1
{
"data":{
"awardStatus": "unsuccessful"
}
}
HTTP/1.1 201 Created
Location: /tenders/64e93250be76435397e8c992ed4214d1/awards/ea36a10ad89649ccac253f23d8e0e80d HTTP/1.1