# /goszakup/tenders

`POST /api/goszakup/tenders`

Price: 60 credits

Kazakhstan public procurement tender from zakup.gov.kz by id, number or URL: organizer, customer and commission, lots with their procurement-plan items, winners per lot, protocols, cancellation decisions and tender documents.

## How to use it

Pass `id` or `number` from goszakup/tenders/search, or the tender URL; the old portal's number goes with its lot suffix (`17685590-1`) or as the old portal URL. A bare number that is both one tender's id and another tender's number answers 412 unless `system` names which one. `winners` names the first and second place per lot once results are out; the signed contracts are in goszakup/contracts/search by `tender_number`.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `id` (string, required) — Tender id, tender number or tender URL (examples: "40670383", "17685590-1", "https://zakup.gov.kz/announcement/40670383", "https://old.goszakup.gov.kz/ru/announce/index/17685590"; minLength: 1)
- `system` (string, nullable) — Procurement system of the tender, as in a search row's `system` (one of: "egz", "mitwork", "skk", "epz")

## Response

### 200 — Successful Response

- `@type` (string) (default: "GoszakupTender")
- `id` (integer, required)
- `external_id` (integer, nullable)
- `number` (string, nullable)
- `name` (string, nullable)
- `name_kk` (string, nullable)
- `url` (string, required)
- `system` (object, nullable)
  - `@type` (string) (default: "GoszakupRef")
  - `id` (integer, nullable)
  - `name` (string, nullable)
  - `name_kk` (string, nullable)
- `status` (object, nullable)
  - `@type` (string) (default: "GoszakupRef")
  - `id` (integer, nullable)
  - `name` (string, nullable)
  - `name_kk` (string, nullable)
- `purchase_method` (object, nullable)
  - `@type` (string) (default: "GoszakupRef")
  - `id` (integer, nullable)
  - `name` (string, nullable)
  - `name_kk` (string, nullable)
- `preceding_purchase_method` (object, nullable)
  - `@type` (string) (default: "GoszakupRef")
  - `id` (integer, nullable)
  - `name` (string, nullable)
  - `name_kk` (string, nullable)
- `purchase_type` (object, nullable)
  - `@type` (string) (default: "GoszakupRef")
  - `id` (integer, nullable)
  - `name` (string, nullable)
  - `name_kk` (string, nullable)
- `purchase_subject` (object, nullable)
  - `@type` (string) (default: "GoszakupRef")
  - `id` (integer, nullable)
  - `name` (string, nullable)
  - `name_kk` (string, nullable)
- `year` (integer, nullable)
- `total_price` (number, nullable)
- `lot_count` (integer, nullable)
- `published_at` (integer, nullable)
- `offer_start_at` (integer, nullable)
- `offer_end_at` (integer, nullable)
- `repeated_offer_start_at` (integer, nullable)
- `repeated_offer_end_at` (integer, nullable)
- `discussion_start_at` (integer, nullable)
- `discussion_end_at` (integer, nullable)
- `results_published_at` (integer, nullable)
- `is_advance_notice` (boolean, nullable)
- `is_among_disabled` (boolean, nullable)
- `is_light_industry` (boolean, nullable)
- `is_vat_payer` (boolean, nullable)
- `is_sign_work` (boolean, nullable)
- `organizer` (object, nullable)
  - `@type` (string) (default: "GoszakupOrganizationProfile")
  - `id` (integer, nullable)
  - `external_id` (integer, nullable)
  - `iin_bin` (string, nullable)
  - `rnn` (string, nullable)
  - `name` (string, nullable)
  - `short_name` (string, nullable)
  - `legal_form` (string, nullable)
  - `org_form_code` (string, nullable)
  - `property_form_code` (string, nullable)
  - `organization_type` (object, nullable)
    - `@type` (string) (default: "GoszakupRef")
    - `id` (integer, nullable)
    - `name` (string, nullable)
    - `name_kk` (string, nullable)
  - `is_resident` (boolean, nullable)
  - `is_individual_entrepreneur` (boolean, nullable)
  - `is_small_business` (boolean, nullable)
  - `size` (string, nullable)
  - `registration_number` (string, nullable)
  - `registered_at` (integer, nullable)
  - `certificate_number` (string, nullable)
  - `certificate_at` (integer, nullable)
  - `authorized_capital` (number, nullable)
  - `government_capital` (number, nullable)
  - `private_capital` (number, nullable)
  - `planned_employees` (integer, nullable)
  - `country_code` (string, nullable)
  - `okpo` (string, nullable)
  - `director` (object, nullable)
    - `@type` (string) (default: "GoszakupPerson")
    - `id` (integer, nullable)
    - `full_name` (string, nullable)
    - `iin` (string, nullable)
    - `rnn` (string, nullable)
  - `address` (object, nullable)
    - `@type` (string) (default: "GoszakupAddress")
    - `id` (integer, nullable)
    - `address_type` (string, nullable)
    - `country` (string, nullable)
    - `country_code` (string, nullable)
    - `kato` (object, nullable)
      - `@type` (string) (default: "GoszakupKato")
      - `id` (integer, nullable)
      - `code` (string, nullable)
      - `name` (string, nullable)
      - `full_name` (string, nullable)
      - `full_name_kk` (string, nullable)
      - `level` (integer, nullable)
    - `city` (string, nullable)
    - `street` (string, nullable)
    - `house` (string, nullable)
    - `office` (string, nullable)
    - `zip` (string, nullable)
    - `phone` (string, nullable)
    - `fax` (string, nullable)
  - `roles` (object, nullable)
    - `@type` (string) (default: "GoszakupRoles")
    - `is_customer` (boolean, nullable)
    - `is_organizer` (boolean, nullable)
    - `is_supplier` (boolean, nullable)
    - `is_quasi_public` (boolean, nullable)
    - `is_state_institution` (boolean, nullable)
    - `is_state_institution_supplier` (boolean, nullable)
    - `is_education_ministry` (boolean, nullable)
    - `ownership_form` (string, nullable)
    - `economic_sector` (string, nullable)
  - `updated_at` (integer, nullable)
