younifyd
Menu

List Customers

List Customers

GET/v1/customers

Use it in a workflow

  1. Add a step and choose the Voucherify connector.
  2. Pick the List Customers action (under Customers).
  3. Fill in the fields below, then reference the result from later steps as {{listCustomers.response.data}}.

Request

Query parameters

limitinteger

Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.

pageinteger

Which page of results to return. The lowest value is `1`, the highest value is `99`.

emailstring

Limit the customers to the ones that have this specific email address.

citystring

Limit the customers to the ones that are located in the specified city.

namestring

Filter customers by the name property.

segment_idstring

Filter customers by the segment ID. Warning: Passing additional query parameter filters that are in conflict with the segment filters may return unexpected results.

created_at[before]string (date-time)

Filter customers by date customer was created.

created_at[after]string (date-time)

Filter customers by date customer was created.

updated_at[before]string (date-time)

Filter customers by date customer was updated last time.

updated_at[after]string (date-time)

Filter customers by date customer was updated last time.

orderstring

This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order.

One ofcreated_at-created_atupdated_at-updated_atsource_id-source_id

starting_afterstring (date-time)

A cursor for pagination. This is a date-time value that defines your place in the list based on `created_at` property from the customer object. For instance, if you make a list request and receive 100 objects, ending with an object created at `2020-05-24T13:43:09.024Z`, your subsequent call can include `starting_after=2020-05-24T13:43:09.024Z` in order to fetch the next page of the list. | **Option** | **Format** | **Sorting** | |:---|:---|:---| | Return customers **before** a specific creation date | - set `starting_after` parameter to the breakpoint date | Sorting order is **descending**; the most recent dates first and least recent dates last. | | Return customers **after** a specific create or update date | - include the `order` parameter set to `created_at` or `updated_at`<br />- set `starting_after` to the breakpoint date | Sorting order is **ascending**; the least recent dates first and the most recent dates last. |

Response

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

objectstring

The type of the object represented by JSON. This object stores information about customers in a dictionary.

Default "list"

data_refstring

Identifies the name of the attribute that contains the array of customer objects.

Default "customers"

customersarray<any>

Contains array of customer objects.

totalinteger

Total number of customers.

has_moreboolean

As query results are always limited (by the limit parameter), the `has_more` flag indicates if there are more records for given filter parameters. This lets you know if you can run another request (with a different end date filter) to get more records returned in the results.

json
{
  "object": "list",
  "data_ref": "customers",
  "customers": [
    null
  ],
  "total": 0,
  "has_more": false
}

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