Creates a customer.
v1/customers/add.php
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Name |
| string | No | ||
| phone | string | No | Phone |
| address_legal | string | No | Legal address |
| address_real | string | No | Delivery address |
| agreement | string | No | Agreement |
| manager_name | string | No | Manager |
| manager_post | string | No | Manager's position |
| notes | string | No | Notes |
A customer can also be created together with a sale, see v1/orders/add.
Example request
{
"name": "Furniture Yard",
"email": "orders@furnitureyard.com",
"phone": "+1 212 555-0123",
"address_legal": "5 Forest St, New York",
"address_real": "12 Warehouse Rd, New York",
"agreement": "No. 15 of 10 Jan 2026",
"manager_name": "Peter Johnson",
"manager_post": "CEO"
}
Example response
{
"success": true,
"customer_id": 512
}
Errors
| Error | Reason |
|---|---|
| No name in input | name is missing or null |
| Name must not be empty | Empty name |
| Name must be a string | name passed as an array or object |