Tutorial

Exploring basic rules

Let’s try exploring the /tenders endpoint:

GET /api/2.5/tenders?opt_pretty=1 HTTP/1.0
Host: lb-api-sandbox.prozorro.gov.ua

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "next_page": {
    "path": "/api/2.5/tenders?offset=",
    "uri": "http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders?offset=",
    "offset": ""
  },
  "data": []
}

Just invoking it reveals empty set.

Now let’s attempt creating some tender:

POST /api/2.5/tenders?opt_pretty=1 HTTP/1.0
Content-Length: 4
Content-Type: application/x-www-form-urlencoded
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
data

Response: 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/2.5/tenders?opt_pretty=1 HTTP/1.0
Authorization: Bearer broker
Content-Length: 4
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
data

Response: 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 provide the data attribute in the submitted body :

POST /api/2.5/tenders?opt_pretty=1 HTTP/1.0
Authorization: Bearer broker
Content-Length: 3019
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "milestones": [
      {
        "code": "prepayment",
        "sequenceNumber": 0,
        "title": "signingTheContract",
        "duration": {
          "type": "banking",
          "days": 2
        },
        "percentage": 45.55,
        "type": "financing",
        "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
      },
      {
        "code": "postpayment",
        "sequenceNumber": 0,
        "title": "deliveryOfGoods",
        "duration": {
          "type": "calendar",
          "days": 900
        },
        "percentage": 54.45,
        "type": "financing"
      }
    ],
    "mainProcurementCategory": "services",
    "tenderPeriod": {
      "endDate": "2019-11-10T00:00:00+02:00"
    },
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35
    },
    "items": [
      {
        "description": "Послуги шкільних їдалень",
        "classification": {
          "scheme": "ДК021",
          "description": "Послуги з харчування у школах",
          "id": "55523100-3"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "Послуги шкільних їдалень"
          }
        ],
        "deliveryAddress": {
          "countryName": "Україна",
          "postalCode": "79000",
          "region": "м. Київ",
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2019-11-14T00:00:00+02:00",
          "endDate": "2019-12-14T00:00:00+02:00"
        },
        "quantity": 1
      }
    ],
    "procurementMethodType": "aboveThresholdUA.defense",
    "value": {
      "currency": "UAH",
      "amount": 500
    },
    "procuringEntity": {
      "kind": "defense",
      "identifier": {
        "scheme": "UA-EDR",
        "id": "21725150",
        "legalName": "Заклад \"Загальноосвітня школа І-ІІІ ступенів № 10 Вінницької міської ради\""
      },
      "contactPoint": {
        "url": "http://sch10.edu.vn.ua/",
        "name": "Куца Світлана Валентинівна",
        "telephone": "+380 (432) 46-53-02"
      },
      "name": "ЗОСШ #10 м.Вінниці",
      "address": {
        "countryName": "Україна",
        "postalCode": "21027",
        "region": "м. Вінниця",
        "streetAddress": "вул. Стахурського. 22",
        "locality": "м. Вінниця"
      }
    }
  }
}

Response: 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/0ef1a1deea644023b37adc3b1d8b274a
{
  "access": {
    "transfer": "f8dd5b28e514413398d521e229cef605",
    "token": "e87d33506acd4c17b37f8d1f2d550f54"
  },
  "data": {
    "procurementMethod": "open",
    "mainProcurementCategory": "services",
    "complaintPeriod": {
      "startDate": "2019-10-25T01:00:03+03:00",
      "endDate": "2019-11-08T00:00:00+02:00"
    },
    "enquiryPeriod": {
      "startDate": "2019-10-25T01:00:03+03:00",
      "clarificationsUntil": "2019-11-08T00:00:00+02:00",
      "endDate": "2019-11-06T00:00:00+02:00"
    },
    "submissionMethod": "electronicAuction",
    "next_check": "2019-11-10T00:00:00+02:00",
    "procuringEntity": {
      "contactPoint": {
        "url": "http://sch10.edu.vn.ua/",
        "name": "Куца Світлана Валентинівна",
        "telephone": "+380 (432) 46-53-02"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "21725150",
        "legalName": "Заклад \"Загальноосвітня школа І-ІІІ ступенів № 10 Вінницької міської ради\""
      },
      "kind": "defense",
      "address": {
        "postalCode": "21027",
        "countryName": "Україна",
        "streetAddress": "вул. Стахурського. 22",
        "region": "м. Вінниця",
        "locality": "м. Вінниця"
      },
      "name": "ЗОСШ #10 м.Вінниці"
    },
    "owner": "broker",
    "id": "0ef1a1deea644023b37adc3b1d8b274a",
    "title": "футляри до державних нагород",
    "tenderID": "UA-2019-10-25-000002",
    "dateModified": "2019-10-25T01:00:03+03:00",
    "status": "active.tendering",
    "tenderPeriod": {
      "startDate": "2019-10-25T01:00:03+03:00",
      "endDate": "2019-11-10T00:00:00+02:00"
    },
    "auctionPeriod": {
      "shouldStartAfter": "2019-11-10T00:00:00+02:00"
    },
    "procurementMethodType": "aboveThresholdUA.defense",
    "date": "2019-10-25T01:00:03+03:00",
    "milestones": [
      {
        "code": "prepayment",
        "sequenceNumber": 0,
        "title": "signingTheContract",
        "duration": {
          "type": "banking",
          "days": 2
        },
        "percentage": 45.55,
        "type": "financing",
        "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
      },
      {
        "code": "postpayment",
        "sequenceNumber": 0,
        "title": "deliveryOfGoods",
        "duration": {
          "type": "calendar",
          "days": 900
        },
        "percentage": 54.45,
        "type": "financing",
        "id": "a50e33f33efd425b8163c37e29d0b703"
      }
    ],
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "Послуги шкільних їдалень",
        "classification": {
          "scheme": "ДК021",
          "description": "Послуги з харчування у школах",
          "id": "55523100-3"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "Послуги шкільних їдалень"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2019-11-14T00:00:00+02:00",
          "endDate": "2019-12-14T00:00:00+02:00"
        },
        "id": "3e31bf63ae7f476c954365433280bdd7",
        "quantity": 1.0
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "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. Note that tender is created with active.tendering status.

The peculiarity of the Defense open tender is that procurementMethodType was changed from belowThreshold to aboveThresholdUA.defense. Also there is no opportunity to set up enquiryPeriod, it will be assigned automatically.

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

GET /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb HTTP/1.0
Authorization: Bearer broker
Host: lb-api-sandbox.prozorro.gov.ua

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "procurementMethod": "open",
    "mainProcurementCategory": "services",
    "complaintPeriod": {
      "startDate": "2019-10-25T01:00:00+03:00",
      "endDate": "2019-11-08T00:00:00+02:00"
    },
    "enquiryPeriod": {
      "startDate": "2019-10-25T01:00:00+03:00",
      "clarificationsUntil": "2019-11-08T00:00:00+02:00",
      "endDate": "2019-11-06T00:00:00+02:00"
    },
    "submissionMethod": "electronicAuction",
    "next_check": "2019-11-10T00:00:00+02:00",
    "procuringEntity": {
      "contactPoint": {
        "url": "http://sch10.edu.vn.ua/",
        "name": "Куца Світлана Валентинівна",
        "telephone": "+380 (432) 46-53-02"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "21725150",
        "legalName": "Заклад \"Загальноосвітня школа І-ІІІ ступенів № 10 Вінницької міської ради\""
      },
      "kind": "defense",
      "address": {
        "postalCode": "21027",
        "countryName": "Україна",
        "streetAddress": "вул. Стахурського. 22",
        "region": "м. Вінниця",
        "locality": "м. Вінниця"
      },
      "name": "ЗОСШ #10 м.Вінниці"
    },
    "owner": "broker",
    "id": "127bd59fdd464def8d1189b954eefcbb",
    "title": "футляри до державних нагород",
    "tenderID": "UA-2019-10-25-000001",
    "dateModified": "2019-10-25T01:00:00+03:00",
    "status": "active.tendering",
    "tenderPeriod": {
      "startDate": "2019-10-25T01:00:00+03:00",
      "endDate": "2019-11-10T00:00:00+02:00"
    },
    "auctionPeriod": {
      "shouldStartAfter": "2019-11-10T00:00:00+02:00"
    },
    "procurementMethodType": "aboveThresholdUA.defense",
    "date": "2019-10-25T01:00:00+03:00",
    "milestones": [
      {
        "code": "prepayment",
        "sequenceNumber": 0,
        "title": "signingTheContract",
        "duration": {
          "type": "banking",
          "days": 2
        },
        "percentage": 45.55,
        "type": "financing",
        "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
      },
      {
        "code": "postpayment",
        "sequenceNumber": 0,
        "title": "deliveryOfGoods",
        "duration": {
          "type": "calendar",
          "days": 900
        },
        "percentage": 54.45,
        "type": "financing",
        "id": "3f86a6cd00524bf9b6a2ceb1654234a2"
      }
    ],
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "Послуги шкільних їдалень",
        "classification": {
          "scheme": "ДК021",
          "description": "Послуги з харчування у школах",
          "id": "55523100-3"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "Послуги шкільних їдалень"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2019-11-14T00:00:00+02:00",
          "endDate": "2019-12-14T00:00:00+02:00"
        },
        "id": "576b1d3783f148f9a65c2664ef759400",
        "quantity": 1.0
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "awardCriteria": "lowestCost"
  }
}

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

