Tutorial

Exploring basic rules

Let’s try exploring the /tenders endpoint:

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


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

{
  "next_page": {
    "path": "/api/0.12/tenders?offset=",
    "uri": "http://api-sandbox.openprocurement.org/api/0.12/tenders?offset=",
    "offset": ""
  },
  "data": []
}

Just invoking it reveals empty set.

Now let’s attempt creating some tender:

POST /api/0.12/tenders?opt_pretty=1 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 4
Content-Type: application/x-www-form-urlencoded
Host: api-sandbox.openprocurement.org


415 Unsupported Media Type
Content-Type: application/json; charset=UTF-8

{
  "status": "error",
  "errors": [
    {
      "description": "Content-Type header should be one of ['application/json']",
      "location": "header",
      "name": "Content-Type"
    }
  ]
}

Error states that the only accepted Content-Type is application/json.

Let’s satisfy the Content-type requirement:

POST /api/0.12/tenders?opt_pretty=1 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 4
Content-Type: application/json
Host: api-sandbox.openprocurement.org


422 Unprocessable Entity
Content-Type: application/json; charset=UTF-8

{
  "status": "error",
  "errors": [
    {
      "description": "No JSON object could be decoded",
      "location": "body",
      "name": "data"
    }
  ]
}

Error states that no data has been found in JSON body.

Creating tender

Let’s create tender with the minimal (only required) data set:

POST /api/0.12/tenders?opt_pretty=1 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 2328
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "tenderPeriod": {
      "endDate": "2016-04-01T18:47:47.136678"
    },
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35
    },
    "enquiryPeriod": {
      "endDate": "2016-03-25T18:47:47.136678"
    },
    "procurementMethodType": "belowThreshold",
    "value": {
      "currency": "UAH",
      "amount": 500
    },
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "address": {
        "countryName": "Україна",
        "postalCode": "01220",
        "region": "м. Київ",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "locality": "м. Київ"
      }
    },
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "CPV",
          "id": "44617100-9",
          "description": "Cartons"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "countryName": "Україна",
          "postalCode": "79000",
          "region": "м. Київ",
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2016-03-20T18:47:47.136678",
          "endDate": "2016-03-23T18:47:47.136678"
        },
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ]
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b

{
  "access": {
    "token": "945a452ee1b442bdaf665b09d0cb4cce"
  },
  "data": {
    "procurementMethod": "open",
    "status": "active.enquiries",
    "tenderID": "UA-2016-03-18-000001",
    "tenderPeriod": {
      "startDate": "2016-03-25T18:47:47.136678+02:00",
      "endDate": "2016-04-01T18:47:47.136678+03:00"
    },
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "CPV",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2016-03-20T18:47:47.136678+02:00",
          "endDate": "2016-03-23T18:47:47.136678+02:00"
        },
        "id": "c6c6e8ed4b1542e4bf13d3f98ec5ab59",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "procurementMethodType": "belowThreshold",
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "submissionMethod": "electronicAuction",
    "next_check": "2016-03-25T18:47:47.136678+02:00",
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "address": {
        "postalCode": "01220",
        "countryName": "Україна",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "region": "м. Київ",
        "locality": "м. Київ"
      }
    },
    "enquiryPeriod": {
      "startDate": "2016-03-18T18:48:01.702855+02:00",
      "endDate": "2016-03-25T18:47:47.136678+02:00"
    },
    "owner": "broker",
    "dateModified": "2016-03-18T18:48:01.708625+02:00",
    "id": "ce536c5f46d543ec81ffa86ce4c77c8b",
    "awardCriteria": "lowestCost"
  }
}

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. Pay attention to the procurementMethodType. Note that tender is created with active.enquiries status.

Let’s access the URL of the created object (the Location header of the response):

GET /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


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

{
  "data": {
    "procurementMethod": "open",
    "status": "active.enquiries",
    "tenderID": "UA-2016-03-18-000001",
    "tenderPeriod": {
      "startDate": "2016-03-25T18:47:47.136678+02:00",
      "endDate": "2016-04-01T18:47:47.136678+03:00"
    },
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "CPV",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2016-03-20T18:47:47.136678+02:00",
          "endDate": "2016-03-23T18:47:47.136678+02:00"
        },
        "id": "c6c6e8ed4b1542e4bf13d3f98ec5ab59",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "procurementMethodType": "belowThreshold",
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "submissionMethod": "electronicAuction",
    "next_check": "2016-03-25T18:47:47.136678+02:00",
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "address": {
        "postalCode": "01220",
        "countryName": "Україна",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "region": "м. Київ",
        "locality": "м. Київ"
      }
    },
    "enquiryPeriod": {
      "startDate": "2016-03-18T18:48:01.702855+02:00",
      "endDate": "2016-03-25T18:47:47.136678+02:00"
    },
    "owner": "broker",
    "dateModified": "2016-03-18T18:48:01.708625+02:00",
    "id": "ce536c5f46d543ec81ffa86ce4c77c8b",
    "awardCriteria": "lowestCost"
  }
}

We can see the same response we got after creating tender.

Let’s see what listing of tenders reveals us:

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


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

{
  "next_page": {
    "path": "/api/0.12/tenders?offset=2016-03-18T18%3A48%3A01.708625%2B02%3A00",
    "uri": "http://api-sandbox.openprocurement.org/api/0.12/tenders?offset=2016-03-18T18%3A48%3A01.708625%2B02%3A00",
    "offset": "2016-03-18T18:48:01.708625+02:00"
  },
  "data": [
    {
      "id": "ce536c5f46d543ec81ffa86ce4c77c8b",
      "dateModified": "2016-03-18T18:48:01.708625+02:00"
    }
  ]
}

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.

The previous tender contained only required fields. Let’s try creating tender with more data (tender has status created):

