Admin api customers

Update customer by customerId

PATCH
/api/admin/v2/customers/{customerId}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

customerId*integer

Request Body

application/json

email?string

The system will randomly generate a fake email if not provided

Formatemail
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
password?string

New password that will be set for the user

Formatpassword
Length8 <= length <= 255
currentPassword?string

Current password of the user

Formatpassword
Length8 <= length <= 255
blocked?boolean

If true, the customer cannot enter the store

card?
cardType?stringDeprecated

Card/payment provider, deprecated, use card.provider instead

Default"NONE"
Value in"NONE" | "STRIPE" | "PAYTER" | "ADYEN" | "FREEDOM_PAY" | "GENERIC"
cardToken?|Deprecated

Card token to charge customer, pass null to delete the existing payment instrument, deprecated, use card.cardToken instead

Response Body

application/json

application/json

curl -X PATCH "https://oasis-api.public.sandbox.oasis.aifi.com/api/admin/v2/customers/0" \  -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
{
  "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.