younifyd
Menu

List Locations

List Locations

GET/inventories/locations

Use it in a workflow

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

Request

Query parameters

page[offset]integer (int)

The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](https://elasticpath.dev/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.

page[limit]integer (int)

The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](https://elasticpath.dev/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.

filterstring (string)

Some Inventories API endpoints support filtering. For the general syntax, see [**Filtering**](/guides/Getting-Started/filtering), but you must go to a specific endpoint to understand the attributes and operators an endpoint supports.

sortstring

Only supported value is `location`. When specified, the results are sorted in ascending order based on the value of the field. For `location`, this means ascending distance from the supplied geolocation. For more information, see [Sorting](/guides/Getting-Started/sorting). For location sorting, `Ep-Geolocation` header must be provided as well.

One oflocation

Headers

Ep-Geolocationstring

Latitude, Longitude representing current location

Response

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

dataarray<object>
idstringrequired

The unique identifier.

typestringrequired

One ofinventory_location

attributesobjectrequired6 fields
metaobject1 fields
linksobject
json
{
  "data": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "type": "inventory_location",
      "attributes": {
        "name": "Milton Keynes Warehouse",
        "slug": "milton-keynes-warehouse",
        "external_ref": "mk-stock-warehouse-walnut-tree",
        "description": "Southern dispatch location for all inventory",
        "address": [
          "string"
        ],
        "geolocation": {
          "lat": 51.477928,
          "lon": -0.001545
        }
      },
      "meta": {
        "timestamps": {
          "created_at": "2017-01-10T11:41:19.244842Z",
          "updated_at": "2017-01-10T11:41:19.244842Z"
        }
      }
    }
  ],
  "links": {}
}

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

Was this page helpful?