POST /api/0.12/tenders?opt_pretty=1 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 4133
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "features": [
      {
        "code": "OCDS-123454-AIR-INTAKE",
        "description": "Ефективна потужність всмоктування пилососа, в ватах (аероватах)",
        "title": "Потужність всмоктування",
        "enum": [
          {
            "value": 0.1,
            "title": "До 1000 Вт"
          },
          {
            "value": 0.15,
            "title": "Більше 1000 Вт"
          }
        ],
        "title_en": "Air Intake",
        "relatedItem": "2a1ee0b9c8594b14b982b9a66830b24a",
        "featureOf": "item"
      },
      {
        "code": "OCDS-123454-YEARS",
        "description": "Кількість років, які організація учасник працює на ринку",
        "title": "Років на ринку",
        "enum": [
          {
            "value": 0.05,
            "title": "До 3 років"
          },
          {
            "value": 0.1,
            "title": "Більше 3 років, менше 5 років"
          },
          {
            "value": 0.15,
            "title": "Більше 5 років"
          }
        ],
        "title_en": "Years trading",
        "featureOf": "tenderer"
      }
    ],
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35
    },
    "enquiryPeriod": {
      "endDate": "2016-03-25T18:47:47.155143"
    },
    "title_en": "Cases with state awards",
    "value": {
      "currency": "UAH",
      "amount": 500
    },
    "mode": "test",
    "procurementMethodType": "belowThreshold",
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "address": {
        "countryName": "Україна",
        "postalCode": "01220",
        "region": "м. Київ",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "locality": "м. Київ"
      }
    },
    "title_ru": "футляры к государственным наградам",
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "CPV",
          "id": "44617100-9",
          "description": "Cartons"
        },
        "description_en": "Cases with state awards",
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "description_ru": "футляры к государственным наградам",
        "id": "2a1ee0b9c8594b14b982b9a66830b24a",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "tenderPeriod": {
      "endDate": "2016-04-01T18:47:47.155143"
    }
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/0.12/tenders/573d41bfa0974e2a933ab4595e7aac8f

{
  "access": {
    "token": "4793cfd4a6724ca8a53050211e825bcd"
  },
  "data": {
    "procurementMethod": "open",
    "status": "active.enquiries",
    "tenderID": "UA-2016-03-18-000002",
    "tenderPeriod": {
      "startDate": "2016-03-25T18:47:47.155143+02:00",
      "endDate": "2016-04-01T18:47:47.155143+03:00"
    },
    "title": "[ТЕСТУВАННЯ] футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "CPV",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "description_en": "Cases with state awards",
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "description_ru": "футляры к государственным наградам",
        "id": "2a1ee0b9c8594b14b982b9a66830b24a",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "procurementMethodType": "belowThreshold",
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "submissionMethod": "electronicAuction",
    "awardCriteria": "lowestCost",
    "next_check": "2016-03-25T18:47:47.155143+02:00",
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "address": {
        "postalCode": "01220",
        "countryName": "Україна",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "region": "м. Київ",
        "locality": "м. Київ"
      }
    },
    "title_ru": "[ТЕСТИРОВАНИЕ] футляры к государственным наградам",
    "enquiryPeriod": {
      "startDate": "2016-03-18T18:48:02.005947+02:00",
      "endDate": "2016-03-25T18:47:47.155143+02:00"
    },
    "owner": "broker",
    "dateModified": "2016-03-18T18:48:02.012912+02:00",
    "mode": "test",
    "title_en": "[TESTING] Cases with state awards",
    "id": "573d41bfa0974e2a933ab4595e7aac8f",
    "features": [
      {
        "code": "OCDS-123454-AIR-INTAKE",
        "description": "Ефективна потужність всмоктування пилососа, в ватах (аероватах)",
        "title": "Потужність всмоктування",
        "enum": [
          {
            "value": 0.1,
            "title": "До 1000 Вт"
          },
          {
            "value": 0.15,
            "title": "Більше 1000 Вт"
          }
        ],
        "title_en": "Air Intake",
        "relatedItem": "2a1ee0b9c8594b14b982b9a66830b24a",
        "featureOf": "item"
      },
      {
        "code": "OCDS-123454-YEARS",
        "description": "Кількість років, які організація учасник працює на ринку",
        "title": "Років на ринку",
        "enum": [
          {
            "value": 0.05,
            "title": "До 3 років"
          },
          {
            "value": 0.1,
            "title": "Більше 3 років, менше 5 років"
          },
          {
            "value": 0.15,
            "title": "Більше 5 років"
          }
        ],
        "title_en": "Years trading",
        "featureOf": "tenderer"
      }
    ]
  }
}

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:

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


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

{
  "next_page": {
    "path": "/api/0.12/tenders?offset=2016-03-18T18%3A48%3A02.194503%2B02%3A00",
    "uri": "http://api-sandbox.openprocurement.org/api/0.12/tenders?offset=2016-03-18T18%3A48%3A02.194503%2B02%3A00",
    "offset": "2016-03-18T18:48:02.194503+02:00"
  },
  "data": [
    {
      "id": "ce536c5f46d543ec81ffa86ce4c77c8b",
      "dateModified": "2016-03-18T18:48:01.708625+02:00"
    },
    {
      "id": "d1f2c417f8d846f782ac4465f9ab6cb4",
      "dateModified": "2016-03-18T18:48:02.194503+02:00"
    }
  ]
}

And indeed we have 2 tenders now.

Modifying tender

Let’s update tender by supplementing it with all other essential properties:

PATCH /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b?acc_token=945a452ee1b442bdaf665b09d0cb4cce HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 75
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "tenderPeriod": {
      "endDate": "2016-04-02T18:48:12.309829+02:00"
    }
  }
}


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

{
  "data": {
    "procurementMethod": "open",
    "status": "active.enquiries",
    "tenderID": "UA-2016-03-18-000001",
    "tenderPeriod": {
      "startDate": "2016-03-25T18:47:47.136678+02:00",
      "endDate": "2016-04-02T18:48:12.309829+02:00"
    },
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "CPV",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2016-03-20T18:47:47.136678+02:00",
          "endDate": "2016-03-23T18:47:47.136678+02:00"
        },
        "id": "c6c6e8ed4b1542e4bf13d3f98ec5ab59",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "procurementMethodType": "belowThreshold",
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "submissionMethod": "electronicAuction",
    "next_check": "2016-03-25T18:47:47.136678+02:00",
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "address": {
        "postalCode": "01220",
        "countryName": "Україна",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "region": "м. Київ",
        "locality": "м. Київ"
      }
    },
    "enquiryPeriod": {
      "startDate": "2016-03-18T18:48:01.702855+02:00",
      "endDate": "2016-03-25T18:47:47.136678+02:00"
    },
    "owner": "broker",
    "dateModified": "2016-03-18T18:48:02.374981+02:00",
    "id": "ce536c5f46d543ec81ffa86ce4c77c8b",
    "awardCriteria": "lowestCost"
  }
}

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:

GET /api/0.12/tenders?opt_pretty=1 HTTP/1.0
Host: api-sandbox.openprocurement.org


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

