# Obtener una cotización

Permiso requerido: quotes:read.

GET `/public/v1/quotes/{id}`

Permiso `quotes:read` · Cotizaciones

## Parámetros

### Parámetros de ruta

| Nombre | Tipo          | Requerido | Descripción |
| ------ | ------------- | --------- | ----------- |
| `id`   | string (uuid) | Sí        | —           |

## Ejemplo de petición

**curl**

```sh
curl "https://api.posdata.so/public/v1/quotes/3f1c2e8d-7a10-4d0b-9a57-0b6f2f0e5c1d" \
  -H "Authorization: Bearer $POSDATA_API_KEY"
```

**Node.js**

```js
const res = await fetch('https://api.posdata.so/public/v1/quotes/3f1c2e8d-7a10-4d0b-9a57-0b6f2f0e5c1d', {
  headers: {
    Authorization: `Bearer ${process.env.POSDATA_API_KEY}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message} (${data.error.request_id})`);
```

**Python**

```python
import os

import requests

res = requests.get(
    "https://api.posdata.so/public/v1/quotes/3f1c2e8d-7a10-4d0b-9a57-0b6f2f0e5c1d",
    headers={
        "Authorization": f"Bearer {os.environ['POSDATA_API_KEY']}",
    },
    timeout=30,
)
data = res.json()
if not res.ok:
    raise RuntimeError(f"{data['error']['code']}: {data['error']['message']} ({data['error']['request_id']})")
```

**PHP**

```php
<?php
$ch = curl_init('https://api.posdata.so/public/v1/quotes/3f1c2e8d-7a10-4d0b-9a57-0b6f2f0e5c1d');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('POSDATA_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException("{$data['error']['code']}: {$data['error']['message']} ({$data['error']['request_id']})");
}
```

## Respuesta

