**Version: 202201**

# Customer List

**GET** `/openapi/2022-01/customers`

Retrieve a list of all customers with pagination.

## Request

**Query Parameters**

- `ids` string

  ID list, separate with comma, e.g. `701670d5-4afd-40b5-8d4f-7e0e55683849,da1bb9af-2489-40df-a15e-f54abdf7fd86`
- `limit` int32

  Record count in every page, maximum: `250`

  **Default value:** `10`
- `page` int32

  Page number

  **Default value:** `1`
- `created_at_min` string

  Filter customer created at after date, e.g. `2016-01-18T23:41:00Z`
- `created_at_max` string

  Filter customer created_at before date, e.g. `2016-01-18T23:41:00Z`
- `updated_at_min` string

  Filter customer last updated at after, e.g. `2016-01-18T23:41:00Z`
- `updated_at_max` string

  Filter customer last updated at before date, e.g. `2016-01-18T23:41:00Z`
- `email` string

  Filter by email, e.g. `abc@def.com`
- `contact` string

  Filter by contact,e.g., `abc@def.com`

## Responses

**200 | 400 | 406**

200

**application/json**

**Schema | Example | Result**

**Schema**

- `customers` object[]

  *   Array [

  - `id` string

    **Example:** `2dd957e3-2051-4cdf-8584-9c0046b4d1ae`
  - `first_name` string

    **Example:** `ryan`
  - `last_name` string

    **Example:** `zhang`
  - `name` string

    **Example:** `ryan zhang`
  - `email` string

    **Example:** `test@shoplazza.com`
  - `phone` string

    **Example:** `+8615014471143`
  - `phone_area_code`
  - `contact_type` string

    **Example:** `email`
  - `accepts_marketing` boolean

    **Default value:** `true`

    **Example:** `true`
  - `source`
  - `free_tax` boolean

    **Default value:** `true`

    **Example:** `false`
  - `registered` boolean

    **Default value:** `true`

    **Example:** `false`
  - `orders_count` integer

    **Default value:** `0`

    **Example:** `0`
  - `last_order_at`
  - `total_spent` string

    **Example:** `0.00`
  - `tags` string

    **Example:** `New Customer`
  - `created_at` string

    **Example:** `2024-04-17T11:10:33Z`
  - `updated_at` string

    **Example:** `2024-04-17T11:10:33Z`
  - `subscribed_flag` integer

    **Default value:** `0`

    **Example:** `5`
  - `sms_subscribed_flag` integer

    **Default value:** `0`

    **Example:** `5`
  - `accepts_sms_marketing` boolean

    **Default value:** `true`

    **Example:** `true`
  - `default_address` object

    - `id` string

      **Example:** `9ffa8dc0-25b8-4424-832e-bab46fcfeb20`
    - `customer_id` string

      **Example:** `2dd957e3-2051-4cdf-8584-9c0046b4d1ae`
    - `first_name` string

      **Example:** `test`
    - `last_name` string

      **Example:** `test`
    - `company` string

      **Example:**
    - `city` string

      **Example:** `深圳`
    - `province` string

      **Example:**
    - `country` string

      **Example:** `Aland lslands`
    - `zip` string

      **Example:** `515300`
    - `province_code` string

      **Example:**
    - `country_code` string

      **Example:** `AX`
    - `gender` string

      **Example:**
    - `phone` string

      **Example:** `+86 150 1447 1143`
    - `phone_area_code`
    - `area` string

      **Example:**
    - `email` string

      **Example:** `test@shoplazza.com`
    - `name` string

      **Example:** `test test`
    - `address1` string

      **Example:** `6 三聖街`
    - `address2` string

      **Example:** `1111`
    - `country_name` string

      **Example:** `Aland lslands`
    - `default` boolean

      **Default value:** `true`

      **Example:** `true`
  - `addresses` object[]

    *   Array [

    - `id` string

      **Example:** `9ffa8dc0-25b8-4424-832e-bab46fcfeb20`
    - `customer_id` string

      **Example:** `2dd957e3-2051-4cdf-8584-9c0046b4d1ae`
    - `first_name` string

      **Example:** `test`
    - `last_name` string

      **Example:** `test`
    - `company` string

      **Example:**
    - `city` string

      **Example:** `深圳`
    - `province` string

      **Example:**
    - `country` string

      **Example:** `Aland lslands`
    - `zip` string

      **Example:** `515300`
    - `province_code` string

      **Example:**
    - `country_code` string

      **Example:** `AX`
    - `gender` string

      **Example:**
    - `phone` string

      **Example:** `+86 150 1447 1143`
    - `phone_area_code`
    - `area` string

      **Example:**
    - `email` string

      **Example:** `test@shoplazza.com`
    - `name` string

      **Example:** `test test`
    - `address1` string

      **Example:** `6 三聖街`
    - `address2` string

      **Example:** `1111`
    - `country_name` string

      **Example:** `Aland lslands`
    - `default` boolean

      **Default value:** `true`

      **Example:** `true`
    *   ]
  *   ]