{
  "next_page": {
    "path": "/api/0.12/tenders?offset=2016-03-18T18%3A48%3A02.374981%2B02%3A00",
    "uri": "http://api-sandbox.openprocurement.org/api/0.12/tenders?offset=2016-03-18T18%3A48%3A02.374981%2B02%3A00",
    "offset": "2016-03-18T18:48:02.374981+02:00"
  },
  "data": [
    {
      "id": "d1f2c417f8d846f782ac4465f9ab6cb4",
      "dateModified": "2016-03-18T18:48:02.194503+02:00"
    },
    {
      "id": "ce536c5f46d543ec81ffa86ce4c77c8b",
      "dateModified": "2016-03-18T18:48:02.374981+02:00"
    }
  ]
}

Procuring entity can set bid guarantee:

PATCH /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b?acc_token=945a452ee1b442bdaf665b09d0cb4cce HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 57
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "guarantee": {
      "currency": "USD",
      "amount": 8
    }
  }
}


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

{
  "data": {
    "procurementMethod": "open",
    "status": "active.enquiries",
    "tenderID": "UA-2016-03-18-000001",
    "tenderPeriod": {
      "startDate": "2016-03-25T18:47:47.136678+02:00",
      "endDate": "2016-04-02T18:48:12.309829+02:00"
    },
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "CPV",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2016-03-20T18:47:47.136678+02:00",
          "endDate": "2016-03-23T18:47:47.136678+02:00"
        },
        "id": "c6c6e8ed4b1542e4bf13d3f98ec5ab59",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "procurementMethodType": "belowThreshold",
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "submissionMethod": "electronicAuction",
    "next_check": "2016-03-25T18:47:47.136678+02:00",
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "address": {
        "postalCode": "01220",
        "countryName": "Україна",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "region": "м. Київ",
        "locality": "м. Київ"
      }
    },
    "enquiryPeriod": {
      "startDate": "2016-03-18T18:48:01.702855+02:00",
      "endDate": "2016-03-25T18:47:47.136678+02:00"
    },
    "owner": "broker",
    "dateModified": "2016-03-18T18:48:02.547485+02:00",
    "guarantee": {
      "currency": "USD",
      "amount": 8.0
    },
    "id": "ce536c5f46d543ec81ffa86ce4c77c8b",
    "awardCriteria": "lowestCost"
  }
}

Uploading documentation

Procuring entity can upload PDF files into the created tender. Uploading should follow the Documents Uploading rules.

POST /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/documents?acc_token=945a452ee1b442bdaf665b09d0cb4cce HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 186
Content-Type: multipart/form-data; boundary=----------a_BoUnDaRy685971104018$
Host: api-sandbox.openprocurement.org


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/documents/caeb63b8bee24a3cbf4d7f8bbbe7352b

{
  "data": {
    "title": "Notice.pdf",
    "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/documents/caeb63b8bee24a3cbf4d7f8bbbe7352b?download=f7a875fc152744c7a5e9124a400f688a",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2016-03-18T18:48:02.645660+02:00",
    "id": "caeb63b8bee24a3cbf4d7f8bbbe7352b",
    "dateModified": "2016-03-18T18:48:02.645712+02:00"
  }
}

201 Created response code and Location header confirm document creation. We can additionally query the documents collection API endpoint to confirm the action:

GET /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/documents/caeb63b8bee24a3cbf4d7f8bbbe7352b HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


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

{
  "data": {
    "title": "Notice.pdf",
    "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/documents/caeb63b8bee24a3cbf4d7f8bbbe7352b?download=f7a875fc152744c7a5e9124a400f688a",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2016-03-18T18:48:02.645660+02:00",
    "previousVersions": [],
    "id": "caeb63b8bee24a3cbf4d7f8bbbe7352b",
    "dateModified": "2016-03-18T18:48:02.645712+02:00"
  }
}

The single array element describes the uploaded document. We can upload more documents:

POST /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/documents?acc_token=945a452ee1b442bdaf665b09d0cb4cce HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 191
Content-Type: multipart/form-data; boundary=----------a_BoUnDaRy18520145775$
Host: api-sandbox.openprocurement.org


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/documents/670a093aa19d418598c9b9d04ec5b034

{
  "data": {
    "title": "AwardCriteria.pdf",
    "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/documents/670a093aa19d418598c9b9d04ec5b034?download=f35b159bf3a04c41896382cdf7103ca3",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2016-03-18T18:48:03.064872+02:00",
    "id": "670a093aa19d418598c9b9d04ec5b034",
    "dateModified": "2016-03-18T18:48:03.064908+02:00"
  }
}

And again we can confirm that there are two documents uploaded.

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


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

{
  "data": [
    {
      "description": "document description modified",
      "title": "Notice.pdf",
      "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/documents/caeb63b8bee24a3cbf4d7f8bbbe7352b?download=f7a875fc152744c7a5e9124a400f688a",
      "format": "application/pdf",
      "documentOf": "tender",
      "datePublished": "2016-03-18T18:48:02.645660+02:00",
      "documentType": "technicalSpecifications",
      "id": "caeb63b8bee24a3cbf4d7f8bbbe7352b",
      "dateModified": "2016-03-18T18:48:02.645712+02:00"
    },
    {
      "title": "AwardCriteria.pdf",
      "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/documents/670a093aa19d418598c9b9d04ec5b034?download=f35b159bf3a04c41896382cdf7103ca3",
      "format": "application/pdf",
      "documentOf": "tender",
      "datePublished": "2016-03-18T18:48:03.064872+02:00",
      "id": "670a093aa19d418598c9b9d04ec5b034",
      "dateModified": "2016-03-18T18:48:03.064908+02:00"
    }
  ]
}

Let’s add new documentType field with technicalSpecifications parameter to the previously uploaded document:

PATCH /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/documents/caeb63b8bee24a3cbf4d7f8bbbe7352b?acc_token=945a452ee1b442bdaf665b09d0cb4cce HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 53
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "documentType": "technicalSpecifications"
  }
}


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

{
  "data": {
    "title": "Notice.pdf",
    "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/documents/caeb63b8bee24a3cbf4d7f8bbbe7352b?download=f7a875fc152744c7a5e9124a400f688a",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2016-03-18T18:48:02.645660+02:00",
    "documentType": "technicalSpecifications",
    "id": "caeb63b8bee24a3cbf4d7f8bbbe7352b",
    "dateModified": "2016-03-18T18:48:02.645712+02:00"
  }
}

Success! Response code is 200 OK and it confirms that documentType field with technicalSpecifications parameter was added .

Now let’s try to modify any field in our document. For example, description:

PATCH /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/documents/caeb63b8bee24a3cbf4d7f8bbbe7352b?acc_token=945a452ee1b442bdaf665b09d0cb4cce HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 58
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "description": "document description modified"
  }
}


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

