Preview Bill
Preview the current Bill for a specific account.
This endpoint is designed to provide a preview of the Bill for exactly one account, allowing you to review charges, frequencies, and other details before finalization. Required parameters include:
- accountIds - exactly 1 account must be specified for previewing a Bill.
- billingFrequency
- billFrequencyInterval
Other request parameters are optional. If version is not specified, the latest version of the Bill is previewed.
Path parameters
The unique identifier (UUID) of your Organization. The Organization represents your company as a direct customer of our service.
Query parameters
Request body
The version number of the entity:
- Create entity: Not valid for initial insertion of new entity - do not use for Create. On initial Create, version is set at 1 and listed in the response.
- Update Entity: On Update, version is required and must match the existing version because a check is performed to ensure sequential versioning is preserved. Version is incremented by 1 and listed in the response.
Specifies the date (in ISO 8601 format) of the last day in the billing period, defining the time range for the associated Bills.
For example: "2023-03-24".
Defines how often Bills are generated.
- Daily. Starting at midnight each day, covering a twenty-four hour period following.
- Weekly. Starting at midnight on a Monday morning covering the seven-day period following.
- Monthly. Starting at midnight on the morning of the first day of each month covering the entire calendar month following.
- Annually. Starting at midnight on the morning of the first day of each year covering the entire calendar year following.
- Ad_Hoc. Use this setting when a custom billing schedule is used for billing an Account, such as for billing of Prepayment/Commitment fees using a custom billing schedule.
How often Bills are issued - used in conjunction with billingFrequency.
For example, if billingFrequency is set to Monthly and billFrequencyInterval is set to 3, Bills are issued every three months.
The specific billing date (in ISO 8601 format), determining when the Bill was generated.
For example: "2023-01-24".
For accounting purposes, the date set at Organization level to use for external invoicing with respect to billing periods - two options:
- FIRST_DAY_OF_NEXT_PERIOD (Default). Used when you want to recognize usage revenue in the following period.
- LAST_DAY_OF_ARREARS. Used when you want to recognize usage revenue in the same period that it's consumed, instead of in the following period.
For example, if the retrieved Bill was on a monthly billing frequency and the billing period for the Bill is September 2023 and the External invoice date is set at FIRST_DAY_OF_NEXT_PERIOD, then the externalInvoiceDate will be "2023-10-01".
NOTE: To change the externalInvoiceDate setting for your Organization, you can use the Update OrganizationConfig call.
The due date (in ISO 8601 format) for payment of the Bill.
For example: "2023-02-24".
An array of UUIDs representing the end customer Accounts associated with the BillJob.
The currency code used for the Bill, such as USD, GBP, or EUR.
Specifies the time zone used for the generated Bills, ensuring alignment with the local time zone.
The starting date (epoch) for Yearly billing frequency (in ISO 8601 format), determining the first Bill date for yearly Bills.
The starting date (epoch) for Monthly billing frequency (in ISO 8601 format), determining the first Bill date for monthly Bills.
The starting date (epoch) for Weekly billing frequency (in ISO 8601 format), determining the first Bill date for weekly Bills.
The starting date (epoch) for Daily billing frequency (in ISO 8601 format), determining the first Bill date for daily Bills.
Example request
{
"currencyConversions": [
{
"from": "EUR",
"to": "USD",
"multiplier": 1.12
}
],
"timezone": "UTC"
}Response
Returns the Bill preview
Purchase Order number linked to the Account the Bill is for.
The reference ID to use for external invoice.
For accounting purposes, the date set at Organization level to use for external invoicing with respect to billing periods - two options:
- FIRST_DAY_OF_NEXT_PERIOD (Default).
- LAST_DAY_OF_ARREARS
For example, if the retrieved Bill was on a monthly billing frequency and the billing period for the Bill is September 2023 and the External invoice date is set at FIRST_DAY_OF_NEXT_PERIOD, then the externalInvoiceDate will be "2023-10-01".
NOTE: To change the externalInvoiceDate setting for your Organization, you can use the Update OrganizationConfig call.
Flag to indicate that the statement in JSON format has been generated for the Bill.
- TRUE - JSON statement has been generated.
- FALSE - no JSON statement generated.
Flag to indicate that the statement in CSV format has been generated for the Bill.
- TRUE - CSV statement has been generated.
- FALSE - no CSV statement generated.
True if the existing bill statement (JSON or CSV) is marked as stale/outdated.
The sum total for the Bill.
The sequential invoice number of the Bill.
NOTE: If you have not defined a billPrefix for your Organization, a sequentialInvoiceNumber is not returned in the response. See Update OrganizationConfig
The date and time (in ISO 8601 format) when the Bill was first created.
The date and time (in ISO 8601 format) when the Bill was last modified.
The unique identifier (UUID) for the user who created the Bill.
The unique identifier (UUID) for the user who last modified this Bill.
The DateTime when the bill was approved.
The id of the user who approved this bill.
The DateTime when the bill was locked.
The id of the user who locked this bill.
The UUID of the entity.
The version number:
- Create: On initial Create to insert a new entity, the version is set at 1 in the response.
- Update: On successful Update, the version is incremented by 1 in the response.
Defines how often Bills are generated.
-
Daily. Starting at midnight each day, covering a twenty-four hour period following.
-
Weekly. Starting at midnight on a Monday morning covering the seven-day period following.
-
Monthly. Starting at midnight on the morning of the first day of each month covering the entire calendar month following.
-
Annually. Starting at midnight on the morning of the first day of each year covering the entire calendar year following.
-
Ad_Hoc. Use this setting when a custom billing schedule is used for billing an Account, such as for billing of Prepayment/Commitment fees using a custom billing schedule.
Indicates whether the Bill has passed human/manual approval.
- Pending - Bill has not yet been passed by a human reviewer.
- Approved - Bill has been approved after manual review.
Example response
{
"timezone": "UTC",
"currencyConversions": [
{
"from": "EUR",
"to": "USD",
"multiplier": 1.12
}
]
}