Let’s see what listing of tenders reveals us:

GET /api/2.5/tenders?opt_pretty=1 HTTP/1.0
Host: lb-api-sandbox.prozorro.gov.ua

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "next_page": {
    "path": "/api/2.5/tenders?offset=2019-10-25T01%3A00%3A00%2B03%3A00",
    "uri": "http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders?offset=2019-10-25T01%3A00%3A00%2B03%3A00",
    "offset": "2019-10-25T01:00:00+03:00"
  },
  "data": [
    {
      "id": "127bd59fdd464def8d1189b954eefcbb",
      "dateModified": "2019-10-25T01:00:00+03: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.

Modifying tender

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

PATCH /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb?acc_token=78250e99c9974266933e656d51b30048 HTTP/1.0
Authorization: Bearer broker
Content-Length: 68
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "tenderPeriod": {
      "endDate": "2019-11-09T01:00:10+03:00"
    }
  }
}

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "procurementMethod": "open",
    "mainProcurementCategory": "services",
    "complaintPeriod": {
      "startDate": "2019-10-25T01:00:00+03:00",
      "endDate": "2019-11-07T00:00:00+03:00"
    },
    "enquiryPeriod": {
      "startDate": "2019-10-25T01:00:00+03:00",
      "clarificationsUntil": "2019-11-08T00:00:00+03:00",
      "endDate": "2019-11-06T00:00:00+03:00",
      "invalidationDate": "2019-10-25T01:00:00+03:00"
    },
    "submissionMethod": "electronicAuction",
    "next_check": "2019-11-09T00:00:10+02:00",
    "procuringEntity": {
      "contactPoint": {
        "url": "http://sch10.edu.vn.ua/",
        "name": "Куца Світлана Валентинівна",
        "telephone": "+380 (432) 46-53-02"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "21725150",
        "legalName": "Заклад \"Загальноосвітня школа І-ІІІ ступенів № 10 Вінницької міської ради\""
      },
      "kind": "defense",
      "address": {
        "postalCode": "21027",
        "countryName": "Україна",
        "streetAddress": "вул. Стахурського. 22",
        "region": "м. Вінниця",
        "locality": "м. Вінниця"
      },
      "name": "ЗОСШ #10 м.Вінниці"
    },
    "owner": "broker",
    "id": "127bd59fdd464def8d1189b954eefcbb",
    "title": "футляри до державних нагород",
    "tenderID": "UA-2019-10-25-000001",
    "dateModified": "2019-10-25T01:00:00+03:00",
    "status": "active.tendering",
    "tenderPeriod": {
      "startDate": "2019-10-25T01:00:00+03:00",
      "endDate": "2019-11-09T01:00:10+03:00"
    },
    "auctionPeriod": {
      "shouldStartAfter": "2019-11-10T00:00:00+03:00"
    },
    "procurementMethodType": "aboveThresholdUA.defense",
    "date": "2019-10-25T01:00:00+03:00",
    "milestones": [
      {
        "code": "prepayment",
        "sequenceNumber": 0,
        "title": "signingTheContract",
        "duration": {
          "type": "banking",
          "days": 2
        },
        "percentage": 45.55,
        "type": "financing",
        "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
      },
      {
        "code": "postpayment",
        "sequenceNumber": 0,
        "title": "deliveryOfGoods",
        "duration": {
          "type": "calendar",
          "days": 900
        },
        "percentage": 54.45,
        "type": "financing",
        "id": "3f86a6cd00524bf9b6a2ceb1654234a2"
      }
    ],
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "Послуги шкільних їдалень",
        "classification": {
          "scheme": "ДК021",
          "description": "Послуги з харчування у школах",
          "id": "55523100-3"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "Послуги шкільних їдалень"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2019-11-14T00:00:00+02:00",
          "endDate": "2019-12-14T00:00:00+02:00"
        },
        "id": "576b1d3783f148f9a65c2664ef759400",
        "quantity": 1.0
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "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/2.5/tenders?opt_pretty=1 HTTP/1.0
Host: lb-api-sandbox.prozorro.gov.ua

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "next_page": {
    "path": "/api/2.5/tenders?offset=2019-10-25T01%3A00%3A00%2B03%3A00",
    "uri": "http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders?offset=2019-10-25T01%3A00%3A00%2B03%3A00",
    "offset": "2019-10-25T01:00:00+03:00"
  },
  "data": [
    {
      "id": "127bd59fdd464def8d1189b954eefcbb",
      "dateModified": "2019-10-25T01:00:00+03:00"
    }
  ]
}

Procuring entity can not change tender if there are less than 7 days before tenderPeriod ends. Changes will not be accepted by API.

PATCH /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb?acc_token=78250e99c9974266933e656d51b30048 HTTP/1.0
Authorization: Bearer broker
Content-Length: 38
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "value": {
      "amount": 501.0
    }
  }
}

Response: 403 Forbidden
Content-Type: application/json; charset=UTF-8
{
  "status": "error",
  "errors": [
    {
      "description": "tenderPeriod should be extended by 2 working days",
      "location": "body",
      "name": "data"
    }
  ]
}

That is why tenderPeriod has to be extended by 7 days.