`200` OK: un objeto [Quote](https://developers.posdata.so/referencia/objetos/#obj-quote).

| Campo               | Tipo                                                                                                            | Requerido | Descripción                                                                                                             |
| ------------------- | --------------------------------------------------------------------------------------------------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------- |
| `object`            | `"quote"`                                                                                                       | Sí        | —                                                                                                                       |
| `id`                | string (uuid)                                                                                                   | Sí        | —                                                                                                                       |
| `number`            | string \| null                                                                                                  | Sí        | COT-XXXX; solo existe cuando la cotización se envió.                                                                    |
| `status`            | string                                                                                                          | Sí        | draft, sent, accepted, rejected, expired, converted. El vencimiento lo aplica la app al leer: compara con `expires_at`. |
| `customer_id`       | string (uuid) \| null                                                                                           | Sí        | —                                                                                                                       |
| `converted_sale_id` | string (uuid) \| null                                                                                           | Sí        | —                                                                                                                       |
| `subtotal`          | integer                                                                                                         | Sí        | Pesos colombianos (COP), entero sin decimales.                                                                          |
| `discount`          | integer                                                                                                         | Sí        | Pesos colombianos (COP), entero sin decimales.                                                                          |
| `tax`               | integer                                                                                                         | Sí        | Pesos colombianos (COP), entero sin decimales.                                                                          |
| `total`             | integer                                                                                                         | Sí        | Pesos colombianos (COP), entero sin decimales.                                                                          |
| `tax_breakdown`     | arreglo de [TaxBreakdownEntry](https://developers.posdata.so/referencia/objetos/#obj-taxbreakdownentry) \| null | Sí        | —                                                                                                                       |
| `notes`             | string \| null                                                                                                  | Sí        | —                                                                                                                       |
| `payment_link`      | string \| null                                                                                                  | Sí        | —                                                                                                                       |
| `expires_at`        | string (date-time) \| null                                                                                      | Sí        | —                                                                                                                       |
| `sent_at`           | string (date-time) \| null                                                                                      | Sí        | —                                                                                                                       |
| `items`             | arreglo de [QuoteItem](https://developers.posdata.so/referencia/objetos/#obj-quoteitem)                         | Sí        | —                                                                                                                       |
| `created_at`        | string (date-time)                                                                                              | Sí        | —                                                                                                                       |
| `updated_at`        | string (date-time)                                                                                              | Sí        | —                                                                                                                       |

```json
{
  "object": "quote",
  "id": "3f1c2e8d-7a10-4d0b-9a57-0b6f2f0e5c1d",
  "number": "texto",
  "status": "texto",
  "customer_id": "3f1c2e8d-7a10-4d0b-9a57-0b6f2f0e5c1d",
  "converted_sale_id": "3f1c2e8d-7a10-4d0b-9a57-0b6f2f0e5c1d",
  "subtotal": 25900,
  "discount": 1,
  "tax": 1,
  "total": 25900,
  "tax_breakdown": [
    {
      "code": "texto",
      "rate": null,
      "per_unit": null,
      "base": 1,
      "amount": 25900
    }
  ],
  "notes": "texto",
  "payment_link": "texto",
  "expires_at": "2026-09-28T15:04:05.000Z",
  "sent_at": "2026-09-28T15:04:05.000Z",
  "items": [
    {
      "object": "quote_item",
      "id": "3f1c2e8d-7a10-4d0b-9a57-0b6f2f0e5c1d",
      "product_id": "3f1c2e8d-7a10-4d0b-9a57-0b6f2f0e5c1d",
      "variant_id": "3f1c2e8d-7a10-4d0b-9a57-0b6f2f0e5c1d",
      "item_kind": "texto",
      "description": "texto",
      "quantity": 5,
      "unit_price": 25900,
      "subtotal": 25900,
      "tax_class": "texto",
      "taxes": [
        null
      ],
      "note": "texto"
    }
  ],
  "created_at": "2026-09-28T15:04:05.000Z",
  "updated_at": "2026-09-28T15:04:05.000Z"
}
```

## Errores

Todo error responde con un objeto [Error](https://developers.posdata.so/referencia/objetos/#obj-error) y un `request_id`. Ramifica por `error.code`, nunca por el mensaje.

### 400Petición inválida (VALIDATION_ERROR, INVALID_JSON, INVALID_CURSOR).

**Respuesta 400**

Cuerpo: un objeto [Error](https://developers.posdata.so/referencia/objetos/#obj-error). Qué significa cada código y qué hacer: [Errores](https://developers.posdata.so/errores/).

VALIDATION_ERRORINVALID_JSONINVALID_CURSOR

### 401Sin API key válida (UNAUTHENTICATED, INVALID_API_KEY, API_KEY_REVOKED, API_KEY_EXPIRED, API_KEY_WRONG_ENVIRONMENT, ACCOUNT_INACTIVE).

**Respuesta 401**

Cuerpo: un objeto [Error](https://developers.posdata.so/referencia/objetos/#obj-error). Qué significa cada código y qué hacer: [Errores](https://developers.posdata.so/errores/).

UNAUTHENTICATEDINVALID_API_KEYAPI_KEY_REVOKEDAPI_KEY_EXPIREDAPI_KEY_WRONG_ENVIRONMENTACCOUNT_INACTIVE

### 403Sin permiso (PLAN_REQUIRED, INSUFFICIENT_SCOPE, BROWSER_REQUESTS_NOT_ALLOWED).

**Respuesta 403**

Cuerpo: un objeto [Error](https://developers.posdata.so/referencia/objetos/#obj-error). Qué significa cada código y qué hacer: [Errores](https://developers.posdata.so/errores/).

PLAN_REQUIREDINSUFFICIENT_SCOPEBROWSER_REQUESTS_NOT_ALLOWED

### 404No existe en esta cuenta (NOT_FOUND).

**Respuesta 404**

Cuerpo: un objeto [Error](https://developers.posdata.so/referencia/objetos/#obj-error). Qué significa cada código y qué hacer: [Errores](https://developers.posdata.so/errores/).

NOT_FOUND

### 429Límite de peticiones (RATE_LIMITED). Respeta Retry-After.

**Respuesta 429**

Cuerpo: un objeto [Error](https://developers.posdata.so/referencia/objetos/#obj-error). Qué significa cada código y qué hacer: [Errores](https://developers.posdata.so/errores/).

RATE_LIMITED

### 500Error interno (INTERNAL_ERROR). Reintenta y comparte el request_id si persiste.

**Respuesta 500**

Cuerpo: un objeto [Error](https://developers.posdata.so/referencia/objetos/#obj-error). Qué significa cada código y qué hacer: [Errores](https://developers.posdata.so/errores/).

INTERNAL_ERROR

---

Fuente: https://developers.posdata.so/referencia/operations/getquote/ · Índice para agentes: https://developers.posdata.so/llms.txt
