Working with invoices
Querying for invoices
Use the following endpoints to retrieve information about invoices:
- GET
/billing/v1/accounts/{accountId}/invoices
- GET
/billing/v1/invoices/{invoiceId}
For example, the following request retrieves invoices for account bc:16:
The following request gets detailed information about invoice bc:8819. Note that in
order to get details about specific invoice, the endpoint path does not include the
account. The parent of the endpoint path is /invoices
.
Modifying invoices
Use the following endpoint to modify a single invoice:
- PATCH
/billing/v1/invoices/{invoiceId}
The only attributes of an invoice that you can update are the eventDate
(the bill date) and the paymentDueDate
(the due date).
- The invoice has a status of
planned
paymentDueDate
andeventDate
cannot be in the pastpaymentDueDate
cannot be beforeeventDate
The example below demonstrates updating the bill date and the due date on invoice
bc:Swwq21ZNjhqLn_Vl0SPIl
. The updated invoice is returned in
the response.