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 a REST-ful interface that provides 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 have 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.9

Released: not released

New features:

0.8

Released: 2015-05-12

New features:

  • Stand-still period for each of the awards independently
  • Added new cancellation API

0.7

Released: 2015-03-13

New features:

  • Set title, classification and additionalClassifications required
  • Added validation identical cpv groups of items
  • Added upload tender documents by auction user
  • Closing tender by signing contract
  • Strict mode for patching operation
  • Cancalling active award

Modifications:

  • Authenticated couchdb access
  • Fixed authentication of PUT and PATCH methods
  • Optimized calls to db on start
  • Fixed deliveryLocation fields
  • Fixed edit format field in Documents
  • Fixed restrictions uploading documents of bid

0.6

Released: 2014-12-15

New features:

  • Token Broker authorization
  • Actor token authorization
  • Added Item.deliveryLocation
  • Pending complaints Tender completion blocking
  • Rescheduling of failed auctions

0.5

Released: not released

New features:

  • Actor token generation
  • Added Item.deliveryAddress
  • Award sequential review logic

Modifications:

  • Tender.deliveryDate moved to Item.deliveryDate

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:

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.

Authentication

Some of the API requests (especially the ones that are read-only GET requests) do not require any authenication. The other ones, that modify data into the database, require broker authentication via API key. Additionally, owner tokens are issued to facilitate multiple actor roles upon object creation.

API keys

API key is username to use with Basic Authenication scheme.

Owner tokens

Getting token

The token is issued when object is created in the database:

$ http --auth broker: -j POST https://api-sandbox.openprocurement.org/api/0/tenders data:=@./school-tender.json
POST /api/0/tenders HTTP/1.1
Authorization: Basic YnJva2VyOg==
Content-Type: application/json; charset=utf-8

{
    "data": {
        "enquiryPeriod": {
            "endDate": "2015-12-01"
        },
        "items": [
            {
                "description": "Послуги шкільних їдалень"
            }
        ],
        "minimalStep": {
            "amount": 35000,
            "currency": "UAH",
            "valueAddedTaxIncluded": true
        },
        "procuringEntity": {
            "address": {
                "countryName": "Україна",
                "locality": "м. Вінниця",
                "postalCode": "21027",
                "region": "м. Вінниця",
                "streetAddress": "вул. Стахурського. 22"
            },
            "contactPoint": {
                "name": "Куца Світлана Валентинівна",
                "telephone": "+380 (432) 46-53-02",
                "url": "http://sch10.edu.vn.ua/"
            },
            "identifier": {
                "id": "21725150",
                "legalName": "Заклад \"Загальноосвітня школа І-ІІІ ступенів № 10 Вінницької міської ради\"",
                "scheme": "UA-EDR"
            },
            "name": "ЗОСШ #10 м.Вінниці"
        },
        "tenderPeriod": {
            "endDate": "2015-12-10"
        },
        "value": {
            "amount": 500000,
            "currency": "UAH",
            "valueAddedTaxIncluded": true
        }
    }
}

HTTP/1.1 201 Created
Content-Type: application/json; charset=UTF-8
Location: https://api-sandbox.openprocurement.org/api/0/tenders/166b4a36611047a492d85c3693b86b4e

{
    "access": {
        "token": "953613dd25d6421588b2597504b747ed"
    },
    "data": {
        "dateModified": "2014-12-26T21:30:56.586789+02:00",
        "enquiryPeriod": {
            "endDate": "2015-12-01T00:00:00+02:00",
            "startDate": "2014-12-26T21:30:56.522694+02:00"
        },
        "id": "166b4a36611047a492d85c3693b86b4e",
        "items": [
            {
                "description": "Послуги шкільних їдалень"
            }
        ],
        "minimalStep": {
            "amount": 35000.0,
            "currency": "UAH",
            "valueAddedTaxIncluded": true
        },
        "owner": "broker",
        "procuringEntity": {
            "address": {
                "countryName": "Україна",
                "locality": "м. Вінниця",
                "postalCode": "21027",
                "region": "м. Вінниця",
                "streetAddress": "вул. Стахурського. 22"
            },
            "contactPoint": {
                "name": "Куца Світлана Валентинівна",
                "telephone": "+380 (432) 46-53-02",
                "url": "http://sch10.edu.vn.ua/"
            },
            "identifier": {
                "id": "21725150",
                "legalName": "Заклад \"Загальноосвітня школа І-ІІІ ступенів № 10 Вінницької міської ради\"",
                "scheme": "UA-EDR"
            },
            "name": "ЗОСШ #10 м.Вінниці"
        },
        "status": "active.enquiries",
        "tenderID": "UA-2014-12-26-000050",
        "tenderPeriod": {
            "endDate": "2015-12-10T00:00:00+02:00",
            "startDate": "2015-12-01T00:00:00+02:00"
        },
        "value": {
            "amount": 500000.0,
            "currency": "UAH",
            "valueAddedTaxIncluded": true
        }
    }
}

You can see the access with token in response. Its value can be used to modify objects further under “Owner role”.

Using token

You can pass access token in the following ways:

  1. acc_token URL query string parameter
  2. X-Access-Token HTTP request header
  3. access.token in the body of POST/PUT/PATCH request

See the example of the action with token passed as URL query string:

$ http --auth broker: -j PATCH https://api-sandbox.openprocurement.org/api/0/tenders/166b4a36611047a492d85c3693b86b4e?acc_token=953613dd25d6421588b2597504b747ed data:=@./school-tender-patch.json
PATCH /api/0/tenders/166b4a36611047a492d85c3693b86b4e?acc_token=953613dd25d6421588b2597504b747ed HTTP/1.1
Authorization: Basic YnJva2VyOg==
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": 9,
                "unit": {
                    "code": "MON",
                    "name": "month"
                }
            }
        ],
        "minimalStep": {
            "amount": 35000,
            "currency": "UAH",
            "valueAddedTaxIncluded": true
        },
        "tenderPeriod": {
            "endDate": "2015-06-07T10:00:00",
            "startDate": "2015-05-29T00: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-26T21:30:58.424362+02:00",
        "enquiryPeriod": {
            "endDate": "2015-05-29T00:00:00+02:00",
            "startDate": "2014-12-26T21:30:56.522694+02:00"
        },
        "id": "166b4a36611047a492d85c3693b86b4e",
        "items": [
            {
                "additionalClassifications": [
                    {
                        "description": "Послуги шкільних їдалень",
                        "id": "55.51.10.300",
                        "scheme": "ДКПП"
                    }
                ],
                "classification": {
                    "description": "Послуги з харчування у школах",
                    "id": "55523100-3",
                    "scheme": "CPV"
                },
                "description": "Послуги шкільних їдалень",
                "quantity": 9,
                "unit": {
                    "code": "MON",
                    "name": "month"
                }
            }
        ],
        "minimalStep": {
            "amount": 35000.0,
            "currency": "UAH",
            "valueAddedTaxIncluded": true
        },
        "owner": "broker",
        "procuringEntity": {
            "address": {
                "countryName": "Україна",
                "locality": "м. Вінниця",
                "postalCode": "21027",
                "region": "м. Вінниця",
                "streetAddress": "вул. Стахурського. 22"
            },
            "contactPoint": {
                "name": "Куца Світлана Валентинівна",
                "telephone": "+380 (432) 46-53-02",
                "url": "http://sch10.edu.vn.ua/"
            },
            "identifier": {
                "id": "21725150",
                "legalName": "Заклад \"Загальноосвітня школа І-ІІІ ступенів № 10 Вінницької міської ради\"",
                "scheme": "UA-EDR"
            },
            "name": "ЗОСШ #10 м.Вінниці"
        },
        "status": "active.enquiries",
        "tenderID": "UA-2014-12-26-000050",
        "tenderPeriod": {
            "endDate": "2015-06-07T10:00:00+02:00",
            "startDate": "2015-05-29T00:00:00+02:00"
        },
        "value": {
            "amount": 500000.0,
            "currency": "UAH",
            "valueAddedTaxIncluded": true
        }
    }
}

Responses

