Multiple Lots Tutorial

Creating tender

Let’s create tender:

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

{
  "data": {
    "procurementMethod": "limited",
    "status": "active",
    "causeDescription": "оригінальний тендер не вдався двічі",
    "title": "Послуги шкільних їдалень",
    "procurementMethodType": "negotiation.quick",
    "title_en": "Services in school canteens",
    "description_en": "Services in school canteens",
    "causeDescription_ru": "оригинальный тендер не получился дважды",
    "causeDescription_en": "original tender has failed twice",
    "procuringEntity": {
      "kind": "general",
      "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": "м. Вінниця"
      }
    },
    "title_ru": "Услуги школьных столовых",
    "items": [
      {
        "description": "Послуги шкільних їдалень",
        "classification": {
          "scheme": "ДК021",
          "description": "Послуги з харчування у школах",
          "id": "55523100-3"
        },
        "description_en": "Services in school canteens",
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "description": "Послуги шкільних їдалень",
            "id": "55.51.10.300"
          }
        ],
        "deliveryAddress": {
          "countryName": "Україна",
          "postalCode": "79000",
          "region": "м. Київ",
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2017-06-21T20:02:22.515286",
          "endDate": "2017-06-24T20:02:22.515286"
        },
        "description_ru": "Услуги школьных столовых",
        "id": "2dc54675d6364e2baffbc0f8e74432ac"
      }
    ],
    "owner": "broker",
    "value": {
      "currency": "UAH",
      "amount": 500000,
      "valueAddedTaxIncluded": true
    },
    "description_ru": "Услуги школьных столовых"
  }
}

Response: 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/2.3/tenders/e2f60567d1d8406e8bc9f40931e1132b
{
  "access": {
    "token": "56bff70fcb174649879a0f9d83055a8c"
  },
  "data": {
    "procurementMethod": "limited",
    "status": "active",
    "causeDescription": "оригінальний тендер не вдався двічі",
    "title": "Послуги шкільних їдалень",
    "items": [
      {
        "description": "Послуги шкільних їдалень",
        "classification": {
          "scheme": "ДК021",
          "description": "Послуги з харчування у школах",
          "id": "55523100-3"
        },
        "description_en": "Services in school canteens",
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "55.51.10.300",
            "description": "Послуги шкільних їдалень"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2017-06-21T20:02:22.515286+03:00",
          "endDate": "2017-06-24T20:02:22.515286+03:00"
        },
        "description_ru": "Услуги школьных столовых",
        "id": "2dc54675d6364e2baffbc0f8e74432ac"
      }
    ],
    "procurementMethodType": "negotiation.quick",
    "value": {
      "currency": "UAH",
      "amount": 500000.0,
      "valueAddedTaxIncluded": true
    },
    "dateModified": "2017-06-19T20:02:50.485614+03:00",
    "causeDescription_ru": "оригинальный тендер не получился дважды",
    "date": "2017-06-19T20:02:50.482399+03:00",
    "causeDescription_en": "original tender has failed twice",
    "description_ru": "Услуги школьных столовых",
    "description_en": "Services in school canteens",
    "title_ru": "Услуги школьных столовых",
    "owner": "broker",
    "procuringEntity": {
      "contactPoint": {
        "url": "http://sch10.edu.vn.ua/",
        "name": "Куца Світлана Валентинівна",
        "telephone": "+380 (432) 46-53-02"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "21725150",
        "legalName": "Заклад \"Загальноосвітня школа І-ІІІ ступенів № 10 Вінницької міської ради\""
      },
      "name": "ЗОСШ #10 м.Вінниці",
      "kind": "general",
      "address": {
        "postalCode": "21027",
        "countryName": "Україна",
        "streetAddress": "вул. Стахурського. 22",
        "region": "м. Вінниця",
        "locality": "м. Вінниця"
      }
    },
    "title_en": "Services in school canteens",
    "id": "e2f60567d1d8406e8bc9f40931e1132b",
    "tenderID": "UA-2017-06-19-000001"
  }
}

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.

Tender can contain several different lots. We can add lot using the following way:

POST /api/2.3/tenders/e2f60567d1d8406e8bc9f40931e1132b/lots?acc_token=56bff70fcb174649879a0f9d83055a8c HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 198
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "description": "Опис Лот №1",
    "value": {
      "currency": "UAH",
      "amount": 500000,
      "valueAddedTaxIncluded": true
    },
    "title": "Лот №1"
  }
}

Response: 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/2.3/tenders/e2f60567d1d8406e8bc9f40931e1132b/lots/132b472e0b564c2a9151fb10fa7abb08
{
  "data": {
    "status": "active",
    "description": "Опис Лот №1",
    "title": "Лот №1",
    "value": {
      "currency": "UAH",
      "amount": 500000.0,
      "valueAddedTaxIncluded": true
    },
    "date": "2017-06-19T20:02:50.533976+03:00",
    "id": "132b472e0b564c2a9151fb10fa7abb08"
  }
}

