Skip to main content
GET
/
invoices
List invoices
curl --request GET \
  --url https://api.togai.com/invoices \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "inv.hkgkgyh.ghg",
      "customerId": "7VcRw9xZDIqsC5E",
      "ownerId": "ACC001",
      "invoiceClass": "INVOICE",
      "invoiceType": "AD_HOC",
      "status": "DUE",
      "finalizingStatus": "FINALIZED",
      "totalAmount": 100,
      "paidAmount": 0,
      "startDate": "2020-07-04T12:00:00.000Z",
      "endDate": "2020-07-04T12:00:00.000Z",
      "invoiceDate": "2020-07-04T12:00:00.000Z",
      "generatedAt": "2020-07-04T12:00:00.000Z",
      "updatedAt": "2020-07-04T12:00:00.000Z"
    }
  ],
  "nextToken": "eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEyMywgInNvcnRPcmRlciI6ICJhc2MifQ=="
}
status
enum
Status of the invoice (`DRAFT`, `DUE`, `PAID`, `VOID`, `UN_COLLECTIBLE`, `INITIATE_REFUND`, `REFUND_COMPLETED`, `MERGED`)
class
enum
Class to which the invoice is categorized (`INVOICE`, `ORDER`, `BILLABLE`)
owner_id
string
Unique identifier of the owner associated with the invoice
invoice_date
string
Date of the invoice
customer_id
string
Unique identifier of the customer associated with the invoice
price_plan_id
string
Unique identifier of the price plan associated with the invoice
start_date
string
Start date of the invoice
end_date
string
End date of the invoice
status
string
class
string
owner_id
string
invoice_date
string
customer_id
string
price_plan_id
string
start_date
string
end_date
string

Allowed filter combinations

  • status
  • class
  • class, owner_id
  • status, owner_id
  • status, class
  • status, class, owner_id
  • status, invoice_date
  • class, invoice_date
  • status, invoice_date, customer_id
  • class, invoice_date, customer_id
  • status, invoice_date, customer_id, owner_id
  • class, invoice_date, customer_id, owner_id
  • owner_id
  • owner_id, price_plan_id
  • owner_id, price_plan_id, start_date
  • owner_id, price_plan_id, start_date, end_date
Fields that can be searched on using _search query param
id
string
customer_id
string
account_id
string
customer_name
string
account_name
string
Fields with which the list response can be sorted using _sort query param
created_at
string
id
string
Default sort order:created_at DESC, id ASC

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

nextToken
string

Pagination token used as a marker to get records from next page.

Example:

"eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEyMywgInNvcnRPcmRlciI6ICJhc2MifQ=="

status
string

Filter option to filter by status.

owner_id
string

Filter option to filter based on owner id.

Example:

"ACC001"

customer_id
string

Filter option to filter based on customer id.

Example:

"1234"

pageSize
integer

Maximum page size expected by client to return the record list.

NOTE: Max page size cannot be more than 50. Also 50 is the default page size if no value is provided.

Example:

10

start_time
integer

Start time filter in epoch milli seconds

Example:

1650110402000

end_time
integer

End time filter in epoch milli seconds

Example:

1650110402000

Response

Success response

List invoices response

data
object[]
required
Maximum length: 50
nextToken
string
Maximum length: 500
Example:

"eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEyMywgInNvcnRPcmRlciI6ICJhc2MifQ=="

I