After processing API always provides 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 (see 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 are trying to read or write to objects or properties that you do 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 result of processing (like new object IDs, or 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 a response that describes tender

HTTP/1.1 200 OK

{
    "data":{
        "id": "64e93250be76435397e8c992ed4214d1",
        "tenderID": "UA-2014-DUS-156",
        "dateModified": "2014-10-27T08:06:58.158Z",
        "procuringEntity": {
            "name": "ДУС"б
            "identifier": {
                "name": "Державне управління справами",
                "scheme": "UA-EDR",
                "uid": "00037256"
            },
            "address": {
                "countryName": "Україна",
                "postalCode": "01220",
                "region": "м. Київ",
                "locality": "м. Київ",
                "streetAddress": "вул. Банкова, 11, корпус 1"
            }
        },
        "value": {
            "amount": 500,
            "currency": "UAH",
            "valueAddedTaxIncluded": true
        },
        "items": [
            {
                "description": "футляри до державних нагород",
                "classification": {
                    "scheme": "CPV",
                    "id": "44617100-9",
                    "description": "Cartons"
                },
                "additionalClassifications": [
                    {
                        "scheme": "ДКПП",
                        "id": "17.21.1",
                        "description": "папір і картон гофровані, паперова й картонна тара"
                    }
                ],
                "quantity": 5,
                "unit": {
                    "name": "item"
                },
                "deliveryDate": {
                    "endDate": "2014-11-20T00:00:00"
                }
            }
        ],
        "clarificationPeriod": {
            "endDate": "2014-10-31T00:00:00"
        },
        "tenderPeriod": {
            "startDate": "2014-11-03T00:00:00",
            "endDate": "2014-11-06T10:00:00"
        },
        "minimalStep": {
            "amount": 35,
            "currency", "UAH",
            "valueAddedTaxIncluded": true
        }
    }
}

Error Response

In the event of an error, the response body will contain an errors field at the top level. It 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:
  • Specific header name that caused the problem (in case of header location)
  • The field name causing the error (in case of body location)
description:

Verbose (human readable) description of the error.

Example Error Response

Sample below indicates 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 different combinations 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 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 to use this only during debugging.

jsonp:

?opt_jsonp=myCallback

Returns the output in JSON-P format instead of plain JSON. This allows 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.

Date Format: ISO 8601

The date format is ISO 8601.

http://imgs.xkcd.com/comics/iso_8601.png

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 the 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 has been 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 the created object. The body of response reveals the information about the created tender: its internal id (that matches the Location segment), its official tenderID and dateModified 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 the created object (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 dateModified datestamp.

Let’s try creating tender with more data, passing the procuringEntity of a tender:

$ http --auth broker: -j POST https://api-sandbox.openprocurement.org/api/0/tenders data:=@./school-tender.json
POST /api/0/tenders HTTP/1.1
Authorization: Basic YnJva2VyOg==
Content-Type: application/json; charset=utf-8

{
    "data": {
        "enquiryPeriod": {
            "endDate": "2015-12-01"
        },
        "items": [
            {
                "description": "Послуги шкільних їдалень"
            }
        ],
        "minimalStep": {
            "amount": 35000,
            "currency": "UAH",
            "valueAddedTaxIncluded": true
        },
        "procuringEntity": {
            "address": {
                "countryName": "Україна",
                "locality": "м. Вінниця",
                "postalCode": "21027",
                "region": "м. Вінниця",
                "streetAddress": "вул. Стахурського. 22"
            },
            "contactPoint": {
                "name": "Куца Світлана Валентинівна",
                "telephone": "+380 (432) 46-53-02",
                "url": "http://sch10.edu.vn.ua/"
            },
            "identifier": {
                "id": "21725150",
                "legalName": "Заклад \"Загальноосвітня школа І-ІІІ ступенів № 10 Вінницької міської ради\"",
                "scheme": "UA-EDR"
            },
            "name": "ЗОСШ #10 м.Вінниці"
        },
        "tenderPeriod": {
            "endDate": "2015-12-10"
        },
        "value": {
            "amount": 500000,
            "currency": "UAH",
            "valueAddedTaxIncluded": true
        }
    }
}

HTTP/1.1 201 Created
Content-Type: application/json; charset=UTF-8
Location: https://api-sandbox.openprocurement.org/api/0/tenders/166b4a36611047a492d85c3693b86b4e

{
    "access": {
        "token": "953613dd25d6421588b2597504b747ed"
    },
    "data": {
        "dateModified": "2014-12-26T21:30:56.586789+02:00",
        "enquiryPeriod": {
            "endDate": "2015-12-01T00:00:00+02:00",
            "startDate": "2014-12-26T21:30:56.522694+02:00"
        },
        "id": "166b4a36611047a492d85c3693b86b4e",
        "items": [
            {
                "description": "Послуги шкільних їдалень"
            }
        ],
        "minimalStep": {
            "amount": 35000.0,
            "currency": "UAH",
            "valueAddedTaxIncluded": true
        },
        "owner": "broker",
        "procuringEntity": {
            "address": {
                "countryName": "Україна",
                "locality": "м. Вінниця",
                "postalCode": "21027",
                "region": "м. Вінниця",
                "streetAddress": "вул. Стахурського. 22"
            },
            "contactPoint": {
                "name": "Куца Світлана Валентинівна",
                "telephone": "+380 (432) 46-53-02",
                "url": "http://sch10.edu.vn.ua/"
            },
            "identifier": {
                "id": "21725150",
                "legalName": "Заклад \"Загальноосвітня школа І-ІІІ ступенів № 10 Вінницької міської ради\"",
                "scheme": "UA-EDR"
            },
            "name": "ЗОСШ #10 м.Вінниці"
        },
        "status": "active.enquiries",
        "tenderID": "UA-2014-12-26-000050",
        "tenderPeriod": {
            "endDate": "2015-12-10T00:00:00+02:00",
            "startDate": "2015-12-01T00:00:00+02:00"
        },
        "value": {
            "amount": 500000.0,
            "currency": "UAH",
            "valueAddedTaxIncluded": true
        }
    }
}

And again we have 201 Created response code, Location header and body with extra id, tenderID, and dateModified 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 supplementing it with all other essential properties:

$ http --auth broker: -j PATCH https://api-sandbox.openprocurement.org/api/0/tenders/166b4a36611047a492d85c3693b86b4e?acc_token=953613dd25d6421588b2597504b747ed data:=@./school-tender-patch.json
PATCH /api/0/tenders/166b4a36611047a492d85c3693b86b4e?acc_token=953613dd25d6421588b2597504b747ed HTTP/1.1
Authorization: Basic YnJva2VyOg==
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": 9,
                "unit": {
                    "code": "MON",
                    "name": "month"
                }
            }
        ],
        "minimalStep": {
            "amount": 35000,
            "currency": "UAH",
            "valueAddedTaxIncluded": true
        },
        "tenderPeriod": {
            "endDate": "2015-06-07T10:00:00",
            "startDate": "2015-05-29T00: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-26T21:30:58.424362+02:00",
        "enquiryPeriod": {
            "endDate": "2015-05-29T00:00:00+02:00",
            "startDate": "2014-12-26T21:30:56.522694+02:00"
        },
        "id": "166b4a36611047a492d85c3693b86b4e",
        "items": [
            {
                "additionalClassifications": [
                    {
                        "description": "Послуги шкільних їдалень",
                        "id": "55.51.10.300",
                        "scheme": "ДКПП"
                    }
                ],
                "classification": {
                    "description": "Послуги з харчування у школах",
                    "id": "55523100-3",
                    "scheme": "CPV"
                },
                "description": "Послуги шкільних їдалень",
                "quantity": 9,
                "unit": {
                    "code": "MON",
                    "name": "month"
                }
            }
        ],
        "minimalStep": {
            "amount": 35000.0,
            "currency": "UAH",
            "valueAddedTaxIncluded": true
        },
        "owner": "broker",
        "procuringEntity": {
            "address": {
                "countryName": "Україна",
                "locality": "м. Вінниця",
                "postalCode": "21027",
                "region": "м. Вінниця",
                "streetAddress": "вул. Стахурського. 22"
            },
            "contactPoint": {
                "name": "Куца Світлана Валентинівна",
                "telephone": "+380 (432) 46-53-02",
                "url": "http://sch10.edu.vn.ua/"
            },
            "identifier": {
                "id": "21725150",
                "legalName": "Заклад \"Загальноосвітня школа І-ІІІ ступенів № 10 Вінницької міської ради\"",
                "scheme": "UA-EDR"
            },
            "name": "ЗОСШ #10 м.Вінниці"
        },
        "status": "active.enquiries",
        "tenderID": "UA-2014-12-26-000050",
        "tenderPeriod": {
            "endDate": "2015-06-07T10:00:00+02:00",
            "startDate": "2015-05-29T00:00:00+02:00"
        },
        "value": {
            "amount": 500000.0,
            "currency": "UAH",
            "valueAddedTaxIncluded": true
        }
    }
}

