Admin api customers

Create customer

POST
/api/admin/v2/customers

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

email?string

The system will randomly generate a fake email if not provided

Formatemail
password?string

The system will randomly generate a fake password if not provided

Formatpassword
Length8 <= length <= 255
externalId?string

Id of the customer in external system

firstName?string
lastName?string
phone?string
role?string

Role of the customer

Default"customer"
Value in"customer" | "employee" | "tester" | "untracked" | "unknown"
priority?integer

Customer priority. default to 0, which means any regular customer. customers with higher priority will have their shopping sessions prioritized during processing, the lower priority is opposite.

Default0
Range-10 <= value <= 10
metadata?|

This object can contain custom metadata information

Defaultnull

Response Body

application/json

application/json

curl -X POST "https://oasis-api.public.sandbox.oasis.aifi.com/api/admin/v2/customers" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": 0,
  "externalId": "string",
  "role": "customer",
  "metadata": {
    "arbitraryKey": "arbitraryValue"
  },
  "priority": 0,
  "email": "user@example.com",
  "firstName": "string",
  "lastName": "string",
  "phone": "string"
}
Empty
Empty
{
  "message": "Invalid request body",
  "type": "E_INVALID_BODY",
  "errors": [
    {
      "error": "\"email\" is required",
      "rule": "any.required",
      "field": "\"email\""
    }
  ]
}

How is this guide?

AiFI AI Chat

Beta

Powered by AiFi

Ask docs or API questions to get grounded answers.