Clients

List Client Invoices

This method allows you to obtain the invoices for a specific client. You can filter the results by document status, type and if it’s archived or not.

post/clients/{client_id}/invoices.json

Path parameters

client_idinteger required
Example:42

Filter invoices for this client.

Query parameters

api_keystring required
Example:YOUR_API_KEY

Your API Key.

pageinteger
Example:1

You can ask for a specific page of results. Defaults to 1.

per_pageinteger
Example:30

You can specify how many results you want to fetch. Defaults to 10 or value defined in account settings (10, 20 or 30).

Request body

Example request

{
  "filter": {
    "status": [
      "final"
    ],
    "by_type": [
      "Invoice"
    ],
    "archived": [
      "non_archived"
    ]
  }
}

Response

SUCCESS. Returns the client's invoices.

Example response

{
  "invoices": [
    {
      "id": 541793,
      "status": "final",
      "cancel_reason": "document was duplicated",
      "archived": true,
      "type": "Invoice",
      "sequence_number": "28/A",
      "inverted_sequence_number": "A/28",
      "date": "27/06/2017",
      "due_date": "27/06/2017",
      "reference": "foo",
      "observations": "foo",
      "atcud": "N/D",
      "permalink": "https://web.invoicexpress.com/documents/...",
      "saft_hash": "Tdik",
      "sum": 1,
      "before_taxes": 1,
      "taxes": 0.07,
      "total": 1.07,
      "currency": "Euro",
      "client": {
        "id": 1310176,
        "name": "John",
        "email": "john@example.com",
        "address": "Avenida da República, Lisboa",
        "postal_code": "1050-555",
        "city": "Lisboa",
        "fiscal_id": "508025338",
        "country": "Portugal"
      },
      "items": [
        {
          "name": " iPhone ",
          "description": "foo",
          "unit_price": "1.0",
          "unit": "foo",
          "quantity": "1.0",
          "tax": {
            "id": 31597,
            "name": "IVA7",
            "value": 7
          },
          "subtotal": 1,
          "tax_amount": 0.07,
          "total": 1.07
        }
      ],
      "sequence_id": 12345,
      "tax_exemption": "M01"
    }
  ],
  "pagination": {
    "total_entries": 6,
    "current_page": 1,
    "total_pages": 1,
    "per_page": 10
  }
}

Changes

Changed in 1 of the 3 revisions of this API.917

  • 5b82d4eb0d9f917See the full diff
    • the response property invoices/items/discount became nullable for the status 200

      response-property-became-nullable

    • the response property invoices/items/items/items/description became nullable for the status 200

      response-property-became-nullable

    • the response property invoices/items/items/items/unit became nullable for the status 200

      response-property-became-nullable

    • the response property invoices/items/observations became nullable for the status 200

      response-property-became-nullable

    • the response property invoices/items/reference became nullable for the status 200

      response-property-became-nullable

    • the response property invoices/items/retention became nullable for the status 200

      response-property-became-nullable

    • the response property invoices/items/sequence_id became nullable for the status 200

      response-property-became-nullable

    • the errors response's property type/format changed from object/ to array/ for status 401

      response-property-type-changed

    • the invoices/items/sequence_id response's property type/format changed from string/ to integer null/ for status 200

      response-property-type-changed

    • removed the optional property errors/error from the response with the 401 status

      response-optional-property-removed

    • added the optional property invoices/items/atcud to the response with the 200 status

      response-optional-property-added

    • added the optional property invoices/items/cancel_reason to the response with the 200 status

      response-optional-property-added

    • added the optional property invoices/items/client/address to the response with the 200 status

      response-optional-property-added

    • added the optional property invoices/items/client/city to the response with the 200 status

      response-optional-property-added

    • added the optional property invoices/items/client/email to the response with the 200 status

      response-optional-property-added

    • added the optional property invoices/items/client/fiscal_id to the response with the 200 status

      response-optional-property-added

    • added the optional property invoices/items/client/postal_code to the response with the 200 status

      response-optional-property-added

    This revision also has 10 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog