Customers

Search for customers

Lists customers of the authenticated store, optionally filtered and paginated. Drafts and deleted customers are excluded by default. Returns 400 for an unsupported sortField or an invalid request.

get/customers

Request

  • Base URL
    https://api.c1st.com/api
  • URL
    https://api.c1st.com/api/customers
  • Auth
    HTTP bearer

Query parameters

paginationStartinteger

Offset (in number of customers) to start from. This is usually a multiple of the paginationPageLength.

paginationPageLengthinteger

Number of customers to fetch in one page.

countboolean

If set, the total number of matching customers (ignoring pagination) is returned in count.

sortOrder-1 | 1

Sorting order. If 1, customers are retrieved in ascending order, if -1, in descending order.

customernostring

Filter customers by exact customer number

sortFieldstring

Field to sort by. Supported values are id, storeid, name, phone, address, city, zipcode, addr_country, email, vat, ean, lat, lng, country, draft, createddate, updated_at, permission_marketing, customerno and balance. Other values result in a 400 response. If omitted, the store's default customer sort is used (if configured).

allowMarketingboolean

If true, only customers with marketing permission are returned. If false, only customers without.

namestring

Search for customer name. Partial match.

emailstring

Search for customer email. Partial match.

phonenostring

Search for customer phone number. Matches the normalized (E.164) number or a partial match on the stored phone number.

eanstring

Search for customer EAN. Partial match.

barcodestring

Filter customers by exact barcode match

cvrstring

Search for customer CVR (VAT number). Partial match.

tagsstring

Customer tag IDs as a comma-separated string. Customers with any of the tags are returned. Ignored if tag is set.

taginteger

Only return customers with the given customer tag ID

idsstring

Customer IDs as a comma-separated string. Only these customers are returned.

freetextstring

Freetext search for customer, this searches in most customer properties like name, address, phone, email etc

partOfLoyaltyClubboolean

If true, only customers in the loyalty club are returned. If false, only customers not in the loyalty club.

updated_afterstring

Get all customers updated at or after the given date

Response

Ok

countinteger nullable

The total number of customers found by the query if ignoring pagination. Only present if count was specified in the query parameter.

hasMoreboolean

True if there are more customers to receive than the current pagination allowed.

Example response

{
  "content": [
    {
      "id": 1,
      "storeid": 1,
      "createddate": "2019-01-02 01:02:03",
      "name": "John Doe",
      "phone": "+4533608586",
      "phone_e164": "+4533608586",
      "country": "dk",
      "email": "johndoe@example.com",
      "barcode": "1234567890",
      "address": "Andebyvej 1",
      "city": "Odense",
      "zipcode": "5000",
      "addr_country": "dk",
      "birthdate": "1993-12-31",
      "ean": "12345678",
      "vat": "12345678",
      "customerno": "19181715",
      "economic_customernumber": 12345678,
      "balance": 123.45,
      "note": "Pays on time.",
      "tags": [
        {
          "color": "#4baf4f"
        }
      ],
      "permission_marketing": "2022-03-10 00:00:00",
      "updated_at": "2022-03-10 00:00:00",
      "deleted_at": "2022-03-10 00:00:00",
      "store": {
        "id": 1
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.