Skip to content

Email a customer their prices

POST
/customers/{id}/send-rates
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.

id
required

UUID v7

string format: uuid

Example

019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f

UUID v7

Media typeapplication/json
object
prices

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).

string
Allowed values: all agreed

Sent

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"
}

No such request, customer or sign-in

Media typeapplication/json
object
error
required
string
message
required
string

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

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
Allowed values: validation
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string

Example

{
"error": "validation",
"issues": [
{
"path": "email",
"message": "Invalid email"
}
]
}