E-commerce API
POST /services/webshop/v1/customers/invite Auth

Invite a customer

Creates a new customer record without a password and emails them an invitation link. Clicking the link lands them on the storefront's accept-invitation page where they pick a password and are signed in automatically. The email arrives on the merchant's brand and the URL lives on the merchant's storefront domain (not the platform host).

Request Body Required

FieldTypeRequiredDescriptionExample
email string (email)
max: 191
Yes jane@example.com
firstname string|null
max: 191
No Jane
lastname string|null
max: 191
No Doe

Responses

201
422
401
403
429
Invitation sent
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.customer object
Validation failed or email already registered for this project
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
errors object
errors.email array
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/webshop/v1/customers/invite" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "jane@example.com",
    "firstname": "Jane",
    "lastname": "Doe"
}'
fetch('https://api.wemasy.nl/api/services/webshop/v1/customers/invite', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "email": "jane@example.com",
    "firstname": "Jane",
    "lastname": "Doe"
})})
.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/customers/invite', {
    "email": "jane@example.com",
    "firstname": "Jane",
    "lastname": "Doe"
});
$data = $response->json();
import requests

headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json"
}
data = {
    "email": "jane@example.com",
    "firstname": "Jane",
    "lastname": "Doe"
}
r = requests.post("https://api.wemasy.nl/api/services/webshop/v1/customers/invite", headers=headers, json=data)
print(r.json())
Response Example
{
    "customer": {
        "id": 42,
        "email": "jane@example.com",
        "firstname": "Jane",
        "lastname": "Doe"
    },
    "message": "Invitation email sent."
}

Try It
Request Body Required

Export