curl --request DELETE \
--url https://api.cobrix.co/api/v1/invoices/{invoiceId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "DELETE_FROM_PROVIDER"
}
'const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: 'DELETE_FROM_PROVIDER'})
};
fetch('https://api.cobrix.co/api/v1/invoices/{invoiceId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.cobrix.co/api/v1/invoices/{invoiceId}"
payload = { "reason": "DELETE_FROM_PROVIDER" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)Eliminar o liquidar desde proveedor
Sin reason o con DELETE_FROM_PROVIDER, anula el documento y los checkouts pendientes, responde HTTP 204 y encola el webhook asíncrono invoice.canceled. El payload del evento refleja invoice.status=DELETE_FROM_PROVIDER e invoice.payment.status=canceled. Con PAID_FROM_PROVIDER, aplica exactamente el saldo abierto usando provider_payment_id y, después de persistir el pago y el saldo cero, encola exactamente un invoice.paid. Ese payload conserva invoice.status=PAID_FROM_PROVIDER, reporta invoice.payment.status=APPROVED y devuelve el identificador recibido en invoice.payment.provider_id. Rechaza documentos con pagos parciales o estados incompatibles. Requiere public_invoices:write.
curl --request DELETE \
--url https://api.cobrix.co/api/v1/invoices/{invoiceId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "DELETE_FROM_PROVIDER"
}
'const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: 'DELETE_FROM_PROVIDER'})
};
fetch('https://api.cobrix.co/api/v1/invoices/{invoiceId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.cobrix.co/api/v1/invoices/{invoiceId}"
payload = { "reason": "DELETE_FROM_PROVIDER" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)Authorizations
Llave cbx_live con scope de documentos públicos.
Path Parameters
Body
Response
Operación completada sin cuerpo