We see the added properies have merged with existing tender data. Additionally, the dateModified property was 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 the created tender. 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 uploaded document. 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 --auth broker: -j POST https://api-sandbox.openprocurement.org/api/0/tenders/9b791af414c64892bb9b1f41e91a84af/questions data:=@./question.json
POST /api/0/tenders/9b791af414c64892bb9b1f41e91a84af/questions HTTP/1.1
Authorization: Basic YnJva2VyOg==
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": "UA-EDR",
                "uri": "http://sch10.edu.vn.ua/"
            },
            "name": "ДКП «Школяр»"
        },
        "description": "Просимо додати таблицю потрібної калорійності харчування по місяцях",
        "title": "Калорійність по місяцях"
    }
}

HTTP/1.1 201 Created
Content-Type: application/json; charset=UTF-8
Location: https://api-sandbox.openprocurement.org/api/0/tenders/9b791af414c64892bb9b1f41e91a84af/questions/3dfbb32cc2f44f75bfe5b44a3a0c287c

{
    "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": "UA-EDR",
                "uri": "http://sch10.edu.vn.ua/"
            },
            "name": "ДКП «Школяр»"
        },
        "date": "2014-12-26T23:43:08.277770+02:00",
        "description": "Просимо додати таблицю потрібної калорійності харчування по місяцях",
        "id": "3dfbb32cc2f44f75bfe5b44a3a0c287c",
        "title": "Калорійність по місяцях"
    }
}

Bidder is answering them:

$ http --auth broker: -j PATCH https://api-sandbox.openprocurement.org/api/0/tenders/9b791af414c64892bb9b1f41e91a84af/questions/3dfbb32cc2f44f75bfe5b44a3a0c287c?acc_token=7face74d65fe4d37ba752aac8f409a0c data:=@./answer.json
PATCH /api/0/tenders/9b791af414c64892bb9b1f41e91a84af/questions/3dfbb32cc2f44f75bfe5b44a3a0c287c?acc_token=7face74d65fe4d37ba752aac8f409a0c HTTP/1.1
Authorization: Basic YnJva2VyOg==
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-26T23:43:08.277770+02:00",
        "description": "Просимо додати таблицю потрібної калорійності харчування по місяцях",
        "id": "3dfbb32cc2f44f75bfe5b44a3a0c287c",
        "title": "Калорійність по місяцях"
    }
}

And one can retrieve the questions list:

$ http -j https://api-sandbox.openprocurement.org/api/0/tenders/17f405f826424ae4949e98ff915412c9/questions
GET /api/0/tenders/17f405f826424ae4949e98ff915412c9/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-26T23:27:51.300952+02:00",
            "description": "Просимо додати таблицю потрібної калорійності харчування по місяцях",
            "id": "88fe3d515eda494983a3973e699ba30d",
            "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 active.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 the uploaded documents:

$ 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
        }
    }
}

Auction

After auction is scheduled anybody can visit it to watch. The auction can be reached at Tender.auctionUrl:

$ http -j https://api-sandbox.openprocurement.org/api/0/tenders/e9ecf1e8f5da47c68d47f8d2c1499946
GET /api/0/tenders/e9ecf1e8f5da47c68d47f8d2c1499946 HTTP/1.1
Content-Type: application/json; charset=utf-8



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

{
    "data": {
        "auctionPeriod": {
            "startDate": "2014-12-04T00:00:00+02:02"
        },
        "auctionUrl": "http://auction-sandbox.openprocurement.org/tenders/e9ecf1e8f5da47c68d47f8d2c1499946",
        "bids": [
            {
                "value": {
                    "amount": 475000.0,
                    "currency": "UAH",
                    "valueAddedTaxIncluded": true
                }
            },
            {
                "value": {
                    "amount": 480000.0,
                    "currency": "UAH",
                    "valueAddedTaxIncluded": true
                }
            }
        ],
        "complaints": [
            {
                "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-03T22:59:57.858006+02:00",
                "description": "Умови виставлені замовником не містять достатньо інформації, щоб заявка мала сенс.",
                "documents": [
                    {
                        "dateModified": "2014-12-03T23:00:02.929901+02:00",
                        "datePublished": "2014-12-03T23:00:02.929858+02:00",
                        "format": "text/plain",
                        "id": "af38e9210b0d43aab68491fcf726b8e9",
                        "title": "ComplaintResolution.pdf",
                        "url": "http://api-sandbox.openprocurement.org/api/0/tenders/e9ecf1e8f5da47c68d47f8d2c1499946/complaints/8c7e05c5bd1a4fca927298677d6e5399/documents/af38e9210b0d43aab68491fcf726b8e9?download=578e4f998b9e444d9c78fd9fd13b3fe3"
                    }
                ],
                "id": "8c7e05c5bd1a4fca927298677d6e5399",
                "status": "declined",
                "title": "Недостатньо інформації"
            }
        ],
        "dateModified": "2014-12-03T23:00:27.392833+02:00",
        "documents": [
            {
                "dateModified": "2014-12-03T23:00:06.170772+02:00",
                "datePublished": "2014-12-03T23:00:06.170728+02:00",
                "format": "text/plain",
                "id": "357a3f75f58e4519a548e2bff502a066",
                "title": "Notice.pdf",
                "url": "http://api-sandbox.openprocurement.org/api/0/tenders/e9ecf1e8f5da47c68d47f8d2c1499946/documents/357a3f75f58e4519a548e2bff502a066?download=b35eb8140f62471d8cdb4f0658fb30c2"
            },
            {
                "dateModified": "2014-12-03T23:00:09.292528+02:00",
                "datePublished": "2014-12-03T23:00:09.292481+02:00",
                "format": "text/plain",
                "id": "ac4306402dba448996c5fe7151cd01ca",
                "title": "AwardCriteria.pdf",
                "url": "http://api-sandbox.openprocurement.org/api/0/tenders/e9ecf1e8f5da47c68d47f8d2c1499946/documents/ac4306402dba448996c5fe7151cd01ca?download=7471f23ba2c346b2a539aa96a9bcca04"
            },
            {
                "dateModified": "2014-12-03T23:00:12.252334+02:00",
                "datePublished": "2014-12-03T23:00:09.292481+02:00",
                "format": "text/plain",
                "id": "ac4306402dba448996c5fe7151cd01ca",
                "title": "AwardCriteria-v2.pdf",
                "url": "http://api-sandbox.openprocurement.org/api/0/tenders/e9ecf1e8f5da47c68d47f8d2c1499946/documents/ac4306402dba448996c5fe7151cd01ca?download=6181d1e5014d438f8b71e55c0ae8dd7b"
            }
        ],
        "enquiryPeriod": {
            "endDate": "2015-05-29T00:00:00+02:02",
            "startDate": "2014-12-03T22:59:53.557296+02:00"
        },
        "id": "e9ecf1e8f5da47c68d47f8d2c1499946",
        "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 м.Вінниці"
        },
        "questions": [
            {
                "answer": "Таблицю додано в файлі \"Kalorijnist.xslx\"",
                "date": "2014-12-03T23:00:14.683574+02:00",
                "description": "Просимо додати таблицю потрібної калорійності харчування по місяцях",
                "id": "e0c46b4e52bd4b05bbc9f41a657da1f0",
                "title": "Калорійність по місяцях"
            }
        ],
        "status": "active.auction",
        "tenderID": "UA-e9ecf1e8f5da47c68d47f8d2c1499946",
        "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
        }
    }
}

