Create Customer

POST {{baseUrl}}/customers

Customers can be created within your store at Salla by providing the required data in this endpoint.

You may need the Countries List endpoint to get the mobile and country codes.

Also, you may use the Customer Groups list to add the group's IDs for the new customer. Kindly note that customer's email and mobile number are unique.

OAuth Scopes


customers.read customers.read_write

Request Body

{"first_name"=>"Ahmed", "last_name"=>"Ali", "mobile"=>"9286487235467354", "mobile_code_country"=>"+999", "country_code"=>"SA", "email"=>"ahmedali@test.test", "groups"=>[11323141, 11323142]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: OK

{"status":200,"success":true,"data":{"id":2075683582,"first_name":"Ahmed","last_name":"Ali","mobile":8236734576347654,"mobile_code":"999","email":"ahmedali@test.test","urls":{"customer":"https://shtara.com/profile","admin":"https://shtara.com/profiley"},"avatar":"https://i.ibb.co/jyqRQfQ/avatar-male.webp","gender":"male","city":"Riyadh","country":"SA","location":"null","updated_at":{"date":"2020-04-02 22:43:26.000000","timezone_type":3,"timezone":"Asia/Riyadh"}}}