Search issued documents
const url = 'https://acme.gravitastec.com/api/v1/companies/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/documents?dateField=issue&environment=testecf&ecfType=31&commercialStatus=pending&deliveryStatus=pending&limit=50';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://acme.gravitastec.com/api/v1/companies/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/documents?dateField=issue&environment=testecf&ecfType=31&commercialStatus=pending&deliveryStatus=pending&limit=50' \ --header 'Authorization: Bearer <token>'Issued documents of the company, newest first (by the date Gravitas received them), limited to the
environments of the credential. All filters are optional and combine with AND. Page with cursor
(the nextCursor of the previous page) and limit.
Authorizations
Sección titulada «Authorizations»Parameters
Sección titulada «Parameters»Path Parameters
Sección titulada «Path Parameters»Query Parameters
Sección titulada «Query Parameters»Start date, inclusive (see dateField)
End date, inclusive (see dateField)
Date compared with from/to: issue (FechaEmision, default) or received (when Gravitas received it, Santo Domingo time)
One environment; must be among the credential environments, otherwise the page is empty
Exact e-NCF
Exact RNC or cédula of the buyer
Free text: e-NCF prefix, buyer RNC/cédula or foreign id prefix, or part of the buyer name
Document status (see DocumentStatus.status); validated without e-NCF means waiting for numbering
Buyer commercial approval (ACECF)
Delivery to the electronic receiver
ISO 4217 code (DOP, USD, EUR…)
MontoTotal at least
MontoTotal at most
Responses
Sección titulada «Responses»Page of documents
object
object
DGII messages with explanation/field/correction added for known rejections
object
What the rejection means (Spanish; only when the message is known)
Path of the document input to correct
How to fix it (Spanish)
Delivery to the buyer (R8); absent until the document is accepted
object
object
Example
{ "items": [ { "environment": "testecf", "delivery": { "channel": "electronic", "status": "pending" } } ]}Not found or outside the credential scope
object
object
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).
Example generated
{ "type": "example", "title": "example", "status": 1, "code": "example", "errors": [ { "path": "example", "message": "example", "code": "example" } ]}All validation errors with field paths; the document is not numbered
object
object
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).
Example generated
{ "type": "example", "title": "example", "status": 1, "code": "example", "errors": [ { "path": "example", "message": "example", "code": "example" } ]}