---
title: "aid_customers_get"
method: GET
path: "/accounts/{aid}/customers/users"
tags: ["users"]
---

# aid_customers_get

`GET /accounts/{aid}/customers/users`

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

## Path parameters

- `aid` string, ^[PT]{1}\d{8}$, required

## Query parameters

- `token_value` string
- `token_type` string
- `email` string
- `phone_number` string
- `type` 'customer' | 'company' | 'contact' | 'employee' | 'other' | 'any'
- `search` string
- `tag_id` string
- `include_deleted` boolean
- `attributes_keys` string[]
- `attributes_values` string[]
- `since_datetime` string, date-time
- `limit` integer
- `starting_after` string
- `total` boolean

## Response `200`

Customer collection

- CustomerResponse[]
  - `metadata` object — 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
  - `id` string, uuid — An UUID that uniquely identifies the resource
  - `created_at` string, date-time — The date-time when the resource was created
  - `created_by` string — The ID of the user/client created the resource
  - `updated_at` string, date-time — The date-time when the resource was last updated
  - `deleted_by` string — The ID of the user/client created the resource
  - `deleted_at` string, date-time
  - `first_name` string, nullable
  - `last_name` string, nullable
  - `email` string, 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_number` string, ^\+?[1-9]\d{1,14}$, nullable — A phone number in E.164 number formatting.
  - `attributes` object — Custom attributes
  - `status` string, nullable — Status of the customer
  - `favorite_store` string, nullable — customer favorite store
  - `enrolled_by` object — The source that recruited the customer
    - `type` string — Enrollment type, e.g. `url`, `store`, `qr_code`, any string
    - `value` string, nullable, required
  - `marketing_consent` object — Customers consent for marketing in different channels
    - `sms` UserConsent
      - `consent` boolean
      - `updated_at` string, date-time — The date-time when the resource was last updated:
    - `email` UserConsent
      - `consent` boolean
      - `updated_at` string, date-time — The date-time when the resource was last updated:
  - `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`
  - `addresses` CustomerAddress[]
    - `address_line` string, required
    - `address_line_2` string
    - `postal_code` string
    - `postal_place` string, required
    - `country` string, iso-3166-1, required — ISO 3166-1 country code
    - `latitude` number
    - `longitude` number
    - `type` 'custom' | 'home' | 'other' | 'work' — The address type
    - `custom_type` string — If the address `type` is `custom`, this property contains the custom value
    - `comment` string — Comment about the address
  - `term` CustomerTerm
    - `id` string, uuid
    - `accepted_at` string, date-time
  - `company` object — Company details, supported when type is Company
    - `organization_number` string — Companys identification number
    - `bussiness_name` string, required
    - `department` string — companys department
    - `industry` string
    - `website` string
    - `number_of_employees` string
  - `gender` string, nullable
  - `date_of_birth` string, date, nullable
  - `contact_for` object[] — The users that it is a contact for, supported when type is `contact`
    - `customer_id` string, required — The customer id that it is a contact for
  - `customer_id` string, 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.

## Other responses

- `default` — Unexpected error

---

[API](https://skmtc.net/dintero/apis/account-management-api.md) · [All operations](https://skmtc.net/dintero/apis/account-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dintero/account-management-api/revisions/9b83a4199008/schema)