- `organizer_address` (string, nullable)
- `organizer_address_kk` (string, nullable)
- `organizer_agent` (object, nullable)
  - `@type` (string) (default: "GoszakupAgent")
  - `id` (integer, nullable)
  - `full_name` (string, nullable)
  - `position` (string, nullable)
  - `email` (string, nullable)
  - `approver_full_name` (string, nullable)
- `customer` (object, nullable)
  - `@type` (string) (default: "GoszakupOrganizationProfile")
  - `id` (integer, nullable)
  - `external_id` (integer, nullable)
  - `iin_bin` (string, nullable)
  - `rnn` (string, nullable)
  - `name` (string, nullable)
  - `short_name` (string, nullable)
  - `legal_form` (string, nullable)
  - `org_form_code` (string, nullable)
  - `property_form_code` (string, nullable)
  - `organization_type` (object, nullable)
    - `@type` (string) (default: "GoszakupRef")
    - `id` (integer, nullable)
    - `name` (string, nullable)
    - `name_kk` (string, nullable)
  - `is_resident` (boolean, nullable)
  - `is_individual_entrepreneur` (boolean, nullable)
  - `is_small_business` (boolean, nullable)
  - `size` (string, nullable)
  - `registration_number` (string, nullable)
  - `registered_at` (integer, nullable)
  - `certificate_number` (string, nullable)
  - `certificate_at` (integer, nullable)
  - `authorized_capital` (number, nullable)
  - `government_capital` (number, nullable)
  - `private_capital` (number, nullable)
  - `planned_employees` (integer, nullable)
  - `country_code` (string, nullable)
  - `okpo` (string, nullable)
  - `director` (object, nullable)
    - `@type` (string) (default: "GoszakupPerson")
    - `id` (integer, nullable)
    - `full_name` (string, nullable)
    - `iin` (string, nullable)
    - `rnn` (string, nullable)
  - `address` (object, nullable)
    - `@type` (string) (default: "GoszakupAddress")
    - `id` (integer, nullable)
    - `address_type` (string, nullable)
    - `country` (string, nullable)
    - `country_code` (string, nullable)
    - `kato` (object, nullable)
      - `@type` (string) (default: "GoszakupKato")
      - `id` (integer, nullable)
      - `code` (string, nullable)
      - `name` (string, nullable)
      - `full_name` (string, nullable)
      - `full_name_kk` (string, nullable)
      - `level` (integer, nullable)
    - `city` (string, nullable)
    - `street` (string, nullable)
    - `house` (string, nullable)
    - `office` (string, nullable)
    - `zip` (string, nullable)
    - `phone` (string, nullable)
    - `fax` (string, nullable)
  - `roles` (object, nullable)
    - `@type` (string) (default: "GoszakupRoles")
    - `is_customer` (boolean, nullable)
    - `is_organizer` (boolean, nullable)
    - `is_supplier` (boolean, nullable)
    - `is_quasi_public` (boolean, nullable)
    - `is_state_institution` (boolean, nullable)
    - `is_state_institution_supplier` (boolean, nullable)
    - `is_education_ministry` (boolean, nullable)
    - `ownership_form` (string, nullable)
    - `economic_sector` (string, nullable)
  - `updated_at` (integer, nullable)