And bidders can find out their participation URLs via their bids:

$ http -j https://api-sandbox.openprocurement.org/api/0/tenders/e9ecf1e8f5da47c68d47f8d2c1499946/bids/8565ea796fcd40ddaf35ff67f98cb33a
GET /api/0/tenders/e9ecf1e8f5da47c68d47f8d2c1499946/bids/8565ea796fcd40ddaf35ff67f98cb33a HTTP/1.1
Content-Type: application/json; charset=utf-8



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

{
    "data": {
        "participationUrl": "http://auction-sandbox.openprocurement.org/tenders/e9ecf1e8f5da47c68d47f8d2c1499946?bidder_id=8565ea796fcd40ddaf35ff67f98cb33a",
        "value": {
            "amount": 475000.0,
            "currency": "UAH",
            "valueAddedTaxIncluded": true
        }
    }
}

See the Bid.participationUrl in the response. Similar, but different, URL can be retrieved for other participants:

$ http -j https://api-sandbox.openprocurement.org/api/0/tenders/e9ecf1e8f5da47c68d47f8d2c1499946/bids/5f040175aed54468b424aefd4780a2b7
GET /api/0/tenders/e9ecf1e8f5da47c68d47f8d2c1499946/bids/5f040175aed54468b424aefd4780a2b7 HTTP/1.1
Content-Type: application/json; charset=utf-8



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

{
    "data": {
        "participationUrl": "http://auction-sandbox.openprocurement.org/tenders/e9ecf1e8f5da47c68d47f8d2c1499946?bidder_id=5f040175aed54468b424aefd4780a2b7",
        "value": {
            "amount": 480000.0,
            "currency": "UAH",
            "valueAddedTaxIncluded": true
        }
    }
}

Confirming qualification

Qualification comission registers its decision via the 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"
    }
}

Cancelling tender

Tender creator can cancel tender anytime. The following steps should be applied:

  1. Prepare cancellation request
  2. Fill it with the protocol describing the cancellation reasons
  3. Cancel the tender with the reasons prepared.

Only the request that has been activated (3rd step above) has power to cancel tender. I.e. you have to not only prepare cancellation request but to activate it as well.

See Cancellation data structure for details.

Preparing the cancellation request

POST /tenders/{id}/cancellations

You should pass reason, status defaults to pending. id is autogenerated and passed in the Location header of response.

Location: /tenders/{id}/cancellations/{cancellation-id}

Filling cancellation with protocol and supplementary documentation

Upload the file contents

POST /tenders/{id}/cancellations/{cancellation-id}/documents

Change the document description and other properties

PATCH /tenders/{id}/cancellations/{cancellation-id}/documents/{document-id}

Upload new version of the document

PUT /tenders/{id}/cancellations/{cancellation-id}/documents/{document-id}

Activating the request and cancelling tender

PATCH /tenders/{id}/cancellations/{cancellation-id}

{“data”:{“status”:”active”}}

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

  • tender code (in procuring organization management system)
  • periodicity of the tender (annual, quarterly, etc.)
  • item being procured
  • some other info
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, required

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:

Value, required

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, required

List that contains 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.

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 with information about tenderers, their proposal and other qualification documentation.

OpenContracting Description: A list of all the companies who entered submissions for the tender.

minimalStep:

Value, required

The minimal step of auction (reduction). Validation rules:

  • amount should be less then Tender.value.amount
  • currency should either be absent or match Tender.value.currency
  • valueAddedTaxIncluded should either be absent or match Tender.value.valueAddedTaxIncluded
awards:

List of Award objects

All qualifications (disqualifications and awards).

enquiryPeriod:

Period, required

Period when questions are allowed. At least endDate has to be provided.

OpenContracting Description: The period during which enquiries may be made and will be answered.

tenderPeriod:

Period, required

Period when bids can be submitted. At least endDate has to be provided.

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

Awarding process period.

OpenContracting Description: The date or period on which an award is anticipated to be made.

status:

string

active.enquiries:
 Enquiries period (enquiries)
active.tendering:
 Tendering period (tendering)
active.auction:Auction period (auction)
active.qualification:
 Winner qualification (qualification)
active.awarded:Standstill period (standstill)
unsuccessful:Unsuccessful tender (unsuccessful)
complete:Complete tender (complete)
cancelled:Cancelled tender (cancelled)

Status of the Tender.

cancellations:

List of Cancellation objects.

Contains 1 object with active status in case of cancelled Tender.

The Cancellation object describes the reason of tender cancellation contains accompanying documents if any.

revisions:

List of Revision objects, autogenerated

Historical changes to Tender object properties.

The Tender dates should be sequential:

  • Current time
  • enquiryPeriod.startDate
  • enquiryPeriod.endDate
  • tenderPeriod.startDate
  • tenderPeriod.endDate

Organization

Schema

name:

string, multilingual

OpenContracting Description: The common name of the organization.

identifier:

Identifier

OpenContracting Description: The primary identifier for this organization.

additionalIdentifiers:
 

List of Identifier objects

address:

Address, required

contactPoint:

ContactPoint, required

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, required

OpenContracting Description: The identifier of the organization in the selected scheme.

The allowed codes are the ones found in “Organisation Registration Agency” codelist of IATI Standard with addition of UA-EDR code for organizations registered in Ukraine (EDRPOU and IPN).

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

OpenContracting Description: The street address. For example, 1600 Amphitheatre Pkwy.

locality:

string

OpenContracting Description: The locality. For example, Mountain View.

region:

string

OpenContracting Description: The region. For example, CA.

postalCode:

string

OpenContracting Description: The postal code. For example, 94043.

countryName:

string, required

OpenContracting Description: The country name. For example, United States.

ContactPoint

Schema

name:

string, multilingual, required

OpenContracting Description: The name of the contact person, department, or contact point, for correspondence relating to this contracting process.

email:

email

OpenContracting Description: The e-mail address of the contact point/person.

telephone:

string

OpenContracting Description: The telephone number of the contact point/person. This should include the international dialling code.

faxNumber:

string

OpenContracting Description: The fax number of the contact point/person. This should include the international dialling code.

url:

url

OpenContracting Description: A web address for the contact point/person.

Either email or telephone field has to be provided.

Item

Schema

description:

string, multilingual, required

OpenContracting Description: A description of the goods, services to be provided.

classification:

Classification

OpenContracting Description: The primary classification for the item. See the itemClassificationScheme to identify preferred classification lists, including CPV and GSIN.

It is mandatory for classification.scheme to be CPV. The classification.id should be valid CPV code.

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.

It is mandatory to have at least one item with ДКПП as scheme.

unit:

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

deliveryDate:

Period

Period during which the item should be delivered.

deliveryAddress:
 

Address

Address, where the item should be delivered.

deliveryLocation:
 

dictionary

Geographical coordinates of delivery location. Element consist of the following items:

latitude:string, required
longitude:string, required
elevation:string, optional, usually not used

deliveryLocation usually takes precedence over deliveryAddress if both are present.

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.

Unit

Schema

code:

string, required

UN/CEFACT Recommendation 20 unit code.

name:

string

OpenContracting Description: Name of the unit

Document

Schema

id:

string, autogenerated

documentType:

string

Possible values for Tender

  • notice - Tender notice

    The formal notice that gives details of a tender. This may be a link to a downloadable document, to a web page, or to an official gazette in which the notice is contained.

  • biddingDocuments - Bidding Documents

    Information for potential suppliers, describing the goals of the contract (e.g. goods and services to be procured), and the bidding process.

  • technicalSpecifications - Technical Specifications

    Detailed technical information about goods or services to be provided.

  • evaluationCriteria - Evaluation Criteria

    Information about how bids will be evaluated.

  • clarifications - Clarifications to bidders questions

    Including replies to issues raised in pre-bid conferences.

  • eligibilityCriteria - Eligibility Criteria

    Detailed documents about the eligibility of bidders.

  • shortlistedFirms - Shortlisted Firms

  • riskProvisions - Provisions for management of risks and liabilities

  • billOfQuantity - Bill Of Quantity

  • bidders - Information on bidders

    Information on bidders or participants, their validation documents and any procedural exemptions for which they qualify.

  • conflictOfInterest - Conflicts of interest uncovered

  • debarments - Debarments issued

