Ir al contenido

Status of a document (state, e-NCF, trackId, security code, DGII messages, links)

GET
/documents/{documentId}
curl --request GET \
--url https://acme.gravitastec.com/api/v1/documents/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>'
documentId
required
string format: uuid

Status

Media typeapplication/json
object
documentId
string format: uuid
companyId
string format: uuid
environment
string
Allowed values: testecf certecf ecf
ecfType
integer
status
string
encf
string | null
trackId
string | null
securityCode
string | null
dgiiMessages

DGII messages with explanation/field/correction added for known rejections

Array<object>
object
codigo
string | null
valor
string | null
explanation

What the rejection means (Spanish; only when the message is known)

string
field

Path of the document input to correct

string | null
correction

How to fix it (Spanish)

string
createdAt
string format: date-time
finalizedAt
string | null format: date-time
delivery

Delivery to the buyer (R8); absent until the document is accepted

object
channel
string
Allowed values: electronic email none
status
string
Allowed values: pending delivered not_received failed not_applicable
reason
string | null
deliveredAt
string | null format: date-time
links
object
xml
string
printed
string
exchanges
string

Example

{
"environment": "testecf",
"delivery": {
"channel": "electronic",
"status": "pending"
}
}

Not found or outside the credential scope

Media typeapplication/problem+json
object
type
string
title
string
status
integer
code
string
errors
Array<object>
object
path
string
message
string
code

Stable snake_case rule code when the rule has one (e.g. modified_same_type, foreign_id_in_rnc, emitter_rnc_mismatch, encf_invalid, encf_type_mismatch, encf_not_in_range, encf_already_used, sequence_expiry_mismatch).

string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"code": "example",
"errors": [
{
"path": "example",
"message": "example",
"code": "example"
}
]
}