{
  "data": {
    "description": "document description modified",
    "title": "Notice.pdf",
    "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/documents/caeb63b8bee24a3cbf4d7f8bbbe7352b?download=f7a875fc152744c7a5e9124a400f688a",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2016-03-18T18:48:02.645660+02:00",
    "documentType": "technicalSpecifications",
    "id": "caeb63b8bee24a3cbf4d7f8bbbe7352b",
    "dateModified": "2016-03-18T18:48:02.645712+02:00"
  }
}

200 OK response was returned. The description was modified successfully.

In case we made an error, we can reupload the document over the older version:

PUT /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/documents/670a093aa19d418598c9b9d04ec5b034?acc_token=945a452ee1b442bdaf665b09d0cb4cce HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 196
Content-Type: multipart/form-data; boundary=----------a_BoUnDaRy824247363461$
Host: api-sandbox.openprocurement.org


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

{
  "data": {
    "title": "AwardCriteria-2.pdf",
    "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/documents/670a093aa19d418598c9b9d04ec5b034?download=6cd6ebcdea1f459c86913e39953e4b3d",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2016-03-18T18:48:03.064872+02:00",
    "id": "670a093aa19d418598c9b9d04ec5b034",
    "dateModified": "2016-03-18T18:48:03.235028+02:00"
  }
}

And we can see that it is overriding the original version:

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


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

{
  "data": [
    {
      "description": "document description modified",
      "title": "Notice.pdf",
      "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/documents/caeb63b8bee24a3cbf4d7f8bbbe7352b?download=f7a875fc152744c7a5e9124a400f688a",
      "format": "application/pdf",
      "documentOf": "tender",
      "datePublished": "2016-03-18T18:48:02.645660+02:00",
      "documentType": "technicalSpecifications",
      "id": "caeb63b8bee24a3cbf4d7f8bbbe7352b",
      "dateModified": "2016-03-18T18:48:02.645712+02:00"
    },
    {
      "title": "AwardCriteria-2.pdf",
      "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/documents/670a093aa19d418598c9b9d04ec5b034?download=6cd6ebcdea1f459c86913e39953e4b3d",
      "format": "application/pdf",
      "documentOf": "tender",
      "datePublished": "2016-03-18T18:48:03.064872+02:00",
      "id": "670a093aa19d418598c9b9d04ec5b034",
      "dateModified": "2016-03-18T18:48:03.235028+02:00"
    }
  ]
}

Enquiries

When tender is in active.enquiry status, interested parties can ask questions:

POST /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/questions HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 1506
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "author": {
      "contactPoint": {
        "telephone": "+380 (432) 21-69-30",
        "name": "Сергій Олексюк",
        "email": "soleksuk@gmail.com"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "legalName": "Державне комунальне підприємство громадського харчування «Школяр»",
        "id": "00137226",
        "uri": "http://sch10.edu.vn.ua/"
      },
      "name": "ДКП «Школяр»",
      "address": {
        "countryName": "Україна",
        "postalCode": "21100",
        "region": "м. Вінниця",
        "streetAddress": "вул. Островського, 33",
        "locality": "м. Вінниця"
      }
    },
    "description": "Просимо додати таблицю потрібної калорійності харчування",
    "title": "Калорійність"
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/questions/241f4ab8df634f23a11f61fe2074a78f

{
  "data": {
    "description": "Просимо додати таблицю потрібної калорійності харчування",
    "author": {
      "contactPoint": {
        "email": "soleksuk@gmail.com",
        "telephone": "+380 (432) 21-69-30",
        "name": "Сергій Олексюк"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "legalName": "Державне комунальне підприємство громадського харчування «Школяр»",
        "id": "00137226",
        "uri": "http://sch10.edu.vn.ua/"
      },
      "name": "ДКП «Школяр»",
      "address": {
        "postalCode": "21100",
        "countryName": "Україна",
        "streetAddress": "вул. Островського, 33",
        "region": "м. Вінниця",
        "locality": "м. Вінниця"
      }
    },
    "title": "Калорійність",
    "date": "2016-03-18T18:48:03.398193+02:00",
    "id": "241f4ab8df634f23a11f61fe2074a78f",
    "questionOf": "tender"
  }
}

Procuring entity can answer them:

PATCH /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/questions/241f4ab8df634f23a11f61fe2074a78f?acc_token=945a452ee1b442bdaf665b09d0cb4cce HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 162
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "answer": "Таблицю додано в файлі \"Kalorijnist.xslx\""
  }
}


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

{
  "data": {
    "description": "Просимо додати таблицю потрібної калорійності харчування",
    "title": "Калорійність",
    "date": "2016-03-18T18:48:03.398193+02:00",
    "answer": "Таблицю додано в файлі \"Kalorijnist.xslx\"",
    "id": "241f4ab8df634f23a11f61fe2074a78f",
    "questionOf": "tender"
  }
}

And one can retrieve the questions list:

GET /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/questions HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


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

{
  "data": [
    {
      "description": "Просимо додати таблицю потрібної калорійності харчування",
      "title": "Калорійність",
      "date": "2016-03-18T18:48:03.398193+02:00",
      "answer": "Таблицю додано в файлі \"Kalorijnist.xslx\"",
      "id": "241f4ab8df634f23a11f61fe2074a78f",
      "questionOf": "tender"
    }
  ]
}

And individual answer:

GET /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/questions/241f4ab8df634f23a11f61fe2074a78f HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


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

{
  "data": {
    "description": "Просимо додати таблицю потрібної калорійності харчування",
    "title": "Калорійність",
    "date": "2016-03-18T18:48:03.398193+02:00",
    "answer": "Таблицю додано в файлі \"Kalorijnist.xslx\"",
    "id": "241f4ab8df634f23a11f61fe2074a78f",
    "questionOf": "tender"
  }
}

Registering bid

When Tender.tenderingPeriod.startDate comes, Tender switches to active.tendering status that allows registration of bids.

Bidder can register a bid:

