Туторіал

Створення плану закупівлі

Наполегливо рекомендуємо створювати плани у статусі draft.

Створимо план:

Request

POST /api/2.5/plans?opt_pretty=1 HTTP/1.0
Authorization: Bearer broker
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "rationale": {
      "description": "Недостатньо змістовне обгрунтування"
    },
    "tender": {
      "procurementMethod": "open",
      "procurementMethodType": "belowThreshold",
      "tenderPeriod": {
        "startDate": "2023-10-17T00:00:00+02:00"
      }
    },
    "items": [
      {
        "deliveryDate": {
          "endDate": "2023-10-25T00:00:00+02:00"
        },
        "deliveryAddress": {
          "countryName": "Україна",
          "postalCode": "79000",
          "region": "м. Київ",
          "locality": "м. Київ",
          "streetAddress": "вул. Банкова 1"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.92",
            "description": "Насіння гірчиці"
          }
        ],
        "unit": {
          "code": "KGM",
          "name": "кг"
        },
        "classification": {
          "scheme": "ДК021",
          "description": "Mustard seeds",
          "id": "03111600-8"
        },
        "quantity": 1000,
        "description": "Насіння гірчиці"
      },
      {
        "deliveryDate": {
          "endDate": "2023-10-26T00:00:00+02:00"
        },
        "deliveryAddress": {
          "countryName": "Україна",
          "postalCode": "79000",
          "region": "м. Київ",
          "locality": "м. Київ",
          "streetAddress": "вул. Банкова 1"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.95",
            "description": "Насіння соняшнику"
          }
        ],
        "unit": {
          "code": "KGM",
          "name": "кг"
        },
        "classification": {
          "scheme": "ДК021",
          "description": "Sunflower seeds",
          "id": "03111300-5"
        },
        "quantity": 2000,
        "description": "Насіння соняшнику"
      },
      {
        "deliveryDate": {
          "endDate": "2023-10-27T00:00:00+02:00"
        },
        "deliveryAddress": {
          "countryName": "Україна",
          "postalCode": "79000",
          "region": "м. Київ",
          "locality": "м. Київ",
          "streetAddress": "вул. Банкова 1"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.84",
            "description": "Насіння бавовнику"
          }
        ],
        "unit": {
          "code": "KGM",
          "name": "кг"
        },
        "classification": {
          "scheme": "ДК021",
          "description": "Cotton seeds",
          "id": "03111400-6"
        },
        "quantity": 3000,
        "description": "Насіння бавовнику"
      }
    ],
    "classification": {
      "scheme": "ДК021",
      "description": "Seeds",
      "id": "03111000-2"
    },
    "additionalClassifications": [
      {
        "scheme": "КЕКВ",
        "id": "2000",
        "description": "Поточні видатки"
      }
    ],
    "procuringEntity": {
      "identifier": {
        "scheme": "UA-EDR",
        "id": "111983",
        "legalName": "ДП Державне Управління Справами"
      },
      "name": "ДУС",
      "address": {
        "countryName": "Україна",
        "postalCode": "01220",
        "region": "м. Київ",
        "locality": "м. Київ",
        "streetAddress": "вул. Банкова, 11, корпус 1"
      },
      "kind": "general",
      "signerInfo": {
        "name": "Test Testovich",
        "telephone": "+380950000000",
        "email": "example@email.com",
        "iban": "111111111111111",
        "authorizedBy": "Статут компанії",
        "position": "Генеральний директор"
      }
    },
    "buyers": [
      {
        "identifier": {
          "scheme": "UA-EDR",
          "id": "111983",
          "legalName": "ДП Державне Управління Справами"
        },
        "name": "ДУС",
        "address": {
          "countryName": "Україна",
          "postalCode": "01220",
          "region": "м. Київ",
          "locality": "м. Київ",
          "streetAddress": "вул. Банкова, 11, корпус 1"
        },
        "kind": "general",
        "signerInfo": {
          "name": "Test Testovich",
          "telephone": "+380950000000",
          "email": "example@email.com",
          "iban": "111111111111111",
          "authorizedBy": "Статут компанії",
          "position": "Генеральний директор"
        }
      }
    ],
    "budget": {
      "project": {
        "name": "proj_name",
        "id": "123"
      },
      "amount": 10000,
      "amountNet": 12222,
      "currency": "UAH",
      "id": "12303111000-2",
      "description": "budget_description",
      "period": {
        "startDate": "2023-01-01T00:00:00",
        "endDate": "2023-12-31T00:00:00"
      },
      "breakdown": [
        {
          "title": "other",
          "description": "Breakdown other description.",
          "value": {
            "amount": 1500,
            "currency": "UAH"
          }
        }
      ]
    },
    "project": {
      "title": "DREAMs come true",
      "uri": "https://dream.gov.ua/ua/project/DREAM-UA-030524-EE48E08C/profile"
    },
    "status": "draft"
  }
}

Response

HTTP/1.0 201 Created
Content-Type: application/json
Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/plans/647ea8f38f72484ea0245b71b7cd4231

{
  "data": {
    "status": "draft",
    "procuringEntity": {
      "id": "3dd578dcb6d34f1fa29434f9f012065d",
      "name": "ДУС",
      "identifier": {
        "scheme": "UA-EDR",
        "id": "111983",
        "legalName": "ДП Державне Управління Справами"
      },
      "address": {
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "locality": "м. Київ",
        "region": "м. Київ",
        "postalCode": "01220",
        "countryName": "Україна"
      },
      "kind": "general",
      "signerInfo": {
        "name": "Test Testovich",
        "email": "example@email.com",
        "telephone": "+380950000000",
        "iban": "111111111111111",
        "position": "Генеральний директор",
        "authorizedBy": "Статут компанії"
      }
    },
    "tender": {
      "procurementMethod": "open",
      "procurementMethodType": "belowThreshold",
      "tenderPeriod": {
        "startDate": "2023-10-17T00:00:00+02:00"
      }
    },
    "budget": {
      "id": "12303111000-2",
      "description": "budget_description",
      "amount": 10000.0,
      "currency": "UAH",
      "amountNet": 12222.0,
      "project": {
        "id": "123",
        "name": "proj_name"
      },
      "period": {
        "startDate": "2023-01-01T00:00:00+02:00",
        "endDate": "2023-12-31T00:00:00+02:00"
      },
      "breakdown": [
        {
          "id": "d01803a5d3f6451dbfa7cc05b05fb200",
          "title": "other",
          "description": "Breakdown other description.",
          "value": {
            "amount": 1500.0,
            "currency": "UAH"
          }
        }
      ]
    },
    "classification": {
      "description": "Seeds",
      "scheme": "ДК021",
      "id": "03111000-2"
    },
    "additionalClassifications": [
      {
        "scheme": "КЕКВ",
        "id": "2000",
        "description": "Поточні видатки"
      }
    ],
    "items": [
      {
        "id": "1788c0b73dc34f7b899e3c504d3d11e6",
        "classification": {
          "description": "Mustard seeds",
          "scheme": "ДК021",
          "id": "03111600-8"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.92",
            "description": "Насіння гірчиці"
          }
        ],
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 1000.0,
        "deliveryAddress": {
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "79000",
          "countryName": "Україна"
        },
        "deliveryDate": {
          "endDate": "2023-10-25T00:00:00+02:00"
        },
        "description": "Насіння гірчиці"
      },
      {
        "id": "2575c0050ed24fbd9673f9f7fa5b1b7d",
        "classification": {
          "description": "Sunflower seeds",
          "scheme": "ДК021",
          "id": "03111300-5"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.95",
            "description": "Насіння соняшнику"
          }
        ],
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 2000.0,
        "deliveryAddress": {
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "79000",
          "countryName": "Україна"
        },
        "deliveryDate": {
          "endDate": "2023-10-26T00:00:00+02:00"
        },
        "description": "Насіння соняшнику"
      },
      {
        "id": "40096854498f4ada92637bdc4e02e95a",
        "classification": {
          "description": "Cotton seeds",
          "scheme": "ДК021",
          "id": "03111400-6"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.84",
            "description": "Насіння бавовнику"
          }
        ],
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 3000.0,
        "deliveryAddress": {
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "79000",
          "countryName": "Україна"
        },
        "deliveryDate": {
          "endDate": "2023-10-27T00:00:00+02:00"
        },
        "description": "Насіння бавовнику"
      }
    ],
    "buyers": [
      {
        "id": "bdec69d290d548aca291dd58d4a1854d",
        "name": "ДУС",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "111983",
          "legalName": "ДП Державне Управління Справами"
        },
        "address": {
          "streetAddress": "вул. Банкова, 11, корпус 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "01220",
          "countryName": "Україна"
        },
        "kind": "general",
        "signerInfo": {
          "name": "Test Testovich",
          "email": "example@email.com",
          "telephone": "+380950000000",
          "iban": "111111111111111",
          "position": "Генеральний директор",
          "authorizedBy": "Статут компанії"
        }
      }
    ],
    "rationale": {
      "description": "Недостатньо змістовне обгрунтування",
      "date": "2023-10-10T01:00:00+03:00"
    },
    "project": {
      "title": "DREAMs come true",
      "uri": "https://dream.gov.ua/ua/project/DREAM-UA-030524-EE48E08C/profile"
    },
    "planID": "UA-P-2023-10-10-000001-a",
    "owner": "broker",
    "datePublished": "2023-10-10T01:00:00+03:00",
    "dateCreated": "2023-10-10T01:00:00+03:00",
    "dateModified": "2023-10-10T01:00:00+03:00",
    "id": "647ea8f38f72484ea0245b71b7cd4231"
  },
  "access": {
    "token": "499da8e897254fb7a478ae7555785628",
    "transfer": "afcfaf20511c4a4ab431b503208ccbe1"
  }
}

Ми отримали код відповіді 201 Created, заголовок Location і тіло з додатковим ідентифікатором id, planID та властивість dateModified - дату, що показує час, коли план закупівлі востаннє модифікувався.

Другий крок - переміщення плану в статус scheduled, щоб опубліковати план:

Request

PATCH /api/2.5/plans/647ea8f38f72484ea0245b71b7cd4231?acc_token=499da8e897254fb7a478ae7555785628 HTTP/1.0
Authorization: Bearer broker
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "status": "scheduled"
  }
}

Response

HTTP/1.0 200 OK
Content-Type: application/json