PATCH /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb?acc_token=78250e99c9974266933e656d51b30048 HTTP/1.0
Authorization: Bearer broker
Content-Length: 113
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "tenderPeriod": {
      "endDate": "2019-11-02T01:00:01+03:00"
    },
    "value": {
      "currency": "UAH",
      "amount": 501
    }
  }
}

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "procurementMethod": "open",
    "mainProcurementCategory": "services",
    "complaintPeriod": {
      "startDate": "2019-10-12T01:00:00+03:00",
      "endDate": "2019-10-31T00:00:00+03:00"
    },
    "enquiryPeriod": {
      "startDate": "2019-10-12T01:00:00+03:00",
      "clarificationsUntil": "2019-11-01T00:00:00+03:00",
      "endDate": "2019-10-30T00:00:00+03:00",
      "invalidationDate": "2019-10-25T01:00:01+03:00"
    },
    "submissionMethod": "electronicAuction",
    "next_check": "2019-11-02T00:00:01+02:00",
    "procuringEntity": {
      "contactPoint": {
        "url": "http://sch10.edu.vn.ua/",
        "name": "Куца Світлана Валентинівна",
        "telephone": "+380 (432) 46-53-02"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "21725150",
        "legalName": "Заклад \"Загальноосвітня школа І-ІІІ ступенів № 10 Вінницької міської ради\""
      },
      "kind": "defense",
      "address": {
        "postalCode": "21027",
        "countryName": "Україна",
        "streetAddress": "вул. Стахурського. 22",
        "region": "м. Вінниця",
        "locality": "м. Вінниця"
      },
      "name": "ЗОСШ #10 м.Вінниці"
    },
    "questions": [
      {
        "description": "Просимо додати таблицю потрібної калорійності харчування",
        "dateAnswered": "2019-10-25T01:00:00+03:00",
        "title": "Калорійність",
        "date": "2019-10-25T01:00:00+03:00",
        "answer": "Таблицю додано в файлі \"Kalorijnist.xslx\"",
        "id": "d3803d4479ee43cc9ed13e8d5f59d394",
        "questionOf": "tender"
      }
    ],
    "owner": "broker",
    "id": "127bd59fdd464def8d1189b954eefcbb",
    "guarantee": {
      "currency": "USD",
      "amount": 8.0
    },
    "documents": [
      {
        "hash": "md5:00000000000000000000000000000000",
        "author": "tender_owner",
        "title": "Notice.pdf",
        "url": "http://public-docs-sandbox.prozorro.gov.ua/get/a9ab51e8a42a44b687a43b3a62414c36?KeyID=a8968c46&Signature=CG2s%2FcG7rQ%252B2B%2F3w%252Bb8QhV4MNX4V85fU5emXeDdqgwNZET10gAlb9WkWSqHinqQSJmJSOd%2FVJL%2FqbQhEuBXTAw%253D%253D",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2019-10-25T01:00:00+03:00",
        "id": "05b87dabf12244cd94fe2f51636ad002",
        "dateModified": "2019-10-25T01:00:00+03:00"
      },
      {
        "hash": "md5:00000000000000000000000000000000",
        "author": "tender_owner",
        "title": "AwardCriteria.pdf",
        "url": "http://public-docs-sandbox.prozorro.gov.ua/get/6f212629e7e2470f9511a6ad67de57a0?KeyID=a8968c46&Signature=IV6gbyGAfhUQRz20VDT4AFzwKBxGpIra6PUrdwbeEhLU3YaEu0FdfsD%252Btjg06QtC3Mo68QYE2StBDLB0sqGQBQ%253D%253D",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2019-10-25T01:00:00+03:00",
        "id": "af19de0bb1e149869a2fa37596133890",
        "dateModified": "2019-10-25T01:00:00+03:00"
      },
      {
        "hash": "md5:00000000000000000000000000000000",
        "author": "tender_owner",
        "title": "AwardCriteria-2.pdf",
        "url": "http://public-docs-sandbox.prozorro.gov.ua/get/9d677673b67647ef8daf56d585b9cb5c?KeyID=a8968c46&Signature=RUklL7sP%252ByI%2Fszpq1HkUN2MPgx%2FxRgra1dhJg6QZiQ5AqY7PUQ7Rpo1EeJMVLiANHdon3HmXll14JLSvmk4IBA%253D%253D",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2019-10-25T01:00:00+03:00",
        "id": "af19de0bb1e149869a2fa37596133890",
        "dateModified": "2019-10-25T01:00:00+03:00"
      }
    ],
    "title": "футляри до державних нагород",
    "tenderID": "UA-2019-10-25-000001",
    "dateModified": "2019-10-25T01:00:01+03:00",
    "status": "active.tendering",
    "tenderPeriod": {
      "startDate": "2019-10-12T01:00:00+03:00",
      "endDate": "2019-11-02T01:00:01+03:00"
    },
    "auctionPeriod": {
      "startDate": "2019-10-27T01:00:00+03:00",
      "shouldStartAfter": "2019-11-03T00:00:00+03:00"
    },
    "procurementMethodType": "aboveThresholdUA.defense",
    "date": "2019-10-25T01:00:00+03:00",
    "milestones": [
      {
        "code": "prepayment",
        "sequenceNumber": 0,
        "title": "signingTheContract",
        "duration": {
          "type": "banking",
          "days": 2
        },
        "percentage": 45.55,
        "type": "financing",
        "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
      },
      {
        "code": "postpayment",
        "sequenceNumber": 0,
        "title": "deliveryOfGoods",
        "duration": {
          "type": "calendar",
          "days": 900
        },
        "percentage": 54.45,
        "type": "financing",
        "id": "3f86a6cd00524bf9b6a2ceb1654234a2"
      }
    ],
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "Послуги шкільних їдалень",
        "classification": {
          "scheme": "ДК021",
          "description": "Послуги з харчування у школах",
          "id": "55523100-3"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "Послуги шкільних їдалень"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2019-11-14T00:00:00+02:00",
          "endDate": "2019-12-14T00:00:00+02:00"
        },
        "id": "576b1d3783f148f9a65c2664ef759400",
        "quantity": 1.0
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 501.0,
      "valueAddedTaxIncluded": true
    },
    "awardCriteria": "lowestCost"
  }
}

Uploading documentation

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

POST /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/documents?acc_token=78250e99c9974266933e656d51b30048 HTTP/1.0
Authorization: Bearer broker
Content-Length: 142
Content-Type: multipart/form-data; boundary=---BOUNDARY
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
-----BOUNDARY
Content-Disposition: form-data; name="file"; filename="Notice.pdf"
Content-Type: application/pdf

content
-----BOUNDARY--


Response: 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/documents/05b87dabf12244cd94fe2f51636ad002
{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "author": "tender_owner",
    "title": "Notice.pdf",
    "url": "http://public-docs-sandbox.prozorro.gov.ua/get/a9ab51e8a42a44b687a43b3a62414c36?KeyID=a8968c46&Signature=CG2s%2FcG7rQ%252B2B%2F3w%252Bb8QhV4MNX4V85fU5emXeDdqgwNZET10gAlb9WkWSqHinqQSJmJSOd%2FVJL%2FqbQhEuBXTAw%253D%253D",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2019-10-25T01:00:00+03:00",
    "id": "05b87dabf12244cd94fe2f51636ad002",
    "dateModified": "2019-10-25T01:00:00+03: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/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/documents/05b87dabf12244cd94fe2f51636ad002?acc_token=78250e99c9974266933e656d51b30048 HTTP/1.0
Authorization: Bearer broker
Host: lb-api-sandbox.prozorro.gov.ua

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "author": "tender_owner",
    "title": "Notice.pdf",
    "url": "http://public-docs-sandbox.prozorro.gov.ua/get/a9ab51e8a42a44b687a43b3a62414c36?KeyID=a8968c46&Signature=CG2s%2FcG7rQ%252B2B%2F3w%252Bb8QhV4MNX4V85fU5emXeDdqgwNZET10gAlb9WkWSqHinqQSJmJSOd%2FVJL%2FqbQhEuBXTAw%253D%253D",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2019-10-25T01:00:00+03:00",
    "previousVersions": [],
    "id": "05b87dabf12244cd94fe2f51636ad002",
    "dateModified": "2019-10-25T01:00:00+03:00"
  }
}

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

POST /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/documents?acc_token=78250e99c9974266933e656d51b30048 HTTP/1.0
Authorization: Bearer broker
Content-Length: 149
Content-Type: multipart/form-data; boundary=---BOUNDARY
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
-----BOUNDARY
Content-Disposition: form-data; name="file"; filename="AwardCriteria.pdf"
Content-Type: application/pdf

content
-----BOUNDARY--


Response: 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/documents/af19de0bb1e149869a2fa37596133890
{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "author": "tender_owner",
    "title": "AwardCriteria.pdf",
    "url": "http://public-docs-sandbox.prozorro.gov.ua/get/6f212629e7e2470f9511a6ad67de57a0?KeyID=a8968c46&Signature=IV6gbyGAfhUQRz20VDT4AFzwKBxGpIra6PUrdwbeEhLU3YaEu0FdfsD%252Btjg06QtC3Mo68QYE2StBDLB0sqGQBQ%253D%253D",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2019-10-25T01:00:00+03:00",
    "id": "af19de0bb1e149869a2fa37596133890",
    "dateModified": "2019-10-25T01:00:00+03:00"
  }
}

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

