Read how customer account numbers work
GET
/account-numbers
const url = 'https://example.com/account-numbers';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/account-numbers \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token>Off, numbered by Bottle with a prefix and next number, or typed by the business. Also the number the next new customer gets, and how many customers have none.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The settings
Media typeapplication/json
object
settings
required
object
mode
required
string
prefix
required
string
nextNumber
required
integer
digits
required
integer
printOn
required
object
invoices
required
boolean
next
required
string | null
withoutNumber
required
integer
Example
{ "settings": { "mode": "off" }}Not signed in
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Not an owner or admin
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" } ]}