{
  "data": {
    "status": "scheduled",
    "procuringEntity": {
      "id": "3dd578dcb6d34f1fa29434f9f012065d",
      "name": "ДУС",
      "identifier": {
        "scheme": "UA-EDR",
        "id": "111983",
        "legalName": "ДП Державне Управління Справами"
      },
      "address": {
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "locality": "м. Київ",
        "region": "м. Київ",
        "postalCode": "01220",
        "countryName": "Україна"
      },
      "kind": "general",
      "signerInfo": {
        "name": "Test Testovich",
        "email": "example@email.com",
        "telephone": "+380950000000",
        "iban": "111111111111111",
        "position": "Генеральний директор",
        "authorizedBy": "Статут компанії"
      }
    },
    "tender": {
      "procurementMethod": "open",
      "procurementMethodType": "belowThreshold",
      "tenderPeriod": {
        "startDate": "2023-10-17T00:00:00+02:00"
      }
    },
    "budget": {
      "id": "12303111000-2",
      "description": "budget_description",
      "amount": 10000.0,
      "currency": "UAH",
      "amountNet": 12222.0,
      "project": {
        "id": "123",
        "name": "proj_name"
      },
      "period": {
        "startDate": "2023-01-01T00:00:00+02:00",
        "endDate": "2023-12-31T00:00:00+02:00"
      },
      "breakdown": [
        {
          "id": "d01803a5d3f6451dbfa7cc05b05fb200",
          "title": "other",
          "description": "Breakdown other description.",
          "value": {
            "amount": 1500.0,
            "currency": "UAH"
          }
        }
      ]
    },
    "classification": {
      "description": "Seeds",
      "scheme": "ДК021",
      "id": "03111000-2"
    },
    "additionalClassifications": [
      {
        "scheme": "КЕКВ",
        "id": "2000",
        "description": "Поточні видатки"
      }
    ],
    "planID": "UA-P-2023-10-10-000001-a",
    "items": [
      {
        "id": "1788c0b73dc34f7b899e3c504d3d11e6",
        "classification": {
          "description": "Mustard seeds",
          "scheme": "ДК021",
          "id": "03111600-8"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.92",
            "description": "Насіння гірчиці"
          }
        ],
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 1000.0,
        "deliveryAddress": {
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "79000",
          "countryName": "Україна"
        },
        "deliveryDate": {
          "endDate": "2023-10-25T00:00:00+02:00"
        },
        "description": "Насіння гірчиці"
      },
      {
        "id": "2575c0050ed24fbd9673f9f7fa5b1b7d",
        "classification": {
          "description": "Sunflower seeds",
          "scheme": "ДК021",
          "id": "03111300-5"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.95",
            "description": "Насіння соняшнику"
          }
        ],
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 2000.0,
        "deliveryAddress": {
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "79000",
          "countryName": "Україна"
        },
        "deliveryDate": {
          "endDate": "2023-10-26T00:00:00+02:00"
        },
        "description": "Насіння соняшнику"
      },
      {
        "id": "40096854498f4ada92637bdc4e02e95a",
        "classification": {
          "description": "Cotton seeds",
          "scheme": "ДК021",
          "id": "03111400-6"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.84",
            "description": "Насіння бавовнику"
          }
        ],
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 3000.0,
        "deliveryAddress": {
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "79000",
          "countryName": "Україна"
        },
        "deliveryDate": {
          "endDate": "2023-10-27T00:00:00+02:00"
        },
        "description": "Насіння бавовнику"
      }
    ],
    "buyers": [
      {
        "id": "bdec69d290d548aca291dd58d4a1854d",
        "name": "ДУС",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "111983",
          "legalName": "ДП Державне Управління Справами"
        },
        "address": {
          "streetAddress": "вул. Банкова, 11, корпус 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "01220",
          "countryName": "Україна"
        },
        "kind": "general",
        "signerInfo": {
          "name": "Test Testovich",
          "email": "example@email.com",
          "telephone": "+380950000000",
          "iban": "111111111111111",
          "position": "Генеральний директор",
          "authorizedBy": "Статут компанії"
        }
      }
    ],
    "rationale": {
      "description": "Недостатньо змістовне обгрунтування",
      "date": "2023-10-10T01:00:00+03:00"
    },
    "project": {
      "title": "DREAMs come true",
      "uri": "https://dream.gov.ua/ua/project/DREAM-UA-030524-EE48E08C/profile"
    },
    "owner": "broker",
    "dateCreated": "2023-10-10T01:00:00+03:00",
    "dateModified": "2023-10-10T01:00:00+03:00",
    "datePublished": "2023-10-10T01:00:00+03:00",
    "id": "647ea8f38f72484ea0245b71b7cd4231"
  }
}

Перевіримо, що містить реєстр планів закупівель:

Request

GET /api/2.5/plans HTTP/1.0
Host: public-api-sandbox.prozorro.gov.ua

Response

HTTP/1.0 200 OK
Content-Type: application/json

{
  "data": [
    {
      "dateModified": "2023-10-10T01:00:00+03:00",
      "id": "647ea8f38f72484ea0245b71b7cd4231"
    }
  ],
  "next_page": {
    "offset": "1696888800.0.1.9095d7df07791098172e5d433224dc62",
    "path": "/api/2.5/plans?offset=1696888800.0.1.9095d7df07791098172e5d433224dc62",
    "uri": "http://public-api-sandbox.prozorro.gov.ua/api/2.5/plans?offset=1696888800.0.1.9095d7df07791098172e5d433224dc62"
  }
}

Відображається id - внутрішній ідентифікатор (який можна використовувати, щоб побудувати повну URL-адресу, додаючи http://api-sandbox.openprocurement.org/api/0/plans/ на початку) та мітка часу dateModified.

Модифікація плану закупівлі

Оновимо план шляхом надання їй усіх інших важливих властивостей:

Request

PATCH /api/2.5/plans/647ea8f38f72484ea0245b71b7cd4231?acc_token=499da8e897254fb7a478ae7555785628 HTTP/1.0
Authorization: Bearer broker
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "items": [
      {
        "description": "Насіння овочевих культур",
        "classification": {
          "scheme": "ДК021",
          "description": "Vegetable seeds",
          "id": "03111700-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.13.6",
            "description": "Насіння овочевих культур"
          }
        ],
        "deliveryDate": {
          "endDate": "2016-06-01T23:06:30.023018+03:00"
        },
        "unit": {
          "code": "KGM",
          "name": "кг"
        },
        "quantity": 5000
      }
    ]
  }
}

Response

HTTP/1.0 200 OK
Content-Type: application/json

{
  "data": {
    "status": "scheduled",
    "procuringEntity": {
      "id": "3dd578dcb6d34f1fa29434f9f012065d",
      "name": "ДУС",
      "identifier": {
        "scheme": "UA-EDR",
        "id": "111983",
        "legalName": "ДП Державне Управління Справами"
      },
      "address": {
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "locality": "м. Київ",
        "region": "м. Київ",
        "postalCode": "01220",
        "countryName": "Україна"
      },
      "kind": "general",
      "signerInfo": {
        "name": "Test Testovich",
        "email": "example@email.com",
        "telephone": "+380950000000",
        "iban": "111111111111111",
        "position": "Генеральний директор",
        "authorizedBy": "Статут компанії"
      }
    },
    "tender": {
      "procurementMethod": "open",
      "procurementMethodType": "belowThreshold",
      "tenderPeriod": {
        "startDate": "2023-10-17T00:00:00+02:00"
      }
    },
    "budget": {
      "id": "12303111000-2",
      "description": "budget_description",
      "amount": 10000.0,
      "currency": "UAH",
      "amountNet": 12222.0,
      "project": {
        "id": "123",
        "name": "proj_name"
      },
      "period": {
        "startDate": "2023-01-01T00:00:00+02:00",
        "endDate": "2023-12-31T00:00:00+02:00"
      },
      "breakdown": [
        {
          "id": "d01803a5d3f6451dbfa7cc05b05fb200",
          "title": "other",
          "description": "Breakdown other description.",
          "value": {
            "amount": 1500.0,
            "currency": "UAH"
          }
        }
      ]
    },
    "classification": {
      "description": "Seeds",
      "scheme": "ДК021",
      "id": "03111000-2"
    },
    "additionalClassifications": [
      {
        "scheme": "КЕКВ",
        "id": "2000",
        "description": "Поточні видатки"
      }
    ],
    "planID": "UA-P-2023-10-10-000001-a",
    "items": [
      {
        "id": "6357797639c344369e5948778ade25b6",
        "classification": {
          "description": "Vegetable seeds",
          "scheme": "ДК021",
          "id": "03111700-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.13.6",
            "description": "Насіння овочевих культур"
          }
        ],
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 5000.0,
        "deliveryDate": {
          "endDate": "2016-06-01T23:06:30.023018+03:00"
        },
        "description": "Насіння овочевих культур"
      }
    ],
    "buyers": [
      {
        "id": "bdec69d290d548aca291dd58d4a1854d",
        "name": "ДУС",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "111983",
          "legalName": "ДП Державне Управління Справами"
        },
        "address": {
          "streetAddress": "вул. Банкова, 11, корпус 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "01220",
          "countryName": "Україна"
        },
        "kind": "general",
        "signerInfo": {
          "name": "Test Testovich",
          "email": "example@email.com",
          "telephone": "+380950000000",
          "iban": "111111111111111",
          "position": "Генеральний директор",
          "authorizedBy": "Статут компанії"
        }
      }
    ],
    "rationale": {
      "description": "Недостатньо змістовне обгрунтування",
      "date": "2023-10-10T01:00:00+03:00"
    },
    "project": {
      "title": "DREAMs come true",
      "uri": "https://dream.gov.ua/ua/project/DREAM-UA-030524-EE48E08C/profile"
    },
    "owner": "broker",
    "dateCreated": "2023-10-10T01:00:00+03:00",
    "dateModified": "2023-10-10T01:00:00+03:00",
    "datePublished": "2023-10-10T01:00:00+03:00",
    "id": "647ea8f38f72484ea0245b71b7cd4231"
  }
}

Ми бачимо, що додаткові властивості об’єднані з існуючими даними плану. Додатково оновлена властивість dateModified, щоб відображати останню дату модифікації.

Ще одна перевірка списку відображає нову дату модифікації:

Request

GET /api/2.5/plans HTTP/1.0
Host: public-api-sandbox.prozorro.gov.ua

Response

HTTP/1.0 200 OK
Content-Type: application/json

{
  "data": [
    {
      "dateModified": "2023-10-10T01:00:00+03:00",
      "id": "647ea8f38f72484ea0245b71b7cd4231"
    }
  ],
  "next_page": {
    "offset": "1696888800.0.1.9095d7df07791098172e5d433224dc62",
    "path": "/api/2.5/plans?offset=1696888800.0.1.9095d7df07791098172e5d433224dc62",
    "uri": "http://public-api-sandbox.prozorro.gov.ua/api/2.5/plans?offset=1696888800.0.1.9095d7df07791098172e5d433224dc62"
  }
}

Створення закупівлі з плану

Закупівля може бути створена з відповідного їй плану закупівлі. Закупівля буде пов’язана з планом за допомогою полів plans тендеру і tender_id плану.

Примітка

Системні збої під час створення закупівлі з плану можуть призвести до закупівель, які не пов’язані з їхніми планами по tender_id.
Переконайтеся, що ви використовуєте Двофазний коміт і не проводте ці помилкові закупівлі (створюйте нові натомість).

Для зменшення шансів зробити помилку та зв’язати закупівлю з неправильним планом, встановлені правила валідації

Request

POST /api/2.5/plans/647ea8f38f72484ea0245b71b7cd4231/tenders HTTP/1.0
Authorization: Bearer broker
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "tenderPeriod": {
      "endDate": "2023-11-10T00:00:00+02:00"
    },
    "title": "Послуги шкільних їдалень",
    "title_en": "Services in school canteens",
    "procurementMethodType": "aboveThresholdEU",
    "value": {
      "currency": "UAH",
      "amount": 500
    },
    "procuringEntity": {
      "kind": "general",
      "address": {
        "countryName": "Україна",
        "locality": "м. Вінниця",
        "postalCode": "21027",
        "region": "Вінницька область",
        "streetAddress": "вул. Стахурського. 22"
      },
      "contactPoint": {
        "name": "Куца Світлана Валентинівна",
        "name_en": "Kutsa Svitlana V.",
        "telephone": "+380432465302",
        "availableLanguage": "uk",
        "url": "http://sch10.edu.vn.ua/"
      },
      "identifier": {
        "id": "21725150",
        "legalName": "Заклад \"Загальноосвітня школа І-ІІІ ступенів № 10 Вінницької міської ради\"",
        "legalName_en": "The institution \"Secondary school I-III levels № 10 Vinnitsa City Council\"",
        "scheme": "UA-EDR"
      },
      "name": "ЗОСШ #10 м.Вінниці",
      "name_en": "School #10 of Vinnytsia",
      "signerInfo": {
        "name": "Test Testovich",
        "telephone": "+380950000000",
        "email": "example@email.com",
        "iban": "111111111111111",
        "authorizedBy": "Статут компанії",
        "position": "Генеральний директор"
      }
    },
    "items": [
      {
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "Послуги шкільних їдалень"
          }
        ],
        "description": "Послуги шкільних їдалень",
        "description_en": "Services in school canteens",
        "classification": {
          "scheme": "ДК021",
          "id": "37810000-9",
          "description": "Test"
        },
        "deliveryDate": {
          "startDate": "2023-10-30T00:00:00+02:00",
          "endDate": "2023-11-29T00:00:00+02:00"
        },
        "deliveryAddress": {
          "countryName": "Україна",
          "postalCode": "79000",
          "region": "м. Київ",
          "locality": "м. Київ",
          "streetAddress": "вул. Банкова 1"
        },
        "unit": {
          "code": "KGM",
          "name": "кілограм",
          "value": {
            "amount": 6
          }
        },
        "quantity": 1
      },
      {
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "Послуги шкільних їдалень"
          }
        ],
        "description": "Послуги шкільних їдалень",
        "description_en": "Services in school canteens",
        "classification": {
          "scheme": "ДК021",
          "id": "37810000-9",
          "description": "Test"
        },
        "unit": {
          "code": "PK",
          "name": "упаковка",
          "value": {
            "amount": 6
          }
        },
        "quantity": 1,
        "deliveryDate": {
          "startDate": "2023-10-30T00:00:00+02:00",
          "endDate": "2023-11-29T00:00:00+02:00"
        },
        "deliveryAddress": {
          "countryName": "Україна",
          "postalCode": "79000",
          "region": "м. Київ",
          "locality": "м. Київ",
          "streetAddress": "вул. Банкова 1"
        }
      }
    ],
    "milestones": [
      {
        "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "title": "signingTheContract",
        "code": "prepayment",
        "type": "financing",
        "duration": {
          "days": 2,
          "type": "banking"
        },
        "sequenceNumber": 1,
        "percentage": 45.55
      },
      {
        "title": "deliveryOfGoods",
        "code": "postpayment",
        "type": "financing",
        "duration": {
          "days": 900,
          "type": "calendar"
        },
        "sequenceNumber": 2,
        "percentage": 54.45
      }
    ],
    "mainProcurementCategory": "services",
    "contractTemplateName": "00000000.0002.01"
  }
}

