Skip to content
BolderBolder Developers
Esc
↑↓navigate↵open⌘Jpreview

Create a customer

If a contact with the given email already exists for this shop, it is updated rather than duplicated.

POST/customers
Authorization
AuthorizationBearer token (JWT) · headerrequired
Request body
requiredapplication/json
emailstring<email>required

Contact email address. Used as the unique identifier for find-or-create.

namestringrequired

Full name (first and last).

phone_numberstring
company_namestring

Company name. Creates or finds a company record automatically.

company_id_numberstring

Company tax/ID number (RUT, DNI, etc.), stored with the company record.

tagsstring[]

Tag names. Replaces all existing tags.

opt_inboolean

Whether the contact accepts marketing emails/newsletters.

contact_group_idinteger

Contact group ID to assign this contact to.

salesperson_idstring

Shop admin user ID

sourcestring

Origin of the contact record. Defaults to API if omitted on create.

Allowed:signup-formregister-formcontact-formcheckout
custom_dataobject[]

Custom field values for this contact.

Show properties
Array of object
keystring

Field key (slug)

field_idinteger

Field definition ID (optional alternative to key)

valueany

Field value

shop_idintegerrequired
Responses
201

Customer created

_linksHalLinks
idinteger
shop_idinteger
emailstring
namestring

Full name (first and last)

phone_numberstring
phone_validatedboolean
validation_methodstring
company_namestring
company_id_numberstring

Company tax/ID number (RUT, DNI, etc.), formatted

company_activity_codestring
customer_statusstring

Customer account status.

Allowed:publicprivatepending
opt_inboolean

Whether the contact has opted in to marketing emails.

sourcestring
last_logged_onstring<date-time>
last_ip_addressstring
has_passwordboolean
total_spentinteger

In cents

available_orders_countinteger
salesperson_idinteger
favorite_product_idsinteger[]
used_promotion_idsinteger[]
tagsstring[]
created_onstring<date-time>
updated_onstring<date-time>
_embeddedobject
Show properties
contact_groupobject

Present when the contact belongs to a group

addressesAddress[]
Show properties
Array of Address
streetstring
street_2string
locality_namestring
region_namestring
country_namestring
postal_codestring
422

Validation error

Try it
Server
Authorization
Bodyapplication/json
Request
curl -s -X POST \
  -H "Authorization: Bearer $BOLDER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"shop_id":1,"email":"newcustomer@example.com","name":"Jane Smith"}' \
  "https://api.onbolder.com/v2/customers"
Response
{
  "id": 3001,
  "shop_id": 1,
  "email": "newcustomer@example.com",
  "name": "Jane Smith",
  "customer_status": "public",
  "phone_validated": false,
  "created_on": "2024-06-20T14:00:00Z",
  "_links": {
    "self": {
      "href": "https://api.onbolder.com/v2/customers/3001"
    },
    "orders": {
      "href": "https://api.onbolder.com/v2/orders?shop_id=1&contact_email=newcustomer@example.com"
    }
  }
}

Was this page helpful?