Update a volume discount
curl --request PATCH \
--url https://wisepim.com/api/public/v1/volume-discounts/{discount_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://wisepim.com/api/public/v1/volume-discounts/{discount_id}"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://wisepim.com/api/public/v1/volume-discounts/{discount_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"name": "<string>",
"scope": "<string>",
"discount_type": "<string>",
"apply_to": "<string>",
"calculation_method": "<string>",
"product_ids": [
123
],
"category_id": 123,
"customer_group_ids": [
123
],
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"priority": 123,
"is_active": true,
"is_currently_active": true,
"combine_with_other_discounts": true,
"requires_coupon": true,
"coupon_code": "<string>",
"include_subcategories": true,
"product_filters": {},
"tiers": [
{
"id": 123,
"min_quantity": 123,
"max_quantity": 123,
"discount_method": "<string>",
"discount_value": "<string>",
"description": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>",
"detail": [
{}
]
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}Update a volume discount
PATCH /volume-discounts/: change a tier pricing rule; tiers and links replace the whole set. Requires volume-discounts:write.
PATCH
/
api
/
public
/
v1
/
volume-discounts
/
{discount_id}
Update a volume discount
curl --request PATCH \
--url https://wisepim.com/api/public/v1/volume-discounts/{discount_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://wisepim.com/api/public/v1/volume-discounts/{discount_id}"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://wisepim.com/api/public/v1/volume-discounts/{discount_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"name": "<string>",
"scope": "<string>",
"discount_type": "<string>",
"apply_to": "<string>",
"calculation_method": "<string>",
"product_ids": [
123
],
"category_id": 123,
"customer_group_ids": [
123
],
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"priority": 123,
"is_active": true,
"is_currently_active": true,
"combine_with_other_discounts": true,
"requires_coupon": true,
"coupon_code": "<string>",
"include_subcategories": true,
"product_filters": {},
"tiers": [
{
"id": 123,
"min_quantity": 123,
"max_quantity": 123,
"discount_method": "<string>",
"discount_value": "<string>",
"description": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>",
"detail": [
{}
]
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}Authorizations
Use a project API key from Settings > API Access. Send it as Authorization: Bearer wpk_.... See authentication and scopes for setup and permissions.
Headers
Body
application/json
Response
OK