Response

HTTP/1.0 422 Unprocessable Entity
Content-Type: application/json

{
  "status": "error",
  "errors": [
    {
      "location": "body",
      "name": "procurementMethodType",
      "description": "procurementMethodType doesn't match: belowThreshold != aboveThresholdEU"
    }
  ]
}

Усього їх три:

  • procurementMethodType - відповідність типу процедури плана і тендера

  • procuringEntity.identifier - відповідність полів id і scheme для плана і тендера

  • classification.id - відповідність перших 4-х цифр кодів класифікатора плана і тендера (336 виняток - відповідність перших 3-х цифр)

План має містити джерела фінансування, інакше буде отрімано помилку під час створення тендеру:

Request

POST /api/2.5/plans/647ea8f38f72484ea0245b71b7cd4231/tenders HTTP/1.0
Authorization: Bearer broker
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "title": "Насіння",
    "mainProcurementCategory": "goods",
    "procuringEntity": {
      "name": "Державне управління справами",
      "identifier": {
        "scheme": "UA-EDR",
        "id": "111983",
        "legalName": "ДП Державне Управління Справами"
      },
      "address": {
        "countryName": "Україна",
        "postalCode": "01220",
        "region": "м. Київ",
        "locality": "м. Київ",
        "streetAddress": "вул. Банкова, 11, корпус 1"
      },
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "+0440000000"
      },
      "kind": "general",
      "signerInfo": {
        "name": "Test Testovich",
        "telephone": "+380950000000",
        "email": "example@email.com",
        "iban": "111111111111111",
        "authorizedBy": "Статут компанії",
        "position": "Генеральний директор"
      }
    },
    "value": {
      "amount": 500,
      "currency": "UAH"
    },
    "items": [
      {
        "deliveryDate": {
          "endDate": "2023-10-25T00:00:00+02:00"
        },
        "deliveryAddress": {
          "countryName": "Україна",
          "postalCode": "79000",
          "region": "м. Київ",
          "locality": "м. Київ",
          "streetAddress": "вул. Банкова 1"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.92",
            "description": "Насіння гірчиці"
          }
        ],
        "unit": {
          "code": "KGM",
          "name": "кг"
        },
        "classification": {
          "scheme": "ДК021",
          "description": "Mustard seeds",
          "id": "03111600-8"
        },
        "quantity": 1000,
        "description": "Насіння гірчиці"
      },
      {
        "deliveryDate": {
          "endDate": "2023-10-26T00:00:00+02:00"
        },
        "deliveryAddress": {
          "countryName": "Україна",
          "postalCode": "79000",
          "region": "м. Київ",
          "locality": "м. Київ",
          "streetAddress": "вул. Банкова 1"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.95",
            "description": "Насіння соняшнику"
          }
        ],
        "unit": {
          "code": "KGM",
          "name": "кг"
        },
        "classification": {
          "scheme": "ДК021",
          "description": "Sunflower seeds",
          "id": "03111300-5"
        },
        "quantity": 2000,
        "description": "Насіння соняшнику"
      },
      {
        "deliveryDate": {
          "endDate": "2023-10-27T00:00:00+02:00"
        },
        "deliveryAddress": {
          "countryName": "Україна",
          "postalCode": "79000",
          "region": "м. Київ",
          "locality": "м. Київ",
          "streetAddress": "вул. Банкова 1"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.84",
            "description": "Насіння бавовнику"
          }
        ],
        "unit": {
          "code": "KGM",
          "name": "кг"
        },
        "classification": {
          "scheme": "ДК021",
          "description": "Cotton seeds",
          "id": "03111400-6"
        },
        "quantity": 3000,
        "description": "Насіння бавовнику"
      }
    ],
    "enquiryPeriod": {
      "endDate": "2023-10-17T00:00:00+02:00"
    },
    "tenderPeriod": {
      "endDate": "2023-10-24T00:00:00+02:00"
    },
    "procurementMethodType": "belowThreshold",
    "milestones": [
      {
        "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "title": "signingTheContract",
        "code": "prepayment",
        "type": "financing",
        "duration": {
          "days": 2,
          "type": "banking"
        },
        "sequenceNumber": 1,
        "percentage": 45.55
      },
      {
        "title": "deliveryOfGoods",
        "code": "postpayment",
        "type": "financing",
        "duration": {
          "days": 900,
          "type": "calendar"
        },
        "sequenceNumber": 2,
        "percentage": 54.45
      }
    ],
    "contractTemplateName": "00000000.0002.01",
    "status": "draft"
  },
  "config": {
    "hasAuction": true,
    "hasAwardingOrder": true,
    "hasValueRestriction": true,
    "valueCurrencyEquality": true,
    "hasPrequalification": false,
    "minBidsNumber": 1,
    "hasPreSelectionAgreement": false,
    "hasTenderComplaints": false,
    "hasAwardComplaints": false,
    "hasCancellationComplaints": false,
    "hasValueEstimation": true,
    "hasQualificationComplaints": false,
    "tenderComplainRegulation": 0,
    "qualificationComplainDuration": 0,
    "awardComplainDuration": 2,
    "cancellationComplainDuration": 0,
    "clarificationUntilDuration": 1,
    "qualificationDuration": 0,
    "minTenderingDuration": 2,
    "hasEnquiries": true,
    "minEnquiriesDuration": 3,
    "enquiryPeriodRegulation": 0,
    "restricted": false
  }
}

Response

HTTP/1.0 422 Unprocessable Entity
Content-Type: application/json

{
  "status": "error",
  "errors": [
    {
      "location": "body",
      "name": "budget.breakdown",
      "description": "Plan should contain budget breakdown"
    }
  ]
}

Додамо джерело фінансування та проект до плану:

Request

PATCH /api/2.5/plans/647ea8f38f72484ea0245b71b7cd4231?acc_token=499da8e897254fb7a478ae7555785628 HTTP/1.0
Authorization: Bearer broker
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "budget": {
      "project": {
        "id": "95f87658-ffa5-472e-89ee-6e9417aa8cbd",
        "name": "1.1. Набрання чинності законодавчими змінами щодо реформи оплати праці в державній службі",
        "name_en": "1.1. Entry into force of the legislative changes to the civil service remuneration reform"
      },
      "amount": 10000,
      "amountNet": 12222,
      "currency": "UAH",
      "id": "12303111000-2",
      "description": "budget_description",
      "period": {
        "startDate": "2023-01-01T00:00:00",
        "endDate": "2023-12-31T00:00:00"
      },
      "breakdown": [
        {
          "title": "other",
          "description": "Breakdown other description.",
          "value": {
            "amount": 1500,
            "currency": "UAH"
          }
        }
      ]
    }
  }
}

Response

HTTP/1.0 200 OK
Content-Type: application/json

{
  "data": {
    "status": "scheduled",
    "procuringEntity": {
      "id": "3dd578dcb6d34f1fa29434f9f012065d",
      "name": "ДУС",
      "identifier": {
        "scheme": "UA-EDR",
        "id": "111983",
        "legalName": "ДП Державне Управління Справами"
      },
      "address": {
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "locality": "м. Київ",
        "region": "м. Київ",
        "postalCode": "01220",
        "countryName": "Україна"
      },
      "kind": "general",
      "signerInfo": {
        "name": "Test Testovich",
        "email": "example@email.com",
        "telephone": "+380950000000",
        "iban": "111111111111111",
        "position": "Генеральний директор",
        "authorizedBy": "Статут компанії"
      }
    },
    "tender": {
      "procurementMethod": "open",
      "procurementMethodType": "belowThreshold",
      "tenderPeriod": {
        "startDate": "2023-10-17T00:00:00+02:00"
      }
    },
    "budget": {
      "id": "12303111000-2",
      "description": "budget_description",
      "amount": 10000.0,
      "currency": "UAH",
      "amountNet": 12222.0,
      "project": {
        "id": "95f87658-ffa5-472e-89ee-6e9417aa8cbd",
        "name": "1.1. Набрання чинності законодавчими змінами щодо реформи оплати праці в державній службі",
        "name_en": "1.1. Entry into force of the legislative changes to the civil service remuneration reform"
      },
      "period": {
        "startDate": "2023-01-01T00:00:00+02:00",
        "endDate": "2023-12-31T00:00:00+02:00"
      },
      "breakdown": [
        {
          "id": "fe685ef07eb149389d0906122d242d57",
          "title": "other",
          "description": "Breakdown other description.",
          "value": {
            "amount": 1500.0,
            "currency": "UAH"
          }
        }
      ]
    },
    "classification": {
      "description": "Seeds",
      "scheme": "ДК021",
      "id": "03111000-2"
    },
    "additionalClassifications": [
      {
        "scheme": "КЕКВ",
        "id": "2000",
        "description": "Поточні видатки"
      }
    ],
    "planID": "UA-P-2023-10-10-000001-a",
    "items": [
      {
        "id": "6357797639c344369e5948778ade25b6",
        "classification": {
          "description": "Vegetable seeds",
          "scheme": "ДК021",
          "id": "03111700-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.13.6",
            "description": "Насіння овочевих культур"
          }
        ],
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 5000.0,
        "deliveryDate": {
          "endDate": "2016-06-01T23:06:30.023018+03:00"
        },
        "description": "Насіння овочевих культур"
      }
    ],
    "buyers": [
      {
        "id": "bdec69d290d548aca291dd58d4a1854d",
        "name": "ДУС",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "111983",
          "legalName": "ДП Державне Управління Справами"
        },
        "address": {
          "streetAddress": "вул. Банкова, 11, корпус 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "01220",
          "countryName": "Україна"
        },
        "kind": "general",
        "signerInfo": {
          "name": "Test Testovich",
          "email": "example@email.com",
          "telephone": "+380950000000",
          "iban": "111111111111111",
          "position": "Генеральний директор",
          "authorizedBy": "Статут компанії"
        }
      }
    ],
    "rationale": {
      "description": "Недостатньо змістовне обгрунтування",
      "date": "2023-10-10T01:00:00+03:00"
    },
    "project": {
      "title": "DREAMs come true",
      "uri": "https://dream.gov.ua/ua/project/DREAM-UA-030524-EE48E08C/profile"
    },
    "owner": "broker",
    "dateCreated": "2023-10-10T01:00:00+03:00",
    "dateModified": "2023-10-10T01:00:00+03:00",
    "datePublished": "2023-10-10T01:00:00+03:00",
    "id": "647ea8f38f72484ea0245b71b7cd4231"
  }
}

Успішний приклад виглядає так:

Request