- `customer_agent` (object, nullable)
  - `@type` (string) (default: "GoszakupAgent")
  - `id` (integer, nullable)
  - `full_name` (string, nullable)
  - `position` (string, nullable)
  - `email` (string, nullable)
  - `approver_full_name` (string, nullable)
- `supplier` (object, nullable)
  - `@type` (string) (default: "GoszakupOrganizationProfile")
  - `id` (integer, nullable)
  - `external_id` (integer, nullable)
  - `iin_bin` (string, nullable)
  - `rnn` (string, nullable)
  - `name` (string, nullable)
  - `short_name` (string, nullable)
  - `legal_form` (string, nullable)
  - `org_form_code` (string, nullable)
  - `property_form_code` (string, nullable)
  - `organization_type` (object, nullable)
    - `@type` (string) (default: "GoszakupRef")
    - `id` (integer, nullable)
    - `name` (string, nullable)
    - `name_kk` (string, nullable)
  - `is_resident` (boolean, nullable)
  - `is_individual_entrepreneur` (boolean, nullable)
  - `is_small_business` (boolean, nullable)
  - `size` (string, nullable)
  - `registration_number` (string, nullable)
  - `registered_at` (integer, nullable)
  - `certificate_number` (string, nullable)
  - `certificate_at` (integer, nullable)
  - `authorized_capital` (number, nullable)
  - `government_capital` (number, nullable)
  - `private_capital` (number, nullable)
  - `planned_employees` (integer, nullable)
  - `country_code` (string, nullable)
  - `okpo` (string, nullable)
  - `director` (object, nullable)
    - `@type` (string) (default: "GoszakupPerson")
    - `id` (integer, nullable)
    - `full_name` (string, nullable)
    - `iin` (string, nullable)
    - `rnn` (string, nullable)
  - `address` (object, nullable)
    - `@type` (string) (default: "GoszakupAddress")
    - `id` (integer, nullable)
    - `address_type` (string, nullable)
    - `country` (string, nullable)
    - `country_code` (string, nullable)
    - `kato` (object, nullable)
      - `@type` (string) (default: "GoszakupKato")
      - `id` (integer, nullable)
      - `code` (string, nullable)
      - `name` (string, nullable)
      - `full_name` (string, nullable)
      - `full_name_kk` (string, nullable)
      - `level` (integer, nullable)
    - `city` (string, nullable)
    - `street` (string, nullable)
    - `house` (string, nullable)
    - `office` (string, nullable)
    - `zip` (string, nullable)
    - `phone` (string, nullable)
    - `fax` (string, nullable)
  - `roles` (object, nullable)
    - `@type` (string) (default: "GoszakupRoles")
    - `is_customer` (boolean, nullable)
    - `is_organizer` (boolean, nullable)
    - `is_supplier` (boolean, nullable)
    - `is_quasi_public` (boolean, nullable)
    - `is_state_institution` (boolean, nullable)
    - `is_state_institution_supplier` (boolean, nullable)
    - `is_education_ministry` (boolean, nullable)
    - `ownership_form` (string, nullable)
    - `economic_sector` (string, nullable)
  - `updated_at` (integer, nullable)
