Fetch an invoice
const url = 'https://app.buildworkpro.com/api/v1/invoices/1';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://app.buildworkpro.com/api/v1/invoices/1 \ --header 'Authorization: Bearer <token>'Returns the invoice with its line items.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Responses
Section titled “ Responses ”Invoice
object
object
What the customer still owes: total minus amountPaid, never below zero. A voided invoice owes nothing, so its balanceDue is always “0.00” whatever its total and amountPaid are.
object
object
Server-generated request identifier
object
Opaque cursor for the next page; null when no more results
Whether more pages are available after this one
Items in this page
Example
{ "data": { "status": "draft" }}Error
object
URL identifying the problem type
Short human-readable summary
HTTP status code
Human-readable explanation
Server-generated request identifier
Validation error array (422 only)
object
Field path that failed validation
Validation error code
Human-readable validation message
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}Error
object
URL identifying the problem type
Short human-readable summary
HTTP status code
Human-readable explanation
Server-generated request identifier
Validation error array (422 only)
object
Field path that failed validation
Validation error code
Human-readable validation message
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}