POST /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/bids HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 738
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "value": {
      "amount": 500
    },
    "tenderers": [
      {
        "contactPoint": {
          "telephone": "+380 (432) 21-69-30",
          "name": "Сергій Олексюк",
          "email": "soleksuk@gmail.com"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137256",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Школяр»",
        "address": {
          "countryName": "Україна",
          "postalCode": "21100",
          "region": "м. Вінниця",
          "streetAddress": "вул. Островського, 33",
          "locality": "м. Вінниця"
        }
      }
    ]
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/bids/e77c99397b104cf286dca9614046667d

{
  "access": {
    "token": "6e50c158137b490aaba73a8a23200ad7"
  },
  "data": {
    "date": "2016-03-18T18:48:03.807216+02:00",
    "id": "e77c99397b104cf286dca9614046667d",
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "tenderers": [
      {
        "contactPoint": {
          "email": "soleksuk@gmail.com",
          "telephone": "+380 (432) 21-69-30",
          "name": "Сергій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137256",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Школяр»",
        "address": {
          "postalCode": "21100",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 33",
          "region": "м. Вінниця",
          "locality": "м. Вінниця"
        }
      }
    ]
  }
}

And upload proposal document:

POST /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/bids/e77c99397b104cf286dca9614046667d/documents?acc_token=6e50c158137b490aaba73a8a23200ad7 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 188
Content-Type: multipart/form-data; boundary=----------a_BoUnDaRy276441808532$
Host: api-sandbox.openprocurement.org


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/bids/e77c99397b104cf286dca9614046667d/documents/519472aa3ec14f2eb984be4ad638cbcc

{
  "data": {
    "title": "Proposal.pdf",
    "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/bids/e77c99397b104cf286dca9614046667d/documents/519472aa3ec14f2eb984be4ad638cbcc?download=9fe31f4bf527465f9678971b95d887f2",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2016-03-18T18:48:03.948271+02:00",
    "id": "519472aa3ec14f2eb984be4ad638cbcc",
    "dateModified": "2016-03-18T18:48:03.948320+02:00"
  }
}

It is possible to check the uploaded documents:

GET /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/bids/e77c99397b104cf286dca9614046667d/documents?acc_token=6e50c158137b490aaba73a8a23200ad7 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


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

{
  "data": [
    {
      "title": "Proposal.pdf",
      "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/bids/e77c99397b104cf286dca9614046667d/documents/519472aa3ec14f2eb984be4ad638cbcc?download=9fe31f4bf527465f9678971b95d887f2",
      "format": "application/pdf",
      "documentOf": "tender",
      "datePublished": "2016-03-18T18:48:03.948271+02:00",
      "id": "519472aa3ec14f2eb984be4ad638cbcc",
      "dateModified": "2016-03-18T18:48:03.948320+02:00"
    }
  ]
}

For best effect (biggest economy) Tender should have multiple bidders registered:

POST /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/bids HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 704
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "value": {
      "amount": 499
    },
    "tenderers": [
      {
        "contactPoint": {
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк",
          "email": "aagt@gmail.com"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Книга»",
        "address": {
          "countryName": "Україна",
          "postalCode": "79013",
          "region": "м. Львів",
          "streetAddress": "вул. Островського, 34",
          "locality": "м. Львів"
        }
      }
    ]
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/bids/b7697e72fef84a3e9c5b4a102fc99af4

{
  "access": {
    "token": "e6a7c356567242969c0f742bb5796e9e"
  },
  "data": {
    "date": "2016-03-18T18:48:04.183023+02:00",
    "id": "b7697e72fef84a3e9c5b4a102fc99af4",
    "value": {
      "currency": "UAH",
      "amount": 499.0,
      "valueAddedTaxIncluded": true
    },
    "tenderers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Книга»",
        "address": {
          "postalCode": "79013",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 34",
          "region": "м. Львів",
          "locality": "м. Львів"
        }
      }
    ]
  }
}

Auction

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

GET /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


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

{
  "data": {
    "procurementMethod": "open",
    "auctionUrl": "http://auction-sandbox.openprocurement.org/tenders/ce536c5f46d543ec81ffa86ce4c77c8b",
    "enquiryPeriod": {
      "startDate": "2016-03-04T18:47:47.136678+02:00",
      "endDate": "2016-03-11T18:47:47.136678+02:00"
    },
    "submissionMethod": "electronicAuction",
    "next_check": "2016-03-18T19:23:47.136678+02:00",
    "awardCriteria": "lowestCost",
    "questions": [
      {
        "description": "Просимо додати таблицю потрібної калорійності харчування",
        "title": "Калорійність",
        "date": "2016-03-18T18:48:03.398193+02:00",
        "answer": "Таблицю додано в файлі \"Kalorijnist.xslx\"",
        "id": "241f4ab8df634f23a11f61fe2074a78f",
        "questionOf": "tender"
      }
    ],
    "owner": "broker",
    "id": "ce536c5f46d543ec81ffa86ce4c77c8b",
    "guarantee": {
      "currency": "USD",
      "amount": 8.0
    },
    "documents": [
      {
        "description": "document description modified",
        "title": "Notice.pdf",
        "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/documents/caeb63b8bee24a3cbf4d7f8bbbe7352b?download=f7a875fc152744c7a5e9124a400f688a",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2016-03-18T18:48:02.645660+02:00",
        "documentType": "technicalSpecifications",
        "id": "caeb63b8bee24a3cbf4d7f8bbbe7352b",
        "dateModified": "2016-03-18T18:48:02.645712+02:00"
      },
      {
        "title": "AwardCriteria.pdf",
        "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/documents/670a093aa19d418598c9b9d04ec5b034?download=f35b159bf3a04c41896382cdf7103ca3",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2016-03-18T18:48:03.064872+02:00",
        "id": "670a093aa19d418598c9b9d04ec5b034",
        "dateModified": "2016-03-18T18:48:03.064908+02:00"
      },
      {
        "title": "AwardCriteria-2.pdf",
        "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/documents/670a093aa19d418598c9b9d04ec5b034?download=6cd6ebcdea1f459c86913e39953e4b3d",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2016-03-18T18:48:03.064872+02:00",
        "id": "670a093aa19d418598c9b9d04ec5b034",
        "dateModified": "2016-03-18T18:48:03.235028+02:00"
      }
    ],
    "title": "футляри до державних нагород",
    "tenderID": "UA-2016-03-18-000001",
    "dateModified": "2016-03-18T18:48:04.626732+02:00",
    "status": "active.auction",
    "tenderPeriod": {
      "startDate": "2016-03-11T18:47:47.136678+02:00",
      "endDate": "2016-03-18T18:47:47.136678+02:00"
    },
    "auctionPeriod": {
      "startDate": "2016-03-18T18:47:47.136678+02:00",
      "shouldStartAfter": "2016-03-18T18:47:47.136678+02:00"
    },
    "procurementMethodType": "belowThreshold",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "CPV",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2016-03-20T18:47:47.136678+02:00",
          "endDate": "2016-03-23T18:47:47.136678+02:00"
        },
        "id": "c6c6e8ed4b1542e4bf13d3f98ec5ab59",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "address": {
        "postalCode": "01220",
        "countryName": "Україна",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "region": "м. Київ",
        "locality": "м. Київ"
      }
    }
  }
}

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

