Skip to Content

List received documents

GET
/v1/ec/received-documents

The documents addressed to your key's business in its environment, from newest to oldest: what its suppliers invoiced and the withholdings its customers issued to it, whichever way they arrived. Never in the recipient portal.

Authorization

headerAuthorizationBearer <token>

Your API key, which acts for the one business it was created for: fb_live_… keys work at api.fiscalbase.io and issue in live, and fb_sandbox_… keys work at api-sandbox.fiscalbase.io and issue in sandbox, on the simulated SRI. A key sent to the other host is refused with api_key_wrong_host, which names its host.

Query Parameters

limit?integer

How many per page, from 1 to 100.

Range1 <= value <= 100
Default20
cursor?string

The next_cursor or prev_cursor of a previous response. Without a cursor, the first page.

Lengthlength <= 200
type?|array<>

Only this family; repeat it for several.

access_key?string

The one with these 49 digits.

Match^\d{49}$
issue_date[gte]?string

Only what was issued on or after this day.

Formatdate
issue_date[lte]?string

Only what was issued on or before this day.

Formatdate
verification?|array<>
xml_status?|array<>
needs_review?string

true: only what waits for a person (no XML yet, or unconfirmed); false: only what doesn't.

Value in"true""false"
issuer?string

Only what this supplier's RUC issued.

Match^\d{13}$
q?string

Words of the issuer's name or of the document number, or the start of the issuer's RUC; each word must be found.

Length1 <= length <= 100
updated_at[gte]?string

Only what changed at or after this moment, ISO 8601 with its offset: poll with the time of your last read to get what changed since.

Formatdate-time

Header Parameters

Fiscalbase-Environment?string

The environment the call acts in. Required with a person's session; a key's own environment is the one that counts, so a key may leave it out, and naming another is 422 environment_mismatch.

Value in"sandbox""test""live"
Fiscalbase-Business?string

The business the call acts for. With a person's session, the one the call is about (without it, a call about one business is 422 business_required and a list covers every business of the organization); a key acts for its own, so naming another is 422 business_mismatch.

Formatuuid
Fiscalbase-Channel?string

Which of Fiscalbase's own integrations a key's call comes from, recorded as the channel of the documents it issues: a record, not a permission. Without it, api. A person's call is always console.

Value in"api""mcp"
Fiscalbase-Agent?string

The AI agent a key's call comes from, as its client names itself (the MCP server sets it); recorded with the request and shown in the console's request log.

Response Body

A page of received documents

application/json
  1. response
object*"list"
Value in"list"
data*array<|||||>
next_cursor*|

The next page (older); null if there are no more.

prev_cursor*|

The previous page (newer); null on the first.

Example Request
curl -X GET 'https://api.fiscalbase.io/v1/ec/received-documents'
Example Response
{
  "object": "list",
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "object": "received_document",
      "environment": "sandbox",
      "business_id": "f59fcbb7-848d-4242-af07-a8bb7e3ab37c",
      "access_key": "stringstringstringstringstringstringstringstrings",
      "number": "string",
      "issue_date": "2019-08-24",
      "issuer": {
        "ruc": "string",
        "name": "string",
        "trade_name": "string",
        "regime": "general",
        "special_taxpayer": true
      },
      "buyer": {
        "identification_type": "ruc",
        "identification": "string",
        "name": "string",
        "address": "string",
        "email": "string"
      },
      "authorization": {
        "number": "string",
        "authorized_at": "2019-08-24T14:15:22Z"
      },
      "sri_status": "authorized",
      "verification": "sri",
      "xml_status": "available",
      "sources": [
        "report"
      ],
      "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",
      "withholding": {
        "object": "document",
        "type": "withholding",
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "number": "string"
      },
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z",
      "type": "invoice",
      "document": {
        "lines": [
          {
            "code": "string",
            "auxiliary_code": "string",
            "description": "string",
            "unit": "string",
            "quantity": "string",
            "unit_price": "string",
            "discount": "string",
            "net": "string",
            "taxes": [
              {
                "type": "iva",
                "rate": "iva_15",
                "base": "string",
                "value": "string"
              }
            ],
            "additional_info": [
              {
                "name": "string",
                "value": "string"
              }
            ],
            "unsubsidized_price": "string"
          }
        ],
        "taxes": [
          {
            "type": "iva",
            "rate": "iva_15",
            "base": "string",
            "value": "string",
            "additional_discount": "string",
            "refund": "string"
          }
        ],
        "subtotal": "string",
        "discount": "string",
        "iva": "string",
        "ice": "string",
        "irbpnr": "string",
        "total": "string",
        "subsidy": "string",
        "tip": "string",
        "issue_date": "2019-08-24",
        "buyer": {
          "identification_type": "ruc",
          "identification": "string",
          "name": "string",
          "address": "string",
          "email": "string"
        },
        "payments": [
          {
            "method": "sin_sistema_financiero",
            "amount": "string",
            "term": {
              "length": 0,
              "unit": "days"
            }
          }
        ],
        "plate": "string",
        "delivery_note_number": "string",
        "export": {
          "incoterm": "string",
          "incoterm_place": "string",
          "origin_country": "string",
          "loading_port": "string",
          "destination_port": "string",
          "destination_country": "string",
          "acquisition_country": "string",
          "subtotal_incoterm": "string",
          "international_freight": "string",
          "international_insurance": "string",
          "customs_costs": "string",
          "other_transport_costs": "string"
        },
        "reimbursement": {
          "document_type": "factura",
          "total": "string",
          "base": "string",
          "tax": "string",
          "documents": [
            {
              "supplier": {
                "identification_type": "ruc",
                "identification": "string"
              },
              "supplier_type": "persona_natural",
              "payment_country": "string",
              "document_type": "factura",
              "number": "string",
              "issue_date": "2019-08-24",
              "authorization_number": "string",
              "taxes": [
                {
                  "type": "iva",
                  "rate": "iva_15",
                  "base": "string",
                  "value": "string"
                }
              ],
              "compensations": [
                {
                  "code": "string",
                  "rate": "string",
                  "value": "string"
                }
              ]
            }
          ]
        },
        "withholdings": [
          {
            "type": "iva_100",
            "value": "string"
          }
        ],
        "withheld_iva": "string",
        "withheld_renta": "string",
        "substitute_delivery_note": {
          "origin_address": "string",
          "destination_address": "string",
          "transport_start": "string",
          "transport_end": "string",
          "carrier": {
            "identification_type": "ruc",
            "identification": "string",
            "name": "string"
          },
          "plate": "string",
          "destinations": [
            {
              "reason": "string",
              "customs_document": "string",
              "destination_establishment": "string",
              "route": "string"
            }
          ]
        },
        "third_party_charges": [
          {
            "concept": "string",
            "amount": "string"
          }
        ],
        "negotiable": {
          "notification_email": "string"
        },
        "compensations": [
          {
            "code": "string",
            "rate": "string",
            "value": "string"
          }
        ],
        "fiscal_machine": {
          "brand": "string",
          "model": "string",
          "serial": "string"
        },
        "additional_info": [
          {
            "name": "string",
            "value": "string"
          }
        ]
      }
    }
  ],
  "next_cursor": "string",
  "prev_cursor": "string"
}