Next Commerce
Customers

Users Create

Create a new customer.

POST
/users/

Authorization

oauth2 users:write
AuthorizationBearer <token>

Generate an Access Token through Settings > API Access for single store access or use the Authorization Code flow with your partner App Client ID. Use required permission scopes for API endpoint access. Example Authorization: Bearer 123

In: header

Scope: users:write

Header Parameters

X-29next-API-Version*string
Default"unstable"
Value in"unstable"

Request Body

accepts_marketing?boolean
addresses?array<>
email*string
Formatemail
first_name?string
Lengthlength <= 255
ip?|
is_blocked?boolean
Defaultfalse
language?|

required : E164

  • en - English
  • fr - Français
  • th - ภาษาไทย
  • de - Deutsch
  • sv - Svenska
  • no - Norsk
  • it - Italiano
  • es - Español
  • nl - Nederlands
  • pt - Português
  • da - Dansk
  • fi - Suomi
Value in"en" | "fr" | "th" | "de" | "sv" | "no" | "it" | "es" | "nl" | "pt" | "da" | "fi" | "" | null
last_name?string
Lengthlength <= 255
metadata?|
phone_number?|
tags?array<|>
user_agent?|

Response Body

application/json

curl -X POST "https://example.29next.store/api/admin/users/" \
  -H "X-29next-API-Version: unstable" \
  -H "Authorization: Bearer " \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com"
  }'
{
  "accepts_marketing": true,
  "addresses": [
    {
      "country": "string",
      "first_name": "string",
      "id": 0,
      "is_default_for_billing": true,
      "is_default_for_shipping": true,
      "last_name": "string",
      "line1": "string",
      "line2": "string",
      "line3": "string",
      "line4": "string",
      "notes": "string",
      "phone_number": "string",
      "postcode": "string",
      "state": "string"
    }
  ],
  "date_joined": "2019-08-24T14:15:22Z",
  "email": "user@example.com",
  "first_name": "string",
  "id": 0,
  "ip": "string",
  "is_blocked": false,
  "language": "en",
  "last_name": "string",
  "metadata": {},
  "orders_count": 0,
  "phone_number": "string",
  "subscriptions_count": 0,
  "tags": [
    "string"
  ],
  "total_spent": "0.00",
  "user_agent": "string",
  "user_type": "customer"
}