Also you will need to update data about item’s related lots:

PATCH /api/2.3/tenders/e2f60567d1d8406e8bc9f40931e1132b?acc_token=56bff70fcb174649879a0f9d83055a8c HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 73
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "items": [
      {
        "relatedLot": "132b472e0b564c2a9151fb10fa7abb08"
      }
    ]
  }
}

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "procurementMethod": "limited",
    "status": "active",
    "causeDescription": "оригінальний тендер не вдався двічі",
    "title": "Послуги шкільних їдалень",
    "lots": [
      {
        "status": "active",
        "description": "Опис Лот №1",
        "title": "Лот №1",
        "value": {
          "currency": "UAH",
          "amount": 500000.0,
          "valueAddedTaxIncluded": true
        },
        "date": "2017-06-19T20:02:50.533976+03:00",
        "id": "132b472e0b564c2a9151fb10fa7abb08"
      }
    ],
    "items": [
      {
        "relatedLot": "132b472e0b564c2a9151fb10fa7abb08",
        "description": "Послуги шкільних їдалень",
        "classification": {
          "scheme": "ДК021",
          "description": "Послуги з харчування у школах",
          "id": "55523100-3"
        },
        "description_en": "Services in school canteens",
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "55.51.10.300",
            "description": "Послуги шкільних їдалень"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2017-06-21T20:02:22.515286+03:00",
          "endDate": "2017-06-24T20:02:22.515286+03:00"
        },
        "description_ru": "Услуги школьных столовых",
        "id": "2dc54675d6364e2baffbc0f8e74432ac"
      }
    ],
    "procurementMethodType": "negotiation.quick",
    "value": {
      "currency": "UAH",
      "amount": 500000.0,
      "valueAddedTaxIncluded": true
    },
    "dateModified": "2017-06-19T20:02:50.619378+03:00",
    "causeDescription_ru": "оригинальный тендер не получился дважды",
    "date": "2017-06-19T20:02:50.482399+03:00",
    "causeDescription_en": "original tender has failed twice",
    "description_ru": "Услуги школьных столовых",
    "description_en": "Services in school canteens",
    "title_ru": "Услуги школьных столовых",
    "owner": "broker",
    "procuringEntity": {
      "contactPoint": {
        "url": "http://sch10.edu.vn.ua/",
        "name": "Куца Світлана Валентинівна",
        "telephone": "+380 (432) 46-53-02"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "21725150",
        "legalName": "Заклад \"Загальноосвітня школа І-ІІІ ступенів № 10 Вінницької міської ради\""
      },
      "name": "ЗОСШ #10 м.Вінниці",
      "kind": "general",
      "address": {
        "postalCode": "21027",
        "countryName": "Україна",
        "streetAddress": "вул. Стахурського. 22",
        "region": "м. Вінниця",
        "locality": "м. Вінниця"
      }
    },
    "title_en": "Services in school canteens",
    "id": "e2f60567d1d8406e8bc9f40931e1132b",
    "tenderID": "UA-2017-06-19-000001"
  }
}

View tender listing:

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

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "next_page": {
    "path": "/api/2.3/tenders?offset=2017-06-19T20%3A02%3A50.619378%2B03%3A00",
    "uri": "http://api-sandbox.openprocurement.org/api/2.3/tenders?offset=2017-06-19T20%3A02%3A50.619378%2B03%3A00",
    "offset": "2017-06-19T20:02:50.619378+03:00"
  },
  "data": [
    {
      "id": "e2f60567d1d8406e8bc9f40931e1132b",
      "dateModified": "2017-06-19T20:02:50.619378+03:00"
    }
  ]
}

or view tender:

