Received documents

Retrieve an invoice issued to you

GET
/v1/ec/received-documents/{access_key}

Asks the SRI for an invoice's access key and, if it authorized it, reads it: who issued it, to whom, its amounts and taxes. It lets you issue a withholding on it without retyping it. A test key asks the SRI's testing service and a live key its real one; the access key must belong to the same environment. The SRI only answers for documents from the last 60 days, and sandbox never asks it. Nothing is stored.

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

Path Parameters

access_key*string

The 49 digits of the access key.

Match^\d{49}$

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://example.com/v1/ec/received-documents/string"
{  "object": "received_document",  "type": "invoice",  "access_key": "stringstringstringstringstringstringstringstrings",  "number": "string",  "issue_date": "2019-08-24",  "authorization": {    "number": "string",    "authorized_at": "2019-08-24T14:15:22Z",    "environment": "test"  },  "issuer": {    "ruc": "string",    "name": "string",    "trade_name": "string"  },  "buyer": {    "identification_type": "ruc",    "identification": "string",    "name": "string",    "address": "string",    "email": "string"  },  "issued_to_you": true,  "subtotal": "string",  "taxes": [    {      "type": "iva",      "rate": "iva_15",      "base": "string",      "value": "string",      "additional_discount": "string",      "refund": "string"    }  ],  "total": "string",  "payments": [    {      "method": "sin_sistema_financiero",      "amount": "string",      "term": {        "length": 0,        "unit": "days"      }    }  ],  "description": "string"}