Billing API (1.0.0)
Download OpenAPI specification:Download
Based on a user's permission, a User can view financial records and payment history and download invoice documents for their permitted billing accounts. The invoice and payment document can be filtered by product type, account, or date range. Only the account billing and invoice details will be from the past 12 months will be returned.
Get billing accounts summary
This method returns a summary of all the billing accounts that the user has permissions to view.
query Parameters
offset | integer >= 0 Default: 0 Use offset and limit to restrict the number of users in the output. Offset can be used to specify the start record |
limit | integer [ 0 .. 100 ] Default: 10 Use offset and limit to restrict the number of users in the output. Limit can be used to restrict the number of reports in the response |
sorts | string Default: "ACCOUNT_NUMBER" Enum: "ACCOUNT_NUMBER" "-ACCOUNT_NUMBER" "PARENT_ACCOUNT_NUMBER" "-PARENT_ACCOUNT_NUMBER" "ACCOUNT_NAME" "-ACCOUNT_NAME" Use sorts to get the accounts in the response sorted in the particular order. for example, use '-ACCOUNT_NUMBER' to sort the reports by generated date in descending order. And 'ACCOUNT_NUMBER' for ascending order. For descending order, the field name should be prefixed with '-' |
header Parameters
Authorization required | string Specify the Access token with prefix 'Bearer '. |
Responses
Response Schema: application/json
required | Array of objects (Account) List accounts with billing summary | ||||||||||||||||||||||
Array
| |||||||||||||||||||||||
object (Page) | |||||||||||||||||||||||
| |||||||||||||||||||||||
required | object (Links) | ||||||||||||||||||||||
|
Response samples
- 200
{- "data": [
- {
- "accountName": "Example Inc.",
- "accountNumber": "124353",
- "parentAccountNumber": "54321",
- "accountIbxs": [
- "IBX1",
- "IBX2",
- "IBX3",
- "IBX4"
]
}
], - "page": {
- "total": 1200,
- "limit": 20,
- "offset": 0
}, - "_links": {
- "prev": {
- "href": "/accounts?limit=10&offset=50"
}, - "self": {
- "href": "/accounts?limit=10&offset=40"
}, - "next": {
- "href": "/accounts?limit=10&offset=30"
}
}
}
Download specific invoice document
This method billing document from an account by its specific invoice identifier and document identifier
path Parameters
accountNumber required | string Account number |
invoiceId required | string Invoice Id |
query Parameters
documentId required | string non-empty Document Id |
header Parameters
Authorization required | string Specify the Access token with prefix 'Bearer '. |
Responses
Response Schema: application/octet-stream
Get specific billing account summary
This method returns a billing summary of an account based on the account number given.
path Parameters
accountNumber required | string Account number |
query Parameters
months | Array of strings Default: "" Finance documents will be pulled for these months ex: 2017-12-03,2018-01-03 in ISO_LOCAL_DATE format |
header Parameters
Authorization required | string Specify the Access token with prefix 'Bearer '. |
Responses
Response Schema: application/json
accountNumber | string | ||||||||||||
parentAccountNumber | string | ||||||||||||
accountName | string | ||||||||||||
billingFrequency | string Enum: "MONTHLY" "QUARTERLY" "ANNUALLY" Frequency of billing | ||||||||||||
currencyCode | string non-empty Currency code of the account | ||||||||||||
invoiceLanguage | string Language of the invoice | ||||||||||||
invoiceFormat | string Enum: "PDF" "EXCEL" Format of the invoice | ||||||||||||
Array of objects (Invoice) Available invoices for the account | |||||||||||||
Array
| |||||||||||||
Array of objects (Payment) Available payments for the account | |||||||||||||
Array
| |||||||||||||
object (BillingContact) | |||||||||||||
| |||||||||||||
accountIbxs | Array of strings |
Response samples
- 200
{- "accountNumber": "124353",
- "billingContact": {
- "firstName": "John",
- "lastName": "Doe",
- "email": "john.doe@example.lk"
}, - "billingFrequency": "MONTHLY",
- "invoiceLanguage": "English",
- "invoiceFormat": "PDF",
- "invoices": [
- {
- "invoiceId": "654321879",
- "transactionNumber": "654321879",
- "amount": 456.87,
- "date": "2017-03-23",
- "type": "INVOICE",
- "documents": [
- {
- "documentId": "DETAILED_PDF_EN",
- "fileType": "PDF_DETAILS",
- "type": "INVOICE"
}, - {
- "documentId": "DETAILED_XLS_EN",
- "fileType": "EXCEL_DETAILS",
- "type": "INVOICE"
}, - {
- "documentId": "SUMMARY_PDF_EN",
- "fileType": "PDF_SUMMARY",
- "type": "INVOICE"
}, - {
- "documentId": "BOLETO_PDF_NA",
- "fileType": "BOLETO_PDF",
- "type": "INVOICE"
}, - {
- "documentId": "OFFICIAL_INVOICE_PDF_NA",
- "fileType": "INVOICE_PDF",
- "type": "INVOICE"
}, - {
- "documentId": "NF_URL_NA",
- "fileType": "NF_URL",
- "type": "INVOICE"
}
]
}, - {
- "invoiceId": "654321879",
- "transactionNumber": "654321879",
- "date": "2017-03-23",
- "type": "CREDIT_MEMO",
- "amount": -1456.87,
- "documents": [
- {
- "documentId": "DETAILED_PDF_EN",
- "fileType": "PDF_DETAILS",
- "type": "CREDIT_MEMO"
}
]
}
], - "currencyCode": "GBP",
- "payments": [
- {
- "paymentId": "FRT0554400011122",
- "amount": 43218.79,
- "date": "2017-03-23",
- "type": "APPLIED"
}, - {
- "paymentId": "FRT0554400011133",
- "amount": 23218.8,
- "date": "2017-03-23",
- "type": "APPLIED"
}
]
}