Introduction
APIs
- Authentication
- Customers
- Accounts
- Aliases
- Event Schemas
- Usage Meters
- AddOns
- Licenses
- Feature
- (Deprecated) Price Plans
- Price Plan V2
- Settings
- Price Experimentation
- Jobs
- Event Ingestion
- Entitlements
- Event Management
- Metrics
- Credits
- Invoices
- GETList invoices
- GETGet an invoice
- GETList pricing rule logs
- PUTAdd or update miscellaneous charges in Invoice
- PUTAdd or update miscellaneous charges in upcoming Invoice for a account
- POSTCreate a custom invoice for an account
- DELDelete a custom invoice in DRAFT state
- GETList invoices eligible for bill run
- POSTCreate a bill run job request
- GET
- Payments
- Wallet
- InvoiceGroups
- Alerts
- Reports
List 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=="
}
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
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Query Parameters
Pagination token used as a marker to get records from next page.
"eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEyMywgInNvcnRPcmRlciI6ICJhc2MifQ=="
Filter option to filter by status.
Filter option to filter based on owner id.
"ACC001"
Filter option to filter based on customer id.
"1234"
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.
10
Start time filter in epoch milli seconds
1650110402000
End time filter in epoch milli seconds
1650110402000
Response
List invoices response
Structure of invoice response
Identifier of invoice
50
Status of the invoice
DRAFT
, DUE
, PAID
, VOID
, UN_COLLECTIBLE
, REFUND_INITIATED
, REFUND_COMPLETED
, MERGED
, PARTIALLY_PAID
Represents the class of entity( INVOICE/ORDER/BILLABLE)
INVOICE
, ORDER
, BILLABLE
Represents the type of entity(STANDARD/AD_HOC/COMPOSITE)
STANDARD
, AD_HOC
, CUSTOM
, COMPOSITE
, STANDARD_ADVANCED
, ADHOC_ADVANCED
Invoice date of the invoice
"2020-07-04T12:00:00.000Z"
Number of days from the invoice date after which an invoice is considered overdue.
FINALIZING
, FINALIZED
Start date of the invoice
"2020-07-04T12:00:00.000Z"
End date of the invoice
"2020-07-04T12:00:00.000Z"
Inclusive end date of the invoice
"2020-07-03T11:59:59.999Z"
Due date of the invoice
"2020-07-04T12:00:00.000Z"
Sequence id of the invoice
Download URL of the pdf file corresponding to the invoice
billing address of the customer
Contact number
Address line 1 (eg. Street, PO Box, Company Name)
Address line 2 (eg. apartment, suite, unit or building)
ZIP or postal code
City, district, suburb, town or village
State, county, province or region
Two letter country code ISO-3166-1 Alpha-2
billing address of the customer
Contact number
Address line 1 (eg. Street, PO Box, Company Name)
Address line 2 (eg. apartment, suite, unit or building)
ZIP or postal code
City, district, suburb, town or village
State, county, province or region
Two letter country code ISO-3166-1 Alpha-2
billing address of the customer
Contact number
Address line 1 (eg. Street, PO Box, Company Name)
Address line 2 (eg. apartment, suite, unit or building)
ZIP or postal code
City, district, suburb, town or village
State, county, province or region
Two letter country code ISO-3166-1 Alpha-2
billing address of the customer
Contact number
Address line 1 (eg. Street, PO Box, Company Name)
Address line 2 (eg. apartment, suite, unit or building)
ZIP or postal code
City, district, suburb, town or village
State, county, province or region
Two letter country code ISO-3166-1 Alpha-2
500
"eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEyMywgInNvcnRPcmRlciI6ICJhc2MifQ=="
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=="
}