Trifaco API
Documentos

Corregir rechazo confirmado

POST/v1/documents/{id}/revisions

Estado: parcial. Ambientes: simulation, qualification. Permisos: documents:write.

Alcance: Nueva revisión solo tras rechazo concluyente; conserva número, historial, artefactos e identidad. Reevaluación fiscal y de autorizaciones, sin producción.

Corregir rechazo confirmado

Authorization

ClientApiKey
X-API-Key<token>

Secreto ligado a empresa, actor, permisos y ambiente. No admite cambiar empresa por body/header.

In: header

Path Parameters

id*string

Identificador opaco. No autoriza acceso por sí mismo.

Formatuuid
Length1 <= length <= 36

Header Parameters

Idempotency-Key*string

Obligatoria en mutaciones. Alcance: empresa/ambiente/operación/recurso destino. Retención mínima 90 días y mientras haya trabajo pendiente. Mismo contenido recupera resultado; contenido diferente produce 409.

Match^[A-Za-z0-9][A-Za-z0-9._:-]{7,127}$
Length1 <= length <= 128
If-Match*string

ETag de versión vigente. Replay idempotente se resuelve ANTES de revalidar If-Match; un comando nuevo con versión antigua produce 409 VERSION_CONFLICT.

Match^"[1-9][0-9]*"$
Length1 <= length <= 30

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Rechazo confirmado; mismo document_type, external_reference, emisor y secuencia. Nueva revisión mantiene historia. If-Match protege la versión del recurso.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/revisions" \  -H "Idempotency-Key: string" \  -H "If-Match: string" \  -H "Content-Type: application/json" \  -d '{    "reason": "Corregir datos tras rechazo confirmado",    "expected_revision": 1,    "replacement": {      "document_type": "invoice",      "external_reference": "DEMO-INVOICE-001",      "profile_id": "co-sale-cop-v1",      "numbering_range_id": "00000000-0000-4000-8000-000000000010",      "issued_at": "2026-09-10T10:00:00-05:00",      "currency": "COP",      "buyer": {        "party_type": "person",        "identification": {          "type_code": "13",          "number": "1000000000"        },        "name": "Comprador de ejemplo",        "email": "comprador@example.com",        "tax_registration": {          "responsibility_codes": [            "R-99-PN"          ],          "tax_scheme_codes": [            "01"          ]        }      },      "lines": [        {          "id": "1",          "description": "Servicio de ejemplo, datos ficticios",          "product_identification": {            "scheme_code": "999",            "value": "DEMO-001"          },          "quantity": "1",          "unit_code": "94",          "unit_price": "10000.00",          "price_base_quantity": "1",          "net_amount": "10000.00",          "adjustments": [],          "taxes": [            {              "code": "01",              "rate": "19",              "taxable_amount": "10000.00",              "amount": "1900.00"            }          ],          "withholdings": []        }      ],      "adjustments": [],      "tax_totals": [        {          "code": "01",          "rate": "19",          "taxable_amount": "10000.00",          "amount": "1900.00"        }      ],      "withholding_totals": [],      "totals": {        "line_extension_amount": "10000.00",        "tax_exclusive_amount": "10000.00",        "tax_inclusive_amount": "11900.00",        "allowance_total_amount": "0.00",        "charge_total_amount": "0.00",        "prepaid_amount": "0.00",        "payable_rounding_amount": "0.00",        "payable_amount": "11900.00"      },      "payment": {        "terms": "cash",        "means_code": "10"      },      "delivery": {        "mode": "trifaco_email",        "recipients": [          "comprador@example.com"        ]      }    }  }'
{  "operation_id": "cb4ede3c-a5d1-45e3-a9d2-fe83accbce52",  "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",  "revision": 1,  "version": 1,  "environment": "simulation",  "external_reference": "string",  "processing_status": "queued",  "dian_status": "not_sent",  "billing_status": "not_reserved",  "created_at": "2019-08-24T14:15:22Z",  "status_url": "../dictionary"}