Email a customer their prices
const url = 'https://example.com/customers/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/send-rates';const options = { method: 'POST', headers: { cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"prices":"all"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/customers/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/send-rates \ --header 'Content-Type: application/json' \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token> \ --data '{ "prices": "all" }'Every product the business sells to this customer (not archived, and not one kept for consumers only) at what they pay (their agreed rate, else their price list, else the trade price, else the list price, with any quantity prices), without VAT when the business is registered, and the cylinder deposits they pay. To the customer’s email, with the same prices attached as a PDF (see GET /customers/{customerId}/prices.pdf). With prices set to agreed, only the products whose price was agreed with them, and refused when none is.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Request Body
Section titled “Request Body”object
Which products to list: everything sold to the customer (all, the default), or only those whose price was agreed with them (an agreed rate, their price list’s price, or quantity prices of their own or their price list’s).
Responses
Section titled “Responses”Sent
Not signed in
object
Example
{ "error": "not_found", "message": "Customer not found"}Not a member, or without the permission this needs
object
Example
{ "error": "not_found", "message": "Customer not found"}No such request, customer or sign-in
object
Example
{ "error": "not_found", "message": "Customer not found"}The customer has no email address, or only agreed prices were asked for and none are agreed
object
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
object
object
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}