GET /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/bids/e77c99397b104cf286dca9614046667d?acc_token=6e50c158137b490aaba73a8a23200ad7 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


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

{
  "data": {
    "documents": [
      {
        "title": "Proposal.pdf",
        "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/bids/e77c99397b104cf286dca9614046667d/documents/519472aa3ec14f2eb984be4ad638cbcc?download=9fe31f4bf527465f9678971b95d887f2",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2016-03-18T18:48:03.948271+02:00",
        "id": "519472aa3ec14f2eb984be4ad638cbcc",
        "dateModified": "2016-03-18T18:48:03.948320+02:00"
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "tenderers": [
      {
        "contactPoint": {
          "email": "soleksuk@gmail.com",
          "telephone": "+380 (432) 21-69-30",
          "name": "Сергій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137256",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Школяр»",
        "address": {
          "postalCode": "21100",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 33",
          "region": "м. Вінниця",
          "locality": "м. Вінниця"
        }
      }
    ],
    "date": "2016-03-18T18:48:03.807216+02:00",
    "id": "e77c99397b104cf286dca9614046667d",
    "participationUrl": "http://auction-sandbox.openprocurement.org/tenders/ce536c5f46d543ec81ffa86ce4c77c8b?key_for_bid=e77c99397b104cf286dca9614046667d"
  }
}

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

GET /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/bids/b7697e72fef84a3e9c5b4a102fc99af4?acc_token=e6a7c356567242969c0f742bb5796e9e HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


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

{
  "data": {
    "date": "2016-03-18T18:48:04.183023+02:00",
    "value": {
      "currency": "UAH",
      "amount": 499.0,
      "valueAddedTaxIncluded": true
    },
    "id": "b7697e72fef84a3e9c5b4a102fc99af4",
    "participationUrl": "http://auction-sandbox.openprocurement.org/tenders/ce536c5f46d543ec81ffa86ce4c77c8b?key_for_bid=b7697e72fef84a3e9c5b4a102fc99af4",
    "tenderers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Книга»",
        "address": {
          "postalCode": "79013",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 34",
          "region": "м. Львів",
          "locality": "м. Львів"
        }
      }
    ]
  }
}

Confirming qualification

Qualification comission registers its decision via the following call:

PATCH /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/awards/8481d7eb01694c25b18658036c236c5d?acc_token=945a452ee1b442bdaf665b09d0cb4cce HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 30
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "status": "active"
  }
}


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

{
  "data": {
    "status": "active",
    "complaintPeriod": {
      "startDate": "2016-03-18T18:48:05.115218+02:00",
      "endDate": "2016-03-19T18:48:05.337953+02:00"
    },
    "suppliers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Книга»",
        "address": {
          "postalCode": "79013",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 34",
          "region": "м. Львів",
          "locality": "м. Львів"
        }
      }
    ],
    "bid_id": "b7697e72fef84a3e9c5b4a102fc99af4",
    "value": {
      "currency": "UAH",
      "amount": 499.0,
      "valueAddedTaxIncluded": true
    },
    "date": "2016-03-18T18:48:05.115546+02:00",
    "id": "8481d7eb01694c25b18658036c236c5d"
  }
}

Setting contract value

By default contract value is set based on the award, but there is a possibility to set custom contract value.

If you want to lower contract value, you can insert new one into the amount field.

PATCH /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/contracts/1359720ade994a56b488a92f2fa577b2?acc_token=945a452ee1b442bdaf665b09d0cb4cce HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 73
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "contractNumber": "contract #13111",
    "value": {
      "amount": 238
    }
  }
}


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

{
  "data": {
    "status": "pending",
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "CPV",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2016-03-20T18:47:47.136678+02:00",
          "endDate": "2016-03-23T18:47:47.136678+02:00"
        },
        "id": "c6c6e8ed4b1542e4bf13d3f98ec5ab59",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "suppliers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Книга»",
        "address": {
          "postalCode": "79013",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 34",
          "region": "м. Львів",
          "locality": "м. Львів"
        }
      }
    ],
    "contractNumber": "contract #13111",
    "value": {
      "currency": "UAH",
      "amount": 238.0,
      "valueAddedTaxIncluded": true
    },
    "awardID": "8481d7eb01694c25b18658036c236c5d",
    "id": "1359720ade994a56b488a92f2fa577b2",
    "contractID": "UA-2016-03-18-000001-1"
  }
}

200 OK response was returned. The value was modified successfully.

Setting contract signature date

There is a possibility to set custom contract signature date. You can insert appropriate date into the dateSigned field.

If this date is not set, it will be auto-generated on the date of contract registration.

PATCH /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/contracts/1359720ade994a56b488a92f2fa577b2?acc_token=945a452ee1b442bdaf665b09d0cb4cce HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 60
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "dateSigned": "2016-03-18T18:48:05.762961+02:00"
  }
}


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

{
  "data": {
    "status": "pending",
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "CPV",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2016-03-20T18:47:47.136678+02:00",
          "endDate": "2016-03-23T18:47:47.136678+02:00"
        },
        "id": "c6c6e8ed4b1542e4bf13d3f98ec5ab59",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "suppliers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Книга»",
        "address": {
          "postalCode": "79013",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 34",
          "region": "м. Львів",
          "locality": "м. Львів"
        }
      }
    ],
    "contractNumber": "contract #13111",
    "dateSigned": "2016-03-18T18:48:05.762961+02:00",
    "value": {
      "currency": "UAH",
      "amount": 238.0,
      "valueAddedTaxIncluded": true
    },
    "awardID": "8481d7eb01694c25b18658036c236c5d",
    "id": "1359720ade994a56b488a92f2fa577b2",
    "contractID": "UA-2016-03-18-000001-1"
  }
}

Setting contract validity period

Setting contract validity period is optional, but if it is needed, you can set appropriate startDate and endDate.

PATCH /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/contracts/1359720ade994a56b488a92f2fa577b2?acc_token=945a452ee1b442bdaf665b09d0cb4cce HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 106
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "period": {
      "startDate": "2016-03-18T18:47:47.155143",
      "endDate": "2017-03-18T18:47:47.155143"
    }
  }
}


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