POST /api/2.5/plans/647ea8f38f72484ea0245b71b7cd4231/tenders HTTP/1.0
Authorization: Bearer broker
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "title": "Насіння",
    "mainProcurementCategory": "goods",
    "procuringEntity": {
      "name": "Державне управління справами",
      "identifier": {
        "scheme": "UA-EDR",
        "id": "111983",
        "legalName": "ДП Державне Управління Справами"
      },
      "address": {
        "countryName": "Україна",
        "postalCode": "01220",
        "region": "м. Київ",
        "locality": "м. Київ",
        "streetAddress": "вул. Банкова, 11, корпус 1"
      },
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "+0440000000"
      },
      "kind": "general",
      "signerInfo": {
        "name": "Test Testovich",
        "telephone": "+380950000000",
        "email": "example@email.com",
        "iban": "111111111111111",
        "authorizedBy": "Статут компанії",
        "position": "Генеральний директор"
      }
    },
    "value": {
      "amount": 500,
      "currency": "UAH"
    },
    "items": [
      {
        "deliveryDate": {
          "endDate": "2023-10-25T00:00:00+02:00"
        },
        "deliveryAddress": {
          "countryName": "Україна",
          "postalCode": "79000",
          "region": "м. Київ",
          "locality": "м. Київ",
          "streetAddress": "вул. Банкова 1"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.92",
            "description": "Насіння гірчиці"
          }
        ],
        "unit": {
          "code": "KGM",
          "name": "кг"
        },
        "classification": {
          "scheme": "ДК021",
          "description": "Mustard seeds",
          "id": "03111600-8"
        },
        "quantity": 1000,
        "description": "Насіння гірчиці"
      },
      {
        "deliveryDate": {
          "endDate": "2023-10-26T00:00:00+02:00"
        },
        "deliveryAddress": {
          "countryName": "Україна",
          "postalCode": "79000",
          "region": "м. Київ",
          "locality": "м. Київ",
          "streetAddress": "вул. Банкова 1"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.95",
            "description": "Насіння соняшнику"
          }
        ],
        "unit": {
          "code": "KGM",
          "name": "кг"
        },
        "classification": {
          "scheme": "ДК021",
          "description": "Sunflower seeds",
          "id": "03111300-5"
        },
        "quantity": 2000,
        "description": "Насіння соняшнику"
      },
      {
        "deliveryDate": {
          "endDate": "2023-10-27T00:00:00+02:00"
        },
        "deliveryAddress": {
          "countryName": "Україна",
          "postalCode": "79000",
          "region": "м. Київ",
          "locality": "м. Київ",
          "streetAddress": "вул. Банкова 1"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.84",
            "description": "Насіння бавовнику"
          }
        ],
        "unit": {
          "code": "KGM",
          "name": "кг"
        },
        "classification": {
          "scheme": "ДК021",
          "description": "Cotton seeds",
          "id": "03111400-6"
        },
        "quantity": 3000,
        "description": "Насіння бавовнику"
      }
    ],
    "enquiryPeriod": {
      "endDate": "2023-10-17T00:00:00+02:00"
    },
    "tenderPeriod": {
      "endDate": "2023-10-24T00:00:00+02:00"
    },
    "procurementMethodType": "belowThreshold",
    "milestones": [
      {
        "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "title": "signingTheContract",
        "code": "prepayment",
        "type": "financing",
        "duration": {
          "days": 2,
          "type": "banking"
        },
        "sequenceNumber": 1,
        "percentage": 45.55
      },
      {
        "title": "deliveryOfGoods",
        "code": "postpayment",
        "type": "financing",
        "duration": {
          "days": 900,
          "type": "calendar"
        },
        "sequenceNumber": 2,
        "percentage": 54.45
      }
    ],
    "contractTemplateName": "00000000.0002.01",
    "status": "draft"
  },
  "config": {
    "hasAuction": true,
    "hasAwardingOrder": true,
    "hasValueRestriction": true,
    "valueCurrencyEquality": true,
    "hasPrequalification": false,
    "minBidsNumber": 1,
    "hasPreSelectionAgreement": false,
    "hasTenderComplaints": false,
    "hasAwardComplaints": false,
    "hasCancellationComplaints": false,
    "hasValueEstimation": true,
    "hasQualificationComplaints": false,
    "tenderComplainRegulation": 0,
    "qualificationComplainDuration": 0,
    "awardComplainDuration": 2,
    "cancellationComplainDuration": 0,
    "clarificationUntilDuration": 1,
    "qualificationDuration": 0,
    "minTenderingDuration": 2,
    "hasEnquiries": true,
    "minEnquiriesDuration": 3,
    "enquiryPeriodRegulation": 0,
    "restricted": false
  }
}

Response

HTTP/1.0 201 Created
Content-Type: application/json
Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/7f5e6c2aa6f54cc3a2f6589002f0d6ce

{
  "data": {
    "mainProcurementCategory": "goods",
    "contractTemplateName": "00000000.0002.01",
    "title": "Насіння",
    "status": "draft",
    "awardCriteria": "lowestCost",
    "procuringEntity": {
      "name": "Державне управління справами",
      "identifier": {
        "scheme": "UA-EDR",
        "id": "111983",
        "legalName": "ДП Державне Управління Справами"
      },
      "address": {
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "locality": "м. Київ",
        "region": "м. Київ",
        "postalCode": "01220",
        "countryName": "Україна"
      },
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "+0440000000"
      },
      "kind": "general",
      "signerInfo": {
        "name": "Test Testovich",
        "email": "example@email.com",
        "telephone": "+380950000000",
        "iban": "111111111111111",
        "position": "Генеральний директор",
        "authorizedBy": "Статут компанії"
      }
    },
    "value": {
      "currency": "UAH",
      "valueAddedTaxIncluded": true,
      "amount": 500.0
    },
    "tenderPeriod": {
      "startDate": "2023-10-17T00:00:00+02:00",
      "endDate": "2023-10-24T00:00:00+02:00"
    },
    "milestones": [
      {
        "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "title": "signingTheContract",
        "type": "financing",
        "code": "prepayment",
        "percentage": 45.55,
        "duration": {
          "days": 2,
          "type": "banking"
        },
        "sequenceNumber": 1
      },
      {
        "id": "1a5728bad63e42d5be8ecda73bcd0e49",
        "title": "deliveryOfGoods",
        "type": "financing",
        "code": "postpayment",
        "percentage": 54.45,
        "duration": {
          "days": 900,
          "type": "calendar"
        },
        "sequenceNumber": 2
      }
    ],
    "procurementMethodType": "belowThreshold",
    "enquiryPeriod": {
      "endDate": "2023-10-17T00:00:00+02:00",
      "startDate": "2023-10-10T01:00:00+03:00",
      "clarificationsUntil": "2023-10-19T00:00:00+03:00"
    },
    "items": [
      {
        "id": "d2723820528f4ebd9bcb7cb9f969288f",
        "description": "Насіння гірчиці",
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 1000.0,
        "classification": {
          "description": "Mustard seeds",
          "scheme": "ДК021",
          "id": "03111600-8"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.92",
            "description": "Насіння гірчиці"
          }
        ],
        "deliveryDate": {
          "endDate": "2023-10-25T00:00:00+02:00"
        },
        "deliveryAddress": {
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "79000",
          "countryName": "Україна"
        }
      },
      {
        "id": "cfb78304f96f42d497833ea72b8fc083",
        "description": "Насіння соняшнику",
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 2000.0,
        "classification": {
          "description": "Sunflower seeds",
          "scheme": "ДК021",
          "id": "03111300-5"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.95",
            "description": "Насіння соняшнику"
          }
        ],
        "deliveryDate": {
          "endDate": "2023-10-26T00:00:00+02:00"
        },
        "deliveryAddress": {
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "79000",
          "countryName": "Україна"
        }
      },
      {
        "id": "59aa7fc25e404f0fbe65f7a1144c2b94",
        "description": "Насіння бавовнику",
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 3000.0,
        "classification": {
          "description": "Cotton seeds",
          "scheme": "ДК021",
          "id": "03111400-6"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.84",
            "description": "Насіння бавовнику"
          }
        ],
        "deliveryDate": {
          "endDate": "2023-10-27T00:00:00+02:00"
        },
        "deliveryAddress": {
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "79000",
          "countryName": "Україна"
        }
      }
    ],
    "tenderID": "UA-2023-10-10-000001-a",
    "owner": "broker",
    "procurementMethod": "open",
    "submissionMethod": "electronicAuction",
    "date": "2023-10-10T01:00:00+03:00",
    "dateCreated": "2023-10-10T01:00:00+03:00",
    "dateModified": "2023-10-10T01:00:00+03:00",
    "id": "7f5e6c2aa6f54cc3a2f6589002f0d6ce",
    "plans": [
      {
        "id": "647ea8f38f72484ea0245b71b7cd4231"
      }
    ]
  },
  "config": {
    "hasAuction": true,
    "hasAwardingOrder": true,
    "hasValueRestriction": true,
    "valueCurrencyEquality": true,
    "hasPrequalification": false,
    "minBidsNumber": 1,
    "hasPreSelectionAgreement": false,
    "hasTenderComplaints": false,
    "hasAwardComplaints": false,
    "hasCancellationComplaints": false,
    "hasValueEstimation": true,
    "hasQualificationComplaints": false,
    "tenderComplainRegulation": 0,
    "qualificationComplainDuration": 0,
    "awardComplainDuration": 2,
    "cancellationComplainDuration": 0,
    "clarificationUntilDuration": 1,
    "qualificationDuration": 0,
    "minTenderingDuration": 2,
    "hasEnquiries": true,
    "minEnquiriesDuration": 3,
    "enquiryPeriodRegulation": 0,
    "restricted": false
  },
  "access": {
    "token": "098d33295ed448cfa248af0641ed8ec8",
    "transfer": "90260c36ef2349518f963a4ca6d1053b"
  }
}

Перевіримо, чи стан плану було перемкнено на complete:

Request

GET /api/2.5/plans/647ea8f38f72484ea0245b71b7cd4231 HTTP/1.0
Authorization: Bearer broker
Host: public-api-sandbox.prozorro.gov.ua

Response

HTTP/1.0 200 OK
Content-Type: application/json