GET /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/documents?acc_token=78250e99c9974266933e656d51b30048 HTTP/1.0
Authorization: Bearer broker
Host: lb-api-sandbox.prozorro.gov.ua

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": [
    {
      "hash": "md5:00000000000000000000000000000000",
      "author": "tender_owner",
      "title": "Notice.pdf",
      "url": "http://public-docs-sandbox.prozorro.gov.ua/get/a9ab51e8a42a44b687a43b3a62414c36?KeyID=a8968c46&Signature=CG2s%2FcG7rQ%252B2B%2F3w%252Bb8QhV4MNX4V85fU5emXeDdqgwNZET10gAlb9WkWSqHinqQSJmJSOd%2FVJL%2FqbQhEuBXTAw%253D%253D",
      "format": "application/pdf",
      "documentOf": "tender",
      "datePublished": "2019-10-25T01:00:00+03:00",
      "id": "05b87dabf12244cd94fe2f51636ad002",
      "dateModified": "2019-10-25T01:00:00+03:00"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "author": "tender_owner",
      "title": "AwardCriteria.pdf",
      "url": "http://public-docs-sandbox.prozorro.gov.ua/get/6f212629e7e2470f9511a6ad67de57a0?KeyID=a8968c46&Signature=IV6gbyGAfhUQRz20VDT4AFzwKBxGpIra6PUrdwbeEhLU3YaEu0FdfsD%252Btjg06QtC3Mo68QYE2StBDLB0sqGQBQ%253D%253D",
      "format": "application/pdf",
      "documentOf": "tender",
      "datePublished": "2019-10-25T01:00:00+03:00",
      "id": "af19de0bb1e149869a2fa37596133890",
      "dateModified": "2019-10-25T01:00:00+03:00"
    }
  ]
}

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

PUT /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/documents/af19de0bb1e149869a2fa37596133890?acc_token=78250e99c9974266933e656d51b30048 HTTP/1.0
Authorization: Bearer broker
Content-Length: 152
Content-Type: multipart/form-data; boundary=---BOUNDARY
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
-----BOUNDARY
Content-Disposition: form-data; name="file"; filename="AwardCriteria-2.pdf"
Content-Type: application/pdf

content2
-----BOUNDARY--


Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "author": "tender_owner",
    "title": "AwardCriteria-2.pdf",
    "url": "http://public-docs-sandbox.prozorro.gov.ua/get/9d677673b67647ef8daf56d585b9cb5c?KeyID=a8968c46&Signature=RUklL7sP%252ByI%2Fszpq1HkUN2MPgx%2FxRgra1dhJg6QZiQ5AqY7PUQ7Rpo1EeJMVLiANHdon3HmXll14JLSvmk4IBA%253D%253D",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2019-10-25T01:00:00+03:00",
    "id": "af19de0bb1e149869a2fa37596133890",
    "dateModified": "2019-10-25T01:00:00+03:00"
  }
}

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

GET /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/documents HTTP/1.0
Authorization: Bearer broker
Host: lb-api-sandbox.prozorro.gov.ua

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": [
    {
      "hash": "md5:00000000000000000000000000000000",
      "author": "tender_owner",
      "title": "Notice.pdf",
      "url": "http://public-docs-sandbox.prozorro.gov.ua/get/a9ab51e8a42a44b687a43b3a62414c36?KeyID=a8968c46&Signature=CG2s%2FcG7rQ%252B2B%2F3w%252Bb8QhV4MNX4V85fU5emXeDdqgwNZET10gAlb9WkWSqHinqQSJmJSOd%2FVJL%2FqbQhEuBXTAw%253D%253D",
      "format": "application/pdf",
      "documentOf": "tender",
      "datePublished": "2019-10-25T01:00:00+03:00",
      "id": "05b87dabf12244cd94fe2f51636ad002",
      "dateModified": "2019-10-25T01:00:00+03:00"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "author": "tender_owner",
      "title": "AwardCriteria-2.pdf",
      "url": "http://public-docs-sandbox.prozorro.gov.ua/get/9d677673b67647ef8daf56d585b9cb5c?KeyID=a8968c46&Signature=RUklL7sP%252ByI%2Fszpq1HkUN2MPgx%2FxRgra1dhJg6QZiQ5AqY7PUQ7Rpo1EeJMVLiANHdon3HmXll14JLSvmk4IBA%253D%253D",
      "format": "application/pdf",
      "documentOf": "tender",
      "datePublished": "2019-10-25T01:00:00+03:00",
      "id": "af19de0bb1e149869a2fa37596133890",
      "dateModified": "2019-10-25T01:00:00+03:00"
    }
  ]
}

Enquiries

When tender has active.tendering status and Tender.enqueryPeriod.endDate hasn’t come yet, interested parties can ask questions:

POST /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/questions HTTP/1.0
Authorization: Bearer broker
Content-Length: 1088
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "author": {
      "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": {
        "countryName": "Україна",
        "postalCode": "79013",
        "region": "м. Львів",
        "streetAddress": "вул. Островського, 34",
        "locality": "м. Львів"
      }
    },
    "description": "Просимо додати таблицю потрібної калорійності харчування",
    "title": "Калорійність"
  }
}

Response: 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/questions/d3803d4479ee43cc9ed13e8d5f59d394
{
  "data": {
    "description": "Просимо додати таблицю потрібної калорійності харчування",
    "author": {
      "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": "м. Львів"
      }
    },
    "title": "Калорійність",
    "date": "2019-10-25T01:00:00+03:00",
    "id": "d3803d4479ee43cc9ed13e8d5f59d394",
    "questionOf": "tender"
  }
}

Procuring entity can answer them:

PATCH /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/questions/d3803d4479ee43cc9ed13e8d5f59d394?acc_token=78250e99c9974266933e656d51b30048 HTTP/1.0
Authorization: Bearer broker
Content-Length: 162
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "answer": "Таблицю додано в файлі \"Kalorijnist.xslx\""
  }
}

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "description": "Просимо додати таблицю потрібної калорійності харчування",
    "dateAnswered": "2019-10-25T01:00:00+03:00",
    "title": "Калорійність",
    "date": "2019-10-25T01:00:00+03:00",
    "answer": "Таблицю додано в файлі \"Kalorijnist.xslx\"",
    "id": "d3803d4479ee43cc9ed13e8d5f59d394",
    "questionOf": "tender"
  }
}

One can retrieve either questions list:

GET /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/questions HTTP/1.0
Authorization: Bearer broker
Host: lb-api-sandbox.prozorro.gov.ua

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": [
    {
      "description": "Просимо додати таблицю потрібної калорійності харчування",
      "dateAnswered": "2019-10-25T01:00:00+03:00",
      "title": "Калорійність",
      "date": "2019-10-25T01:00:00+03:00",
      "answer": "Таблицю додано в файлі \"Kalorijnist.xslx\"",
      "id": "d3803d4479ee43cc9ed13e8d5f59d394",
      "questionOf": "tender"
    }
  ]
}

or individual answer:

GET /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/questions/d3803d4479ee43cc9ed13e8d5f59d394 HTTP/1.0
Authorization: Bearer broker
Host: lb-api-sandbox.prozorro.gov.ua

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "description": "Просимо додати таблицю потрібної калорійності харчування",
    "dateAnswered": "2019-10-25T01:00:00+03:00",
    "title": "Калорійність",
    "date": "2019-10-25T01:00:00+03:00",
    "answer": "Таблицю додано в файлі \"Kalorijnist.xslx\"",
    "id": "d3803d4479ee43cc9ed13e8d5f59d394",
    "questionOf": "tender"
  }
}

Enquiries can be made only during Tender.enqueryPeriod

POST /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/questions HTTP/1.0
Authorization: Bearer broker
Content-Length: 1088
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "author": {
      "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": {
        "countryName": "Україна",
        "postalCode": "79013",
        "region": "м. Львів",
        "streetAddress": "вул. Островського, 34",
        "locality": "м. Львів"
      }
    },
    "description": "Просимо додати таблицю потрібної калорійності харчування",
    "title": "Калорійність"
  }
}

Response: 403 Forbidden
Content-Type: application/json; charset=UTF-8
{
  "status": "error",
  "errors": [
    {
      "description": "Can add question only in enquiryPeriod",
      "location": "body",
      "name": "data"
    }
  ]
}

