younifyd
Menu

Get customers for given filters

Get customers for given filters

GET/shops/{shopKey}/countries/{countryCode}/customers

Use it in a workflow

  1. Add a step and choose the SCAYLE Admin connector.
  2. Pick the Get customers for given filters action (under Customers).
  3. Fill in the fields below, then reference the result from later steps as {{getCustomersForGivenFilters.response.data}}.

Request

Path parameters

shopKeystringrequired

The shop key.

countryCodestringrequired

The shop country code; use shop country ID instead of country code when a country is ambiguous within a shop.

Query parameters

witharray<string>

Comma-separated list of additional properties that should be included in the response.

filters[id]array<integer>

Comma-separated list of IDs of entities that should be used for filtering.

filters[minId]integer

Minimum (inclusive) ID of entities that should be returned.

filters[maxId]integer

Maximum (inclusive) ID of entities that should be returned.

filters[minCreatedAt]string (date-time)

Minimum (inclusive) creation date of entities that should be returned.

filters[maxCreatedAt]string (date-time)

Maximum (inclusive) creation date of entities that should be returned.

filters[minUpdatedAt]string (date-time)

Minimum (inclusive) modification date of entities that should be returned.

filters[maxUpdatedAt]string (date-time)

Maximum (inclusive) modification date of entities that should be returned.

filters[billingAddressCountryCode]string

Only returns customers with the given billingAddress country code (ISO 3166-1 alpha-3).

filters[shippingAddressCountryCode]string

Only returns customers with the given shippingAddress country code (ISO 3166-1 alpha-3).

filters[group]array<string>

Comma-separated list of customer groups that should be used for filtering.

filters[isActive]boolean

Pass true to get only active customer, pass false to get the opposite.

filters[referenceKey]array<string>

Comma-separated list of reference keys that should be used for filtering.

filters[lastName]string

Last name of the customer that should be used for filtering. When filtering the customer by name both firstName and lastName should be specified.

filters[firstName]string

First name of the customer that should be used for filtering. When filtering the customer by name both firstName and lastName should be specified.

filters[email]string

Email of the customer that should be used for filtering.

filters[publicKey]string

Public key of the customer that should be used for filtering.

filters[dateOfBirth]string

Date of birth of the customer, in YYYY-MM-DD format, used for filtering.

filters[street]string

Street address of the customer that should be used for filtering.

filters[zipCode]string

Zip code address of the customer that should be used for filtering.

filters[city]string

City address of the customer that should be used for filtering.

filters[isGuest]boolean

True for guest customers, false for non guest customers. Requires any of the following filters to be set: 'firstName', 'lastName', 'email', 'zipCode', 'city'

filters[includeAnonymized]boolean

Set to true to additionally include anonymous customers. Should be used with additional filters to narrow scope of results.

filters[externalUserId]string

The customer's user id at an identity provider

filters[providerCode]string

The code of the provider via which a customer is registered. Required if filter 'externalUserId' is set.

sortstring

Sort by the provided column.

One ofidappIdbirthDatefirstNamelastNamelastInvoiceDatelastLoginDatelockedUntilDatepasswordResetRequestedAtcreatedAtupdatedAtDefault "id"

sortDirstring

Sort ascending or descending

One ofascdescDefault "asc"

limitinteger

Maximum number of entities in the result. When fetching entities with children, the limit always applies to the amount of parent entities (max. 1000).

Default 100

cursorstring

Valid cursor used for pagination.

Response

Returns 200 with an object. Read it in later steps with {{getCustomersForGivenFilters.response.data.<field>}}.

entitiesarray<object>
idinteger

The ID of the customer

referenceKeystring

External reference set by the client to integrate a third party system. It can be set to NULL otherwise

firstNamestring

First name of the customer

lastNamestring

Last name of the customer

genderstring

Gender of the customer mentioned as per defined ENUM as "m" , "f", "d", "n"

One offmdn

birthDatestring

Date of birth of the customer in YYYY-MM-DD format. It can be set to NULL otherwise

emailstring

email address of the customer

phoneoneOf
publicKeystring

Public reference set by the client to display to customers in account areas and transactional emails.

titlestring

User defined title. It can be set to NULL otherwise

typestring

The type of the customer. Possible values: personal, retail, organization, family.

groupsarray<string>

Group to which the customer belongs to

identitiesarray<object>2 fields

A list of Identity Providers (IDP)

statusobject2 fields
companyobject2 fields
addressesarray<object>15 fields

Customers address (es)

legacyCustomDataany

Custom data added to the customers (legacy feature)

hasPasswordboolean

Defines if the customer has a password set.

createdAtstring (date-time)

Timestamp when the customer is created

updatedAtstring (date-time)

Timestamp when the customer is updated

cursorobject
nextstring

The cursor pointing to the next page. If null there is no next page available.

json
{
  "entities": [
    {
      "id": 0,
      "referenceKey": "string",
      "firstName": "string",
      "lastName": "string",
      "gender": "f",
      "birthDate": "string",
      "email": "string",
      "phone": null,
      "publicKey": "string",
      "title": "string",
      "type": "string",
      "groups": [
        "string"
      ]
    }
  ],
  "cursor": {
    "next": "MQ=="
  }
}

Need more? See the SCAYLE Admin guide for connection setup and behaviour shared by every action.