Possible values for Award

  • notice - Award Notice

    The formal notice that gives details of the contract award. This may be a link to a downloadable document, to a web page, or to an official gazette in which the notice is contained.

  • evaluationReports - Evaluation report

    Report on the evaluation of the bids and the application of the evaluation criteria, including the justification fo the award.

  • winningBid - Winning Bid

  • complaints - Complaints and decisions

Possible values for Contract

  • notice - Contract notice

    The formal notice that gives details of a contract being signed and valid to start implementation. This may be a link to a downloadable document, to a web page, or to an official gazette in which the notice is contained.

  • contractSigned - Signed Contract

  • contractArrangements - Arrangements for ending contract

  • contractSchedule - Schedules and milestones

  • contractAnnexe - Annexes to the Contract

  • contractGuarantees - Guarantees

  • subContract - Subcontracts

title:

string, multilingual

OpenContracting Description: The document title.

description:

string, multilingual

OpenContracting Description: A short description of the document. In the event the document is not accessible online, the description field can be used to describe arrangements for obtaining a copy of the document.

format:

string

OpenContracting Description: The format of the document taken from the IANA Media Types code list, with the addition of one extra value for ‘offline/print’, used when this document entry is being used to describe the offline publication of a document.

url:

string, autogenerated

OpenContracting Description: Direct link to the document or attachment.

datePublished:

string, Date

OpenContracting Description: The date on which the document was first published.

dateModified:

string, Date

OpenContracting Description: Date that the document was last modified

language:

string

OpenContracting Description: Specifies the language of the linked document using either two-digit ISO 639-1, or extended BCP47 language tags.

Bid

Schema

tenderers:

List of Organization objects

date:

string, Date

id:

uid, autogenerated

status:

string

Possible values are:

  • registration
  • validBid
  • invalidBid
value:

Value, required

Validation rules:

  • amount should be less than Tender.value.amout
  • currency should either be absent or match Tender.value.currency
  • valueAddedTaxIncluded should either be absent or match Tender.value.valueAddedTaxIncluded
documents:

List of Document objects

Award

Schema

id:

string, autogenerated, read-only

OpenContracting Description: The identifier for this award.

bid_id:

string, autogenerated, read-only

The Id of a bid that the award relates to.

title:

string, multilingual

OpenContracting Description: Award title.

description:

string, multilingual

OpenContracting Description: Award description.

status:

string

OpenContracting Description: The current status of the award drawn from the awardStatus codelist.

Possible values are:

  • pending - the award is under review of qualification committee
  • unsuccessful - the award has been rejected by qualification comittee
  • active - the tender is awarded to the bidder from the bid_id
  • cancelled - the award has been cancelled by complaint review body
date:

string, Date, autogenerated, read-only

OpenContracting Description: The date of the contract award.

value:

List of Value objects, autogenerated, read-only

OpenContracting Description: The total value of this award.

suppliers:

List of Organization objects, autogenerated, read-only

OpenContracting Description: The suppliers awarded with this award.

items:

List of Item objects, autogenerated, read-only

OpenContracting Description: The goods and services awarded in this award, broken into line items wherever possible. Items should not be duplicated, but the quantity specified instead.

documents:

List of Document objects

OpenContracting Description: All documents and attachments related to the award, including any notices.

complaints:

List of Complaint objects

contracts:

List of Contract objects

complaintPeriod:
 

Period

The timeframe when complaints can be submitted.

Question

Schema

id:

uid, autogenerated

author:

Organization, required

Who is asking a question (contactPoint - person, identification - organization that person represents).

title:

string, required

Title of the question.

description:

string

Description of the question.

date:

string, Date, autogenerated

Date of posting.

answer:

string

Answer for the question asked.

Complaint

Schema

id:

uid, autogenerated

author:

Organization, required

Organization filing a complaint (contactPoint - person, identification - organization that person represents).

title:

string, required

Title of the complaint.

description:

Description of the issue.

date:

string, Date, autogenerated

Date of posting.

status:

string

Possible values are:

  • pending
  • invalid
  • declined
  • resolved
resolution:

string

documents:

List of Document objects

Contract

Schema

id:

uid, autogenerated

OpenContracting Description: The identifier for this contract.

awardID:

string, required

OpenContracting Description: The Award.id against which this contract is being issued.

title:

string, required

OpenContracting Description: Contract title

description:

string

OpenContracting Description: Contract description

status:

string, required

OpenContracting Description: The current status of the contract.

Possible values are:

  • pending - this contract has been proposed, but is not yet in force. It may be awaiting signature.
  • active - this contract has been signed by all the parties, and is now legally in force.
  • cancelled - this contract has been cancelled prior to being signed.
  • terminated - this contract was signed and in force, and has now come to a close. This may be due to a successful completion of the contract, or may be early termination due to some non-completion issue.
period:

Period

OpenContracting Description: The start and end date for the contract.

value:

Value

OpenContracting Description: The total value of this contract.

dateSigned:

string, Date, autogenerated

OpenContracting Description: The date the contract was signed. In the case of multiple signatures, the date of the last signature.

documents:

List of Document objects

OpenContracting Description: All documents and attachments related to the contract, including any notices.

Period

Schema

startDate:

string, Date

OpenContracting Description: The start date for the period.

endDate:

string, Date

OpenContracting Description: The end date for the period.

startDate should always precede endDate.

Date

Date/time in Date Format: ISO 8601.

Value

Schema

amount:

float, required

OpenContracting Description: Amount as a number.

Should be positive.

currency:

string, required

OpenContracting Description: The currency in 3-letter ISO 4217 format.

valueAddedTaxIncluded:
 

bool, required

Revision

Schema

date:

string, Date

Date when changes were recorded.

changes:

List of :Change objects

Cancellation

Schema

id:

uid, autogenerated

reason:

string, multilingual, required

The reason, why Tender is being cancelled.

status:

string

Possible values are:
pending:Default. The request is being prepared.
active:Cancellation activated.
documents:

List of Document objects

Documents accompanying the Cancellation: Protocol of Tender Committee with decision to cancel the Tender.

date:

string, Date

Cancellation date.

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:

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

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

$ 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/bids/ HTTP/1.1
HTTP/1.1 201 Created
Location: /tenders/64e93250be76435397e8c992ed4214d1/bids/4879d3f8ee2443169b5fbbc9f89fa607

Uploading Bid documents

POST /tenders/64e93250be76435397e8c992ed4214d1/bids/4879d3f8ee2443169b5fbbc9f89fa607/documents HTTP/1.1
HTTP/1.1 201 Created
Location: /tenders/64e93250be76435397e8c992ed4214d1/bids/4879d3f8ee2443169b5fbbc9f89fa607/documents/bd2e4c64179445cab93987fff3d58d23

Update of proposal

PATCH /tenders/64e93250be76435397e8c992ed4214d1/bids/4879d3f8ee2443169b5fbbc9f89fa607 HTTP/1.1
HTTP/1.1 200 OK

Updating Bid documents

PUT /tenders/64e93250be76435397e8c992ed4214d1/bids/4879d3f8ee2443169b5fbbc9f89fa607/documents/bd2e4c64179445cab93987fff3d58d23 HTTP/1.1
HTTP/1.1 200 Created

{
    "data": {
        ...
        "id": "ddd45992f1c545b9b03302205962265b",
        ...
        "url": ".../tenders/64e93250be76435397e8c992ed4214d1/bids/4879d3f8ee2443169b5fbbc9f89fa607/documents/bd2e4c64179445cab93987fff3d58d23?download=7d56370415484488bbb621b8cea6315b"
    }
}

Cancelling the proposal

DELETE /tenders/64e93250be76435397e8c992ed4214d1/bids/4879d3f8ee2443169b5fbbc9f89fa607 HTTP/1.1
HTTP/1.1 200 OK

Bids Listing

After auction ends it is possible to get full information about bids and bidders that submitted them:

GET /api/0/tenders/6f73bf0f7f734f459f7e37e3787054a0/bids HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8