- `commission` (array) (default: [])
  - `@type` (string) (default: "GoszakupCommissionMember")
  - `id` (integer, nullable)
  - `role` (object, nullable)
    - `@type` (string) (default: "GoszakupRef")
    - `id` (integer, nullable)
    - `name` (string, nullable)
    - `name_kk` (string, nullable)
  - `organization` (object, nullable)
    - `@type` (string) (default: "GoszakupOrganizationProfile")
    - `id` (integer, nullable)
    - `external_id` (integer, nullable)
    - `iin_bin` (string, nullable)
    - `rnn` (string, nullable)
    - `name` (string, nullable)
    - `short_name` (string, nullable)
    - `legal_form` (string, nullable)
    - `org_form_code` (string, nullable)
    - `property_form_code` (string, nullable)
    - `organization_type` (object, nullable)
      - `@type` (string) (default: "GoszakupRef")
      - `id` (integer, nullable)
      - `name` (string, nullable)
      - `name_kk` (string, nullable)
    - `is_resident` (boolean, nullable)
    - `is_individual_entrepreneur` (boolean, nullable)
    - `is_small_business` (boolean, nullable)
    - `size` (string, nullable)
    - `registration_number` (string, nullable)
    - `registered_at` (integer, nullable)
    - `certificate_number` (string, nullable)
    - `certificate_at` (integer, nullable)
    - `authorized_capital` (number, nullable)
    - `government_capital` (number, nullable)
    - `private_capital` (number, nullable)
    - `planned_employees` (integer, nullable)
    - `country_code` (string, nullable)
    - `okpo` (string, nullable)
    - `director` (object, nullable)
      - `@type` (string) (default: "GoszakupPerson")
      - `id` (integer, nullable)
      - `full_name` (string, nullable)
      - `iin` (string, nullable)
      - `rnn` (string, nullable)
    - `address` (object, nullable)
      - `@type` (string) (default: "GoszakupAddress")
      - `id` (integer, nullable)
      - `address_type` (string, nullable)
      - `country` (string, nullable)
      - `country_code` (string, nullable)
      - `kato` (object, nullable) (see schema GoszakupKato)
      - `city` (string, nullable)
      - `street` (string, nullable)
      - `house` (string, nullable)
      - `office` (string, nullable)
      - `zip` (string, nullable)
      - `phone` (string, nullable)
      - `fax` (string, nullable)
    - `roles` (object, nullable)
      - `@type` (string) (default: "GoszakupRoles")
      - `is_customer` (boolean, nullable)
      - `is_organizer` (boolean, nullable)
      - `is_supplier` (boolean, nullable)
      - `is_quasi_public` (boolean, nullable)
      - `is_state_institution` (boolean, nullable)
      - `is_state_institution_supplier` (boolean, nullable)
      - `is_education_ministry` (boolean, nullable)
      - `ownership_form` (string, nullable)
      - `economic_sector` (string, nullable)
    - `updated_at` (integer, nullable)
- `attributes` (array) (default: [])
  - `@type` (string) (default: "GoszakupAttribute")
  - `id` (integer, nullable)
  - `name` (string, nullable)
  - `value` (integer, nullable)
- `lots` (array) (default: [])
  - `@type` (string) (default: "GoszakupLot")
  - `id` (integer, required)
  - `external_id` (integer, nullable)
  - `number` (string, nullable)
  - `name` (string, nullable)
  - `name_kk` (string, nullable)
  - `description` (string, nullable)
  - `description_kk` (string, nullable)
  - `status` (object, nullable)
    - `@type` (string) (default: "GoszakupRef")
    - `id` (integer, nullable)
    - `name` (string, nullable)
    - `name_kk` (string, nullable)
  - `system` (object, nullable)
    - `@type` (string) (default: "GoszakupRef")
    - `id` (integer, nullable)
    - `name` (string, nullable)
    - `name_kk` (string, nullable)
  - `total_price` (number, nullable)
  - `dumping_price` (number, nullable)
  - `feasibility_study_price` (number, nullable)
  - `is_combined` (boolean, nullable)
  - `is_complex_expertise` (boolean, nullable)
  - `is_consulting_service` (boolean, nullable)
  - `is_dumping` (boolean, nullable)
  - `is_externally_deleted` (boolean, nullable)
  - `plan_items` (array) (default: [])
    - `@type` (string) (default: "GoszakupPlanItem")
    - `id` (integer, required)
    - `external_id` (integer, nullable)
    - `name` (string, nullable)
    - `name_kk` (string, nullable)
    - `description` (string, nullable)
    - `description_kk` (string, nullable)
    - `extra_description` (string, nullable)
    - `extra_description_kk` (string, nullable)
    - `system` (object, nullable) (see schema GoszakupRef)
    - `status` (object, nullable) (see schema GoszakupRef)
    - `purchase_method` (object, nullable) (see schema GoszakupRef)
    - `purchase_method_justification` (object, nullable) (see schema GoszakupRef)
    - `purchase_subject` (object, nullable) (see schema GoszakupRef)
    - `item_type` (object, nullable) (see schema GoszakupRef)
    - `budget_type` (object, nullable) (see schema GoszakupRef)
    - `budget_administrator` (object, nullable) (see schema GoszakupRef)
    - `funding_source` (object, nullable) (see schema GoszakupRef)
    - `enstru` (object, nullable) (see schema GoszakupEnstru)
    - `year` (integer, nullable)
    - `month` (string, nullable)
    - `plan_id` (integer, nullable)
    - `plan_act_number` (string, nullable)
    - `plan_act_date` (string, nullable)
    - `organization` (object, nullable) (see schema GoszakupOrgRef)
    - `state_institution` (object, nullable) (see schema GoszakupRef)
    - `quantity` (number, nullable)
    - `unit` (string, nullable)
    - `unit_price` (number, nullable)
    - `total_price` (number, nullable)
    - `total_price_year_1` (number, nullable)
    - `total_price_year_2` (number, nullable)
    - `total_price_year_3` (number, nullable)
    - `total_price_year_4` (number, nullable)
    - `total_price_year_5` (number, nullable)
    - `prepayment_percent` (number, nullable)
    - `delivery_deadline` (string, nullable)
    - `delivery_deadline_kk` (string, nullable)
    - `delivery_address` (object, nullable) (see schema GoszakupKato)
    - `deliveries` (array) (default: [])
    - `financing` (array) (default: [])
    - `attributes` (array) (default: [])
    - `is_quasi_sector` (boolean, nullable)
    - `is_externally_active` (boolean, nullable)
    - `is_externally_deleted` (boolean, nullable)
    - `purchase_limitation_sign` (integer, nullable)
    - `updated_at` (integer, nullable)
  - `updated_at` (integer, nullable)
