{"openapi":"3.1.0","info":{"title":"NexoBID Client API","description":"API de integración de solo lectura. Requiere una credencial de cuenta habilitada explícitamente. No acepta credenciales de proveedores, sesiones web ni permisos administrativos internos.","version":"1.0.0"},"servers":[{"url":"."}],"paths":{"/tenders":{"get":{"tags":["Tenders"],"summary":"List Tenders","description":"Published tenders within current account country/portal entitlements, newest ID first.","operationId":"listTenders","security":[{"ClientApiKey":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Cursor"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":2,"maxLength":200},{"type":"null"}],"title":"Q"}},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[A-Za-z]{2}$"},{"type":"null"}],"title":"Country"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}],"title":"Source"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}],"title":"Status"}},{"name":"opening_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Opening From"}},{"name":"opening_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Opening To"}},{"name":"updated_since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated Since"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TenderSummary_"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"}}}},"/tenders/{tender_id}":{"get":{"tags":["Tenders"],"summary":"Get Tender","description":"Source-backed detail; applies the same idempotent monthly view allowance as the web application.","operationId":"getTender","security":[{"ClientApiKey":[]}],"parameters":[{"name":"tender_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMaximum":9223372036854775808,"exclusiveMinimum":0,"title":"Tender Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenderDetail"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"}}}},"/tenders/{tender_id}/items":{"get":{"tags":["Tenders"],"summary":"List Items","description":"Captured line items; no extraction, background job or generated rows are triggered.","operationId":"listTenderItems","security":[{"ClientApiKey":[]}],"parameters":[{"name":"tender_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMaximum":9223372036854775808,"exclusiveMinimum":0,"title":"Tender Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TenderItem_"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"}}}},"/tenders/{tender_id}/attachments":{"get":{"tags":["Attachments"],"summary":"List Attachments","description":"Public-source document metadata only; no storage paths, source payloads or session URLs.","operationId":"listTenderAttachments","security":[{"ClientApiKey":[]}],"parameters":[{"name":"tender_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMaximum":9223372036854775808,"exclusiveMinimum":0,"title":"Tender Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Attachment_"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"}}}},"/tenders/{tender_id}/attachments/{attachment_id}/download":{"get":{"tags":["Attachments"],"summary":"Download Attachment","description":"Audited bounded delivery; account, publication, plan and attachment/tender binding checked on every call.","operationId":"downloadTenderAttachment","security":[{"ClientApiKey":[]}],"parameters":[{"name":"tender_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMaximum":9223372036854775808,"exclusiveMinimum":0,"title":"Tender Id"}},{"name":"attachment_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMaximum":9223372036854775808,"exclusiveMinimum":0,"title":"Attachment Id"}}],"responses":{"200":{"description":"Public source document stream","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request Entity Too Large"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Gateway"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Gateway Timeout"}}}},"/metadata":{"get":{"tags":["Metadata"],"summary":"Metadata","description":"Only currently authorized active sources and countries, plus nonsecret credential limits.","operationId":"getMetadata","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Metadata"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ClientApiKey":[]}]}}},"components":{"schemas":{"Attachment":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"kind":{"type":"string","title":"Kind"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"download_available":{"type":"boolean","title":"Download Available"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url","description":"Relative to this response URL; authenticated API link, never an upstream session URL."}},"type":"object","required":["id","kind","download_available"],"title":"Attachment"},"ErrorDetail":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"request_id":{"type":"string","title":"Request Id"}},"type":"object","required":["code","message","request_id"],"title":"ErrorDetail"},"ErrorResponse":{"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}},"type":"object","required":["error"],"title":"ErrorResponse"},"Metadata":{"properties":{"api_version":{"type":"string","const":"1.0","title":"Api Version","default":"1.0"},"countries":{"items":{"type":"string"},"type":"array","title":"Countries"},"sources":{"items":{"$ref":"#/components/schemas/Source"},"type":"array","title":"Sources"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"max_page_size":{"type":"integer","title":"Max Page Size","default":100},"requests_per_minute":{"type":"integer","title":"Requests Per Minute"},"requests_per_day":{"type":"integer","title":"Requests Per Day"},"credential_expires_at":{"type":"string","format":"date-time","title":"Credential Expires At"}},"type":"object","required":["countries","sources","scopes","requests_per_minute","requests_per_day","credential_expires_at"],"title":"Metadata"},"Page_Attachment_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Attachment"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["data","has_more","limit"],"title":"Page[Attachment]"},"Page_TenderItem_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TenderItem"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["data","has_more","limit"],"title":"Page[TenderItem]"},"Page_TenderSummary_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TenderSummary"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["data","has_more","limit"],"title":"Page[TenderSummary]"},"Source":{"properties":{"code":{"type":"string","title":"Code"},"official_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Official Url"},"name":{"type":"string","title":"Name"},"countries":{"items":{"type":"string"},"type":"array","title":"Countries"}},"type":"object","required":["code","name","countries"],"title":"Source"},"TenderDetail":{"properties":{"id":{"type":"integer","title":"Id"},"process_number":{"type":"string","title":"Process Number"},"official_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Official Number"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"buyer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer"},"country":{"type":"string","title":"Country"},"source":{"type":"string","title":"Source"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"process_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Process Type"},"opening_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Opening At","description":"Source local time, unless an offset is present."},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At","description":"Source publication time; not ingestion time."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"NexoBID record update time in UTC."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"procurement_object":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Procurement Object"},"estimated_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Estimated Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"offer_deadline":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Offer Deadline","description":"Source local time."},"data_status":{"type":"string","enum":["complete","partial"],"title":"Data Status"},"items_url":{"type":"string","title":"Items Url","description":"Relative to this response URL; resolve with urljoin."},"attachments_url":{"type":"string","title":"Attachments Url","description":"Relative to this response URL; resolve with urljoin."}},"type":"object","required":["id","process_number","country","source","data_status","items_url","attachments_url"],"title":"TenderDetail"},"TenderItem":{"properties":{"id":{"type":"integer","title":"Id"},"line_number":{"type":"string","title":"Line Number"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"specifications":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Specifications"},"quantity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quantity"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"unit_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Unit Price"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"detail_captured":{"type":"boolean","title":"Detail Captured"}},"type":"object","required":["id","line_number","detail_captured"],"title":"TenderItem"},"TenderSummary":{"properties":{"id":{"type":"integer","title":"Id"},"process_number":{"type":"string","title":"Process Number"},"official_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Official Number"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"buyer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer"},"country":{"type":"string","title":"Country"},"source":{"type":"string","title":"Source"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"process_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Process Type"},"opening_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Opening At","description":"Source local time, unless an offset is present."},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At","description":"Source publication time; not ingestion time."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"NexoBID record update time in UTC."}},"type":"object","required":["id","process_number","country","source"],"title":"TenderSummary"}},"securitySchemes":{"ClientApiKey":{"type":"http","description":"Clave de integración nxb_cr_…; no JWT/cookie.","scheme":"bearer"}}}}