{
    "data": [
        {
            "date": "2014-12-16T04:44:23.569815+02:00",
            "documents": [
                {
                    "dateModified": "2014-12-16T04:44:25.010930+02:00",
                    "datePublished": "2014-12-16T04:44:25.010885+02:00",
                    "format": "text/plain",
                    "id": "ff001412c60c4164a0f57101e4eaf8aa",
                    "title": "Proposal.pdf",
                    "url": "http://api-sandbox.openprocurement.org/api/0/tenders/6f73bf0f7f734f459f7e37e3787054a0/bids/f7fc1212f9f140bba5c4e3cd4f2b62d9/documents/ff001412c60c4164a0f57101e4eaf8aa?download=4f45bbd414104cd78faf620208efd824"
                }
            ],
            "id": "f7fc1212f9f140bba5c4e3cd4f2b62d9",
            "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": "UA-EDR",
                        "uri": "http://sch10.edu.vn.ua/"
                    },
                    "name": "ДКП «Школяр»"
                }
            ],
            "value": {
                "amount": 475000.0,
                "currency": "UAH",
                "valueAddedTaxIncluded": true
            }
        },
        {
            "date": "2014-12-16T04:44:26.973605+02:00",
            "id": "25261352d2d042ff8639f65b68e95e9f",
            "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": "UA-EDR",
                        "uri": "http://sch10.edu.vn.ua/"
                    },
                    "name": "ДКП «Меридіан»"
                }
            ],
            "value": {
                "amount": 480000.0,
                "currency": "UAH",
                "valueAddedTaxIncluded": true
            }
        },
        {
            "date": "2014-12-16T04:44:27.976478+02:00",
            "id": "7ec725815ef448a9b857129024395638",
            "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": "UA-EDR",
                        "uri": "http://sch10.edu.vn.ua/"
                    },
                    "name": "ДКП «Меридіан2»"
                }
            ],
            "value": {
                "amount": 482000.0,
                "currency": "UAH",
                "valueAddedTaxIncluded": true
            }
        }
    ]
}

Retrieving the proposal

Individual bid can be retrieved via its id:

GET /api/0/tenders/6f73bf0f7f734f459f7e37e3787054a0/bids/f7fc1212f9f140bba5c4e3cd4f2b62d9 HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8

{
    "data": {
        "date": "2014-12-16T04:44:23.569815+02:00",
        "documents": [
            {
                "dateModified": "2014-12-16T04:44:25.010930+02:00",
                "datePublished": "2014-12-16T04:44:25.010885+02:00",
                "format": "text/plain",
                "id": "ff001412c60c4164a0f57101e4eaf8aa",
                "title": "Proposal.pdf",
                "url": "http://api-sandbox.openprocurement.org/api/0/tenders/6f73bf0f7f734f459f7e37e3787054a0/bids/f7fc1212f9f140bba5c4e3cd4f2b62d9/documents/ff001412c60c4164a0f57101e4eaf8aa?download=4f45bbd414104cd78faf620208efd824"
            }
        ],
        "id": "f7fc1212f9f140bba5c4e3cd4f2b62d9",
        "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": "UA-EDR",
                    "uri": "http://sch10.edu.vn.ua/"
                },
                "name": "ДКП «Школяр»"
            }
        ],
        "value": {
            "amount": 475000.0,
            "currency": "UAH",
            "valueAddedTaxIncluded": true
        }
    }
}

Qualification Operations

When auction is over, the qualification process starts. The status of tender is active.qualification then. Right after results are submitted to Central DB, there is award generated for auction winner.

Listing awards

The pending award can be retrieved via request to list all available awards:

GET /tenders/64e93250be76435397e8c992ed4214d1/awards HTTP/1.1

When the award is in pending status, it means that procuring entity has to review documents describing the bid and other bidder documents.

Disqualification

The protocol of Qualification Committee decision should be uploaded as document into award and later its status should switch to either active (if it is accepted) or unsuccessful (if rejected).

POST /tenders/64e93250be76435397e8c992ed4214d1/awards/{}/documents HTTP/1.1

The Qualification Comittee can upload several documents, for example, decisions to prolong the qualification process - in order to allow the bidder to collect all necessary documents or correct errors. Such documents would help to have procedure as transparent as possible and will reduce risk of cancellation by Complaint Review Body.

PATCH /tenders/64e93250be76435397e8c992ed4214d1/awards/{} HTTP/1.1

{
    "data":{
        "status": "unsuccessful"
    }
}
HTTP/1.1 200 OK
Location: /tenders/64e93250be76435397e8c992ed4214d1/awards/ea36a10ad89649ccac253f23d8e0e80d HTTP/1.1

Note that after award rejection the next bid in the value-sorted bid sequence becomes subject of subsequent award. For convenience you can use the Location response header from the response above that is pointing to an award in “pending” state.

Contract Awarding

Protocol upload:

POST /tenders/64e93250be76435397e8c992ed4214d1/awards/{}/documents HTTP/1.1

Confirming the Award:

PATCH /tenders/64e93250be76435397e8c992ed4214d1/awards/{} HTTP/1.1

{
    "data":{
        "status": "active"
    }
}
HTTP/1.1 200 OK

The procuring entity can wait until bidder provides all missing documents (licenses, certificates, statements, etc.) or update original bid documents to correct errors. Alternatively, they can reject the bid if provided documents do not satisfy the pass/fail criteria of tender (even before full package of supplementary documents is available).

Cancelling Active Award

Sometimes Bidder refuses to sign the contract even after passing qualification process. In this case Procuring Entity is expected to be able to reject approved award and disqualify Bid afterwards.

After we have Award with active status:

GET /tenders/64e93250be76435397e8c992ed4214d1/awards/fbccb31b3b864c7b80ca19ebd510ee72 HTTP/1.1

{
    "data": {
        "status": "active",
        "contracts": [
            {
                "status": "pending",
                "awardID": "fbccb31b3b864c7b80ca19ebd510ee72",
                "id": "40d0fe977c0f4560a1de71ab122a6fae"
            }
        ],
        "suppliers": [
            {
                "contactPoint": {
                    "name": "Розалія Піддубний",
                    "telephone": "014 883 59 49"
                },
                "identifier": {
                    "scheme": "UA-EDR",
                    "id": "0000741"
                },
                "name": "Чуйко-Скопенко",
                "address": {
                    "postalCode": "21100",
                    "countryName": "Україна",
                    "streetAddress": "21284 Данько Cape",
                    "region": "м. Вінниця",
                    "locality": "м. Вінниця"
                }
            }
        ],
        "bid_id": "1af1d3169c5947c3a30450d2f8c8e7a2",
        "value": {
            "currency": "UAH",
            "amount": 39000.0,
            "valueAddedTaxIncluded": true
        },
        "date": "2015-03-04T14:21:01.006685+02:00",
        "id": "fbccb31b3b864c7b80ca19ebd510ee72"
    }
}

There is need to cancel it:

PATCH /tenders/64e93250be76435397e8c992ed4214d1/awards/fbccb31b3b864c7b80ca19ebd510ee72 HTTP/1.1

{
    "data":{
        "status": "cancelled"
    }
}

HTTP/1.1 200 OK
Location: /tenders/6d01584306ad4138bd78c9cf41056ea3/awards/77272dfb3e9645b4ab499e1d42913b87 HTTP/1.1

{
    "data": {
        "status": "cancelled",
        "contracts": [
            {
                "status": "cancelled",
                "awardID": "fbccb31b3b864c7b80ca19ebd510ee72",
                "id": "40d0fe977c0f4560a1de71ab122a6fae"
            }
        ],
        "suppliers": [
            {
                "contactPoint": {
                    "name": "Розалія Піддубний",
                    "telephone": "014 883 59 49"
                },
                "identifier": {
                    "scheme": "UA-EDR",
                    "id": "0000741"
                },
                "name": "Чуйко-Скопенко",
                "address": {
                    "postalCode": "21100",
                    "countryName": "Україна",
                    "streetAddress": "21284 Данько Cape",
                    "region": "м. Вінниця",
                    "locality": "м. Вінниця"
                }
            }
        ],
        "bid_id": "1af1d3169c5947c3a30450d2f8c8e7a2",
        "value": {
            "currency": "UAH",
            "amount": 39000.0,
            "valueAddedTaxIncluded": true
        },
        "date": "2015-03-04T14:21:01.006685+02:00",
        "id": "fbccb31b3b864c7b80ca19ebd510ee72"
    }
}