- `winners` (array) (default: [])
  - `@type` (string) (default: "GoszakupWinner")
  - `id` (integer, nullable)
  - `lot` (object, nullable)
    - `@type` (string) (default: "GoszakupLotRef")
    - `id` (integer, nullable)
    - `external_id` (integer, nullable)
    - `number` (string, nullable)
    - `name` (string, nullable)
    - `total_price` (number, nullable)
  - `status` (object, nullable)
    - `@type` (string) (default: "GoszakupRef")
    - `id` (integer, nullable)
    - `name` (string, nullable)
    - `name_kk` (string, nullable)
  - `winner` (object, nullable)
    - `@type` (string) (default: "GoszakupBidder")
    - `id` (integer, nullable)
    - `external_id` (integer, nullable)
    - `organization` (object, nullable)
      - `@type` (string) (default: "GoszakupOrgRef")
      - `id` (integer, nullable)
      - `external_id` (integer, nullable)
      - `iin_bin` (string, nullable)
      - `name` (string, nullable)
      - `name_kk` (string, nullable)
      - `full_name` (string, nullable)
      - `full_name_kk` (string, nullable)
      - `is_resident` (boolean, nullable)
      - `organization_type` (object, nullable) (see schema GoszakupRef)
      - `email` (string, nullable)
      - `phone` (string, nullable)
    - `status` (object, nullable)
      - `@type` (string) (default: "GoszakupRef")
      - `id` (integer, nullable)
      - `name` (string, nullable)
      - `name_kk` (string, nullable)
    - `system` (object, nullable)
      - `@type` (string) (default: "GoszakupRef")
      - `id` (integer, nullable)
      - `name` (string, nullable)
      - `name_kk` (string, nullable)
  - `second_place` (object, nullable)
    - `@type` (string) (default: "GoszakupBidder")
    - `id` (integer, nullable)
    - `external_id` (integer, nullable)
    - `organization` (object, nullable)
      - `@type` (string) (default: "GoszakupOrgRef")
      - `id` (integer, nullable)
      - `external_id` (integer, nullable)
      - `iin_bin` (string, nullable)
      - `name` (string, nullable)
      - `name_kk` (string, nullable)
      - `full_name` (string, nullable)
      - `full_name_kk` (string, nullable)
      - `is_resident` (boolean, nullable)
      - `organization_type` (object, nullable) (see schema GoszakupRef)
      - `email` (string, nullable)
      - `phone` (string, nullable)
    - `status` (object, nullable)
      - `@type` (string) (default: "GoszakupRef")
      - `id` (integer, nullable)
      - `name` (string, nullable)
      - `name_kk` (string, nullable)
    - `system` (object, nullable)
      - `@type` (string) (default: "GoszakupRef")
      - `id` (integer, nullable)
      - `name` (string, nullable)
      - `name_kk` (string, nullable)
