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

List Customers (admin)

Returns project-scoped customers with order aggregates and basic profile fields, paginated and sortable. Supports free-text search across email, name, and company.

Request Body

FieldTypeRequiredDescriptionExample
sortKey string|null
id, email, firstname, lastname, created_at, total_orders, total_spent, last_order_at
No created_at
sortOrder string|null
asc, desc
No desc
per_page integer|null
min: 1 max: 200
No 50
search_query string|null
max: 191
No jane

Responses

200
422
401
403
429
Paginated customers with order aggregates
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.current_page integer
data.data object[]
data.first_page_url string
data.from integer|null
data.last_page integer
data.last_page_url string
data.links mixed[]
data.next_page_url string|null
data.path string
data.per_page integer
data.prev_page_url string|null
data.to integer|null
data.total integer
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/webshop/v1/customers/all" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "sortKey": "created_at",
    "sortOrder": "desc",
    "per_page": 50,
    "search_query": "jane"
}'
fetch('https://api.wemasy.nl/api/services/webshop/v1/customers/all', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "sortKey": "created_at",
    "sortOrder": "desc",
    "per_page": 50,
    "search_query": "jane"
})})
.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/all', {
    "sortKey": "created_at",
    "sortOrder": "desc",
    "per_page": 50,
    "search_query": "jane"
});
$data = $response->json();
import requests

headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json"
}
data = {
    "sortKey": "created_at",
    "sortOrder": "desc",
    "per_page": 50,
    "search_query": "jane"
}
r = requests.post("https://api.wemasy.nl/api/services/webshop/v1/customers/all", headers=headers, json=data)
print(r.json())
Response Example
{
    "error": false,
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 7,
                "email": "jane@example.com",
                "firstname": "Jane",
                "lastname": "Smith",
                "name": "Jane Smith",
                "company": null,
                "phone": "+31612345678",
                "email_verified": true,
                "location": "Amsterdam, NL",
                "total_orders": 4,
                "total_spent": 489.5,
                "last_order_at": "2026-04-20T14:20:00.000000Z",
                "created_at": "2025-09-12T10:00:00.000000Z"
            }
        ],
        "first_page_url": "https://api.example.com/api/services/webshop/v1/customers/all?page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "https://api.example.com/api/services/webshop/v1/customers/all?page=1",
        "next_page_url": null,
        "path": "https://api.example.com/api/services/webshop/v1/customers/all",
        "per_page": 50,
        "prev_page_url": null,
        "to": 1,
        "total": 1
    }
}

Try It
Request Body Optional

Export