POST
/
api-commerceIdentity
/
user
/
guest
curl --request POST \
  --url https://{customerDomain}.fabric.zone/api-commerceIdentity/user/guest \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-site-context: <x-site-context>' \
  --data '{
  "user": {
    "name": {
      "first": "Pat",
      "middle": "E",
      "last": "Kake"
    },
    "phone": [
      {
        "number": "555-123-4567",
        "countryCode": "+91",
        "extenstion": "x-6789",
        "kind": "Mobile"
      }
    ],
    "email": "test@mail.com",
    "extra": {}
  },
  "provider": {
    "username": "user101",
    "password": "ABC123"
  }
}'
{
  "_id": "596f7557696e2d4d617a616c546f7621",
  "userId": "6169b2d892a5f30009d76480",
  "roles": "customer",
  "name": "Pat E Kake",
  "account": "xxxxxcxxxxxxxxxxxxxx",
  "userType": "customer",
  "accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...",
  "refreshToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4..."
}

Authorizations

x-api-key
string
header
required

Headers

x-site-context
string
required

The x-site-context header is a JSON object that contains information about the source you wish to pull from. The mandatory account is the 24 character identifier found in Copilot. The channel (Sales channel ID), stage (environment name), and date attributes can be used to further narrow the scope of your data source.

Example:

"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"

Body

application/json

Request body for creating a guest user

Response

200
application/json
Sign-in response

Sign-in response body