# /comprar/tenders

`POST /api/comprar/tenders`

Price: 20 credits

One Argentine federal procurement process from COMPR.AR or CONTRAT.AR by process number or page URL: basic information and legal basis, schedule, spending requests, line items, requirements, guarantees, annexes, circulars, administrative acts, opening and evaluation reports, invited suppliers, auction lots, and the purchase orders with supplier CUIT, status and amount.

## How to use it

A process number is unique within one portal only, so pass the `portal` a comprar/tenders/search row came from; a page URL carries its own portal. `purchase_orders` are the awards, and `awarded_amount` is their sum when they share one currency. `url` is the permanent page of the process.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `number` (string, required) — Process number or the process page URL (examples: "14-0377-CDI20", "14/2-0158-CDI23", "https://comprar.gob.ar/PLIEGO/VistaPreviaPliegoCiudadano.aspx?qs=BQoBkoMoEhwazr4iyjhwFY98L/riDAj1T|CLipKWk2Wl4Hx9bn78ZhU3l7GdfgKawpDFKisy5o2ftW01excgfIILrDrFcmcJAzh2TUqRC2U4xKWUdkXI/w=="; minLength: 1)
- `portal` (string) — Portal the process number belongs to (default: "comprar"; one of: "comprar", "contratar")

## Response

### 200 — Successful Response

- `@type` (string) (default: "ComprarTender")
- `number` (string, required)
- `portal` (string, required)
- `file_number` (string, nullable)
- `name` (string, nullable)
- `purpose` (string, nullable)
- `buying_unit_code` (string, nullable)
- `buying_unit` (string, nullable)
- `procedure` (string, nullable)
- `submodality` (string, nullable)
- `phases` (string, nullable)
- `modality` (string, nullable)
- `scope` (string, nullable)
- `currency` (string, nullable)
- `legal_basis` (string, nullable)
- `legal_clause` (string, nullable)
- `contract_document_type` (string, nullable)
- `quote_quantity_rule` (string, nullable)
- `quote_line_rule` (string, nullable)
- `award_quantity_rule` (string, nullable)
- `award_line_rule` (string, nullable)
- `contracting_systems` (array) (default: [])
- `delivery_place` (string, nullable)
- `offer_validity` (string, nullable)
- `requires_payment` (boolean, nullable)
- `generates_revenue` (boolean, nullable)
- `revenue_via` (string, nullable)
- `goods_type` (string, nullable)
- `has_external_financing` (boolean, nullable)
- `accepts_extension` (boolean, nullable)
- `has_offer_improvement` (boolean, nullable)
- `advance_payment_percent` (number, nullable)
- `requires_repair_fund` (boolean, nullable)
- `repair_fund_percent` (number, nullable)
- `allows_repair_fund_substitution` (boolean, nullable)
- `published_at` (integer, nullable)
- `official_published_at` (integer, nullable)
- `publication_days` (integer, nullable)
- `enquiries_start_at` (integer, nullable)
- `enquiries_end_at` (integer, nullable)
- `documents_start_at` (integer, nullable)
- `documents_end_at` (integer, nullable)
- `opening_at` (integer, nullable)
- `next_openings` (array) (default: [])
  - `@type` (string) (default: "ComprarOpening")
  - `opening_at` (integer, nullable)
  - `bulletin_published_date` (string, nullable)
  - `publication_days` (integer, nullable)
- `media_notices` (array) (default: [])
  - `@type` (string) (default: "ComprarMediaNotice")
  - `medium` (string, required)
  - `published_date` (string, nullable)
  - `publication_days` (integer, nullable)
- `contract_start` (string, nullable)
- `contract_duration` (string, nullable)
- `contract_start_act` (string, nullable)
- `contract_currency` (string, nullable)
- `contract_notes` (string, nullable)
- `participants_count` (integer, nullable)
- `confirmed_offers_count` (integer, nullable)
- `bid_guarantee` (string, nullable)
- `performance_guarantee` (string, nullable)
- `challenge_guarantee` (string, nullable)
- `other_guarantees` (array) (default: [])
- `penalties` (array) (default: [])
- `requirements` (array) (default: [])
  - `@type` (string) (default: "ComprarRequirement")
  - `kind` (string, required)
  - `description` (string, required)
  - `document_type` (string, nullable)
