younifyd
Menu

List Locations

List Locations

GET/v1/locations

Use it in a workflow

  1. Add a step and choose the Voucherify connector.
  2. Pick the List Locations action (under Locations).
  3. Fill in the fields below, then reference the result from later steps as {{listLocations.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.

orderstring

Sorts 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_at

filtersobject

Filter the locations using one of the available filters.

nameobject1 fields
created_atobject1 fields

Timestamp representing the date and time when the location was created. The value is shown in the ISO 8601 format.

updated_atobject1 fields

Timestamp representing the date and time when the location was updated. The value is shown in the ISO 8601 format.

end_datestring (date-time)

A filter on the list based on the end date. This will filter out all locations whose end date falls before the specified date and time. A date value must be presented in the ISO 8601 format (`2016-11-16T14:14:31Z` or `2016-11-16`).

Response

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

objectstring

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

Default "list"

data_refstring

Identifies the name of the attribute that contains the array of metadata schema objects.

Default "data"

dataarray<object>

Array of location objects.

idstring

Unique location ID, assigned by the Voucherify API.

objectstring

The type of the object represented by JSON. This object stores information about a `location`.

One oflocationDefault "location"

namestring

Location name.

shapeobject

Defines the shape and boundaries of the location.

created_atstring (date-time)

Timestamp representing the date and time when the location was created. The value is shown in the ISO 8601 format.

updated_atstring (date-time)

Timestamp representing the date and time when the location was updated. The value is shown in the ISO 8601 format.

totalinteger

Total number of locations.

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": "data",
  "data": [
    {
      "id": "loc_NoMGXmHO9OUs7iz9mGWpamma",
      "object": "location",
      "name": "string",
      "shape": {},
      "created_at": "2022-02-14T15:12:06.817Z",
      "updated_at": "2022-03-14T15:12:06.817Z"
    }
  ],
  "total": 0,
  "has_more": false
}

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