Ir al contenido

Etiquetas fiscales de un DTE emitido (códigos de renta, zona franca, excluir de libros…)

PATCH
/documents/{id}/fiscal
curl --request PATCH \
--url https://api.sudte.com/v1/documents/example/fiscal \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "income_codes": { "operation_type": "example", "income_type": "example" }, "expense_codes": { "operation_type": "example", "classification": "example", "sector": "example", "cost_type": "example" }, "free_zone": true, "exempt_non_proportional": true, "exclude_from_books": true, "external_ref": "example" }'
id
obligatorio
string
Media type application/json
object
income_codes
object
operation_type
string
income_type
string
expense_codes

Factura de sujeto excluido (14) emitida: clasificación de costo/gasto del anexo de sujetos excluidos (anexo 5)

object
operation_type
string
classification
string
sector
string
cost_type
string
free_zone
boolean
exempt_non_proportional
boolean
exclude_from_books
boolean
external_ref
string

Example generated

{
"income_codes": {
"operation_type": "example",
"income_type": "example"
},
"expense_codes": {
"operation_type": "example",
"classification": "example",
"sector": "example",
"cost_type": "example"
},
"free_zone": true,
"exempt_non_proportional": true,
"exclude_from_books": true,
"external_ref": "example"
}

Actualizado

Media type application/json
object
income_codes
object
operation_type
string
income_type
string
expense_codes

Factura de sujeto excluido (14) emitida: clasificación de costo/gasto del anexo de sujetos excluidos (anexo 5)

object
operation_type
string
classification
string
sector
string
cost_type
string
free_zone
boolean
exempt_non_proportional
boolean
exclude_from_books
boolean
external_ref
string

Example generated

{
"income_codes": {
"operation_type": "example",
"income_type": "example"
},
"expense_codes": {
"operation_type": "example",
"classification": "example",
"sector": "example",
"cost_type": "example"
},
"free_zone": true,
"exempt_non_proportional": true,
"exclude_from_books": true,
"external_ref": "example"
}

Error (RFC 9457)

Media type application/problem+json
object
type
string format: uri
title
string
status
integer
detail
string
instance
string
request_id
string
errors
Array<object>
object
path
string
message
string
mh
object
codigoMsg
string
descripcionMsg
string
observaciones
Array<string>
blocking_documents

Invalidación rechazada por AV 44: NC/ND vigentes (o pendientes) que ajustan el documento; invalídelas primero

Array<object>
object
id
string
type

CAT-002. Implementados: todos (01, 03, 04, 05, 06, 07, 08, 09, 11, 14 y 15)

string
Allowed values: 01 03 04 05 06 07 08 09 11 14 15
control_number
string
generation_code
string
status

discarded: el emisor abandonó un documento sin sello (rechazado por el MH) con POST /documents/{id}/discard; conserva su historial, ya no se transmite ni se corrige y, si discard.number_released, su número de control lo toma el siguiente documento del mismo alcance y año.

string
Allowed values: draft validated signed sending processed rejected contingency voided error discarded
issue_date
string format: date

Example

{
"blocking_documents": [
{
"type": "01",
"status": "draft"
}
]
}