Registering bid

Tender status active.tendering allows registration of bids.

Bidder can register a bid:

POST /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/bids HTTP/1.0
Authorization: Bearer broker
Content-Length: 935
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "selfEligible": true,
    "tenderers": [
      {
        "contactPoint": {
          "email": "soleksuk@gmail.com",
          "telephone": "+380 (432) 21-69-30",
          "name": "Сергій Олексюк"
        },
        "scale": "micro",
        "name": "ДКП «Школяр»",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137256",
          "uri": "http://www.sc.gov.ua/"
        },
        "address": {
          "countryName": "Україна",
          "postalCode": "21100",
          "region": "м. Вінниця",
          "streetAddress": "вул. Островського, 33",
          "locality": "м. Вінниця"
        }
      }
    ],
    "selfQualified": true,
    "value": {
      "amount": 500
    },
    "subcontractingDetails": "ДКП «Орфей», Україна"
  }
}

Response: 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/bids/0fa7c814dd0e42e3b1f8b4f2623ab07d
{
  "access": {
    "transfer": "d5756578a82f48fba71a9186e94a15de",
    "token": "d2f6e6c8a7a54d2cb138ef2ef5de765a"
  },
  "data": {
    "status": "active",
    "selfEligible": true,
    "id": "0fa7c814dd0e42e3b1f8b4f2623ab07d",
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "subcontractingDetails": "ДКП «Орфей», Україна",
    "tenderers": [
      {
        "contactPoint": {
          "email": "soleksuk@gmail.com",
          "telephone": "+380 (432) 21-69-30",
          "name": "Сергій Олексюк"
        },
        "scale": "micro",
        "name": "ДКП «Школяр»",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137256",
          "uri": "http://www.sc.gov.ua/"
        },
        "address": {
          "postalCode": "21100",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 33",
          "region": "м. Вінниця",
          "locality": "м. Вінниця"
        }
      }
    ],
    "date": "2019-10-25T01:00:01+03:00",
    "selfQualified": true
  }
}

Proposal Uploading

Then bidder should upload proposal document(s):

POST /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/bids/0fa7c814dd0e42e3b1f8b4f2623ab07d/documents?acc_token=d2f6e6c8a7a54d2cb138ef2ef5de765a HTTP/1.0
Authorization: Bearer broker
Content-Length: 144
Content-Type: multipart/form-data; boundary=---BOUNDARY
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
-----BOUNDARY
Content-Disposition: form-data; name="file"; filename="Proposal.pdf"
Content-Type: application/pdf

content
-----BOUNDARY--


Response: 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/bids/0fa7c814dd0e42e3b1f8b4f2623ab07d/documents/5ef15c2a462344429ef05b5446d7e47d
{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "title": "Proposal.pdf",
    "url": "http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/bids/0fa7c814dd0e42e3b1f8b4f2623ab07d/documents/5ef15c2a462344429ef05b5446d7e47d?download=43422c87d39d4f4495d7b41f9e56155a",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2019-10-25T01:00:01+03:00",
    "id": "5ef15c2a462344429ef05b5446d7e47d",
    "dateModified": "2019-10-25T01:00:01+03:00"
  }
}

It is possible to check the uploaded documents:

GET /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/bids/0fa7c814dd0e42e3b1f8b4f2623ab07d/documents?acc_token=d2f6e6c8a7a54d2cb138ef2ef5de765a HTTP/1.0
Authorization: Bearer broker
Host: lb-api-sandbox.prozorro.gov.ua

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": [
    {
      "hash": "md5:00000000000000000000000000000000",
      "title": "Proposal.pdf",
      "url": "http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/bids/0fa7c814dd0e42e3b1f8b4f2623ab07d/documents/5ef15c2a462344429ef05b5446d7e47d?download=43422c87d39d4f4495d7b41f9e56155a",
      "format": "application/pdf",
      "documentOf": "tender",
      "datePublished": "2019-10-25T01:00:01+03:00",
      "id": "5ef15c2a462344429ef05b5446d7e47d",
      "dateModified": "2019-10-25T01:00:01+03:00"
    }
  ]
}

Bid invalidation

If tender is modified, status of all bid proposals will be changed to invalid. Bid proposal will look the following way after tender has been modified:

GET /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/bids/0fa7c814dd0e42e3b1f8b4f2623ab07d?acc_token=d2f6e6c8a7a54d2cb138ef2ef5de765a HTTP/1.0
Authorization: Bearer broker
Host: lb-api-sandbox.prozorro.gov.ua

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "status": "invalid",
    "id": "0fa7c814dd0e42e3b1f8b4f2623ab07d"
  }
}

Bid confirmation

Bidder should confirm bid proposal:

PATCH /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/bids/0fa7c814dd0e42e3b1f8b4f2623ab07d?acc_token=d2f6e6c8a7a54d2cb138ef2ef5de765a HTTP/1.0
Authorization: Bearer broker
Content-Length: 30
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "status": "active"
  }
}

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "status": "active",
    "documents": [
      {
        "hash": "md5:00000000000000000000000000000000",
        "title": "Proposal.pdf",
        "url": "http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/bids/0fa7c814dd0e42e3b1f8b4f2623ab07d/documents/5ef15c2a462344429ef05b5446d7e47d?download=43422c87d39d4f4495d7b41f9e56155a",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2019-10-25T01:00:01+03:00",
        "id": "5ef15c2a462344429ef05b5446d7e47d",
        "dateModified": "2019-10-25T01:00:01+03:00"
      }
    ],
    "selfEligible": true,
    "id": "0fa7c814dd0e42e3b1f8b4f2623ab07d",
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "subcontractingDetails": "ДКП «Орфей», Україна",
    "tenderers": [
      {
        "contactPoint": {
          "email": "soleksuk@gmail.com",
          "telephone": "+380 (432) 21-69-30",
          "name": "Сергій Олексюк"
        },
        "scale": "micro",
        "name": "ДКП «Школяр»",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137256",
          "uri": "http://www.sc.gov.ua/"
        },
        "address": {
          "postalCode": "21100",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 33",
          "region": "м. Вінниця",
          "locality": "м. Вінниця"
        }
      }
    ],
    "date": "2019-10-25T01:00:01+03:00",
    "selfQualified": true
  }
}

Defense open tender demands at least two bidders, so there should be at least two bid proposals registered to move to auction stage:

POST /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/bids HTTP/1.0
Authorization: Bearer broker
Content-Length: 765
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "selfEligible": true,
    "selfQualified": true,
    "value": {
      "amount": 499
    },
    "tenderers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "scale": "sme",
        "name": "ДКП «Книга»",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "address": {
          "countryName": "Україна",
          "postalCode": "79013",
          "region": "м. Львів",
          "streetAddress": "вул. Островського, 34",
          "locality": "м. Львів"
        }
      }
    ]
  }
}

Response: 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/bids/7e335c57715e407da04305d26eb0bb90
{
  "access": {
    "transfer": "f349d3fec1284796be806de9b698acd6",
    "token": "bbf4baf749f54990802f4c33f55e7fae"
  },
  "data": {
    "status": "active",
    "selfEligible": true,
    "value": {
      "currency": "UAH",
      "amount": 499.0,
      "valueAddedTaxIncluded": true
    },
    "selfQualified": true,
    "tenderers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "scale": "sme",
        "name": "ДКП «Книга»",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "address": {
          "postalCode": "79013",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 34",
          "region": "м. Львів",
          "locality": "м. Львів"
        }
      }
    ],
    "date": "2019-10-25T01:00:01+03:00",
    "id": "7e335c57715e407da04305d26eb0bb90"
  }
}

Pay attention!

If there are no bidders, procurement is unsuccessful.

If there is only 1 bidder, then procedure will move to active.qualification status (see confirming qualification).

If there are 2 or more bidders, then auction will start.

Auction

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