GET /api/2.3/tenders/e2f60567d1d8406e8bc9f40931e1132b HTTP/1.0
Host: api-sandbox.openprocurement.org

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "procurementMethod": "limited",
    "status": "active",
    "causeDescription": "оригінальний тендер не вдався двічі",
    "title": "Послуги шкільних їдалень",
    "lots": [
      {
        "status": "active",
        "description": "Опис Лот №1",
        "title": "Лот №1",
        "value": {
          "currency": "UAH",
          "amount": 500000.0,
          "valueAddedTaxIncluded": true
        },
        "date": "2017-06-19T20:02:50.533976+03:00",
        "id": "132b472e0b564c2a9151fb10fa7abb08"
      }
    ],
    "items": [
      {
        "relatedLot": "132b472e0b564c2a9151fb10fa7abb08",
        "description": "Послуги шкільних їдалень",
        "classification": {
          "scheme": "ДК021",
          "description": "Послуги з харчування у школах",
          "id": "55523100-3"
        },
        "description_en": "Services in school canteens",
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "55.51.10.300",
            "description": "Послуги шкільних їдалень"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2017-06-21T20:02:22.515286+03:00",
          "endDate": "2017-06-24T20:02:22.515286+03:00"
        },
        "description_ru": "Услуги школьных столовых",
        "id": "2dc54675d6364e2baffbc0f8e74432ac"
      }
    ],
    "procurementMethodType": "negotiation.quick",
    "value": {
      "currency": "UAH",
      "amount": 500000.0,
      "valueAddedTaxIncluded": true
    },
    "dateModified": "2017-06-19T20:02:50.619378+03:00",
    "causeDescription_ru": "оригинальный тендер не получился дважды",
    "date": "2017-06-19T20:02:50.482399+03:00",
    "causeDescription_en": "original tender has failed twice",
    "description_ru": "Услуги школьных столовых",
    "description_en": "Services in school canteens",
    "title_ru": "Услуги школьных столовых",
    "owner": "broker",
    "procuringEntity": {
      "contactPoint": {
        "url": "http://sch10.edu.vn.ua/",
        "name": "Куца Світлана Валентинівна",
        "telephone": "+380 (432) 46-53-02"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "21725150",
        "legalName": "Заклад \"Загальноосвітня школа І-ІІІ ступенів № 10 Вінницької міської ради\""
      },
      "name": "ЗОСШ #10 м.Вінниці",
      "kind": "general",
      "address": {
        "postalCode": "21027",
        "countryName": "Україна",
        "streetAddress": "вул. Стахурського. 22",
        "region": "м. Вінниця",
        "locality": "м. Вінниця"
      }
    },
    "title_en": "Services in school canteens",
    "id": "e2f60567d1d8406e8bc9f40931e1132b",
    "tenderID": "UA-2017-06-19-000001"
  }
}

Awarding

Addition of supplier information is the same for all procedures.

Add award for lot №1:

POST /api/2.3/tenders/e2f60567d1d8406e8bc9f40931e1132b/awards?acc_token=56bff70fcb174649879a0f9d83055a8c HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 1329
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "status": "pending",
    "lotID": "132b472e0b564c2a9151fb10fa7abb08",
    "suppliers": [
      {
        "contactPoint": {
          "email": "soleksuk@gmail.com",
          "telephone": "+380 (432) 21-69-30",
          "name": "Сергій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "13313462",
          "uri": "http://sch10.edu.vn.ua/",
          "legalName": "Державне комунальне підприємство громадського харчування «Школяр»"
        },
        "name": "ДКП «Школяр»",
        "address": {
          "countryName": "Україна",
          "postalCode": "21100",
          "region": "м. Вінниця",
          "streetAddress": "вул. Островського, 33",
          "locality": "м. Вінниця"
        }
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 475000,
      "valueAddedTaxIncluded": "true"
    },
    "date": "2016-01-14T18:07:00.628073+02:00",
    "id": "d373338bc3324f14b8b3d4af68922773"
  }
}

Response: 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/2.3/tenders/e2f60567d1d8406e8bc9f40931e1132b/awards/d113ca3649e1455a8f839a496ed2ad36
{
  "data": {
    "status": "pending",
    "lotID": "132b472e0b564c2a9151fb10fa7abb08",
    "complaintPeriod": {
      "startDate": "2017-06-19T20:02:50.795217+03:00"
    },
    "suppliers": [
      {
        "contactPoint": {
          "email": "soleksuk@gmail.com",
          "telephone": "+380 (432) 21-69-30",
          "name": "Сергій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "legalName": "Державне комунальне підприємство громадського харчування «Школяр»",
          "id": "13313462",
          "uri": "http://sch10.edu.vn.ua/"
        },
        "name": "ДКП «Школяр»",
        "address": {
          "postalCode": "21100",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 33",
          "region": "м. Вінниця",
          "locality": "м. Вінниця"
        }
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 475000.0,
      "valueAddedTaxIncluded": true
    },
    "date": "2017-06-19T20:02:50.793061+03:00",
    "id": "d113ca3649e1455a8f839a496ed2ad36"
  }
}

Award confirmation:

PATCH /api/2.3/tenders/e2f60567d1d8406e8bc9f40931e1132b/awards/d113ca3649e1455a8f839a496ed2ad36?acc_token=56bff70fcb174649879a0f9d83055a8c HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 49
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "status": "active",
    "qualified": true
  }
}

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "status": "active",
    "lotID": "132b472e0b564c2a9151fb10fa7abb08",
    "complaintPeriod": {
      "startDate": "2017-06-19T20:02:50.795217+03:00",
      "endDate": "2017-06-25T00:00:00+03:00"
    },
    "suppliers": [
      {
        "contactPoint": {
          "email": "soleksuk@gmail.com",
          "telephone": "+380 (432) 21-69-30",
          "name": "Сергій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "legalName": "Державне комунальне підприємство громадського харчування «Школяр»",
          "id": "13313462",
          "uri": "http://sch10.edu.vn.ua/"
        },
        "name": "ДКП «Школяр»",
        "address": {
          "postalCode": "21100",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 33",
          "region": "м. Вінниця",
          "locality": "м. Вінниця"
        }
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 475000.0,
      "valueAddedTaxIncluded": true
    },
    "qualified": true,
    "date": "2017-06-19T20:02:50.883003+03:00",
    "id": "d113ca3649e1455a8f839a496ed2ad36"
  }
}

