Skip to content

Put customers on a price list

POST
/customers/rate-set
curl --request POST \
--url https://example.com/customers/rate-set \
--header 'Content-Type: application/json' \
--cookie bottle.session_token=<bottle.session_token> \
--data '{ "customerIds": [ "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" ], "rateSetId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "clearAgreedRates": false, "dryRun": false }'

Many customers at once, onto a price list or (rateSetId null) off theirs. A customer is on one list or none. dryRun only counts. clearAgreedRates removes the moved customers’ own agreed prices on products the list prices, which would otherwise still beat it. All or nothing: an unknown customer or list is 404, an archived list 409.

Media typeapplication/json
object
customerIds
required
Array<string>
>= 1 items <= 5000 items
rateSetId
required

UUID v7

string | null format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f
clearAgreedRates
boolean
dryRun
boolean

Moved, or what would move

Media typeapplication/json
object
moved
required
integer
unchanged
required
integer
agreedRatesInTheWay
required
integer
agreedRatesCleared
required
integer
Examplegenerated
{
"moved": 1,
"unchanged": 1,
"agreedRatesInTheWay": 1,
"agreedRatesCleared": 1
}

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

A customer or the list is not this business’s

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

The list is archived

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