{
  "data": {
    "status": "pending",
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "CPV",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2016-03-20T18:47:47.136678+02:00",
          "endDate": "2016-03-23T18:47:47.136678+02:00"
        },
        "id": "c6c6e8ed4b1542e4bf13d3f98ec5ab59",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "suppliers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Книга»",
        "address": {
          "postalCode": "79013",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 34",
          "region": "м. Львів",
          "locality": "м. Львів"
        }
      }
    ],
    "contractNumber": "contract #13111",
    "period": {
      "startDate": "2016-03-18T18:47:47.155143+02:00",
      "endDate": "2017-03-18T18:47:47.155143+02:00"
    },
    "value": {
      "currency": "UAH",
      "amount": 238.0,
      "valueAddedTaxIncluded": true
    },
    "dateSigned": "2016-03-18T18:48:05.762961+02:00",
    "awardID": "8481d7eb01694c25b18658036c236c5d",
    "id": "1359720ade994a56b488a92f2fa577b2",
    "contractID": "UA-2016-03-18-000001-1"
  }
}

Uploading contract documentation

You can upload contract documents. Let’s upload contract document:

POST /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/contracts/1359720ade994a56b488a92f2fa577b2/documents?acc_token=945a452ee1b442bdaf665b09d0cb4cce HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 206
Content-Type: multipart/form-data; boundary=----------a_BoUnDaRy740569125895$
Host: api-sandbox.openprocurement.org


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/contracts/1359720ade994a56b488a92f2fa577b2/documents/f4f9338cda06496f9f2e588660a5203e

{
  "data": {
    "title": "contract_first_document.doc",
    "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/contracts/1359720ade994a56b488a92f2fa577b2/documents/f4f9338cda06496f9f2e588660a5203e?download=711bc63427c444d3a0638616e559996a",
    "format": "application/msword",
    "documentOf": "tender",
    "datePublished": "2016-03-18T18:48:06.238010+02:00",
    "id": "f4f9338cda06496f9f2e588660a5203e",
    "dateModified": "2016-03-18T18:48:06.238047+02:00"
  }
}

201 Created response code and Location header confirm document was added.

Let’s see the list of contract documents:

GET /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/contracts/1359720ade994a56b488a92f2fa577b2/documents HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


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

{
  "data": [
    {
      "title": "contract_first_document.doc",
      "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/contracts/1359720ade994a56b488a92f2fa577b2/documents/f4f9338cda06496f9f2e588660a5203e?download=711bc63427c444d3a0638616e559996a",
      "format": "application/msword",
      "documentOf": "tender",
      "datePublished": "2016-03-18T18:48:06.238010+02:00",
      "id": "f4f9338cda06496f9f2e588660a5203e",
      "dateModified": "2016-03-18T18:48:06.238047+02:00"
    }
  ]
}

We can add another contract document:

POST /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/contracts/1359720ade994a56b488a92f2fa577b2/documents?acc_token=945a452ee1b442bdaf665b09d0cb4cce HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 207
Content-Type: multipart/form-data; boundary=----------a_BoUnDaRy796922092393$
Host: api-sandbox.openprocurement.org


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/contracts/1359720ade994a56b488a92f2fa577b2/documents/9c8b66120d4c415cb334bbad33f94ba9

{
  "data": {
    "title": "contract_second_document.doc",
    "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/contracts/1359720ade994a56b488a92f2fa577b2/documents/9c8b66120d4c415cb334bbad33f94ba9?download=da839a4c3d7a41d2852d17f90aa14f47",
    "format": "application/msword",
    "documentOf": "tender",
    "datePublished": "2016-03-18T18:48:06.477792+02:00",
    "id": "9c8b66120d4c415cb334bbad33f94ba9",
    "dateModified": "2016-03-18T18:48:06.477829+02:00"
  }
}

201 Created response code and Location header confirm second document was uploaded.

Let’s see the list of all added contract documents:

GET /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/contracts/1359720ade994a56b488a92f2fa577b2/documents HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


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

{
  "data": [
    {
      "title": "contract_first_document.doc",
      "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/contracts/1359720ade994a56b488a92f2fa577b2/documents/f4f9338cda06496f9f2e588660a5203e?download=711bc63427c444d3a0638616e559996a",
      "format": "application/msword",
      "documentOf": "tender",
      "datePublished": "2016-03-18T18:48:06.238010+02:00",
      "id": "f4f9338cda06496f9f2e588660a5203e",
      "dateModified": "2016-03-18T18:48:06.238047+02:00"
    },
    {
      "title": "contract_second_document.doc",
      "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/contracts/1359720ade994a56b488a92f2fa577b2/documents/9c8b66120d4c415cb334bbad33f94ba9?download=da839a4c3d7a41d2852d17f90aa14f47",
      "format": "application/msword",
      "documentOf": "tender",
      "datePublished": "2016-03-18T18:48:06.477792+02:00",
      "id": "9c8b66120d4c415cb334bbad33f94ba9",
      "dateModified": "2016-03-18T18:48:06.477829+02:00"
    }
  ]
}

Set contract signature date

There is a possibility to set custom contract signature date. If the date is not set it will be generated on contract registration.

PATCH /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/contracts/1359720ade994a56b488a92f2fa577b2?acc_token=945a452ee1b442bdaf665b09d0cb4cce HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 60
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "dateSigned": "2016-03-18T18:48:05.762961+02:00"
  }
}


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

{
  "data": {
    "status": "pending",
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "CPV",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2016-03-20T18:47:47.136678+02:00",
          "endDate": "2016-03-23T18:47:47.136678+02:00"
        },
        "id": "c6c6e8ed4b1542e4bf13d3f98ec5ab59",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "suppliers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Книга»",
        "address": {
          "postalCode": "79013",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 34",
          "region": "м. Львів",
          "locality": "м. Львів"
        }
      }
    ],
    "contractNumber": "contract #13111",
    "dateSigned": "2016-03-18T18:48:05.762961+02:00",
    "value": {
      "currency": "UAH",
      "amount": 238.0,
      "valueAddedTaxIncluded": true
    },
    "awardID": "8481d7eb01694c25b18658036c236c5d",
    "id": "1359720ade994a56b488a92f2fa577b2",
    "contractID": "UA-2016-03-18-000001-1"
  }
}

Contract registration

PATCH /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/contracts/1359720ade994a56b488a92f2fa577b2?acc_token=945a452ee1b442bdaf665b09d0cb4cce HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 30
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "status": "active"
  }
}


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