{
  "data": {
    "status": "complete",
    "procuringEntity": {
      "id": "3dd578dcb6d34f1fa29434f9f012065d",
      "name": "ДУС",
      "identifier": {
        "scheme": "UA-EDR",
        "id": "111983",
        "legalName": "ДП Державне Управління Справами"
      },
      "address": {
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "locality": "м. Київ",
        "region": "м. Київ",
        "postalCode": "01220",
        "countryName": "Україна"
      },
      "kind": "general",
      "signerInfo": {
        "name": "Test Testovich",
        "email": "example@email.com",
        "telephone": "+380950000000",
        "iban": "111111111111111",
        "position": "Генеральний директор",
        "authorizedBy": "Статут компанії"
      }
    },
    "tender": {
      "procurementMethod": "open",
      "procurementMethodType": "belowThreshold",
      "tenderPeriod": {
        "startDate": "2023-10-17T00:00:00+02:00"
      }
    },
    "budget": {
      "id": "12303111000-2",
      "description": "budget_description",
      "amount": 10000.0,
      "currency": "UAH",
      "amountNet": 12222.0,
      "project": {
        "id": "95f87658-ffa5-472e-89ee-6e9417aa8cbd",
        "name": "1.1. Набрання чинності законодавчими змінами щодо реформи оплати праці в державній службі",
        "name_en": "1.1. Entry into force of the legislative changes to the civil service remuneration reform"
      },
      "period": {
        "startDate": "2023-01-01T00:00:00+02:00",
        "endDate": "2023-12-31T00:00:00+02:00"
      },
      "breakdown": [
        {
          "id": "abf2efd495c14084a00790a883386ee2",
          "title": "local",
          "description": "Breakdown other description.",
          "value": {
            "amount": 1500.0,
            "currency": "UAH"
          },
          "address": {
            "countryName": "Україна",
            "addressDetails": [
              {
                "id": "UA01020030010043419",
                "description": "Ароматне",
                "scheme": "КАТОТТГ"
              }
            ]
          },
          "classification": {
            "id": "2170",
            "description": "Будівництво закладів охорони здоров’я",
            "scheme": "ТПКВКМБ"
          }
        }
      ]
    },
    "classification": {
      "description": "Seeds",
      "scheme": "ДК021",
      "id": "03111000-2"
    },
    "additionalClassifications": [
      {
        "scheme": "КЕКВ",
        "id": "2000",
        "description": "Поточні видатки"
      }
    ],
    "planID": "UA-P-2023-10-10-000001-a",
    "items": [
      {
        "id": "6357797639c344369e5948778ade25b6",
        "classification": {
          "description": "Vegetable seeds",
          "scheme": "ДК021",
          "id": "03111700-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.13.6",
            "description": "Насіння овочевих культур"
          }
        ],
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 5000.0,
        "deliveryDate": {
          "endDate": "2016-06-01T23:06:30.023018+03:00"
        },
        "description": "Насіння овочевих культур"
      }
    ],
    "buyers": [
      {
        "id": "bdec69d290d548aca291dd58d4a1854d",
        "name": "ДУС",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "111983",
          "legalName": "ДП Державне Управління Справами"
        },
        "address": {
          "streetAddress": "вул. Банкова, 11, корпус 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "01220",
          "countryName": "Україна"
        },
        "kind": "general",
        "signerInfo": {
          "name": "Test Testovich",
          "email": "example@email.com",
          "telephone": "+380950000000",
          "iban": "111111111111111",
          "position": "Генеральний директор",
          "authorizedBy": "Статут компанії"
        }
      }
    ],
    "rationale": {
      "description": "Недостатньо змістовне обгрунтування",
      "date": "2023-10-10T01:00:00+03:00"
    },
    "project": {
      "title": "DREAMs come true",
      "uri": "https://dream.gov.ua/ua/project/DREAM-UA-030524-EE48E08C/profile"
    },
    "owner": "broker",
    "dateCreated": "2023-10-10T01:00:00+03:00",
    "dateModified": "2023-10-10T01:00:00+03:00",
    "datePublished": "2023-10-10T01:00:00+03:00",
    "tender_id": "7f5e6c2aa6f54cc3a2f6589002f0d6ce",
    "id": "647ea8f38f72484ea0245b71b7cd4231"
  }
}

Після створення закупівлі з плану змінити план більше неможливо:

Request

PATCH /api/2.5/plans/647ea8f38f72484ea0245b71b7cd4231?acc_token=499da8e897254fb7a478ae7555785628 HTTP/1.0
Authorization: Bearer broker
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "procuringEntity": {
      "identifier": {
        "scheme": "UA-EDR",
        "id": "111983",
        "legalName": "ДП Державне Управління Справами"
      },
      "name": "ДУС"
    }
  }
}

Response

HTTP/1.0 422 Unprocessable Entity
Content-Type: application/json

{
  "status": "error",
  "errors": [
    {
      "location": "body",
      "name": "procuringEntity",
      "description": {
        "address": [
          "This field is required."
        ],
        "kind": [
          "This field is required."
        ]
      }
    }
  ]
}

Завершення плану без торгів

Існує спосіб завершити план без створення тендеру:

Request

PATCH /api/2.5/plans/efc2bdfd149240f1bf2262ff356c60d0?acc_token=cc99c7a557f54ca08b0bf5d757bb11b8 HTTP/1.0
Authorization: Bearer broker
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "status": "complete"
  }
}

Response

HTTP/1.0 200 OK
Content-Type: application/json

{
  "data": {
    "status": "complete",
    "procuringEntity": {
      "id": "deb1063d81184ee0b2fcc0c8db1526d3",
      "name": "ДУС",
      "identifier": {
        "scheme": "UA-EDR",
        "id": "111983",
        "legalName": "ДП Державне Управління Справами"
      },
      "address": {
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "locality": "м. Київ",
        "region": "м. Київ",
        "postalCode": "01220",
        "countryName": "Україна"
      },
      "kind": "general",
      "signerInfo": {
        "name": "Test Testovich",
        "email": "example@email.com",
        "telephone": "+380950000000",
        "iban": "111111111111111",
        "position": "Генеральний директор",
        "authorizedBy": "Статут компанії"
      }
    },
    "tender": {
      "procurementMethod": "open",
      "procurementMethodType": "belowThreshold",
      "tenderPeriod": {
        "startDate": "2023-10-17T00:00:00+02:00"
      }
    },
    "budget": {
      "id": "12303111000-2",
      "description": "budget_description",
      "amount": 10000.0,
      "currency": "UAH",
      "amountNet": 12222.0,
      "project": {
        "id": "123",
        "name": "proj_name"
      },
      "period": {
        "startDate": "2023-01-01T00:00:00+02:00",
        "endDate": "2023-12-31T00:00:00+02:00"
      },
      "breakdown": [
        {
          "id": "a819e82250614114ba485a59ec92d8dc",
          "title": "other",
          "description": "Breakdown other description.",
          "value": {
            "amount": 1500.0,
            "currency": "UAH"
          }
        }
      ]
    },
    "classification": {
      "description": "Seeds",
      "scheme": "ДК021",
      "id": "03111000-2"
    },
    "additionalClassifications": [
      {
        "scheme": "КЕКВ",
        "id": "2000",
        "description": "Поточні видатки"
      }
    ],
    "planID": "UA-P-2023-10-11-000001-a",
    "items": [
      {
        "id": "5384314bfdfb4235a10c4b2060c04eba",
        "classification": {
          "description": "Mustard seeds",
          "scheme": "ДК021",
          "id": "03111600-8"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.92",
            "description": "Насіння гірчиці"
          }
        ],
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 1000.0,
        "deliveryAddress": {
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "79000",
          "countryName": "Україна"
        },
        "deliveryDate": {
          "endDate": "2023-10-25T00:00:00+02:00"
        },
        "description": "Насіння гірчиці"
      },
      {
        "id": "cf7e8ef089b84926853e2c41b8c19c2b",
        "classification": {
          "description": "Sunflower seeds",
          "scheme": "ДК021",
          "id": "03111300-5"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.95",
            "description": "Насіння соняшнику"
          }
        ],
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 2000.0,
        "deliveryAddress": {
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "79000",
          "countryName": "Україна"
        },
        "deliveryDate": {
          "endDate": "2023-10-26T00:00:00+02:00"
        },
        "description": "Насіння соняшнику"
      },
      {
        "id": "5577b5e8eb24440da9c5fd188f1d9086",
        "classification": {
          "description": "Cotton seeds",
          "scheme": "ДК021",
          "id": "03111400-6"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.84",
            "description": "Насіння бавовнику"
          }
        ],
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 3000.0,
        "deliveryAddress": {
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "79000",
          "countryName": "Україна"
        },
        "deliveryDate": {
          "endDate": "2023-10-27T00:00:00+02:00"
        },
        "description": "Насіння бавовнику"
      }
    ],
    "buyers": [
      {
        "id": "762d601282164523b9e3e113e7c95a21",
        "name": "ДУС",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "111983",
          "legalName": "ДП Державне Управління Справами"
        },
        "address": {
          "streetAddress": "вул. Банкова, 11, корпус 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "01220",
          "countryName": "Україна"
        },
        "kind": "general",
        "signerInfo": {
          "name": "Test Testovich",
          "email": "example@email.com",
          "telephone": "+380950000000",
          "iban": "111111111111111",
          "position": "Генеральний директор",
          "authorizedBy": "Статут компанії"
        }
      }
    ],
    "rationale": {
      "description": "Недостатньо змістовне обгрунтування",
      "date": "2023-10-11T02:00:33+03:00"
    },
    "project": {
      "title": "DREAMs come true",
      "uri": "https://dream.gov.ua/ua/project/DREAM-UA-030524-EE48E08C/profile"
    },
    "owner": "broker",
    "dateCreated": "2023-10-11T02:00:33+03:00",
    "dateModified": "2023-10-11T02:00:33+03:00",
    "datePublished": "2023-10-11T02:00:33+03:00",
    "id": "efc2bdfd149240f1bf2262ff356c60d0"
  }
}

Це працює лише в тому випадку, якщо procurementMethodType є одним із наступних:

  • belowThreshold

  • reporting

  • порожній рядок

Скасування плану

План можна скасувати за допомогою PlanCancellation:

Request

PATCH /api/2.5/plans/b0fe086d27094c24895c95d0b2a6b29d?acc_token=9b0c2eb782a148278eafc00e8a90a28c HTTP/1.0
Authorization: Bearer broker
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "cancellation": {
      "reason": "Підстава для скасування",
      "reason_en": "Reason of the cancellation"
    }
  }
}

Response

HTTP/1.0 200 OK
Content-Type: application/json

{
  "data": {
    "status": "scheduled",
    "procuringEntity": {
      "id": "9cec288dd8814c76ae956e2ebd07020a",
      "name": "ДУС",
      "identifier": {
        "scheme": "UA-EDR",
        "id": "111983",
        "legalName": "ДП Державне Управління Справами"
      },
      "address": {
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "locality": "м. Київ",
        "region": "м. Київ",
        "postalCode": "01220",
        "countryName": "Україна"
      },
      "kind": "general",
      "signerInfo": {
        "name": "Test Testovich",
        "email": "example@email.com",
        "telephone": "+380950000000",
        "iban": "111111111111111",
        "position": "Генеральний директор",
        "authorizedBy": "Статут компанії"
      }
    },
    "tender": {
      "procurementMethod": "open",
      "procurementMethodType": "belowThreshold",
      "tenderPeriod": {
        "startDate": "2023-10-17T00:00:00+02:00"
      }
    },
    "budget": {
      "id": "12303111000-2",
      "description": "budget_description",
      "amount": 10000.0,
      "currency": "UAH",
      "amountNet": 12222.0,
      "project": {
        "id": "123",
        "name": "proj_name"
      },
      "period": {
        "startDate": "2023-01-01T00:00:00+02:00",
        "endDate": "2023-12-31T00:00:00+02:00"
      },
      "breakdown": [
        {
          "id": "552dc58dc0dc45eb8ebe8abc10ff20b1",
          "title": "other",
          "description": "Breakdown other description.",
          "value": {
            "amount": 1500.0,
            "currency": "UAH"
          }
        }
      ]
    },
    "classification": {
      "description": "Seeds",
      "scheme": "ДК021",
      "id": "03111000-2"
    },
    "additionalClassifications": [
      {
        "scheme": "КЕКВ",
        "id": "2000",
        "description": "Поточні видатки"
      }
    ],
    "planID": "UA-P-2023-10-11-000002-a",
    "items": [
      {
        "id": "3c63bf6f72dc40f2b8bf4b330d558a7e",
        "classification": {
          "description": "Mustard seeds",
          "scheme": "ДК021",
          "id": "03111600-8"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.92",
            "description": "Насіння гірчиці"
          }
        ],
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 1000.0,
        "deliveryAddress": {
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "79000",
          "countryName": "Україна"
        },
        "deliveryDate": {
          "endDate": "2023-10-25T00:00:00+02:00"
        },
        "description": "Насіння гірчиці"
      },
      {
        "id": "a88d9910af254dd688111a12ecf337ac",
        "classification": {
          "description": "Sunflower seeds",
          "scheme": "ДК021",
          "id": "03111300-5"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.95",
            "description": "Насіння соняшнику"
          }
        ],
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 2000.0,
        "deliveryAddress": {
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "79000",
          "countryName": "Україна"
        },
        "deliveryDate": {
          "endDate": "2023-10-26T00:00:00+02:00"
        },
        "description": "Насіння соняшнику"
      },
      {
        "id": "84a8b59456f04cc38386c68c87ff7d5f",
        "classification": {
          "description": "Cotton seeds",
          "scheme": "ДК021",
          "id": "03111400-6"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.84",
            "description": "Насіння бавовнику"
          }
        ],
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 3000.0,
        "deliveryAddress": {
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "79000",
          "countryName": "Україна"
        },
        "deliveryDate": {
          "endDate": "2023-10-27T00:00:00+02:00"
        },
        "description": "Насіння бавовнику"
      }
    ],
    "buyers": [
      {
        "id": "e540d6af5f6740b08f97779447df1fbf",
        "name": "ДУС",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "111983",
          "legalName": "ДП Державне Управління Справами"
        },
        "address": {
          "streetAddress": "вул. Банкова, 11, корпус 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "01220",
          "countryName": "Україна"
        },
        "kind": "general",
        "signerInfo": {
          "name": "Test Testovich",
          "email": "example@email.com",
          "telephone": "+380950000000",
          "iban": "111111111111111",
          "position": "Генеральний директор",
          "authorizedBy": "Статут компанії"
        }
      }
    ],
    "cancellation": {
      "reason": "Підстава для скасування",
      "reason_en": "Reason of the cancellation",
      "status": "pending",
      "id": "965c004e43df477cbbe36c3fe5796010",
      "date": "2023-10-11T02:00:33+03:00"
    },
    "rationale": {
      "description": "Недостатньо змістовне обгрунтування",
      "date": "2023-10-11T02:00:33+03:00"
    },
    "project": {
      "title": "DREAMs come true",
      "uri": "https://dream.gov.ua/ua/project/DREAM-UA-030524-EE48E08C/profile"
    },
    "owner": "broker",
    "dateCreated": "2023-10-11T02:00:33+03:00",
    "dateModified": "2023-10-11T02:00:33+03:00",
    "datePublished": "2023-10-11T02:00:33+03:00",
    "id": "b0fe086d27094c24895c95d0b2a6b29d"
  }
}

