Create Customer
Create a new customer in your store.
Endpoint
POST /api/customers/createRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
| storeId | string | Yes | Store ID |
| firstname | string | Yes | First name |
| lastname | string | Yes | Last name |
| string | No | Email address | |
| phone | string | No | Phone number |
| password | string | No | Password (if registered) |
| isSubscriber | boolean | No | Is newsletter subscriber |
| note | string | No | Note |
| status | string | No | ACTIVE, UNACTIVE, BLOCKED |
| type | string | No | particular, professional |
| address | object | No | Address object |
Example
json
{
"storeId": "store_id",
"firstname": "John",
"lastname": "Doe",
"email": "john@example.com",
"phone": "+123456789",
"password": "secret",
"isSubscriber": true,
"note": "VIP customer",
"status": "ACTIVE",
"type": "particular",
"address": {
"firstname": "John",
"lastname": "Doe",
"company": "Company Inc.",
"address1": "123 Main St",
"address2": "",
"city": { "name": "City" },
"province": { "name": "Province" },
"country": { "name": "Country", "code": "US", "dialCode": "+1" },
"zip": "12345",
"phone": "+123456789",
"default": true
}
}Response
json
{
"status": "success",
"data": {
"_id": "string",
"firstname": "John",
"lastname": "Doe",
...
}
}