/services/webshop/v1/customers/invite
Auth
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).
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
email |
string (email)
max: 191 |
Yes | jane@example.com |
|
firstname |
string|null
max: 191 |
No | Jane |
|
lastname |
string|null
max: 191 |
No | Doe |
| 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 |
object | |
data.customer |
object |
| 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 | |
errors |
object | |
errors.email |
array |
| 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/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())
{
"customer": {
"id": 42,
"email": "jane@example.com",
"firstname": "Jane",
"lastname": "Doe"
},
"message": "Invitation email sent."
}