Note that there is Location header returned that aids in locating the “fresh” award that is most likely subject for disqualification:

POST /tenders/64e93250be76435397e8c992ed4214d1/awards/ea36a10ad89649ccac253f23d8e0e80d/documents HTTP/1.1
PATCH /tenders/6d01584306ad4138bd78c9cf41056ea3/awards/77272dfb3e9645b4ab499e1d42913b87 HTTP/1.1

{
    "data":{
        "awardStatus": "unsuccessful"
    }
}

HTTP/1.1 200 OK
Location: /tenders/6d01584306ad4138bd78c9cf41056ea3/awards/2beef6aa944c4a8ba0e9654ed5e25993

{
    "data": {
        "status": "unsuccessful",
        "suppliers": [
            {
                "contactPoint": {
                    "name": "Розалія Піддубний",
                    "telephone": "014 883 59 49"
                },
                "identifier": {
                    "scheme": "UA-EDR",
                    "id": "0000741"
                },
                "name": "Чуйко-Скопенко",
                "address": {
                    "postalCode": "21100",
                    "countryName": "Україна",
                    "streetAddress": "21284 Данько Cape",
                    "region": "м. Вінниця",
                    "locality": "м. Вінниця"
                }
            }
        ],
        "bid_id": "1af1d3169c5947c3a30450d2f8c8e7a2",
        "value": {
            "currency": "UAH",
            "amount": 39000.0,
            "valueAddedTaxIncluded": true
        },
        "date": "2015-03-04T14:22:07.937667+02:00",
        "id": "77272dfb3e9645b4ab499e1d42913b87"
    }
}



GET /tenders/64e93250be76435397e8c992ed4214d1/awards  HTTP/1.1

{
    "data": [
        {
            "status": "cancelled",
            "contracts": [
                {
                    "status": "cancelled",
                    "awardID": "fbccb31b3b864c7b80ca19ebd510ee72",
                    "id": "40d0fe977c0f4560a1de71ab122a6fae"
                }
            ],
            "suppliers": [
                {
                    "contactPoint": {
                        "name": "Розалія Піддубний",
                        "telephone": "014 883 59 49"
                    },
                    "identifier": {
                        "scheme": "UA-EDR",
                        "id": "0000741"
                    },
                    "name": "Чуйко-Скопенко",
                    "address": {
                        "postalCode": "21100",
                        "countryName": "Україна",
                        "streetAddress": "21284 Данько Cape",
                        "region": "м. Вінниця",
                        "locality": "м. Вінниця"
                    }
                }
            ],
            "bid_id": "1af1d3169c5947c3a30450d2f8c8e7a2",
            "value": {
                "currency": "UAH",
                "amount": 39000.0,
                "valueAddedTaxIncluded": true
            },
            "date": "2015-03-04T14:21:01.006685+02:00",
            "id": "fbccb31b3b864c7b80ca19ebd510ee72"
        },
        {
            "status": "unsuccessful",
            "suppliers": [
                {
                    "contactPoint": {
                        "name": "Розалія Піддубний",
                        "telephone": "014 883 59 49"
                    },
                    "identifier": {
                        "scheme": "UA-EDR",
                        "id": "0000741"
                    },
                    "name": "Чуйко-Скопенко",
                    "address": {
                        "postalCode": "21100",
                        "countryName": "Україна",
                        "streetAddress": "21284 Данько Cape",
                        "region": "м. Вінниця",
                        "locality": "м. Вінниця"
                    }
                }
            ],
            "bid_id": "1af1d3169c5947c3a30450d2f8c8e7a2",
            "value": {
                "currency": "UAH",
                "amount": 39000.0,
                "valueAddedTaxIncluded": true
            },
            "date": "2015-03-04T14:22:07.937667+02:00",
            "id": "77272dfb3e9645b4ab499e1d42913b87"
        },
        {
            "status": "pending",
            "suppliers": [
                {
                    "contactPoint": {
                        "name": "пан Остап Пелех",
                        "telephone": "+38 (485) 390-29-49"
                    },
                    "identifier": {
                        "scheme": "UA-EDR",
                        "id": "00003195"
                    },
                    "name": "Ємець and Sons",
                    "address": {
                        "postalCode": "21100",
                        "countryName": "Україна",
                        "streetAddress": "93546 John Street",
                        "region": "м. Вінниця",
                        "locality": "м. Вінниця"
                    }
                }
            ],
            "bid_id": "bbb0b1a3344b4d79b67298af4b143bce",
            "value": {
                "currency": "UAH",
                "amount": 40000.0,
                "valueAddedTaxIncluded": true
            },
            "date": "2015-03-04T14:22:11.530927+02:00",
            "id": "2beef6aa944c4a8ba0e9654ed5e25993"
        }
    ]
}

In the case when there is another Bid for qualification, there will be Location header in the response pointing to its Award.

Influence of Complaint Satisfaction

If decision of the procuring entity is considered unfair any bidder can file complaint and after proper review the whole awarding process can start from the award in question. When Complaint Review Body satifies the complaint, all awards registered in the system that were issued (including the one that complaint was filed against) are cancelled (switch to cancelled status). New pending award is generated and Procuring Entity is obliged to qualify it again, taking into consideration recommendations in the report of Complaint Review Body.

Asking Questions

Submitting Questions

Anybody (who provides their identity) can ask questions:

$ http --auth broker: -j POST https://api-sandbox.openprocurement.org/api/0/tenders/9b791af414c64892bb9b1f41e91a84af/questions data:=@./question.json
POST /api/0/tenders/9b791af414c64892bb9b1f41e91a84af/questions HTTP/1.1
Authorization: Basic YnJva2VyOg==
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": "UA-EDR",
                "uri": "http://sch10.edu.vn.ua/"
            },
            "name": "ДКП «Школяр»"
        },
        "description": "Просимо додати таблицю потрібної калорійності харчування по місяцях",
        "title": "Калорійність по місяцях"
    }
}

HTTP/1.1 201 Created
Content-Type: application/json; charset=UTF-8
Location: https://api-sandbox.openprocurement.org/api/0/tenders/9b791af414c64892bb9b1f41e91a84af/questions/3dfbb32cc2f44f75bfe5b44a3a0c287c

{
    "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": "UA-EDR",
                "uri": "http://sch10.edu.vn.ua/"
            },
            "name": "ДКП «Школяр»"
        },
        "date": "2014-12-26T23:43:08.277770+02:00",
        "description": "Просимо додати таблицю потрібної калорійності харчування по місяцях",
        "id": "3dfbb32cc2f44f75bfe5b44a3a0c287c",
        "title": "Калорійність по місяцях"
    }
}

Retrieving Questions

Question author identities are not revealed before auction ends:

$ http -j https://api-sandbox.openprocurement.org/api/0/tenders/17f405f826424ae4949e98ff915412c9/questions
GET /api/0/tenders/17f405f826424ae4949e98ff915412c9/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-26T23:27:51.300952+02:00",
            "description": "Просимо додати таблицю потрібної калорійності харчування по місяцях",
            "id": "88fe3d515eda494983a3973e699ba30d",
            "title": "Калорійність по місяцях"
        }
    ]
}

Answering

Submitting Answers

Tender creator can answer questions:

$ http --auth broker: -j PATCH https://api-sandbox.openprocurement.org/api/0/tenders/9b791af414c64892bb9b1f41e91a84af/questions/3dfbb32cc2f44f75bfe5b44a3a0c287c?acc_token=7face74d65fe4d37ba752aac8f409a0c data:=@./answer.json
PATCH /api/0/tenders/9b791af414c64892bb9b1f41e91a84af/questions/3dfbb32cc2f44f75bfe5b44a3a0c287c?acc_token=7face74d65fe4d37ba752aac8f409a0c HTTP/1.1
Authorization: Basic YnJva2VyOg==
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-26T23:43:08.277770+02:00",
        "description": "Просимо додати таблицю потрібної калорійності харчування по місяцях",
        "id": "3dfbb32cc2f44f75bfe5b44a3a0c287c",
        "title": "Калорійність по місяцях"
    }
}