Зміна статуса об’єкта скасування на active скасовує план:

Request

PATCH /api/2.5/plans/b0fe086d27094c24895c95d0b2a6b29d?acc_token=9b0c2eb782a148278eafc00e8a90a28c HTTP/1.0
Authorization: Bearer broker
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "cancellation": {
      "reason": "Підстава для скасування",
      "status": "active"
    }
  }
}

Response

HTTP/1.0 200 OK
Content-Type: application/json

{
  "data": {
    "status": "cancelled",
    "procuringEntity": {
      "id": "9cec288dd8814c76ae956e2ebd07020a",
      "name": "ДУС",
      "identifier": {
        "scheme": "UA-EDR",
        "id": "111983",
        "legalName": "ДП Державне Управління Справами"
      },
      "address": {
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "locality": "м. Київ",
        "region": "м. Київ",
        "postalCode": "01220",
        "countryName": "Україна"
      },
      "kind": "general",
      "signerInfo": {
        "name": "Test Testovich",
        "email": "example@email.com",
        "telephone": "+380950000000",
        "iban": "111111111111111",
        "position": "Генеральний директор",
        "authorizedBy": "Статут компанії"
      }
    },
    "tender": {
      "procurementMethod": "open",
      "procurementMethodType": "belowThreshold",
      "tenderPeriod": {
        "startDate": "2023-10-17T00:00:00+02:00"
      }
    },
    "budget": {
      "id": "12303111000-2",
      "description": "budget_description",
      "amount": 10000.0,
      "currency": "UAH",
      "amountNet": 12222.0,
      "project": {
        "id": "123",
        "name": "proj_name"
      },
      "period": {
        "startDate": "2023-01-01T00:00:00+02:00",
        "endDate": "2023-12-31T00:00:00+02:00"
      },
      "breakdown": [
        {
          "id": "552dc58dc0dc45eb8ebe8abc10ff20b1",
          "title": "other",
          "description": "Breakdown other description.",
          "value": {
            "amount": 1500.0,
            "currency": "UAH"
          }
        }
      ]
    },
    "classification": {
      "description": "Seeds",
      "scheme": "ДК021",
      "id": "03111000-2"
    },
    "additionalClassifications": [
      {
        "scheme": "КЕКВ",
        "id": "2000",
        "description": "Поточні видатки"
      }
    ],
    "planID": "UA-P-2023-10-11-000002-a",
    "items": [
      {
        "id": "3c63bf6f72dc40f2b8bf4b330d558a7e",
        "classification": {
          "description": "Mustard seeds",
          "scheme": "ДК021",
          "id": "03111600-8"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.92",
            "description": "Насіння гірчиці"
          }
        ],
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 1000.0,
        "deliveryAddress": {
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "79000",
          "countryName": "Україна"
        },
        "deliveryDate": {
          "endDate": "2023-10-25T00:00:00+02:00"
        },
        "description": "Насіння гірчиці"
      },
      {
        "id": "a88d9910af254dd688111a12ecf337ac",
        "classification": {
          "description": "Sunflower seeds",
          "scheme": "ДК021",
          "id": "03111300-5"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.95",
            "description": "Насіння соняшнику"
          }
        ],
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 2000.0,
        "deliveryAddress": {
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "79000",
          "countryName": "Україна"
        },
        "deliveryDate": {
          "endDate": "2023-10-26T00:00:00+02:00"
        },
        "description": "Насіння соняшнику"
      },
      {
        "id": "84a8b59456f04cc38386c68c87ff7d5f",
        "classification": {
          "description": "Cotton seeds",
          "scheme": "ДК021",
          "id": "03111400-6"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.11.84",
            "description": "Насіння бавовнику"
          }
        ],
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 3000.0,
        "deliveryAddress": {
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "79000",
          "countryName": "Україна"
        },
        "deliveryDate": {
          "endDate": "2023-10-27T00:00:00+02:00"
        },
        "description": "Насіння бавовнику"
      }
    ],
    "buyers": [
      {
        "id": "e540d6af5f6740b08f97779447df1fbf",
        "name": "ДУС",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "111983",
          "legalName": "ДП Державне Управління Справами"
        },
        "address": {
          "streetAddress": "вул. Банкова, 11, корпус 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "01220",
          "countryName": "Україна"
        },
        "kind": "general",
        "signerInfo": {
          "name": "Test Testovich",
          "email": "example@email.com",
          "telephone": "+380950000000",
          "iban": "111111111111111",
          "position": "Генеральний директор",
          "authorizedBy": "Статут компанії"
        }
      }
    ],
    "cancellation": {
      "reason": "Підстава для скасування",
      "status": "active",
      "id": "eb9f71a61b4044f4984d23be7049df0c",
      "date": "2023-10-11T02:00:33+03:00"
    },
    "rationale": {
      "description": "Недостатньо змістовне обгрунтування",
      "date": "2023-10-11T02:00:33+03:00"
    },
    "project": {
      "title": "DREAMs come true",
      "uri": "https://dream.gov.ua/ua/project/DREAM-UA-030524-EE48E08C/profile"
    },
    "owner": "broker",
    "dateCreated": "2023-10-11T02:00:33+03:00",
    "dateModified": "2023-10-11T02:00:33+03:00",
    "datePublished": "2023-10-11T02:00:33+03:00",
    "id": "b0fe086d27094c24895c95d0b2a6b29d"
  }
}

Оновлення обгурнтування плану закупівлі

Поле rationale оновлюється у будь-якому статусі плану закупівлі:

Request

PATCH /api/2.5/plans/647ea8f38f72484ea0245b71b7cd4231?acc_token=499da8e897254fb7a478ae7555785628 HTTP/1.0
Authorization: Bearer broker
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "rationale": {
      "description": "Змістовне пояснення необхідності закупівлі"
    }
  }
}

Response

HTTP/1.0 200 OK
Content-Type: application/json

{
  "data": {
    "status": "complete",
    "procuringEntity": {
      "id": "3dd578dcb6d34f1fa29434f9f012065d",
      "name": "ДУС",
      "identifier": {
        "scheme": "UA-EDR",
        "id": "111983",
        "legalName": "ДП Державне Управління Справами"
      },
      "address": {
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "locality": "м. Київ",
        "region": "м. Київ",
        "postalCode": "01220",
        "countryName": "Україна"
      },
      "kind": "general",
      "signerInfo": {
        "name": "Test Testovich",
        "email": "example@email.com",
        "telephone": "+380950000000",
        "iban": "111111111111111",
        "position": "Генеральний директор",
        "authorizedBy": "Статут компанії"
      }
    },
    "tender": {
      "procurementMethod": "open",
      "procurementMethodType": "belowThreshold",
      "tenderPeriod": {
        "startDate": "2023-10-17T00:00:00+02:00"
      }
    },
    "budget": {
      "id": "12303111000-2",
      "description": "budget_description",
      "amount": 10000.0,
      "currency": "UAH",
      "amountNet": 12222.0,
      "project": {
        "id": "95f87658-ffa5-472e-89ee-6e9417aa8cbd",
        "name": "1.1. Набрання чинності законодавчими змінами щодо реформи оплати праці в державній службі",
        "name_en": "1.1. Entry into force of the legislative changes to the civil service remuneration reform"
      },
      "period": {
        "startDate": "2023-01-01T00:00:00+02:00",
        "endDate": "2023-12-31T00:00:00+02:00"
      },
      "breakdown": [
        {
          "id": "abf2efd495c14084a00790a883386ee2",
          "title": "local",
          "description": "Breakdown other description.",
          "value": {
            "amount": 1500.0,
            "currency": "UAH"
          },
          "address": {
            "countryName": "Україна",
            "addressDetails": [
              {
                "id": "UA01020030010043419",
                "description": "Ароматне",
                "scheme": "КАТОТТГ"
              }
            ]
          },
          "classification": {
            "id": "2170",
            "description": "Будівництво закладів охорони здоров’я",
            "scheme": "ТПКВКМБ"
          }
        }
      ]
    },
    "classification": {
      "description": "Seeds",
      "scheme": "ДК021",
      "id": "03111000-2"
    },
    "additionalClassifications": [
      {
        "scheme": "КЕКВ",
        "id": "2000",
        "description": "Поточні видатки"
      }
    ],
    "tender_id": "7f5e6c2aa6f54cc3a2f6589002f0d6ce",
    "planID": "UA-P-2023-10-10-000001-a",
    "items": [
      {
        "id": "6357797639c344369e5948778ade25b6",
        "classification": {
          "description": "Vegetable seeds",
          "scheme": "ДК021",
          "id": "03111700-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.13.6",
            "description": "Насіння овочевих культур"
          }
        ],
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 5000.0,
        "deliveryDate": {
          "endDate": "2016-06-01T23:06:30.023018+03:00"
        },
        "description": "Насіння овочевих культур"
      }
    ],
    "buyers": [
      {
        "id": "bdec69d290d548aca291dd58d4a1854d",
        "name": "ДУС",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "111983",
          "legalName": "ДП Державне Управління Справами"
        },
        "address": {
          "streetAddress": "вул. Банкова, 11, корпус 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "01220",
          "countryName": "Україна"
        },
        "kind": "general",
        "signerInfo": {
          "name": "Test Testovich",
          "email": "example@email.com",
          "telephone": "+380950000000",
          "iban": "111111111111111",
          "position": "Генеральний директор",
          "authorizedBy": "Статут компанії"
        }
      }
    ],
    "rationale": {
      "description": "Змістовне пояснення необхідності закупівлі",
      "date": "2023-10-11T02:00:33+03:00"
    },
    "project": {
      "title": "DREAMs come true",
      "uri": "https://dream.gov.ua/ua/project/DREAM-UA-030524-EE48E08C/profile"
    },
    "owner": "broker",
    "dateCreated": "2023-10-10T01:00:00+03:00",
    "dateModified": "2023-10-11T02:00:33+03:00",
    "datePublished": "2023-10-10T01:00:00+03:00",
    "id": "647ea8f38f72484ea0245b71b7cd4231"
  }
}

Історія змін полів плану закупівлі

Існує окремий метод API, який дозволяє передивлятися історію полів плану закупівлі.

На даний момент підтримується тільки поле rationale :

Request

GET /api/2.5/history/plans/647ea8f38f72484ea0245b71b7cd4231?opt_fields=rationale HTTP/1.0
Authorization: Bearer broker
Host: public-api-sandbox.prozorro.gov.ua

Response

HTTP/1.0 200 OK
Content-Type: application/json

