Skip to content
On this page

Create Customer ​

Create a new customer in your store.

Endpoint ​

POST /api/customers/create

Request Body ​

FieldTypeRequiredDescription
storeIdstringYesStore ID
firstnamestringYesFirst name
lastnamestringYesLast name
emailstringNoEmail address
phonestringNoPhone number
passwordstringNoPassword (if registered)
isSubscriberbooleanNoIs newsletter subscriber
notestringNoNote
statusstringNoACTIVE, UNACTIVE, BLOCKED
typestringNoparticular, professional
addressobjectNoAddress 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",
    ...
  }
}

Released under the MIT License.