Complaints Submission

If tender conditions are favoriting only one provider, or in any other viable case, one can submit Tender Conditions Complaint.

Tender Conditions Complaint Submission

$ http -j POST https://api-sandbox.openprocurement.org/api/0/tenders/c0c01003785344829136c3890ddf8192/complaints data:=@./complaint.json
POST /api/0/tenders/c0c01003785344829136c3890ddf8192/complaints 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/c0c01003785344829136c3890ddf8192/complaints/8e17d36ac7a049b6889ed2e01687db88

{
    "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-02T22:35:25.198141+02:00",
        "description": "Умови виставлені замовником не містять достатньо інформації, щоб заявка мала сенс.",
        "id": "8e17d36ac7a049b6889ed2e01687db88",
        "status": "pending",
        "title": "Недостатньо інформації"
    }
}

Tender Conditions Complaint Retrieval

You can list all Tender Conditions Complaints:

$ http -j https://api-sandbox.openprocurement.org/api/0/tenders/c0c01003785344829136c3890ddf8192/complaints
GET /api/0/tenders/c0c01003785344829136c3890ddf8192/complaints HTTP/1.1
Content-Type: application/json; charset=utf-8



HTTP/1.1 200 OK
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": "ДКП «Школяр»"
            },
            "date": "2014-12-02T22:35:25.198141+02:00",
            "description": "Умови виставлені замовником не містять достатньо інформації, щоб заявка мала сенс.",
            "id": "8e17d36ac7a049b6889ed2e01687db88",
            "status": "pending",
            "title": "Недостатньо інформації"
        }
    ]
}

And check individual complaint:

$ http -j https://api-sandbox.openprocurement.org/api/0/tenders/c0c01003785344829136c3890ddf8192/complaints/8e17d36ac7a049b6889ed2e01687db88
GET /api/0/tenders/c0c01003785344829136c3890ddf8192/complaints/8e17d36ac7a049b6889ed2e01687db88 HTTP/1.1
Content-Type: application/json; charset=utf-8



HTTP/1.1 200 OK
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": "ДКП «Школяр»"
        },
        "date": "2014-12-02T22:35:25.198141+02:00",
        "description": "Умови виставлені замовником не містять достатньо інформації, щоб заявка мала сенс.",
        "id": "8e17d36ac7a049b6889ed2e01687db88",
        "status": "pending",
        "title": "Недостатньо інформації"
    }
}

Tender Award Complaint Submission

Tender Award Complaint Retrieval

You can list all complaints:

And check individual complaint:

Complaints Resolution

Rejecting Tender Conditions Complaint

$ http -j PATCH https://api-sandbox.openprocurement.org/api/0/tenders/c0c01003785344829136c3890ddf8192/complaints/8e17d36ac7a049b6889ed2e01687db88 data:={"status":"invalid"}
PATCH /api/0/tenders/c0c01003785344829136c3890ddf8192/complaints/8e17d36ac7a049b6889ed2e01687db88 HTTP/1.1
Content-Type: application/json; charset=utf-8

{
    "data": {
        "status": "invalid"
    }
}

HTTP/1.1 200 OK
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": "ДКП «Школяр»"
        },
        "date": "2014-12-02T22:35:25.198141+02:00",
        "description": "Умови виставлені замовником не містять достатньо інформації, щоб заявка мала сенс.",
        "id": "8e17d36ac7a049b6889ed2e01687db88",
        "status": "invalid",
        "title": "Недостатньо інформації"
    }
}

Submitting Tender Conditions Complaint Resolution

The Complaint Review Body uploads the resolution document:

$ http --form POST https://api-sandbox.openprocurement.org/api/0/tenders/c0c01003785344829136c3890ddf8192/complaints/8e17d36ac7a049b6889ed2e01687db88/documents file@./ComplaintResolution.pdf
POST /api/0/tenders/c0c01003785344829136c3890ddf8192/complaints/8e17d36ac7a049b6889ed2e01687db88/documents HTTP/1.1
Content-Type: multipart/form-data; boundary=29b5edbb4280422ba5e565003ce36030



+-----------------------------------------+
| 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/c0c01003785344829136c3890ddf8192/complaints/8e17d36ac7a049b6889ed2e01687db88/documents/d74ba2b8c92744b283dc693ceb6e3f2c

{
    "data": {
        "dateModified": "2014-12-02T22:35:28.720221+02:00",
        "datePublished": "2014-12-02T22:35:28.720178+02:00",
        "format": "text/plain",
        "id": "d74ba2b8c92744b283dc693ceb6e3f2c",
        "title": "ComplaintResolution.pdf",
        "url": "http://api-sandbox.openprocurement.org/api/0/tenders/c0c01003785344829136c3890ddf8192/complaints/8e17d36ac7a049b6889ed2e01687db88/documents/d74ba2b8c92744b283dc693ceb6e3f2c?download=527a0cb2ca8948118969fff9d8da6fc6"
    }
}

And either resolves complaint:

$ http -j PATCH https://api-sandbox.openprocurement.org/api/0/tenders/c0c01003785344829136c3890ddf8192/complaints/8e17d36ac7a049b6889ed2e01687db88 data:={"status":"resolved"}
PATCH /api/0/tenders/c0c01003785344829136c3890ddf8192/complaints/8e17d36ac7a049b6889ed2e01687db88 HTTP/1.1
Content-Type: application/json; charset=utf-8

{
    "data": {
        "status": "resolved"
    }
}

HTTP/1.1 200 OK
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": "ДКП «Школяр»"
        },
        "date": "2014-12-02T22:35:25.198141+02:00",
        "description": "Умови виставлені замовником не містять достатньо інформації, щоб заявка мала сенс.",
        "documents": [
            {
                "dateModified": "2014-12-02T22:35:28.720221+02:00",
                "datePublished": "2014-12-02T22:35:28.720178+02:00",
                "format": "text/plain",
                "id": "d74ba2b8c92744b283dc693ceb6e3f2c",
                "title": "ComplaintResolution.pdf",
                "url": "http://api-sandbox.openprocurement.org/api/0/tenders/c0c01003785344829136c3890ddf8192/complaints/8e17d36ac7a049b6889ed2e01687db88/documents/d74ba2b8c92744b283dc693ceb6e3f2c?download=527a0cb2ca8948118969fff9d8da6fc6"
            }
        ],
        "id": "8e17d36ac7a049b6889ed2e01687db88",
        "status": "resolved",
        "title": "Недостатньо інформації"
    }
}

Or declines it:

$ http -j PATCH https://api-sandbox.openprocurement.org/api/0/tenders/c0c01003785344829136c3890ddf8192/complaints/8e17d36ac7a049b6889ed2e01687db88 data:={"status":"declined"}
PATCH /api/0/tenders/c0c01003785344829136c3890ddf8192/complaints/8e17d36ac7a049b6889ed2e01687db88 HTTP/1.1
Content-Type: application/json; charset=utf-8

{
    "data": {
        "status": "declined"
    }
}

HTTP/1.1 200 OK
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": "ДКП «Школяр»"
        },
        "date": "2014-12-02T22:35:25.198141+02:00",
        "description": "Умови виставлені замовником не містять достатньо інформації, щоб заявка мала сенс.",
        "documents": [
            {
                "dateModified": "2014-12-02T22:35:28.720221+02:00",
                "datePublished": "2014-12-02T22:35:28.720178+02:00",
                "format": "text/plain",
                "id": "d74ba2b8c92744b283dc693ceb6e3f2c",
                "title": "ComplaintResolution.pdf",
                "url": "http://api-sandbox.openprocurement.org/api/0/tenders/c0c01003785344829136c3890ddf8192/complaints/8e17d36ac7a049b6889ed2e01687db88/documents/d74ba2b8c92744b283dc693ceb6e3f2c?download=527a0cb2ca8948118969fff9d8da6fc6"
            }
        ],
        "id": "8e17d36ac7a049b6889ed2e01687db88",
        "status": "declined",
        "title": "Недостатньо інформації"
    }
}

Rejecting Tender Award Complaint

Submitting Tender Award Complaint Resolution

API Reference

Indices and tables