/services/webshop/v1/discounts/update
Auth
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
discount_id |
string | Yes | 42 |
|
discount_type |
string | No | ||
start_date |
string | No | ||
end_date |
string | No | ||
label |
string | No | ||
include_shipping |
string | No | ||
sale_price_handling |
string | No | ||
selections |
string | No | ||
coupon_codes |
string | No |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 60 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 57 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string | |
details |
string |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 60 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 57 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string | |
data |
mixed |
| Field | Type | Description |
|---|---|---|
message |
string | Errors overview. |
errors |
object | A detailed description of each field that failed validation. |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 60 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 57 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 60 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 57 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 60 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 57 |
Retry-After |
integer | Seconds until the rate limit resets | 60 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string |
curl -X POST "https://api.wemasy.nl/api/services/webshop/v1/discounts/update" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"discount_id": "42",
"discount_type": "string",
"start_date": "string",
"end_date": "string",
"label": "string",
"include_shipping": "string",
"sale_price_handling": "string",
"selections": "string",
"coupon_codes": "string"
}'
fetch('https://api.wemasy.nl/api/services/webshop/v1/discounts/update', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"discount_id": "42",
"discount_type": "string",
"start_date": "string",
"end_date": "string",
"label": "string",
"include_shipping": "string",
"sale_price_handling": "string",
"selections": "string",
"coupon_codes": "string"
})})
.then(r => r.json())
.then(data => console.log(data));
$response = Http::withToken('YOUR_API_TOKEN')
->accept('application/json')
->post('https://api.wemasy.nl/api/services/webshop/v1/discounts/update', {
"discount_id": "42",
"discount_type": "string",
"start_date": "string",
"end_date": "string",
"label": "string",
"include_shipping": "string",
"sale_price_handling": "string",
"selections": "string",
"coupon_codes": "string"
});
$data = $response->json();
import requests
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
data = {
"discount_id": "42",
"discount_type": "string",
"start_date": "string",
"end_date": "string",
"label": "string",
"include_shipping": "string",
"sale_price_handling": "string",
"selections": "string",
"coupon_codes": "string"
}
r = requests.post("https://api.wemasy.nl/api/services/webshop/v1/discounts/update", headers=headers, json=data)
print(r.json())
{
"error": false,
"message": "Discount updated successfully",
"data": {
"id": 42,
"project_id": 10,
"discount_type": "coupon",
"status": "active",
"priority": 2,
"label": "Winter Sale 15%",
"discount_value": null,
"discount_value_type": null,
"start_date": "2026-11-01T00:00:00.000000Z",
"end_date": "2026-12-31T23:59:59.000000Z",
"include_shipping": true,
"sale_price_handling": "apply_to_sale_price",
"selections": "[{\"label\":\"All products\",\"discount_value\":15,\"discount_value_type\":\"percentage\",\"filters\":[]}]",
"created_at": "2026-04-01T12:00:00.000000Z",
"updated_at": "2026-04-01T14:30:00.000000Z"
}
}