{
  "data": {
    "status": "active",
    "documents": [
      {
        "title": "contract_first_document.doc",
        "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/contracts/1359720ade994a56b488a92f2fa577b2/documents/f4f9338cda06496f9f2e588660a5203e?download=711bc63427c444d3a0638616e559996a",
        "format": "application/msword",
        "documentOf": "tender",
        "datePublished": "2016-03-18T18:48:06.238010+02:00",
        "id": "f4f9338cda06496f9f2e588660a5203e",
        "dateModified": "2016-03-18T18:48:06.238047+02:00"
      },
      {
        "title": "contract_second_document.doc",
        "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/contracts/1359720ade994a56b488a92f2fa577b2/documents/9c8b66120d4c415cb334bbad33f94ba9?download=da839a4c3d7a41d2852d17f90aa14f47",
        "format": "application/msword",
        "documentOf": "tender",
        "datePublished": "2016-03-18T18:48:06.477792+02:00",
        "id": "9c8b66120d4c415cb334bbad33f94ba9",
        "dateModified": "2016-03-18T18:48:06.477829+02:00"
      }
    ],
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "CPV",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2016-03-20T18:47:47.136678+02:00",
          "endDate": "2016-03-23T18:47:47.136678+02:00"
        },
        "id": "c6c6e8ed4b1542e4bf13d3f98ec5ab59",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "suppliers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Книга»",
        "address": {
          "postalCode": "79013",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 34",
          "region": "м. Львів",
          "locality": "м. Львів"
        }
      }
    ],
    "contractNumber": "contract #13111",
    "period": {
      "startDate": "2016-03-18T18:47:47.155143+02:00",
      "endDate": "2017-03-18T18:47:47.155143+02:00"
    },
    "value": {
      "currency": "UAH",
      "amount": 238.0,
      "valueAddedTaxIncluded": true
    },
    "dateSigned": "2016-03-18T18:48:05.762961+02:00",
    "awardID": "8481d7eb01694c25b18658036c236c5d",
    "id": "1359720ade994a56b488a92f2fa577b2",
    "contractID": "UA-2016-03-18-000001-1"
  }
}

Cancelling tender

Tender creator can cancel tender anytime (except when tender has terminal status e.g. usuccesfull, canceled, complete).

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

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

POST /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/cancellations?acc_token=945a452ee1b442bdaf665b09d0cb4cce HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 43
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "reason": "cancellation reason"
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/cancellations/64d0c03dbf124b1c8fa9a47501875f2b

{
  "data": {
    "date": "2016-03-18T18:48:07.218428+02:00",
    "status": "pending",
    "reason": "cancellation reason",
    "cancellationOf": "tender",
    "id": "64d0c03dbf124b1c8fa9a47501875f2b"
  }
}

Filling cancellation with protocol and supplementary documentation

Upload the file contents

POST /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/cancellations/64d0c03dbf124b1c8fa9a47501875f2b/documents?acc_token=945a452ee1b442bdaf665b09d0cb4cce HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 186
Content-Type: multipart/form-data; boundary=----------a_BoUnDaRy767551853361$
Host: api-sandbox.openprocurement.org


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/cancellations/64d0c03dbf124b1c8fa9a47501875f2b/documents/8db5aa66de364c07b78f4332aba4e39b

{
  "data": {
    "title": "Notice.pdf",
    "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/cancellations/64d0c03dbf124b1c8fa9a47501875f2b/documents/8db5aa66de364c07b78f4332aba4e39b?download=b0b544007a9e4829991d4a50f9a3b89d",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2016-03-18T18:48:07.404114+02:00",
    "id": "8db5aa66de364c07b78f4332aba4e39b",
    "dateModified": "2016-03-18T18:48:07.404150+02:00"
  }
}

Change the document description and other properties

PATCH /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/cancellations/64d0c03dbf124b1c8fa9a47501875f2b/documents/8db5aa66de364c07b78f4332aba4e39b?acc_token=945a452ee1b442bdaf665b09d0cb4cce HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 48
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "description": "Changed description"
  }
}


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

{
  "data": {
    "description": "Changed description",
    "title": "Notice.pdf",
    "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/cancellations/64d0c03dbf124b1c8fa9a47501875f2b/documents/8db5aa66de364c07b78f4332aba4e39b?download=b0b544007a9e4829991d4a50f9a3b89d",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2016-03-18T18:48:07.404114+02:00",
    "id": "8db5aa66de364c07b78f4332aba4e39b",
    "dateModified": "2016-03-18T18:48:07.404150+02:00"
  }
}

Upload new version of the document

PUT /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/cancellations/64d0c03dbf124b1c8fa9a47501875f2b/documents/8db5aa66de364c07b78f4332aba4e39b?acc_token=945a452ee1b442bdaf665b09d0cb4cce HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 189
Content-Type: multipart/form-data; boundary=----------a_BoUnDaRy304262660535$
Host: api-sandbox.openprocurement.org


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

{
  "data": {
    "description": "Changed description",
    "title": "Notice-2.pdf",
    "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/cancellations/64d0c03dbf124b1c8fa9a47501875f2b/documents/8db5aa66de364c07b78f4332aba4e39b?download=60a2fb98f4094e9a93bb64dd5367f954",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2016-03-18T18:48:07.404114+02:00",
    "id": "8db5aa66de364c07b78f4332aba4e39b",
    "dateModified": "2016-03-18T18:48:07.832343+02:00"
  }
}

Activating the request and cancelling tender

PATCH /api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/cancellations/64d0c03dbf124b1c8fa9a47501875f2b?acc_token=945a452ee1b442bdaf665b09d0cb4cce HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 30
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "status": "active"
  }
}


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

{
  "data": {
    "status": "active",
    "documents": [
      {
        "description": "Changed description",
        "title": "Notice.pdf",
        "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/cancellations/64d0c03dbf124b1c8fa9a47501875f2b/documents/8db5aa66de364c07b78f4332aba4e39b?download=b0b544007a9e4829991d4a50f9a3b89d",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2016-03-18T18:48:07.404114+02:00",
        "id": "8db5aa66de364c07b78f4332aba4e39b",
        "dateModified": "2016-03-18T18:48:07.404150+02:00"
      },
      {
        "description": "Changed description",
        "title": "Notice-2.pdf",
        "url": "http://api-sandbox.openprocurement.org/api/0.12/tenders/ce536c5f46d543ec81ffa86ce4c77c8b/cancellations/64d0c03dbf124b1c8fa9a47501875f2b/documents/8db5aa66de364c07b78f4332aba4e39b?download=60a2fb98f4094e9a93bb64dd5367f954",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2016-03-18T18:48:07.404114+02:00",
        "id": "8db5aa66de364c07b78f4332aba4e39b",
        "dateModified": "2016-03-18T18:48:07.832343+02:00"
      }
    ],
    "reason": "cancellation reason",
    "date": "2016-03-18T18:48:07.218428+02:00",
    "cancellationOf": "tender",
    "id": "64d0c03dbf124b1c8fa9a47501875f2b"
  }
}