```json
{
  "customers": [
    {
      "id": "2dd957e3-2051-4cdf-8584-9c0046b4d1ae",
      "first_name": "ryan",
      "last_name": "zhang",
      "name": "ryan zhang",
      "email": "test@shoplazza.com",
      "phone": "+8615014471143",
      "phone_area_code": {},
      "contact_type": "email",
      "accepts_marketing": true,
      "source": {},
      "free_tax": false,
      "registered": false,
      "orders_count": 0,
      "last_order_at": {},
      "total_spent": "0.00",
      "tags": "New Customer",
      "created_at": "2024-04-17T11:10:33Z",
      "updated_at": "2024-04-17T11:10:33Z",
      "subscribed_flag": 5,
      "sms_subscribed_flag": 5,
      "accepts_sms_marketing": true,
      "default_address": {
        "id": "9ffa8dc0-25b8-4424-832e-bab46fcfeb20",
        "customer_id": "2dd957e3-2051-4cdf-8584-9c0046b4d1ae",
        "first_name": "test",
        "last_name": "test",
        "company": "",
        "city": "深圳",
        "province": "",
        "country": "Aland lslands",
        "zip": "515300",
        "province_code": "",
        "country_code": "AX",
        "gender": "",
        "phone": "+86 150 1447 1143",
        "phone_area_code": {},
        "area": "",
        "email": "test@shoplazza.com",
        "name": "test test",
        "address1": "6 三聖街",
        "address2": "1111",
        "country_name": "Aland lslands",
        "default": true
      },
      "addresses": [
        {
          "id": "9ffa8dc0-25b8-4424-832e-bab46fcfeb20",
          "customer_id": "2dd957e3-2051-4cdf-8584-9c0046b4d1ae",
          "first_name": "test",
          "last_name": "test",
          "company": "",
          "city": "深圳",
          "province": "",
          "country": "Aland lslands",
          "zip": "515300",
          "province_code": "",
          "country_code": "AX",
          "gender": "",
          "phone": "+86 150 1447 1143",
          "phone_area_code": {},
          "area": "",
          "email": "test@shoplazza.com",
          "name": "test test",
          "address1": "6 三聖街",
          "address2": "1111",
          "country_name": "Aland lslands",
          "default": true
        }
      ]
    }
  ]
}
```

```json
{
  "customers": [
    {
      "id": "2dd957e3-2051-4cdf-8584-9c0046b4d1ae",
      "first_name": "ryan",
      "last_name": "zhang",
      "name": "ryan zhang",
      "email": "test@shoplazza.com",
      "phone": "+8615014471143",
      "phone_area_code": null,
      "contact_type": "email",
      "accepts_marketing": true,
      "source": null,
      "free_tax": false,
      "registered": false,
      "orders_count": 0,
      "last_order_at": null,
      "total_spent": "0.00",
      "tags": "New Customer",
      "created_at": "2024-04-17T11:10:33Z",
      "updated_at": "2024-04-17T11:10:33Z",
      "subscribed_flag": 5,
      "sms_subscribed_flag": 5,
      "accepts_sms_marketing": true,
      "default_address": {
        "id": "9ffa8dc0-25b8-4424-832e-bab46fcfeb20",
        "customer_id": "2dd957e3-2051-4cdf-8584-9c0046b4d1ae",
        "first_name": "test",
        "last_name": "test",
        "company": "",
        "city": "深圳",
        "province": "",
        "country": "Aland lslands",
        "zip": "515300",
        "province_code": "",
        "country_code": "AX",
        "gender": "",
        "phone": "+86 150 1447 1143",
        "phone_area_code": null,
        "area": "",
        "email": "test@shoplazza.com",
        "name": "test test",
        "address1": "6 三聖街",
        "address2": "1111",
        "country_name": "Aland lslands",
        "default": true
      },
      "addresses": [
        {
          "id": "9ffa8dc0-25b8-4424-832e-bab46fcfeb20",
          "customer_id": "2dd957e3-2051-4cdf-8584-9c0046b4d1ae",
          "first_name": "test",
          "last_name": "test",
          "company": "",
          "city": "深圳",
          "province": "",
          "country": "Aland lslands",
          "zip": "515300",
          "province_code": "",
          "country_code": "AX",
          "gender": "",
          "phone": "+86 150 1447 1143",
          "phone_area_code": null,
          "area": "",
          "email": "test@shoplazza.com",
          "name": "test test",
          "address1": "6 三聖街",
          "address2": "1111",
          "country_name": "Aland lslands",
          "default": true
        }
      ]
    }
  ]
}
```

400

**application/json**

**Schema | Example | Result**

**Schema**

- `errors` string[]

```json
{
  "errors": [
    "Exceeds maximum limit of 250"
  ]
}
```

```json
{
  "errors": [
    "Exceeds maximum limit of 250"
  ]
}
```

406

**application/json**

**Schema | Example | Result**

**Schema**

- `errors` string[]

```json
{
  "errors": [
    "Created at max time format error"
  ]
}
```

```json
{
  "errors": [
    "Created at max time format error",
    "Updated at min time format error",
    "Updated at max time format error"
  ]
}
```
