Invoices

The List invoices endpoint returns a list of invoices for a given company's connection.

Invoices are itemized records of goods sold or services provided to a customer.

Before using this endpoint, you must have retrieved data for the company.

Useful queries

  • Outstanding invoices - query = amountDue > 0
  • Invoices due after a certain date: query = dueDate > 2021-01-28

Read more about querying.

Tips and traps

To access the paymentAllocations property, ensure that the payments data type is queued and cached in Codat before retrieving invoices from Codat's cache.

get/companies/{companyId}/data/invoices

Request

  • Base URL
    https://api.codat.io
  • Auth
    API key in header Authorization

Query parameters

pageinteger
Example:1

Page number. Read more.

pageSizeinteger
Example:100

Number of records to return in a page. Read more.

querystring

Codat query string. Read more.

orderBystring
Example:-modifiedDate

Field to order results by. Read more.

Response

Success

pageNumberinteger required

Current page number.

pageSizeinteger required

Number of items to return in results array.

totalResultsinteger required

Total number of items.

_linksLinks required(unresolved $ref)

Example response

{
  "pageNumber": 1,
  "pageSize": 10,
  "totalResults": 1,
  "_links": {
    "self": {
      "href": "/companies/{id}/data/{dataType}"
    },
    "current": {
      "href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"
    }
  }
}

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      response property allOf[subschema #1]/results/items/allOf[subschema #1]/lineItems/items/trackingCategoryRefs reactivated