Docs

List and search invoices

  • In the sandbox

In plain words

Lists and searches the invoices of one client.
GET
/invoices

A client key sees its own client's invoices; the operator sees every client's, or one client's with client. Rows carry what GET /invoices/{id} carries, without documents, and no invoice content: no buyer or amounts, and no issue date (for Romania and Poland the deadline_at follows from it, to within a few days). An unknown parameter answers 400.

Authorization

apiKey
headerAuthorizationBearer <token>

Send your key as a bearer token: Authorization: Bearer <your-api-key>. Health is the only call that needs no key.

Query parameters

q?string

Case-insensitive part of the invoice_ref or the invoice number. At most 100 characters.

Lengthlength <= 100
route?array<>

One or more routes, comma-separated.

state?array<>

One or more states, comma-separated.

client?string

The operator's filter to one client. A client key may name only its own client; any other answers 404. Another shape answers 400.

Match^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$
received_from?string

First UTC day the invoice was received, inclusive.

Formatdate
received_to?string

Last UTC day the invoice was received, inclusive.

Formatdate
sort?string

By the time received. Ties break on id, so a page never reshuffles between calls.

Default"newest"
Value in"newest""oldest"
page?integer
Range1 <= value
Default1
page_size?integer
Default25
Value in2550100200

Response body

One page of matches.

application/json
  1. response
data*array<>
total*integer

Matches before paging.

page*integer

The page returned. A page past the end is clamped to the last.

page_size*integer
counts_by_state*

Matches per state with every filter but state. A state with none is left out.

curl -X GET "https://example.com/invoices" \  -H "Authorization: Bearer <your-api-key>"
{  "data": [    {      "id": "string",      "invoice_ref": "string",      "invoice_number": "string",      "route": "PEPPOL",      "environment": "sandbox",      "state": "received",      "legal_id": "string",      "buyer_status": "string",      "document_sha256": "string",      "attempts": [        {          "id": "string",          "state": "received",          "created_at": "2019-08-24T14:15:22Z"        }      ],      "errors": [        {          "code": "string",          "source": "string",          "message": "string",          "field": "string",          "fix_hint": "string",          "who_fixes": "us",          "related": [            {              "code": "string",              "source": "string"            }          ]        }      ],      "documents": [        {          "kind": "string",          "sha256": "string",          "href": "string"        }      ],      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z",      "deadline_at": "2019-08-24T14:15:22Z"    }  ],  "total": 0,  "page": 0,  "page_size": 0,  "counts_by_state": {    "property1": 0,    "property2": 0  }}