- `protocols` (array) (default: [])
  - `@type` (string) (default: "GoszakupProtocol")
  - `id` (integer, nullable)
  - `external_id` (integer, nullable)
  - `number` (string, nullable)
  - `protocol_type` (object, nullable)
    - `@type` (string) (default: "GoszakupRef")
    - `id` (integer, nullable)
    - `name` (string, nullable)
    - `name_kk` (string, nullable)
  - `protocol_at` (integer, nullable)
  - `published_at` (integer, nullable)
  - `is_enabled` (boolean, nullable)
  - `file` (object, nullable)
    - `@type` (string) (default: "GoszakupFile")
    - `id` (string, nullable)
    - `name` (string, nullable)
    - `url` (string, nullable)
    - `uuid` (string, nullable)
    - `uploaded_by` (string, nullable)
    - `uploaded_at` (integer, nullable)
    - `organization_id` (integer, nullable)
- `cancellations` (array) (default: [])
  - `@type` (string) (default: "GoszakupCancellation")
  - `id` (integer, nullable)
  - `decision_number` (string, nullable)
  - `decision_date` (string, nullable)
  - `act_type` (object, nullable)
    - `@type` (string) (default: "GoszakupRef")
    - `id` (integer, nullable)
    - `name` (string, nullable)
    - `name_kk` (string, nullable)
  - `authority_type` (object, nullable)
    - `@type` (string) (default: "GoszakupRef")
    - `id` (integer, nullable)
    - `name` (string, nullable)
    - `name_kk` (string, nullable)
  - `authority_name` (string, nullable)
  - `lots` (array) (default: [])
    - `@type` (string) (default: "GoszakupLotRef")
    - `id` (integer, nullable)
    - `external_id` (integer, nullable)
    - `number` (string, nullable)
    - `name` (string, nullable)
    - `total_price` (number, nullable)
  - `files` (array) (default: [])
    - `@type` (string) (default: "GoszakupFile")
    - `id` (string, nullable)
    - `name` (string, nullable)
    - `url` (string, nullable)
    - `uuid` (string, nullable)
    - `uploaded_by` (string, nullable)
    - `uploaded_at` (integer, nullable)
    - `organization_id` (integer, nullable)
- `documents` (array) (default: [])
  - `@type` (string) (default: "GoszakupDocument")
  - `id` (integer, nullable)
  - `external_id` (integer, nullable)
  - `group` (object, nullable)
    - `@type` (string) (default: "GoszakupRef")
    - `id` (integer, nullable)
    - `name` (string, nullable)
    - `name_kk` (string, nullable)
  - `category` (object, nullable)
    - `@type` (string) (default: "GoszakupRef")
    - `id` (integer, nullable)
    - `name` (string, nullable)
    - `name_kk` (string, nullable)
  - `lot` (object, nullable)
    - `@type` (string) (default: "GoszakupLotRef")
    - `id` (integer, nullable)
    - `external_id` (integer, nullable)
    - `number` (string, nullable)
    - `name` (string, nullable)
    - `total_price` (number, nullable)
  - `organizer_id` (integer, nullable)
  - `file` (object, nullable)
    - `@type` (string) (default: "GoszakupFile")
    - `id` (string, nullable)
    - `name` (string, nullable)
    - `url` (string, nullable)
    - `uuid` (string, nullable)
    - `uploaded_by` (string, nullable)
    - `uploaded_at` (integer, nullable)
    - `organization_id` (integer, nullable)
- `updated_at` (integer, nullable)

## Errors

### 422 — Validation Error

The value is not a tender id, number or URL

What to do: Check the fields against this schema. A URN with the wrong prefix is the most common cause.

- `detail` (array)
  - `loc` (array, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (object)

### 408

The request ran past its time limit

What to do: Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.

### 412

No tender with that id or number, or a bare number matching two tenders without `system`

What to do: Retrying will not help: either the entity does not exist, or the input points at a different one.

### 429

Too many requests: a rate limit or a usage window is exhausted

What to do: When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.

### 500

Something broke on our side

What to do: Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.

### 529

Rate limit reached, or the endpoint is overloaded

What to do: Wait at least 30 seconds, then retry.

## Response envelope

Success: Array of objects (may be empty if no results)

Error: Error may coexist with partial results if it occurs mid-execution. Check X-Error header and status code.

Every response carries these headers:

- `X-Error` — Error message text (present only on error)
- `X-Request-ID` — Unique request identifier
- `X-Execution-Time` — Execution time in seconds
- `X-Result-Count` — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.
- `X-Total-Available-Results` — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.
- `X-Warning` — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.
- `X-Retry-After` — Seconds to wait before retrying. Present only on 429.