GET /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb HTTP/1.0
Authorization: Bearer broker
Host: lb-api-sandbox.prozorro.gov.ua

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "procurementMethod": "open",
    "mainProcurementCategory": "services",
    "complaintPeriod": {
      "startDate": "2019-10-09T01:00:01+03:00",
      "endDate": "2019-10-23T00:00:00+03:00"
    },
    "auctionUrl": "http://auction-sandbox.prozorro.gov.ua/tenders/127bd59fdd464def8d1189b954eefcbb",
    "enquiryPeriod": {
      "startDate": "2019-10-09T01:00:01+03:00",
      "clarificationsUntil": "2019-10-25T00:00:00+03:00",
      "endDate": "2019-10-22T01:00:01+03:00",
      "invalidationDate": "2019-10-25T01:00:01+03:00"
    },
    "submissionMethod": "electronicAuction",
    "next_check": "2019-10-25T01:36:01+03:00",
    "procuringEntity": {
      "contactPoint": {
        "url": "http://sch10.edu.vn.ua/",
        "name": "Куца Світлана Валентинівна",
        "telephone": "+380 (432) 46-53-02"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "21725150",
        "legalName": "Заклад \"Загальноосвітня школа І-ІІІ ступенів № 10 Вінницької міської ради\""
      },
      "kind": "defense",
      "address": {
        "postalCode": "21027",
        "countryName": "Україна",
        "streetAddress": "вул. Стахурського. 22",
        "region": "м. Вінниця",
        "locality": "м. Вінниця"
      },
      "name": "ЗОСШ #10 м.Вінниці"
    },
    "questions": [
      {
        "description": "Просимо додати таблицю потрібної калорійності харчування",
        "dateAnswered": "2019-10-25T01:00:00+03:00",
        "title": "Калорійність",
        "date": "2019-10-25T01:00:00+03:00",
        "answer": "Таблицю додано в файлі \"Kalorijnist.xslx\"",
        "id": "d3803d4479ee43cc9ed13e8d5f59d394",
        "questionOf": "tender"
      }
    ],
    "owner": "broker",
    "id": "127bd59fdd464def8d1189b954eefcbb",
    "guarantee": {
      "currency": "USD",
      "amount": 8.0
    },
    "documents": [
      {
        "hash": "md5:00000000000000000000000000000000",
        "author": "tender_owner",
        "title": "Notice.pdf",
        "url": "http://public-docs-sandbox.prozorro.gov.ua/get/a9ab51e8a42a44b687a43b3a62414c36?KeyID=a8968c46&Signature=CG2s%2FcG7rQ%252B2B%2F3w%252Bb8QhV4MNX4V85fU5emXeDdqgwNZET10gAlb9WkWSqHinqQSJmJSOd%2FVJL%2FqbQhEuBXTAw%253D%253D",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2019-10-25T01:00:00+03:00",
        "id": "05b87dabf12244cd94fe2f51636ad002",
        "dateModified": "2019-10-25T01:00:00+03:00"
      },
      {
        "hash": "md5:00000000000000000000000000000000",
        "author": "tender_owner",
        "title": "AwardCriteria.pdf",
        "url": "http://public-docs-sandbox.prozorro.gov.ua/get/6f212629e7e2470f9511a6ad67de57a0?KeyID=a8968c46&Signature=IV6gbyGAfhUQRz20VDT4AFzwKBxGpIra6PUrdwbeEhLU3YaEu0FdfsD%252Btjg06QtC3Mo68QYE2StBDLB0sqGQBQ%253D%253D",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2019-10-25T01:00:00+03:00",
        "id": "af19de0bb1e149869a2fa37596133890",
        "dateModified": "2019-10-25T01:00:00+03:00"
      },
      {
        "hash": "md5:00000000000000000000000000000000",
        "author": "tender_owner",
        "title": "AwardCriteria-2.pdf",
        "url": "http://public-docs-sandbox.prozorro.gov.ua/get/9d677673b67647ef8daf56d585b9cb5c?KeyID=a8968c46&Signature=RUklL7sP%252ByI%2Fszpq1HkUN2MPgx%2FxRgra1dhJg6QZiQ5AqY7PUQ7Rpo1EeJMVLiANHdon3HmXll14JLSvmk4IBA%253D%253D",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2019-10-25T01:00:00+03:00",
        "id": "af19de0bb1e149869a2fa37596133890",
        "dateModified": "2019-10-25T01:00:00+03:00"
      }
    ],
    "title": "футляри до державних нагород",
    "tenderID": "UA-2019-10-25-000001",
    "dateModified": "2019-10-25T01:00:01+03:00",
    "status": "active.auction",
    "tenderPeriod": {
      "startDate": "2019-10-09T01:00:01+03:00",
      "endDate": "2019-10-25T01:00:01+03:00"
    },
    "auctionPeriod": {
      "startDate": "2019-10-25T01:00:01+03:00",
      "shouldStartAfter": "2019-10-26T00:00:00+03:00"
    },
    "procurementMethodType": "aboveThresholdUA.defense",
    "date": "2019-10-25T01:00:00+03:00",
    "milestones": [
      {
        "code": "prepayment",
        "sequenceNumber": 0,
        "title": "signingTheContract",
        "duration": {
          "type": "banking",
          "days": 2
        },
        "percentage": 45.55,
        "type": "financing",
        "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
      },
      {
        "code": "postpayment",
        "sequenceNumber": 0,
        "title": "deliveryOfGoods",
        "duration": {
          "type": "calendar",
          "days": 900
        },
        "percentage": 54.45,
        "type": "financing",
        "id": "3f86a6cd00524bf9b6a2ceb1654234a2"
      }
    ],
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "Послуги шкільних їдалень",
        "classification": {
          "scheme": "ДК021",
          "description": "Послуги з харчування у школах",
          "id": "55523100-3"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "Послуги шкільних їдалень"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2019-11-14T00:00:00+02:00",
          "endDate": "2019-12-14T00:00:00+02:00"
        },
        "id": "576b1d3783f148f9a65c2664ef759400",
        "quantity": 1.0
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 501.0,
      "valueAddedTaxIncluded": true
    },
    "awardCriteria": "lowestCost"
  }
}

Bidders can find out their participation URLs via their bids:

GET /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/bids/0fa7c814dd0e42e3b1f8b4f2623ab07d?acc_token=d2f6e6c8a7a54d2cb138ef2ef5de765a HTTP/1.0
Authorization: Bearer broker
Host: lb-api-sandbox.prozorro.gov.ua

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "status": "active",
    "documents": [
      {
        "hash": "md5:00000000000000000000000000000000",
        "title": "Proposal.pdf",
        "url": "http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/bids/0fa7c814dd0e42e3b1f8b4f2623ab07d/documents/5ef15c2a462344429ef05b5446d7e47d?download=43422c87d39d4f4495d7b41f9e56155a",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2019-10-25T01:00:01+03:00",
        "id": "5ef15c2a462344429ef05b5446d7e47d",
        "dateModified": "2019-10-25T01:00:01+03:00"
      }
    ],
    "selfEligible": true,
    "id": "0fa7c814dd0e42e3b1f8b4f2623ab07d",
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "subcontractingDetails": "ДКП «Орфей», Україна",
    "tenderers": [
      {
        "contactPoint": {
          "email": "soleksuk@gmail.com",
          "telephone": "+380 (432) 21-69-30",
          "name": "Сергій Олексюк"
        },
        "scale": "micro",
        "name": "ДКП «Школяр»",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137256",
          "uri": "http://www.sc.gov.ua/"
        },
        "address": {
          "postalCode": "21100",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 33",
          "region": "м. Вінниця",
          "locality": "м. Вінниця"
        }
      }
    ],
    "date": "2019-10-25T01:00:01+03:00",
    "selfQualified": true,
    "participationUrl": "http://auction-sandbox.prozorro.gov.ua/tenders/127bd59fdd464def8d1189b954eefcbb?key_for_bid=0fa7c814dd0e42e3b1f8b4f2623ab07d"
  }
}

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

