Obtener detalle de una licitación
curl --request GET \
--url https://api.pruff.com/api/clients/datahub/publicMarket/tenders/{code} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.pruff.com/api/clients/datahub/publicMarket/tenders/{code}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.pruff.com/api/clients/datahub/publicMarket/tenders/{code}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pruff.com/api/clients/datahub/publicMarket/tenders/{code}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pruff.com/api/clients/datahub/publicMarket/tenders/{code}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pruff.com/api/clients/datahub/publicMarket/tenders/{code}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pruff.com/api/clients/datahub/publicMarket/tenders/{code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"code": "1234-56-LE26",
"name": "Servicio de aseo de dependencias municipales",
"description": "Aseo diario de las dependencias municipales",
"type": "LE",
"statusCode": 8,
"status": "Adjudicada",
"currency": "CLP",
"estimatedAmount": 5000000,
"bidders": 3,
"adjudicationNumber": "1520",
"url": "https://www.mercadopublico.cl/ejemplo",
"creationDate": "2026-03-01T12:00:00-03:00",
"publicationDate": "2026-03-02T12:00:00-03:00",
"initialDate": "2026-03-02T12:00:00-03:00",
"finalDate": "2026-03-20T12:00:00-03:00",
"closeDate": "2026-03-20T12:00:00-03:00",
"signatureDate": null,
"adjudicationDate": "2026-04-01T12:00:00-03:00",
"buyer": {
"identifier": "69111111-3",
"name": "Municipalidad Ejemplo"
},
"items": [
{
"correlativeId": 1,
"productCode": 76111501,
"productName": "Servicio de aseo",
"description": "Aseo diario",
"category": "Servicios de limpieza",
"estimatedQuantity": 1,
"quantity": 1,
"unitPrice": 4800000,
"supplier": {
"identifier": "76111111-6",
"name": "Proveedor Ejemplo SpA"
}
}
]
}
}{
"message": "invalid_format",
"displayMessage": "El código no es válido",
"data": {
"errors": [
{
"path": "code",
"message": "El código no es válido",
"code": "invalid_format"
}
]
}
}{
"message": "Unauthorized: Invalid API Key"
}{
"message": "Tender not found",
"displayMessage": "No se encontró la licitación"
}{
"message": "Rate limit exceeded: 301 requests in the current 3600s window, limit is 300. Retry in 1200s.",
"displayMessage": "Superaste el límite de 300 solicitudes cada 3600 segundos. Vuelve a intentarlo en 1200 segundos.",
"data": {
"code": "RATE_LIMIT_EXCEEDED",
"scope": "All API keys of your company share this budget.",
"limit": 300,
"used": 301,
"windowSeconds": 3600,
"retryAfterSeconds": 1200,
"resetAt": "2026-03-10T16:00:00.000Z",
"hint": "Wait until resetAt (or honor the Retry-After header) before retrying. Avoid repeating identical requests: reuse responses you already fetched, use filters and larger pageSize values instead of one request per item, and cap your client concurrency."
}
}{
"message": "Internal server error"
}{
"message": "request_timeout",
"displayMessage": "La solicitud excedió el tiempo máximo permitido"
}Mercado Público
Obtener detalle de una licitación
Devuelve el detalle de una licitación de Mercado Público (ChileCompra) a partir de su código: fechas, monto estimado, organismo comprador y todos sus ítems, cada uno con su proveedor adjudicado. La cuota de 300 solicitudes por hora por empresa se comparte con los demás endpoints de Mercado Público y con otras consultas de Datahub de tu empresa.
GET
/
datahub
/
publicMarket
/
tenders
/
{code}
Obtener detalle de una licitación
curl --request GET \
--url https://api.pruff.com/api/clients/datahub/publicMarket/tenders/{code} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.pruff.com/api/clients/datahub/publicMarket/tenders/{code}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.pruff.com/api/clients/datahub/publicMarket/tenders/{code}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pruff.com/api/clients/datahub/publicMarket/tenders/{code}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pruff.com/api/clients/datahub/publicMarket/tenders/{code}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pruff.com/api/clients/datahub/publicMarket/tenders/{code}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pruff.com/api/clients/datahub/publicMarket/tenders/{code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"code": "1234-56-LE26",
"name": "Servicio de aseo de dependencias municipales",
"description": "Aseo diario de las dependencias municipales",
"type": "LE",
"statusCode": 8,
"status": "Adjudicada",
"currency": "CLP",
"estimatedAmount": 5000000,
"bidders": 3,
"adjudicationNumber": "1520",
"url": "https://www.mercadopublico.cl/ejemplo",
"creationDate": "2026-03-01T12:00:00-03:00",
"publicationDate": "2026-03-02T12:00:00-03:00",
"initialDate": "2026-03-02T12:00:00-03:00",
"finalDate": "2026-03-20T12:00:00-03:00",
"closeDate": "2026-03-20T12:00:00-03:00",
"signatureDate": null,
"adjudicationDate": "2026-04-01T12:00:00-03:00",
"buyer": {
"identifier": "69111111-3",
"name": "Municipalidad Ejemplo"
},
"items": [
{
"correlativeId": 1,
"productCode": 76111501,
"productName": "Servicio de aseo",
"description": "Aseo diario",
"category": "Servicios de limpieza",
"estimatedQuantity": 1,
"quantity": 1,
"unitPrice": 4800000,
"supplier": {
"identifier": "76111111-6",
"name": "Proveedor Ejemplo SpA"
}
}
]
}
}{
"message": "invalid_format",
"displayMessage": "El código no es válido",
"data": {
"errors": [
{
"path": "code",
"message": "El código no es válido",
"code": "invalid_format"
}
]
}
}{
"message": "Unauthorized: Invalid API Key"
}{
"message": "Tender not found",
"displayMessage": "No se encontró la licitación"
}{
"message": "Rate limit exceeded: 301 requests in the current 3600s window, limit is 300. Retry in 1200s.",
"displayMessage": "Superaste el límite de 300 solicitudes cada 3600 segundos. Vuelve a intentarlo en 1200 segundos.",
"data": {
"code": "RATE_LIMIT_EXCEEDED",
"scope": "All API keys of your company share this budget.",
"limit": 300,
"used": 301,
"windowSeconds": 3600,
"retryAfterSeconds": 1200,
"resetAt": "2026-03-10T16:00:00.000Z",
"hint": "Wait until resetAt (or honor the Retry-After header) before retrying. Avoid repeating identical requests: reuse responses you already fetched, use filters and larger pageSize values instead of one request per item, and cap your client concurrency."
}
}{
"message": "Internal server error"
}{
"message": "request_timeout",
"displayMessage": "La solicitud excedió el tiempo máximo permitido"
}