Domain Registration API
POST /services/domains/v1/domain-cart/claim Auth

Attach an anonymous cart to the authenticated user

The marketing site (wemasy.com) creates a cart against a session_token only — no user_id. After the visitor signs up and the dashboard SPA mounts, it fires this endpoint with the token it brought along. We: 1. Find the cart by token. 2. Refuse if the cart is already claimed by a different user (capability-URL safety — token leak doesn't let one user hijack another's cart). 3. Stamp user_id + claimed_at. Returns the full cart so the dashboard register page can render its items immediately without a second round-trip.

Request Body Required

FieldTypeRequiredDescriptionExample
session_token string
max: 64
Yes

Responses

200
404
422
401
403
429
Successful response
Headers
HeaderTypeDescriptionExample
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
FieldTypeDescription
error boolean
message string
data object
data.cart object
Resource not found
Headers
HeaderTypeDescriptionExample
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
FieldTypeDescription
error boolean
message string
data mixed[]
Validation error
FieldTypeDescription
message string Errors overview.
errors object A detailed description of each field that failed validation.
Unauthenticated — missing or invalid Bearer token
Headers
HeaderTypeDescriptionExample
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
FieldTypeDescription
error boolean
message string
Forbidden — insufficient permissions for this resource
Headers
HeaderTypeDescriptionExample
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
FieldTypeDescription
error boolean
message string
Too Many Requests — rate limit exceeded
Headers
HeaderTypeDescriptionExample
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
FieldTypeDescription
error boolean
message string
Base URL
https://api.wemasy.nl/api
Authentication

Request Sample
cURL
JS
PHP
Python
curl -X POST "https://api.wemasy.nl/api/services/domains/v1/domain-cart/claim" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "session_token": "string"
}'
fetch('https://api.wemasy.nl/api/services/domains/v1/domain-cart/claim', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "session_token": "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/domains/v1/domain-cart/claim', {
    "session_token": "string"
});
$data = $response->json();
import requests

headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json"
}
data = {
    "session_token": "string"
}
r = requests.post("https://api.wemasy.nl/api/services/domains/v1/domain-cart/claim", headers=headers, json=data)
print(r.json())
Response Example
{
    "error": false,
    "message": "string",
    "data": {
        "cart": {
            "session_token": "string",
            "status": "string",
            "currency": "string",
            "total_price": 0,
            "item_count": 0,
            "is_claimed": true,
            "items": []
        }
    }
}

Try It
Request Body Required

Export