GET /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/bids/7e335c57715e407da04305d26eb0bb90?acc_token=bbf4baf749f54990802f4c33f55e7fae HTTP/1.0
Authorization: Bearer broker
Host: lb-api-sandbox.prozorro.gov.ua

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "status": "active",
    "selfEligible": true,
    "value": {
      "currency": "UAH",
      "amount": 499.0,
      "valueAddedTaxIncluded": true
    },
    "id": "7e335c57715e407da04305d26eb0bb90",
    "tenderers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "scale": "sme",
        "name": "ДКП «Книга»",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "address": {
          "postalCode": "79013",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 34",
          "region": "м. Львів",
          "locality": "м. Львів"
        }
      }
    ],
    "date": "2019-10-25T01:00:01+03:00",
    "selfQualified": true,
    "participationUrl": "http://auction-sandbox.prozorro.gov.ua/tenders/127bd59fdd464def8d1189b954eefcbb?key_for_bid=7e335c57715e407da04305d26eb0bb90"
  }
}

Confirming qualification

Qualification commission registers its decision via the following call:

PATCH /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/awards/b3a9546810624f718531b61aca1ac59b?acc_token=78250e99c9974266933e656d51b30048 HTTP/1.0
Authorization: Bearer broker
Content-Length: 67
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "status": "active",
    "qualified": true,
    "eligible": true
  }
}

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "status": "active",
    "eligible": true,
    "suppliers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "scale": "sme",
        "name": "ДКП «Книга»",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "address": {
          "postalCode": "79013",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 34",
          "region": "м. Львів",
          "locality": "м. Львів"
        }
      }
    ],
    "complaintPeriod": {
      "startDate": "2019-10-25T01:00:01+03:00",
      "endDate": "2019-11-01T00:00:00+03:00"
    },
    "bid_id": "7e335c57715e407da04305d26eb0bb90",
    "value": {
      "currency": "UAH",
      "amount": 499.0,
      "valueAddedTaxIncluded": true
    },
    "qualified": true,
    "date": "2019-10-25T01:00:01+03:00",
    "id": "b3a9546810624f718531b61aca1ac59b"
  }
}

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/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/contracts/815bd06a9ab34af69743fc32a8451cc6?acc_token=78250e99c9974266933e656d51b30048 HTTP/1.0
Authorization: Bearer broker
Content-Length: 54
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "value": {
      "amount": 238,
      "amountNet": 230
    }
  }
}

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "status": "pending",
    "items": [
      {
        "description": "Послуги шкільних їдалень",
        "classification": {
          "scheme": "ДК021",
          "description": "Послуги з харчування у школах",
          "id": "55523100-3"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "Послуги шкільних їдалень"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2019-11-14T00:00:00+02:00",
          "endDate": "2019-12-14T00:00:00+02:00"
        },
        "id": "576b1d3783f148f9a65c2664ef759400",
        "quantity": 1.0
      }
    ],
    "suppliers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "scale": "sme",
        "name": "ДКП «Книга»",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "address": {
          "postalCode": "79013",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 34",
          "region": "м. Львів",
          "locality": "м. Львів"
        }
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 238.0,
      "amountNet": 230.0,
      "valueAddedTaxIncluded": true
    },
    "date": "2019-10-25T01:00:01+03:00",
    "awardID": "b3a9546810624f718531b61aca1ac59b",
    "id": "815bd06a9ab34af69743fc32a8451cc6",
    "contractID": "UA-2019-10-25-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/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/contracts/815bd06a9ab34af69743fc32a8451cc6?acc_token=78250e99c9974266933e656d51b30048 HTTP/1.0
Authorization: Bearer broker
Content-Length: 53
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "dateSigned": "2019-10-25T01:00:03+03:00"
  }
}

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "status": "pending",
    "items": [
      {
        "description": "Послуги шкільних їдалень",
        "classification": {
          "scheme": "ДК021",
          "description": "Послуги з харчування у школах",
          "id": "55523100-3"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "Послуги шкільних їдалень"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2019-11-14T00:00:00+02:00",
          "endDate": "2019-12-14T00:00:00+02:00"
        },
        "id": "576b1d3783f148f9a65c2664ef759400",
        "quantity": 1.0
      }
    ],
    "suppliers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "scale": "sme",
        "name": "ДКП «Книга»",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "address": {
          "postalCode": "79013",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 34",
          "region": "м. Львів",
          "locality": "м. Львів"
        }
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 238.0,
      "amountNet": 230.0,
      "valueAddedTaxIncluded": true
    },
    "dateSigned": "2019-10-25T01:00:03+03:00",
    "date": "2019-10-25T01:00:01+03:00",
    "awardID": "b3a9546810624f718531b61aca1ac59b",
    "id": "815bd06a9ab34af69743fc32a8451cc6",
    "contractID": "UA-2019-10-25-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/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/contracts/815bd06a9ab34af69743fc32a8451cc6?acc_token=78250e99c9974266933e656d51b30048 HTTP/1.0
Authorization: Bearer broker
Content-Length: 104
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "period": {
      "startDate": "2019-10-25T01:00:03+03:00",
      "endDate": "2020-10-24T01:00:03+03:00"
    }
  }
}

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "status": "pending",
    "items": [
      {
        "description": "Послуги шкільних їдалень",
        "classification": {
          "scheme": "ДК021",
          "description": "Послуги з харчування у школах",
          "id": "55523100-3"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "Послуги шкільних їдалень"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2019-11-14T00:00:00+02:00",
          "endDate": "2019-12-14T00:00:00+02:00"
        },
        "id": "576b1d3783f148f9a65c2664ef759400",
        "quantity": 1.0
      }
    ],
    "suppliers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "scale": "sme",
        "name": "ДКП «Книга»",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "address": {
          "postalCode": "79013",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 34",
          "region": "м. Львів",
          "locality": "м. Львів"
        }
      }
    ],
    "period": {
      "startDate": "2019-10-25T01:00:03+03:00",
      "endDate": "2020-10-24T01:00:03+03:00"
    },
    "value": {
      "currency": "UAH",
      "amount": 238.0,
      "amountNet": 230.0,
      "valueAddedTaxIncluded": true
    },
    "dateSigned": "2019-10-25T01:00:03+03:00",
    "date": "2019-10-25T01:00:01+03:00",
    "awardID": "b3a9546810624f718531b61aca1ac59b",
    "id": "815bd06a9ab34af69743fc32a8451cc6",
    "contractID": "UA-2019-10-25-000001-1"
  }
}

Uploading contract documentation

You can upload contract documents for the Defense open tender procedure.

Let’s upload contract document:

POST /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/contracts/815bd06a9ab34af69743fc32a8451cc6/documents?acc_token=78250e99c9974266933e656d51b30048 HTTP/1.0
Authorization: Bearer broker
Content-Length: 156
Content-Type: multipart/form-data; boundary=---BOUNDARY
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
-----BOUNDARY
Content-Disposition: form-data; name="file"; filename="contract_document.doc"
Content-Type: application/msword

content
-----BOUNDARY--


Response: 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/contracts/815bd06a9ab34af69743fc32a8451cc6/documents/33e8d9794e2c407da7f7ca540d792e9a
{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "title": "contract_document.doc",
    "url": "http://public-docs-sandbox.prozorro.gov.ua/get/a82d35a9b3f5416b8275051b6a1f6393?KeyID=a8968c46&Signature=f8nAQauBv23xEUZzy4QK6E%252B%2F2VBbxW86dJ4TAJUAswGeK7DY%2FWBVxTZxMiX8CrZ7SMI9W0%252BBnqzr0lEb%2FcKPBA%253D%253D",
    "format": "application/msword",
    "documentOf": "tender",
    "datePublished": "2019-10-25T01:00:03+03:00",
    "id": "33e8d9794e2c407da7f7ca540d792e9a",
    "dateModified": "2019-10-25T01:00:03+03:00"
  }
}

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

Let’s view the uploaded contract document:

