/services/webshop/v1/pricing/resolve
Public
Returns ONLY the products whose price changes for this visitor (customer or campaign overlay). Products absent from the response should keep their static price.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
website_id |
string | Yes | 1 |
|
project_id |
string | Yes | 1 |
|
campaign_key |
string|null
max: 64 |
No | BLACK_FRIDAY |
|
product_ids |
integer[] | Yes | [12,14,18] |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 120 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 117 |
| Field | Type | Description |
|---|---|---|
data |
string | |
context |
object | |
context.campaign_key |
string | customer_id intentionally not returned — the frontend sent the Bearer token, so it already knows who's logged in. Re-echoing it would only add noise (and a tiny info leak in shared network logs). |
context.campaign_applied |
string |
| 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 | 120 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 117 |
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/pricing/resolve" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"website_id": "1",
"project_id": "1",
"campaign_key": "BLACK_FRIDAY",
"product_ids": [
12,
14,
18
]
}'
fetch('https://api.wemasy.nl/api/services/webshop/v1/pricing/resolve', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"website_id": "1",
"project_id": "1",
"campaign_key": "BLACK_FRIDAY",
"product_ids": [
12,
14,
18
]
})})
.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/pricing/resolve', {
"website_id": "1",
"project_id": "1",
"campaign_key": "BLACK_FRIDAY",
"product_ids": [
12,
14,
18
]
});
$data = $response->json();
import requests
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
data = {
"website_id": "1",
"project_id": "1",
"campaign_key": "BLACK_FRIDAY",
"product_ids": [
12,
14,
18
]
}
r = requests.post("https://api.wemasy.nl/api/services/webshop/v1/pricing/resolve", headers=headers, json=data)
print(r.json())
{
"data": {
"12": {
"price_excl_tax": 22,
"price_incl_tax": 26.62,
"original_price_excl_tax": 39.99,
"original_price_incl_tax": 48.39,
"discount_label": "-45%",
"source": "customer"
}
},
"context": {
"customer_id": 7,
"campaign_key": "BLACK_FRIDAY",
"campaign_applied": true
}
}