{
  "data": {
    "changes": [
      {
        "date": "2023-10-10T01:00:00+03:00",
        "data": {
          "rationale": {
            "description": "Недостатньо змістовне обгрунтування",
            "date": "2023-10-10T01:00:00+03:00"
          }
        }
      },
      {
        "date": "2023-10-11T02:00:33+03:00",
        "data": {
          "rationale": {
            "description": "Змістовне пояснення необхідності закупівлі",
            "date": "2023-10-11T02:00:33+03:00"
          }
        }
      }
    ]
  }
}

План України

Якщо зазначено джерело фінансування, Замовник може зазначати пункт Плану України в полі budget.project.

Якщо project.id вказано з довідника plan_of_ukraine, то ми побачимо додаткові валідації на поля name та name_en:

Request

PATCH /api/2.5/plans/647ea8f38f72484ea0245b71b7cd4231?acc_token=499da8e897254fb7a478ae7555785628 HTTP/1.0
Authorization: Bearer broker
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "budget": {
      "project": {
        "id": "532ba4bc-e1a7-4334-8d8e-59646d5dcee6",
        "name": "Project name"
      },
      "amount": 10000,
      "amountNet": 12222,
      "currency": "UAH",
      "id": "12303111000-2",
      "description": "budget_description",
      "period": {
        "startDate": "2023-01-01T00:00:00",
        "endDate": "2023-12-31T00:00:00"
      },
      "breakdown": [
        {
          "title": "other",
          "description": "Breakdown other description.",
          "value": {
            "amount": 1500,
            "currency": "UAH"
          }
        }
      ]
    }
  }
}

Response

HTTP/1.0 422 Unprocessable Entity
Content-Type: application/json

{
  "status": "error",
  "errors": [
    {
      "location": "body",
      "name": "budget",
      "description": {
        "project": {
          "name": [
            "Value should be from plan_of_ukraine dictionary for 532ba4bc-e1a7-4334-8d8e-59646d5dcee6"
          ],
          "name_en": [
            "Value should be from plan_of_ukraine dictionary for 532ba4bc-e1a7-4334-8d8e-59646d5dcee6"
          ]
        }
      }
    }
  ]
}

Успішне додавання джерела фінансування разом з проектом з Плану України:

Request

PATCH /api/2.5/plans/647ea8f38f72484ea0245b71b7cd4231?acc_token=499da8e897254fb7a478ae7555785628 HTTP/1.0
Authorization: Bearer broker
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "budget": {
      "project": {
        "id": "95f87658-ffa5-472e-89ee-6e9417aa8cbd",
        "name": "1.1. Набрання чинності законодавчими змінами щодо реформи оплати праці в державній службі",
        "name_en": "1.1. Entry into force of the legislative changes to the civil service remuneration reform"
      },
      "amount": 10000,
      "amountNet": 12222,
      "currency": "UAH",
      "id": "12303111000-2",
      "description": "budget_description",
      "period": {
        "startDate": "2023-01-01T00:00:00",
        "endDate": "2023-12-31T00:00:00"
      },
      "breakdown": [
        {
          "title": "other",
          "description": "Breakdown other description.",
          "value": {
            "amount": 1500,
            "currency": "UAH"
          }
        }
      ]
    }
  }
}

Response

HTTP/1.0 200 OK
Content-Type: application/json

{
  "data": {
    "status": "scheduled",
    "procuringEntity": {
      "id": "3dd578dcb6d34f1fa29434f9f012065d",
      "name": "ДУС",
      "identifier": {
        "scheme": "UA-EDR",
        "id": "111983",
        "legalName": "ДП Державне Управління Справами"
      },
      "address": {
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "locality": "м. Київ",
        "region": "м. Київ",
        "postalCode": "01220",
        "countryName": "Україна"
      },
      "kind": "general",
      "signerInfo": {
        "name": "Test Testovich",
        "email": "example@email.com",
        "telephone": "+380950000000",
        "iban": "111111111111111",
        "position": "Генеральний директор",
        "authorizedBy": "Статут компанії"
      }
    },
    "tender": {
      "procurementMethod": "open",
      "procurementMethodType": "belowThreshold",
      "tenderPeriod": {
        "startDate": "2023-10-17T00:00:00+02:00"
      }
    },
    "budget": {
      "id": "12303111000-2",
      "description": "budget_description",
      "amount": 10000.0,
      "currency": "UAH",
      "amountNet": 12222.0,
      "project": {
        "id": "95f87658-ffa5-472e-89ee-6e9417aa8cbd",
        "name": "1.1. Набрання чинності законодавчими змінами щодо реформи оплати праці в державній службі",
        "name_en": "1.1. Entry into force of the legislative changes to the civil service remuneration reform"
      },
      "period": {
        "startDate": "2023-01-01T00:00:00+02:00",
        "endDate": "2023-12-31T00:00:00+02:00"
      },
      "breakdown": [
        {
          "id": "fe685ef07eb149389d0906122d242d57",
          "title": "other",
          "description": "Breakdown other description.",
          "value": {
            "amount": 1500.0,
            "currency": "UAH"
          }
        }
      ]
    },
    "classification": {
      "description": "Seeds",
      "scheme": "ДК021",
      "id": "03111000-2"
    },
    "additionalClassifications": [
      {
        "scheme": "КЕКВ",
        "id": "2000",
        "description": "Поточні видатки"
      }
    ],
    "planID": "UA-P-2023-10-10-000001-a",
    "items": [
      {
        "id": "6357797639c344369e5948778ade25b6",
        "classification": {
          "description": "Vegetable seeds",
          "scheme": "ДК021",
          "id": "03111700-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.13.6",
            "description": "Насіння овочевих культур"
          }
        ],
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 5000.0,
        "deliveryDate": {
          "endDate": "2016-06-01T23:06:30.023018+03:00"
        },
        "description": "Насіння овочевих культур"
      }
    ],
    "buyers": [
      {
        "id": "bdec69d290d548aca291dd58d4a1854d",
        "name": "ДУС",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "111983",
          "legalName": "ДП Державне Управління Справами"
        },
        "address": {
          "streetAddress": "вул. Банкова, 11, корпус 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "01220",
          "countryName": "Україна"
        },
        "kind": "general",
        "signerInfo": {
          "name": "Test Testovich",
          "email": "example@email.com",
          "telephone": "+380950000000",
          "iban": "111111111111111",
          "position": "Генеральний директор",
          "authorizedBy": "Статут компанії"
        }
      }
    ],
    "rationale": {
      "description": "Недостатньо змістовне обгрунтування",
      "date": "2023-10-10T01:00:00+03:00"
    },
    "project": {
      "title": "DREAMs come true",
      "uri": "https://dream.gov.ua/ua/project/DREAM-UA-030524-EE48E08C/profile"
    },
    "owner": "broker",
    "dateCreated": "2023-10-10T01:00:00+03:00",
    "dateModified": "2023-10-10T01:00:00+03:00",
    "datePublished": "2023-10-10T01:00:00+03:00",
    "id": "647ea8f38f72484ea0245b71b7cd4231"
  }
}

Ukraine facility

Для державних, місцевих бюджетів та бюджетів Автономної Республіки Крим, Замовинк має вказати код з класифікаторів Ukraine facility в полі budget.breakdown.classification та budget.breakdown.address.addressDetails.

  • Для державних бюджетів використовується класифікатор КПК. Він поділений на декілька довідників в залежності від року, наприклад КПК-2025.

  • Для місцевих бюджетів та бюджетів Автономної Республіки Крим використовуються класифікатори КАТОТТГ та ТПКВКМБ

Існують додаткові валідації для планів з цими джерелами фінансування:

Request

PATCH /api/2.5/plans/647ea8f38f72484ea0245b71b7cd4231?acc_token=499da8e897254fb7a478ae7555785628 HTTP/1.0
Authorization: Bearer broker
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "budget": {
      "project": {
        "id": "95f87658-ffa5-472e-89ee-6e9417aa8cbd",
        "name": "1.1. Набрання чинності законодавчими змінами щодо реформи оплати праці в державній службі",
        "name_en": "1.1. Entry into force of the legislative changes to the civil service remuneration reform"
      },
      "amount": 10000,
      "amountNet": 12222,
      "currency": "UAH",
      "id": "12303111000-2",
      "description": "budget_description",
      "period": {
        "startDate": "2023-01-01T00:00:00",
        "endDate": "2023-12-31T00:00:00"
      },
      "breakdown": [
        {
          "title": "state",
          "description": "Breakdown other description.",
          "value": {
            "amount": 1500,
            "currency": "UAH"
          }
        }
      ]
    }
  }
}

Response

HTTP/1.0 422 Unprocessable Entity
Content-Type: application/json

{
  "status": "error",
  "errors": [
    {
      "location": "body",
      "name": "budget.breakdown.classification",
      "description": "КПК is required for state budget."
    }
  ]
}

Додамо classification для державного бюджету:

Request

PATCH /api/2.5/plans/647ea8f38f72484ea0245b71b7cd4231?acc_token=499da8e897254fb7a478ae7555785628 HTTP/1.0
Authorization: Bearer broker
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "budget": {
      "project": {
        "id": "95f87658-ffa5-472e-89ee-6e9417aa8cbd",
        "name": "1.1. Набрання чинності законодавчими змінами щодо реформи оплати праці в державній службі",
        "name_en": "1.1. Entry into force of the legislative changes to the civil service remuneration reform"
      },
      "amount": 10000,
      "amountNet": 12222,
      "currency": "UAH",
      "id": "12303111000-2",
      "description": "budget_description",
      "period": {
        "startDate": "2023-01-01T00:00:00",
        "endDate": "2023-12-31T00:00:00"
      },
      "breakdown": [
        {
          "title": "state",
          "description": "Breakdown other description.",
          "value": {
            "amount": 1500,
            "currency": "UAH"
          },
          "classification": {
            "scheme": "КПК-2023",
            "id": "3505000",
            "description": "Державна аудиторська служба України"
          }
        }
      ]
    }
  }
}

Response

HTTP/1.0 200 OK
Content-Type: application/json

{
  "data": {
    "status": "scheduled",
    "procuringEntity": {
      "id": "3dd578dcb6d34f1fa29434f9f012065d",
      "name": "ДУС",
      "identifier": {
        "scheme": "UA-EDR",
        "id": "111983",
        "legalName": "ДП Державне Управління Справами"
      },
      "address": {
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "locality": "м. Київ",
        "region": "м. Київ",
        "postalCode": "01220",
        "countryName": "Україна"
      },
      "kind": "general",
      "signerInfo": {
        "name": "Test Testovich",
        "email": "example@email.com",
        "telephone": "+380950000000",
        "iban": "111111111111111",
        "position": "Генеральний директор",
        "authorizedBy": "Статут компанії"
      }
    },
    "tender": {
      "procurementMethod": "open",
      "procurementMethodType": "belowThreshold",
      "tenderPeriod": {
        "startDate": "2023-10-17T00:00:00+02:00"
      }
    },
    "budget": {
      "id": "12303111000-2",
      "description": "budget_description",
      "amount": 10000.0,
      "currency": "UAH",
      "amountNet": 12222.0,
      "project": {
        "id": "95f87658-ffa5-472e-89ee-6e9417aa8cbd",
        "name": "1.1. Набрання чинності законодавчими змінами щодо реформи оплати праці в державній службі",
        "name_en": "1.1. Entry into force of the legislative changes to the civil service remuneration reform"
      },
      "period": {
        "startDate": "2023-01-01T00:00:00+02:00",
        "endDate": "2023-12-31T00:00:00+02:00"
      },
      "breakdown": [
        {
          "id": "5ab35e786a83478f8db170bbe63d0289",
          "title": "state",
          "description": "Breakdown other description.",
          "value": {
            "amount": 1500.0,
            "currency": "UAH"
          },
          "classification": {
            "id": "3505000",
            "description": "Державна аудиторська служба України",
            "scheme": "КПК-2023"
          }
        }
      ]
    },
    "classification": {
      "description": "Seeds",
      "scheme": "ДК021",
      "id": "03111000-2"
    },
    "additionalClassifications": [
      {
        "scheme": "КЕКВ",
        "id": "2000",
        "description": "Поточні видатки"
      }
    ],
    "planID": "UA-P-2023-10-10-000001-a",
    "items": [
      {
        "id": "6357797639c344369e5948778ade25b6",
        "classification": {
          "description": "Vegetable seeds",
          "scheme": "ДК021",
          "id": "03111700-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.13.6",
            "description": "Насіння овочевих культур"
          }
        ],
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 5000.0,
        "deliveryDate": {
          "endDate": "2016-06-01T23:06:30.023018+03:00"
        },
        "description": "Насіння овочевих культур"
      }
    ],
    "buyers": [
      {
        "id": "bdec69d290d548aca291dd58d4a1854d",
        "name": "ДУС",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "111983",
          "legalName": "ДП Державне Управління Справами"
        },
        "address": {
          "streetAddress": "вул. Банкова, 11, корпус 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "01220",
          "countryName": "Україна"
        },
        "kind": "general",
        "signerInfo": {
          "name": "Test Testovich",
          "email": "example@email.com",
          "telephone": "+380950000000",
          "iban": "111111111111111",
          "position": "Генеральний директор",
          "authorizedBy": "Статут компанії"
        }
      }
    ],
    "rationale": {
      "description": "Недостатньо змістовне обгрунтування",
      "date": "2023-10-10T01:00:00+03:00"
    },
    "project": {
      "title": "DREAMs come true",
      "uri": "https://dream.gov.ua/ua/project/DREAM-UA-030524-EE48E08C/profile"
    },
    "owner": "broker",
    "dateCreated": "2023-10-10T01:00:00+03:00",
    "dateModified": "2023-10-10T01:00:00+03:00",
    "datePublished": "2023-10-10T01:00:00+03:00",
    "id": "647ea8f38f72484ea0245b71b7cd4231"
  }
}

