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.
uri: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.