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 the 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 with other database (we’ll call it “local”). The default sorting “by modification date” together with 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 has to pause for a while to let central database register some changes and attempt fetching subsequent page. The next_page guarantees that all changes from the last request are included in the 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:

GET /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/documents HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


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

{
  "data": [
    {
      "hash": "md5:00000000000000000000000000000000",
      "description": "document description modified",
      "title": "Notice.pdf",
      "url": "http://public.docs-sandbox.openprocurement.org/get/789735fb78a349da9f22a4bb3cb6b32f?KeyID=661750a8&Signature=b1y%252BWqNZyRMzQ08R49e8ajjS5Io1JCpsHXdiB7AyfjAYwJLqRtrU%2Fdnj3oSEhiAgw87czAsRdlpWiQi5k23xDA%253D%253D",
      "format": "application/pdf",
      "documentOf": "tender",
      "datePublished": "2017-06-24T18:05:46.316547+03:00",
      "author": "tender_owner",
      "documentType": "technicalSpecifications",
      "id": "0d34d2cd91f14650af325f081014e682",
      "dateModified": "2017-06-24T18:05:46.316590+03:00"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "author": "tender_owner",
      "title": "AwardCriteria.pdf",
      "url": "http://public.docs-sandbox.openprocurement.org/get/58577196924f4ba995155fc3dbc3b3fd?KeyID=661750a8&Signature=VgsAsmxGq3uGKvxdKmYic78oDL30P9P2EXXwNS%2FjTjtj0NVPKis7YeyLL%252B3NipGWXOPnglkj3QdMsTRqtsRmBA%253D%253D",
      "format": "application/pdf",
      "documentOf": "tender",
      "datePublished": "2017-06-24T18:05:46.511984+03:00",
      "id": "9f28e5dbb5254b8abba2b6eca5f46bb1",
      "dateModified": "2017-06-24T18:05:46.512018+03:00"
    }
  ]
}

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.