The difference between startDate and endDate in complaintPeriod record for negotiation is 10 days and for negotiation.quick is 5 days.

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.3/tenders/e2f60567d1d8406e8bc9f40931e1132b/contracts/3a0caa5770a54815bdd48cd2e07a8a20?acc_token=56bff70fcb174649879a0f9d83055a8c HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 36
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "value": {
      "amount": 238
    }
  }
}

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "status": "pending",
    "items": [
      {
        "relatedLot": "132b472e0b564c2a9151fb10fa7abb08",
        "description": "Послуги шкільних їдалень",
        "classification": {
          "scheme": "ДК021",
          "description": "Послуги з харчування у школах",
          "id": "55523100-3"
        },
        "description_en": "Services in school canteens",
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "55.51.10.300",
            "description": "Послуги шкільних їдалень"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2017-06-21T20:02:22.515286+03:00",
          "endDate": "2017-06-24T20:02:22.515286+03:00"
        },
        "description_ru": "Услуги школьных столовых",
        "id": "2dc54675d6364e2baffbc0f8e74432ac"
      }
    ],
    "suppliers": [
      {
        "contactPoint": {
          "email": "soleksuk@gmail.com",
          "telephone": "+380 (432) 21-69-30",
          "name": "Сергій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "legalName": "Державне комунальне підприємство громадського харчування «Школяр»",
          "id": "13313462",
          "uri": "http://sch10.edu.vn.ua/"
        },
        "name": "ДКП «Школяр»",
        "address": {
          "postalCode": "21100",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 33",
          "region": "м. Вінниця",
          "locality": "м. Вінниця"
        }
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 238.0,
      "valueAddedTaxIncluded": true
    },
    "date": "2017-06-19T20:02:51.033377+03:00",
    "awardID": "d113ca3649e1455a8f839a496ed2ad36",
    "id": "3a0caa5770a54815bdd48cd2e07a8a20",
    "contractID": "UA-2017-06-19-000001-1"
  }
}

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

Contract registration

Negotiation and Negotiation.quick tender contract can be registered only after the stand-still (10 and 5 days period after the award confirmation).

PATCH /api/2.3/tenders/e2f60567d1d8406e8bc9f40931e1132b/contracts/3a0caa5770a54815bdd48cd2e07a8a20?acc_token=56bff70fcb174649879a0f9d83055a8c HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 30
Content-Type: application/json
Host: api-sandbox.openprocurement.org

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

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "status": "active",
    "items": [
      {
        "relatedLot": "132b472e0b564c2a9151fb10fa7abb08",
        "description": "Послуги шкільних їдалень",
        "classification": {
          "scheme": "ДК021",
          "description": "Послуги з харчування у школах",
          "id": "55523100-3"
        },
        "description_en": "Services in school canteens",
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "55.51.10.300",
            "description": "Послуги шкільних їдалень"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2017-06-21T20:02:22.515286+03:00",
          "endDate": "2017-06-24T20:02:22.515286+03:00"
        },
        "description_ru": "Услуги школьных столовых",
        "id": "2dc54675d6364e2baffbc0f8e74432ac"
      }
    ],
    "suppliers": [
      {
        "contactPoint": {
          "email": "soleksuk@gmail.com",
          "telephone": "+380 (432) 21-69-30",
          "name": "Сергій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "legalName": "Державне комунальне підприємство громадського харчування «Школяр»",
          "id": "13313462",
          "uri": "http://sch10.edu.vn.ua/"
        },
        "name": "ДКП «Школяр»",
        "address": {
          "postalCode": "21100",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 33",
          "region": "м. Вінниця",
          "locality": "м. Вінниця"
        }
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 238.0,
      "valueAddedTaxIncluded": true
    },
    "dateSigned": "2017-06-19T20:02:51.155028+03:00",
    "date": "2017-06-19T20:02:51.158920+03:00",
    "awardID": "d113ca3649e1455a8f839a496ed2ad36",
    "id": "3a0caa5770a54815bdd48cd2e07a8a20",
    "contractID": "UA-2017-06-19-000001-1"
  }
}