Preview scheduled invoices building up
GET
/invoices/pending
const url = 'https://example.com/invoices/pending?customerId=019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f&limit=50&offset=0';const options = { method: 'GET', headers: {cookie: '__Host-bottle.session_token=<__Host-bottle.session_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://example.com/invoices/pending?customerId=019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f&limit=50&offset=0' \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token>A live, unnumbered preview per customer, calculated from the deliveries, cylinder rent and credits currently expected on their next weekly, monthly or quarterly invoice.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”q
string
customerId
UUID v7
string format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
limit
integer
offset
integer | null
Responses
Section titled “Responses”Scheduled invoices which currently contain charges or credits
Media typeapplication/json
object
items
required
Array<object>
object
customerId
required
UUID v7
string format: uuid
customerName
required
string
billingPeriod
required
string
periodFrom
required
string format: date
periodTo
required
string format: date
builtThrough
required
string format: date
issueOn
required
string format: date
orderCount
required
integer
orderIds
required
Array<string>
netPence
required
integer
vatPence
required
integer
totalPence
required
integer
lines
required
Array<object>
object
productId
required
UUID v7
string | null format: uuid
description
required
string
deliveredOn
required
string | null format: date
orderReference
required
string | null
customerReference
required
string | null
quantity
required
number
unitPrice
required
integer
priceIncludesVat
required
boolean
vatRate
required
integer
netPence
required
integer
vatPence
required
integer
totalPence
required
integer
total
required
integer
Example
{ "items": [ { "customerId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "billingPeriod": "weekly", "orderIds": [ "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" ], "lines": [ { "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ] } ]}Not signed in
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Not a member, or without the permission this needs
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
Media typeapplication/json
object
error
required
string
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}