v1

latestOpenAPI 3.0.0UNLICENSED2026-07-26178479713.7 KB
users

aid_customers_get

Get all customers, limited by parameters. The result will match all parameters with AND. Search is done by prefix match, and + in phone_number/email must be URL encoded, (+4799999999 => %2B4799999999)

Users with type contact are by default excluded from the result, use type=contact or type=any to include contact users

The response from a request that match contact users will include the users that are linked from the contact

scopes:

  • admin:customers
  • read:customers
get/accounts/{aid}/customers/users

Path parameters

aidstring ^[PT]{1}\d{8}$ required

An id that uniquely identifies the account.

Query parameters

token_valuestring

lookup customers by token value

token_typestring

lookup customer by token type

emailstring

lookup customer by email

phone_numberstring

lookup customer by phone_number

type'customer' | 'company' | 'contact' | 'employee' | 'other' | 'any'

lookup customer by type

searchstring

lookup customer where search term match name, phone number, customer_id or email. The search term will be matched with the user details

tag_idstring

lookup customers by tag id

include_deletedboolean

include deleted customers in the response. A deleted user will only have an id/customer_id, created_at/created_by and deleted_at/deleted_by set All other details of a customer, like email or phone_number will be deleted.

attributes_keysstring[]

include customers that has all the attributes.

attributes_valuesstring[]

Combine with attributes_keys to include customers with match on attribute values

since_datetimestring date-time

lookup customers that has been added or modified since an ISO timestamp. NOTE: this parameter can't be combined with starting_after parameter. Retrieve next page by updating since_datetime to the latest updated_at value found in the result

limitinteger

A limit on the number of objects to be returned. Limit can range between 1 and 100 items, and the default is 10 items.

starting_afterstring

cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, end the result contains paging_token=pt1, your subsequent call can include starting_after=pt1 in order to fetch the next page of the list.

totalboolean

include total-count header in the response

Response

Customer collection

metadataobject

A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format. You can unset an individual key by setting its value to null and then saving. To clear all keys, set metadata to null

idstring uuid

An UUID that uniquely identifies the resource

created_atstring date-time

The date-time when the resource was created

created_bystring

The ID of the user/client created the resource

updated_atstring date-time

The date-time when the resource was last updated

deleted_bystring

The ID of the user/client created the resource

deleted_atstring date-time
first_namestring nullable
last_namestring nullable
emailstring nullable

customer email, case insensitive duplication control prevents multiple user with same type to have equal email

customer@example.com is equal to CUStOMer@EXAMPLE.com

phone_numberstring ^\+?[1-9]\d{1,14}$ nullable

A phone number in E.164 number formatting.

attributesobject

Custom attributes

statusstring nullable

Status of the customer

favorite_storestring nullable

customer favorite store

type'customer' | 'company' | 'contact' | 'employee' | 'other' required

Describe type of a user.

  • company property is required when using the type company
  • company property is only supported for users with type other or company
  • Creating or updating user with type employee or other requires admin:customers or write:customers scope.
  • User login is only available for users with type customer or company
genderstring nullable
date_of_birthstring date nullable
customer_idstring required

The customer id you have defined for the customer. (must not have trailing or leading spaces) An auto-generated customer_id will be created if no customer_id is provided.

Example response

[
  {
    "metadata": {
      "dob_year": 1985
    },
    "created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
    "deleted_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
    "first_name": "John",
    "last_name": "Doe",
    "email": "customer@example.com",
    "phone_number": "+4799999999",
    "enrolled_by": {
      "type": "url",
      "value": "https://facebook.com"
    },
    "marketing_consent": {
      "sms": {
        "consent": true,
        "updated_at": "2018-01-12T13:42:00Z"
      },
      "email": {
        "consent": true,
        "updated_at": "2018-01-12T13:42:00Z"
      }
    },
    "addresses": [
      {
        "address_line": "Sommerkroveien 34",
        "address_line_2": "PB 123",
        "postal_code": "0349",
        "postal_place": "Oslo",
        "country": "NO",
        "latitude": 59.942112,
        "longitude": 10.716991,
        "comment": "5th floor, use doorbell."
      }
    ],
    "company": {
      "organization_number": "123456789MVA",
      "bussiness_name": "TKP tech AS",
      "department": "sales department",
      "industry": "computer industry"
    },
    "gender": "male",
    "date_of_birth": "1990-09-20"
  }
]