younifyd
Menu

Get Carts

Get Carts

GET/v2/carts

Use it in a workflow

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

Request

Query parameters

includearray<string>

A comma-separated list of resources to include. See [Characteristics of Include Parameter](/guides/Getting-Started/includes#characteristics-of-include-parameter).

page[limit]integer

The maximum number of records per page.

Default 20

page[offset]integer

The number of records to offset the results by.

Default 0

filterstring

Filter expression for searching carts. For more information about filtering, see [Filtering](/guides/Getting-Started/filtering). :::note Filtering is only supported when using **client credentials** (admin) authentication. When using a **customer token** (`X-Moltin-Customer-Token`) or **account token** (`EP-Account-Management-Authentication-Token`), the `filter` parameter is ignored and all carts associated with the customer or account are returned. ::: **Supported Fields:** - `account_ids`: Filter carts by associated account ID (UUID format) - `name`: Filter carts by cart name (case-insensitive) **Supported Operators:** - `contains(field,value)`: Contains value in array field - `ilike(field,value)`: Case-insensitive string matching **Examples:** - `contains(account_ids,"c24e5698-3b54-491b-9225-559c7a9cf2b2")` - Find carts associated with a specific account - `ilike(name,"Shopping Cart")` - Find carts with name matching "Shopping Cart" (case-insensitive) - `ilike(name,"*cart*")` - Find carts with names containing "cart" (wildcard search) **Combining Filters:** You can combine multiple filters using the `:`, and `|` operator for and and or respectively: - `contains(account_ids,"abc123"):ilike(name,"Holiday Cart")` - Find carts matching both conditions - `contains(account_ids,"abc123")|ilike(name,"Holiday Cart")` - Find carts matching either condition.

Headers

EP-Account-Management-Authentication-Tokenstring

An Account Management Authentication token to access a specific account's carts.

X-Moltin-Customer-Tokenstring

A customer token to access a specific customer's carts.

Response

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

dataarray<any>
linksobject
currentstring

Always the current page.

firststring

Always the first page.

laststring

If there is only one page, it is `null`.

nextstring

If there is only one page, it is `null`.

prevstring

if the user is on the first page, it is `null`.

metaobject
pageobject4 fields
resultsobject1 fields
json
{
  "data": [
    null
  ],
  "links": {
    "current": "string",
    "first": "string",
    "last": "string",
    "next": "string",
    "prev": "string"
  },
  "meta": {
    "page": {
      "current": 0,
      "limit": 0,
      "offset": 0,
      "total": 0
    },
    "results": {
      "total": 0
    }
  }
}

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