/services/webshop/v1/shoppingcart/validate-vat
Public
Dedicated, self-contained VAT validation so the storefront can show a "validating…" indicator next to the VAT field WITHOUT blocking the whole address-save or the checkout button. Persists the invoice tax fields and the resolved vies_* state, then returns the full updated cart (same shape as Get Shopping Cart) so reverse-charge totals and the vies status update together.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
website_id |
string | Yes | 1 |
|
shoppingcart_session |
string | Yes | abc123def456ghi789 |
|
invoice_tax_number |
string | No | ||
invoice_company |
string | No | ||
invoice_is_company |
string | No | ||
invoice_country |
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 |
|---|---|---|
payment |
object | |
payment.selected |
string|null | |
payment.methods |
object | |
shipment |
object | |
shipment.shipping_methods |
mixed | |
shipment.selected |
object | |
quote |
object | |
quote.show_price_tax_included |
boolean | |
quote.session |
string|null | |
quote.tax_amounts |
string | |
quote.total_price |
string | |
quote.total_price_tax |
string | |
quote.total_price_with_tax |
string | |
quote.products |
object[] | |
shoppingcart |
object | |
shoppingcart.show_price_tax_included |
boolean | |
shoppingcart.session |
string|null | |
shoppingcart.tax_amounts |
string | |
shoppingcart.total_price |
string | |
shoppingcart.total_price_tax |
string | |
shoppingcart.total_price_with_tax |
string | |
shoppingcart.products |
object[] | |
shoppingcart.total_quantity |
number | |
shoppingcart.cart_reminder_consent |
boolean|null | Cart-reminder consent checkbox state — restored on page reload so the checkout doesn't reset it to unchecked between sessions. Stored under cart.metadata when the shopper actually toggles the checkbox. Returns null (NOT false) when the cart has no explicit value yet, so the frontend can distinguish "shopper explicitly unticked on this cart" from "never touched, fall back to customer-profile's consent state". Without this distinction the frontend always overwrites a logged-in customer's profile-level consent with the cart's default false. |
coupon |
object | |
coupon.code |
string | |
coupon.label |
string | |
coupon.value |
string | |
coupon.value_type |
string | |
coupon.discount_amount |
number | Amounts |
coupon.discount_amount_incl_tax |
number | Amounts |
coupon.applied_to_shipping |
boolean | |
auto_discount |
object|null | Customer-specific or URL-campaign discount applied to the cart. Mutually exclusive with `coupon` — only one auto-discount applies at a time, and a coupon takes precedence when both could fire. |
agreement |
object | |
agreement.url |
string | |
countries |
object | |
countries.NL |
string | |
countries.BE |
string | |
countries.DE |
string | |
countries.FR |
string | |
countries.IT |
string | |
countries.ES |
string | |
countries.AT |
string | |
countries.LU |
string | |
countries.IE |
string | |
countries.PT |
string | |
countries.PL |
string | |
countries.CZ |
string | |
countries.SK |
string | |
countries.SI |
string | |
countries.HU |
string | |
countries.RO |
string | |
countries.BG |
string | |
countries.HR |
string | |
countries.GR |
string | |
countries.CY |
string | |
countries.EE |
string | |
countries.LV |
string | |
countries.LT |
string | |
countries.FI |
string | |
countries.SE |
string | |
countries.DK |
string | |
countries.MT |
string | |
users |
string | |
vies |
object | |
vies.status |
string valid, unavailable, invalid, unchecked |
|
vies.reverse_charge_applied |
boolean | |
vies.needs_review |
boolean | True when VIES was down but 0% was auto-approved — admin must verify. |
| 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 |
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/shoppingcart/validate-vat" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"website_id": "1",
"shoppingcart_session": "abc123def456ghi789",
"invoice_tax_number": "string",
"invoice_company": "string",
"invoice_is_company": "string",
"invoice_country": "string"
}'
fetch('https://api.wemasy.nl/api/services/webshop/v1/shoppingcart/validate-vat', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"website_id": "1",
"shoppingcart_session": "abc123def456ghi789",
"invoice_tax_number": "string",
"invoice_company": "string",
"invoice_is_company": "string",
"invoice_country": "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/shoppingcart/validate-vat', {
"website_id": "1",
"shoppingcart_session": "abc123def456ghi789",
"invoice_tax_number": "string",
"invoice_company": "string",
"invoice_is_company": "string",
"invoice_country": "string"
});
$data = $response->json();
import requests
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
data = {
"website_id": "1",
"shoppingcart_session": "abc123def456ghi789",
"invoice_tax_number": "string",
"invoice_company": "string",
"invoice_is_company": "string",
"invoice_country": "string"
}
r = requests.post("https://api.wemasy.nl/api/services/webshop/v1/shoppingcart/validate-vat", headers=headers, json=data)
print(r.json())
{
"payment": {
"selected": "string",
"methods": {
"wire": {
"id": "string",
"title": "string",
"description": "string",
"image": "string"
},
"pay_on_pickup": {
"id": "string",
"title": "string",
"description": "string",
"image": "string"
}
}
},
"shipment": {
"shipping_methods": "string",
"selected": {
"selected": "string",
"title": "string",
"price": "string"
}
},
"quote": {
"show_price_tax_included": true,
"session": "string",
"tax_amounts": "string",
"total_price": "string",
"total_price_tax": "string",
"total_price_with_tax": "string",
"products": []
},
"shoppingcart": {
"show_price_tax_included": true,
"session": "string",
"tax_amounts": "string",
"total_price": "string",
"total_price_tax": "string",
"total_price_with_tax": "string",
"products": [],
"total_quantity": 0,
"cart_reminder_consent": true
},
"coupon": {
"code": "string",
"label": "string",
"value": "string",
"value_type": "string",
"discount_amount": 0,
"discount_amount_incl_tax": 0,
"applied_to_shipping": true
},
"auto_discount": {
"source": "string",
"label": "string",
"value": "string",
"value_type": "string",
"discount_amount": 0,
"discount_amount_incl_tax": 0,
"applied_to_shipping": true
},
"agreement": {
"url": "string"
},
"countries": {
"NL": "string",
"BE": "string",
"DE": "string",
"FR": "string",
"IT": "string",
"ES": "string",
"AT": "string",
"LU": "string",
"IE": "string",
"PT": "string",
"PL": "string",
"CZ": "string",
"SK": "string",
"SI": "string",
"HU": "string",
"RO": "string",
"BG": "string",
"HR": "string",
"GR": "string",
"CY": "string",
"EE": "string",
"LV": "string",
"LT": "string",
"FI": "string",
"SE": "string",
"DK": "string",
"MT": "string"
},
"users": "string",
"vies": {
"status": "string",
"reverse_charge_applied": true,
"needs_review": true
}
}