- `spending_requests` (array) (default: [])
  - `@type` (string) (default: "ComprarSpendingRequest")
  - `number` (string, required)
  - `status` (string, nullable)
  - `buying_unit` (string, nullable)
  - `category` (string, nullable)
  - `urgency` (string, nullable)
  - `created_date` (string, nullable)
- `line_items` (array) (default: [])
  - `@type` (string) (default: "ComprarLineItem")
  - `line_number` (string, required)
  - `expense_object` (string, nullable)
  - `item_code` (string, nullable)
  - `description` (string, nullable)
  - `work_front` (string, nullable)
  - `quantity` (number, nullable)
  - `unit` (string, nullable)
  - `subtotal` (number, nullable)
- `general_conditions` (array) (default: [])
  - `@type` (string) (default: "ComprarGeneralConditions")
  - `name` (string, required)
  - `approval` (string, nullable)
  - `created_date` (string, nullable)
- `clauses` (array) (default: [])
  - `@type` (string) (default: "ComprarAct")
  - `document` (string, required)
  - `gde_number` (string, nullable)
  - `special_number` (string, nullable)
  - `linked_date` (string, nullable)
- `administrative_acts` (array) (default: [])
  - `@type` (string) (default: "ComprarAct")
  - `document` (string, required)
  - `gde_number` (string, nullable)
  - `special_number` (string, nullable)
  - `linked_date` (string, nullable)
- `annexes` (array) (default: [])
  - `@type` (string) (default: "ComprarAnnex")
  - `name` (string, required)
  - `annex_type` (string, nullable)
  - `description` (string, nullable)
- `circulars` (array) (default: [])
  - `@type` (string) (default: "ComprarCircular")
  - `number` (string, required)
  - `published_date` (string, nullable)
  - `circular_type` (string, nullable)
- `opening_acts` (array) (default: [])
  - `@type` (string) (default: "ComprarReport")
  - `document` (string, required)
  - `created_date` (string, nullable)
  - `status` (string, nullable)
  - `justification` (string, nullable)
- `preselection_reports` (array) (default: [])
  - `@type` (string) (default: "ComprarReport")
  - `document` (string, required)
  - `created_date` (string, nullable)
  - `status` (string, nullable)
  - `justification` (string, nullable)
- `evaluation_reports` (array) (default: [])
  - `@type` (string) (default: "ComprarReport")
  - `document` (string, required)
  - `created_date` (string, nullable)
  - `status` (string, nullable)
  - `justification` (string, nullable)
- `invited_suppliers` (array) (default: [])
  - `@type` (string) (default: "ComprarSupplier")
  - `name` (string, required)
  - `cuit` (string, nullable)
- `purchase_orders` (array) (default: [])
  - `@type` (string) (default: "ComprarPurchaseOrder")
  - `number` (string, required)
  - `supplier_name` (string, nullable)
  - `supplier_cuit` (string, nullable)
  - `order_type` (string, nullable)
  - `status` (string, nullable)
  - `perfected_date` (string, nullable)
  - `amount` (number, nullable)
  - `currency` (string, nullable)
- `awarded_amount` (number, nullable)
- `auction` (object, nullable)
  - `@type` (string) (default: "ComprarAuction")
  - `coordinator` (string, nullable)
  - `initial_duration` (string, nullable)
  - `extension_time` (string, nullable)
  - `lots` (array) (default: [])
    - `@type` (string) (default: "ComprarAuctionLot")
    - `number` (string, required)
    - `name` (string, nullable)
    - `base_price` (number, nullable)
    - `minimum_increment` (number, nullable)
    - `currency` (string, nullable)
    - `starts_at` (integer, nullable)
- `versions` (array) (default: [])
  - `@type` (string) (default: "ComprarVersion")
  - `version` (string, required)
  - `published_date` (string, nullable)
  - `status` (string, nullable)
- `country` (string) (default: "AR")
- `url` (string, required)

## Errors

### 422 — Validation Error

The request body did not validate

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 process under that number on that portal

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.

