Documents

Report on a period's documents

GET
/v1/ec/documents/report

How many documents of each type your key's business issued in a period, in each status, and what they add up to; what was sold, net of credit notes; and the documents the SRI returned or didn't authorize, with its messages and what to do about each. This month by default.

Authorization

AuthorizationBearer <token>

Your API key, which acts for the one business it was created for: fb_sandbox_… issues in sandbox, fb_test_… in test, the tax authority's testing service, and fb_live_… in live.

In: header

Query Parameters

issue_date[gte]?string

The first issue date counted. The first day of this month in Ecuador by default.

Formatdate
issue_date[lte]?string

The last issue date counted. The last day of this month by default.

Formatdate

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://example.com/v1/ec/documents/report"
{  "object": "document_report",  "environment": "sandbox",  "entity_id": "8161163a-f227-466f-bc01-090a01e80165",  "period": {    "from": "2019-08-24",    "to": "2019-08-24"  },  "count": 0,  "by_status": {    "pending": 0,    "submitted": 0,    "authorized": 0,    "returned": 0,    "not_authorized": 0,    "annulled": 0  },  "by_type": {    "invoice": {      "count": 0,      "total": "string",      "tax_total": "string"    },    "credit_note": {      "count": 0,      "total": "string",      "tax_total": "string"    },    "debit_note": {      "count": 0,      "total": "string",      "tax_total": "string"    },    "withholding": {      "count": 0,      "total": "string",      "tax_total": "string"    },    "delivery_note": {      "count": 0,      "total": "string",      "tax_total": "string"    },    "purchase_settlement": {      "count": 0,      "total": "string",      "tax_total": "string"    }  },  "rows": [    {      "type": "invoice",      "status": "pending",      "count": 0,      "total": "string",      "tax_total": "string"    }  ],  "sales": {    "total": "string",    "vat": "string"  },  "needs_action": {    "total_count": 0,    "data": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "object": "invoice",        "number": "string",        "status": "pending",        "issue_date": "2019-08-24",        "counterparty": {          "identification": "string",          "name": "string"        },        "total": "string",        "sri_messages": [          {            "code": "string",            "message": "string",            "detail": "string",            "type": "error",            "cause": "string",            "remedy": "string"          }        ]      }    ]  }}