GET /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/contracts/815bd06a9ab34af69743fc32a8451cc6?acc_token=78250e99c9974266933e656d51b30048 HTTP/1.0
Authorization: Bearer broker
Host: lb-api-sandbox.prozorro.gov.ua

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "status": "pending",
    "documents": [
      {
        "hash": "md5:00000000000000000000000000000000",
        "title": "contract_document.doc",
        "url": "http://public-docs-sandbox.prozorro.gov.ua/get/a82d35a9b3f5416b8275051b6a1f6393?KeyID=a8968c46&Signature=f8nAQauBv23xEUZzy4QK6E%252B%2F2VBbxW86dJ4TAJUAswGeK7DY%2FWBVxTZxMiX8CrZ7SMI9W0%252BBnqzr0lEb%2FcKPBA%253D%253D",
        "format": "application/msword",
        "documentOf": "tender",
        "datePublished": "2019-10-25T01:00:03+03:00",
        "id": "33e8d9794e2c407da7f7ca540d792e9a",
        "dateModified": "2019-10-25T01:00:03+03:00"
      }
    ],
    "items": [
      {
        "description": "Послуги шкільних їдалень",
        "classification": {
          "scheme": "ДК021",
          "description": "Послуги з харчування у школах",
          "id": "55523100-3"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "Послуги шкільних їдалень"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2019-11-14T00:00:00+02:00",
          "endDate": "2019-12-14T00:00:00+02:00"
        },
        "id": "576b1d3783f148f9a65c2664ef759400",
        "quantity": 1.0
      }
    ],
    "suppliers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "scale": "sme",
        "name": "ДКП «Книга»",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "address": {
          "postalCode": "79013",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 34",
          "region": "м. Львів",
          "locality": "м. Львів"
        }
      }
    ],
    "period": {
      "startDate": "2019-10-25T01:00:03+03:00",
      "endDate": "2020-10-24T01:00:03+03:00"
    },
    "dateSigned": "2019-10-25T01:00:03+03:00",
    "value": {
      "currency": "UAH",
      "amount": 238.0,
      "amountNet": 230.0,
      "valueAddedTaxIncluded": true
    },
    "date": "2019-10-25T01:00:01+03:00",
    "awardID": "b3a9546810624f718531b61aca1ac59b",
    "id": "815bd06a9ab34af69743fc32a8451cc6",
    "contractID": "UA-2019-10-25-000001-1"
  }
}

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 prepared reasons.

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/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/cancellations?acc_token=78250e99c9974266933e656d51b30048 HTTP/1.0
Authorization: Bearer broker
Content-Length: 43
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "reason": "cancellation reason"
  }
}

Response: 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/cancellations/2c8220ea5a244315811d83251e9ff4f1
{
  "data": {
    "status": "pending",
    "reason": "cancellation reason",
    "reasonType": "cancelled",
    "date": "2019-10-25T01:00:03+03:00",
    "cancellationOf": "tender",
    "id": "2c8220ea5a244315811d83251e9ff4f1"
  }
}

Filling cancellation with protocol and supplementary documentation

Upload the file contents

POST /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/cancellations/2c8220ea5a244315811d83251e9ff4f1/documents?acc_token=78250e99c9974266933e656d51b30048 HTTP/1.0
Authorization: Bearer broker
Content-Length: 142
Content-Type: multipart/form-data; boundary=---BOUNDARY
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
-----BOUNDARY
Content-Disposition: form-data; name="file"; filename="Notice.pdf"
Content-Type: application/pdf

content
-----BOUNDARY--


Response: 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/cancellations/2c8220ea5a244315811d83251e9ff4f1/documents/a07c11ed15064e1bad53c031eaad847c
{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "title": "Notice.pdf",
    "url": "http://public-docs-sandbox.prozorro.gov.ua/get/0b520ba17040480fb0d9f4572701ba10?KeyID=a8968c46&Signature=T12%252Bd9JlVXgxhvf7gDlyPdF74M1rd26%2F%2FGgOV2D39QPu5aAmqn7SArN5Jl%2FyBrsP9iL%2FKtwINi%2FcdMXULvT2Aw%253D%253D",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2019-10-25T01:00:03+03:00",
    "id": "a07c11ed15064e1bad53c031eaad847c",
    "dateModified": "2019-10-25T01:00:03+03:00"
  }
}

Change the document description and other properties

PATCH /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/cancellations/2c8220ea5a244315811d83251e9ff4f1/documents/a07c11ed15064e1bad53c031eaad847c?acc_token=78250e99c9974266933e656d51b30048 HTTP/1.0
Authorization: Bearer broker
Content-Length: 48
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "description": "Changed description"
  }
}

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "description": "Changed description",
    "title": "Notice.pdf",
    "url": "http://public-docs-sandbox.prozorro.gov.ua/get/0b520ba17040480fb0d9f4572701ba10?KeyID=a8968c46&Signature=T12%252Bd9JlVXgxhvf7gDlyPdF74M1rd26%2F%2FGgOV2D39QPu5aAmqn7SArN5Jl%2FyBrsP9iL%2FKtwINi%2FcdMXULvT2Aw%253D%253D",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2019-10-25T01:00:03+03:00",
    "id": "a07c11ed15064e1bad53c031eaad847c",
    "dateModified": "2019-10-25T01:00:03+03:00"
  }
}

Upload new version of the document

PUT /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/cancellations/2c8220ea5a244315811d83251e9ff4f1/documents/a07c11ed15064e1bad53c031eaad847c?acc_token=78250e99c9974266933e656d51b30048 HTTP/1.0
Authorization: Bearer broker
Content-Length: 145
Content-Type: multipart/form-data; boundary=---BOUNDARY
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
-----BOUNDARY
Content-Disposition: form-data; name="file"; filename="Notice-2.pdf"
Content-Type: application/pdf

content2
-----BOUNDARY--


Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "description": "Changed description",
    "title": "Notice-2.pdf",
    "url": "http://public-docs-sandbox.prozorro.gov.ua/get/a11172b2f6cb4d20990628db4d49bf11?KeyID=a8968c46&Signature=g9DyNouyxNzS83OdEWcgKYeO9ZI8s6wDDIEcuCGlS3M5uybfcTIuM5lNetAMBwn4kIUGEWIdNLFsPiMPnf2kDg%253D%253D",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2019-10-25T01:00:03+03:00",
    "id": "a07c11ed15064e1bad53c031eaad847c",
    "dateModified": "2019-10-25T01:00:03+03:00"
  }
}

Activating the request and cancelling tender

PATCH /api/2.5/tenders/127bd59fdd464def8d1189b954eefcbb/cancellations/2c8220ea5a244315811d83251e9ff4f1?acc_token=78250e99c9974266933e656d51b30048 HTTP/1.0
Authorization: Bearer broker
Content-Length: 30
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "status": "active"
  }
}

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "status": "active",
    "documents": [
      {
        "hash": "md5:00000000000000000000000000000000",
        "description": "Changed description",
        "title": "Notice.pdf",
        "url": "http://public-docs-sandbox.prozorro.gov.ua/get/0b520ba17040480fb0d9f4572701ba10?KeyID=a8968c46&Signature=T12%252Bd9JlVXgxhvf7gDlyPdF74M1rd26%2F%2FGgOV2D39QPu5aAmqn7SArN5Jl%2FyBrsP9iL%2FKtwINi%2FcdMXULvT2Aw%253D%253D",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2019-10-25T01:00:03+03:00",
        "id": "a07c11ed15064e1bad53c031eaad847c",
        "dateModified": "2019-10-25T01:00:03+03:00"
      },
      {
        "hash": "md5:00000000000000000000000000000000",
        "description": "Changed description",
        "title": "Notice-2.pdf",
        "url": "http://public-docs-sandbox.prozorro.gov.ua/get/a11172b2f6cb4d20990628db4d49bf11?KeyID=a8968c46&Signature=g9DyNouyxNzS83OdEWcgKYeO9ZI8s6wDDIEcuCGlS3M5uybfcTIuM5lNetAMBwn4kIUGEWIdNLFsPiMPnf2kDg%253D%253D",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2019-10-25T01:00:03+03:00",
        "id": "a07c11ed15064e1bad53c031eaad847c",
        "dateModified": "2019-10-25T01:00:03+03:00"
      }
    ],
    "reason": "cancellation reason",
    "reasonType": "unsuccessful",
    "date": "2019-10-25T01:00:03+03:00",
    "cancellationOf": "tender",
    "id": "2c8220ea5a244315811d83251e9ff4f1"
  }
}