Create or retrieve a shop customer

POST /chat/ambassadors/shop-customer

use this route to create or retrieve a client ambassador from his email_tmp, if he doesn't exists, the account and its api key will be created

Headers

application/json

Body

Responses

POST /chat/ambassadors/shop-customer
curl \
 -X POST https://domain.tld/api/v2/chat/ambassadors/shop-customer \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -H "X-Popsell-Brand: 3" \
 -d '{"email_tmp":"string","firstname":"string","lastname":"string"}'
Request examples
# Headers
X-Popsell-Brand: 3

# Payload
{
  "email_tmp": "string",
  "firstname": "string",
  "lastname": "string"
}
Response examples (200)
{
  "id_ambassador": 42,
  "image": "string",
  "firstname": "string",
  "lastname": "string",
  "username": "string",
  "email": "string",
  "email_tmp": "string",
  "active": 42,
  "status": 42,
  "online": true,
  "last_action_date": "2024-05-04T09:42:00+00:00",
  "customer_id": "string",
  "anonymized": true
}
Response examples (401)
{
  "message": "Unauthorized."
}
Response examples (422)
{
  "message": "field is required! (and 3 more error)",
  "errors": {
    "field": [
      "Error message details here"
    ],
    "additionalProperty1": [
      "Error message details here"
    ],
    "additionalProperty2": [
      "Error message details here"
    ]
  }
}