Подивимося, що буде, якщо ми змінимо бюджет на місцевий:

Request

PATCH /api/2.5/plans/647ea8f38f72484ea0245b71b7cd4231?acc_token=499da8e897254fb7a478ae7555785628 HTTP/1.0
Authorization: Bearer broker
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "budget": {
      "project": {
        "id": "95f87658-ffa5-472e-89ee-6e9417aa8cbd",
        "name": "1.1. Набрання чинності законодавчими змінами щодо реформи оплати праці в державній службі",
        "name_en": "1.1. Entry into force of the legislative changes to the civil service remuneration reform"
      },
      "amount": 10000,
      "amountNet": 12222,
      "currency": "UAH",
      "id": "12303111000-2",
      "description": "budget_description",
      "period": {
        "startDate": "2023-01-01T00:00:00",
        "endDate": "2023-12-31T00:00:00"
      },
      "breakdown": [
        {
          "title": "local",
          "description": "Breakdown other description.",
          "value": {
            "amount": 1500,
            "currency": "UAH"
          }
        }
      ]
    }
  }
}

Response

HTTP/1.0 422 Unprocessable Entity
Content-Type: application/json

{
  "status": "error",
  "errors": [
    {
      "location": "body",
      "name": "budget.breakdown.classification",
      "description": "ТПКВКМБ is required for local budget."
    }
  ]
}

Додамо classification для місцевого бюджету і зробимо запит ще раз:

Request

PATCH /api/2.5/plans/647ea8f38f72484ea0245b71b7cd4231?acc_token=499da8e897254fb7a478ae7555785628 HTTP/1.0
Authorization: Bearer broker
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "budget": {
      "project": {
        "id": "95f87658-ffa5-472e-89ee-6e9417aa8cbd",
        "name": "1.1. Набрання чинності законодавчими змінами щодо реформи оплати праці в державній службі",
        "name_en": "1.1. Entry into force of the legislative changes to the civil service remuneration reform"
      },
      "amount": 10000,
      "amountNet": 12222,
      "currency": "UAH",
      "id": "12303111000-2",
      "description": "budget_description",
      "period": {
        "startDate": "2023-01-01T00:00:00",
        "endDate": "2023-12-31T00:00:00"
      },
      "breakdown": [
        {
          "title": "local",
          "description": "Breakdown other description.",
          "value": {
            "amount": 1500,
            "currency": "UAH"
          },
          "classification": {
            "scheme": "ТПКВКМБ",
            "id": "2170",
            "description": "Будівництво закладів охорони здоров’я"
          }
        }
      ]
    }
  }
}

Response

HTTP/1.0 422 Unprocessable Entity
Content-Type: application/json

{
  "status": "error",
  "errors": [
    {
      "location": "body",
      "name": "budget.breakdown.address",
      "description": "Address is required for local budget."
    }
  ]
}

Додамо адресу, після цього ЦБД буде вимагати КАТОТТГ для місцевого бюджету:

Request

PATCH /api/2.5/plans/647ea8f38f72484ea0245b71b7cd4231?acc_token=499da8e897254fb7a478ae7555785628 HTTP/1.0
Authorization: Bearer broker
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "budget": {
      "project": {
        "id": "95f87658-ffa5-472e-89ee-6e9417aa8cbd",
        "name": "1.1. Набрання чинності законодавчими змінами щодо реформи оплати праці в державній службі",
        "name_en": "1.1. Entry into force of the legislative changes to the civil service remuneration reform"
      },
      "amount": 10000,
      "amountNet": 12222,
      "currency": "UAH",
      "id": "12303111000-2",
      "description": "budget_description",
      "period": {
        "startDate": "2023-01-01T00:00:00",
        "endDate": "2023-12-31T00:00:00"
      },
      "breakdown": [
        {
          "title": "local",
          "description": "Breakdown other description.",
          "value": {
            "amount": 1500,
            "currency": "UAH"
          },
          "classification": {
            "scheme": "ТПКВКМБ",
            "id": "2170",
            "description": "Будівництво закладів охорони здоров’я"
          },
          "address": {
            "countryName": "Україна"
          }
        }
      ]
    }
  }
}

Response

HTTP/1.0 422 Unprocessable Entity
Content-Type: application/json

{
  "status": "error",
  "errors": [
    {
      "location": "body",
      "name": "budget.breakdown.address.addressDetails",
      "description": "КАТОТТГ is required for local budget."
    }
  ]
}

Тепер додамо classification разом з address для місцевого бюджету:

Request

PATCH /api/2.5/plans/647ea8f38f72484ea0245b71b7cd4231?acc_token=499da8e897254fb7a478ae7555785628 HTTP/1.0
Authorization: Bearer broker
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "budget": {
      "project": {
        "id": "95f87658-ffa5-472e-89ee-6e9417aa8cbd",
        "name": "1.1. Набрання чинності законодавчими змінами щодо реформи оплати праці в державній службі",
        "name_en": "1.1. Entry into force of the legislative changes to the civil service remuneration reform"
      },
      "amount": 10000,
      "amountNet": 12222,
      "currency": "UAH",
      "id": "12303111000-2",
      "description": "budget_description",
      "period": {
        "startDate": "2023-01-01T00:00:00",
        "endDate": "2023-12-31T00:00:00"
      },
      "breakdown": [
        {
          "title": "local",
          "description": "Breakdown other description.",
          "value": {
            "amount": 1500,
            "currency": "UAH"
          },
          "classification": {
            "scheme": "ТПКВКМБ",
            "id": "2170",
            "description": "Будівництво закладів охорони здоров’я"
          },
          "address": {
            "countryName": "Україна",
            "addressDetails": [
              {
                "scheme": "КАТОТТГ",
                "id": "UA01020030010043419",
                "description": "Ароматне"
              }
            ]
          }
        }
      ]
    }
  }
}

Response

HTTP/1.0 200 OK
Content-Type: application/json

{
  "data": {
    "status": "scheduled",
    "procuringEntity": {
      "id": "3dd578dcb6d34f1fa29434f9f012065d",
      "name": "ДУС",
      "identifier": {
        "scheme": "UA-EDR",
        "id": "111983",
        "legalName": "ДП Державне Управління Справами"
      },
      "address": {
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "locality": "м. Київ",
        "region": "м. Київ",
        "postalCode": "01220",
        "countryName": "Україна"
      },
      "kind": "general",
      "signerInfo": {
        "name": "Test Testovich",
        "email": "example@email.com",
        "telephone": "+380950000000",
        "iban": "111111111111111",
        "position": "Генеральний директор",
        "authorizedBy": "Статут компанії"
      }
    },
    "tender": {
      "procurementMethod": "open",
      "procurementMethodType": "belowThreshold",
      "tenderPeriod": {
        "startDate": "2023-10-17T00:00:00+02:00"
      }
    },
    "budget": {
      "id": "12303111000-2",
      "description": "budget_description",
      "amount": 10000.0,
      "currency": "UAH",
      "amountNet": 12222.0,
      "project": {
        "id": "95f87658-ffa5-472e-89ee-6e9417aa8cbd",
        "name": "1.1. Набрання чинності законодавчими змінами щодо реформи оплати праці в державній службі",
        "name_en": "1.1. Entry into force of the legislative changes to the civil service remuneration reform"
      },
      "period": {
        "startDate": "2023-01-01T00:00:00+02:00",
        "endDate": "2023-12-31T00:00:00+02:00"
      },
      "breakdown": [
        {
          "id": "abf2efd495c14084a00790a883386ee2",
          "title": "local",
          "description": "Breakdown other description.",
          "value": {
            "amount": 1500.0,
            "currency": "UAH"
          },
          "address": {
            "countryName": "Україна",
            "addressDetails": [
              {
                "id": "UA01020030010043419",
                "description": "Ароматне",
                "scheme": "КАТОТТГ"
              }
            ]
          },
          "classification": {
            "id": "2170",
            "description": "Будівництво закладів охорони здоров’я",
            "scheme": "ТПКВКМБ"
          }
        }
      ]
    },
    "classification": {
      "description": "Seeds",
      "scheme": "ДК021",
      "id": "03111000-2"
    },
    "additionalClassifications": [
      {
        "scheme": "КЕКВ",
        "id": "2000",
        "description": "Поточні видатки"
      }
    ],
    "planID": "UA-P-2023-10-10-000001-a",
    "items": [
      {
        "id": "6357797639c344369e5948778ade25b6",
        "classification": {
          "description": "Vegetable seeds",
          "scheme": "ДК021",
          "id": "03111700-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "01.13.6",
            "description": "Насіння овочевих культур"
          }
        ],
        "unit": {
          "name": "кг",
          "code": "KGM"
        },
        "quantity": 5000.0,
        "deliveryDate": {
          "endDate": "2016-06-01T23:06:30.023018+03:00"
        },
        "description": "Насіння овочевих культур"
      }
    ],
    "buyers": [
      {
        "id": "bdec69d290d548aca291dd58d4a1854d",
        "name": "ДУС",
        "identifier": {
          "scheme": "UA-EDR",
          "id": "111983",
          "legalName": "ДП Державне Управління Справами"
        },
        "address": {
          "streetAddress": "вул. Банкова, 11, корпус 1",
          "locality": "м. Київ",
          "region": "м. Київ",
          "postalCode": "01220",
          "countryName": "Україна"
        },
        "kind": "general",
        "signerInfo": {
          "name": "Test Testovich",
          "email": "example@email.com",
          "telephone": "+380950000000",
          "iban": "111111111111111",
          "position": "Генеральний директор",
          "authorizedBy": "Статут компанії"
        }
      }
    ],
    "rationale": {
      "description": "Недостатньо змістовне обгрунтування",
      "date": "2023-10-10T01:00:00+03:00"
    },
    "project": {
      "title": "DREAMs come true",
      "uri": "https://dream.gov.ua/ua/project/DREAM-UA-030524-EE48E08C/profile"
    },
    "owner": "broker",
    "dateCreated": "2023-10-10T01:00:00+03:00",
    "dateModified": "2023-10-10T01:00:00+03:00",
    "datePublished": "2023-10-10T01:00:00+03:00",
    "id": "647ea8f38f72484ea0245b71b7cd4231"
  }
}