QAPI está en beta — la API puede cambiar sin previo aviso. Usa sandbox para pruebas.
QAPIQAPIDocs · by DTEVIA
Api

Obtener factura

Devuelve el estado actual de una factura (incluye las creadas vía Sandbox). Los campos presentes dependen del estado: uuid_sat/serie/numero_dte/pdf_url/certified_at solo en CERTIFIED; error_code/error_message solo en FAILED; cancelled_at solo en CANCELLED.

GET
/v1/invoices/{id}

Authorization

ApiKeyAuth
AuthorizationBearer <token>

API key con prefijo qapi_live_ o qapi_test_, o JWT (access_token) obtenido vía POST /v1/auth/login. QAPI detecta el tipo automáticamente por el prefijo del token.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/invoices/inv_V1StGXR8_Z5jdHi6"
{
  "id": "inv_V1StGXR8_Z5jdHi6",
  "status": "PENDING",
  "tipo_dte": "FACT",
  "moneda": "GTQ",
  "gran_total": 112,
  "numero_acceso": 543219876,
  "certificador": "MOCK",
  "uuid_sat": "91cfb67b-89f6-4d15-a97b-76fa68e0db9c",
  "serie": "QAPI",
  "numero_dte": 42,
  "pdf_url": "http://example.com",
  "referencia_interna": "string",
  "integrity_checksum": "string",
  "error_code": "string",
  "error_message": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "certified_at": "2019-08-24T14:15:22Z",
  "cancelled_at": "2019-08-24T14:15:22Z"
}
{
  "type": "https://docs.dtevia.com.gt/errors/validation-error",
  "title": "VALIDATION_ERROR",
  "status": 422,
  "detail": "Error de validación",
  "instance": "/v1/invoices",
  "invalid_params": [
    {
      "field": "items.0.impuestos.0.monto_impuesto",
      "message": "MontoImpuesto IVA inválido. Esperado ~12 (MontoGravable 100 × 0.12), recibido 10"
    }
  ]
}