Query products

To get the list of products in the product catalog with their properties, use the products query.

query {
  products(first: 2) {
    nodes {
      attributes {
        name
        value
        type
      }
      metadata {
        tracking {
          createdBy
          createdAt
          lastModifiedBy
          lastModifiedAt
        }
      }
    }
  }
}
{
  "data": {
    "products": {
      "nodes": [
        {
          "attributes": [
            {
              "name": "productId",
              "value": "AC-PNT-WHT-SM",
              "type": "TEXT"
            },
            {
              "name": "discount",
              "value": 6,
              "type": "NUMBER"
            },
            {
              "name": "imageUrls",
              "value": [
                "https://example.com/photos/products/awesome-colors-int-paint.png"
              ],
              "type": "ARRAY"
            },
            {
              "name": "productName",
              "value": "AWESOME COLORS Interior Paint Satin Finish 32 Fl Oz",
              "type": "TEXT"
            },
            {
              "name": "productUrls",
              "value": [
                "https://www.example.com/painting-and-decorating/paint/awesome-colors-interior-satin-paint",
                "https://www.example.com/painting-and-decorating/must-haves/awesome-colors-interior-satin-paint"
              ],
              "type": "ARRAY"
            },
            {
              "name": "currency",
              "value": "EUR",
              "type": "TEXT"
            },
            {
              "name": "unitPrice",
              "value": 39.99,
              "type": "NUMBER"
            }
          ],
          "metadata": {
            "tracking": {
              "createdBy": "signal-processor",
              "createdAt": "2025-08-01T07:36:26.891Z",
              "lastModifiedBy": "signal-processor",
              "lastModifiedAt": "2025-08-01T07:36:26.891Z"
            }
          }
        },
        {
          "attributes": [
            {
              "name": "productId",
              "value": "AC-DBL-BRSH-6",
              "type": "TEXT"
            },
            {
              "name": "currency",
              "value": "EUR",
              "type": "TEXT"
            },
            {
              "name": "discount",
              "value": 3.22,
              "type": "NUMBER"
            },
            {
              "name": "imageUrls",
              "value": [
                "https://example.com/photos/products/awesome-colors-brush21.png"
              ],
              "type": "ARRAY"
            },
            {
              "name": "productName",
              "value": "AWESOME COLORS Double Thick Chip Paint Brush",
              "type": "TEXT"
            },
            {
              "name": "productUrls",
              "value": [
                "https://www.example.com/painting-and-decorating/tools/awesome-colors-double-brush",
                "https://www.example.com/painting-and-decorating/must-haves/awesome-colors-double-brush"
              ],
              "type": "ARRAY"
            }
          ],
          "metadata": {
            "tracking": {
              "createdBy": "signal-processor",
              "createdAt": "2025-06-04T10:42:03.605Z",
              "lastModifiedBy": "signal-processor",
              "lastModifiedAt": "2025-06-04T10:42:14.707Z"
            }
          }
        }
      ]
    }
  }
}

Running the query

If you haven't used our API before, see Using the Connect API for instructions. It explains how to authenticate your calls and suggests some tools for testing.

Query structure

Arguments for customizing response structure

You can customize response structure using arguments. See examples below.

#***** Get the first three products and sort the list by the product name ****#
#*****************************************************************************#

query {
  products(first: 3, orderBy: { field: "productName", sort: ASC }) {
    nodes {
      attributes {
        name
        value
        type
      }
    }
  }
}
#******************** Get specified attributes for products ******************#
#*****************************************************************************#

query {
  products(
    selectByName: ["productId", "productName", "unitPrice", "currency"]
  ) {
    nodes {
      attributes {
        name
        value
        type
      }
    }
  }
}

Here is the summary of available attributes. All of them are optional.

ArgumentValuesDefinition
first/lastIntegerIf you don't need the full list of products, you can request a certain number of products from the beginning (or from the end) of the catalog.
orderByObjectLets you sort products in the response.
selectByNameArray of stringsThe names of product attributes you want to get in the response. If you skip the argument, all product attributes will be returned.

Fields supported by the orderBy object

FieldValuesDefinition
fieldStringThe name of the product attribute to use for sorting
sortEnumeration. Valid values: ASC and DESCThe sorting order to use for products in the response

Arguments for filtering products

Use the filter argument to filter products based on their attributes. The following product attributes are supported:

  • category (string)
  • productId (string)
  • sku (string)
  • brandName (string)
  • productName (string)
  • price (number)
  • unitPrice (number)
  • lastModifiedAt (date)

You need a separate object for each filtering condition. The object requires the field field and an operator. Below are the operators that you can use depending on the format of the product attribute (string, number or date).

Filtering products based on string attributes

#************************ Get products without an SKU *****************************#
#**********************************************************************************#

query {
  products(filter: { field: "sku", blank: true }) {
    nodes {
      attributes {
        name
        value
        type
      }
    }
  }
}
#**************** Get a product with a specified ID ****************#
#*******************************************************************#

query {
  products(
    filter: [
      {field: "productId", eq: "AC-DBL-BAA-6"}
    ]
  ) {
    nodes {
      attributes {
        name
        value
        type
      }
    }
  }
}
#*************** Get products from the following categories **********************#
#**********************************************************************************#

query {
  products(
    filter: {
      field: "category"
      in: ["Footwear/Sandals", "Footwear/Loafers", "Footwear/Espadrille"]
    }
  ) {
    nodes {
      attributes {
        name
        value
        type
      }
    }
  }
}
#*************** Get products which names start with "AWESOME COLORS" *************#
#**********************************************************************************#

query {
  products(
    filter: [
      {field: "productName", startsWith: "AWESOME COLORS"}
    ]
  ) {
    nodes {
      attributes {
        name
        value
        type
      }
    }
  }
}

Here is the summary of available operators.

OperatorValuesDefinition
blankBooleanThe value is/isn't blank.

⚠️ Empty values and null are counted as blank.
contains/ ncontainsStringThe value contains/doesn't contain a given string.
eq /neqStringThe value equals/doesn't equal a given string.
in/ninArray of stringsThe value is/isn't one of given strings.
startsWith/ endsWithStringThe value starts/ends with a given string.

Filtering products based on numeric attributes

#***************** Get products that cost from 100 to 200  ***********************#
#*********************************************************************************#

query {
  products(filter: { field: "unitPrice", between: { from: 100, to: 200 } }) {
    nodes {
      attributes {
        name
        value
        type
      }
    }
  }
}
#******************* Get products with no unit price specified *******************#
#*********************************************************************************#

query {
  products(
    filter: [
      {field: "unitPrice", blank: true}
    ]
  ) {
    nodes {
      attributes {
        name
        value
        type
      }
    }
  }
}
#******************** Get products that cost exactly 1200.39 *********************#
#*********************************************************************************#

query {
  products(filter: { field: "unitPrice", eq: 1200.39 }) {
    nodes {
      attributes {
        name
        value
        type
      }
    }
  }
}
#*************************** Get products that cost over 200  ********************#
#*********************************************************************************#

query {
  products(filter: { field: "unitPrice", gt: 200 }) {
    nodes {
      attributes {
        name
        value
        type
      }
    }
  }
}
#*************** Get products that cost 4.99, 3.36 or 15.45  *****************#
#*****************************************************************************#

query {
  products(filter: { field: "unitPrice", in: [4.99, 3.36, 15.45] }) {
    nodes {
      attributes {
        name
        value
        type
      }
    }
  }
}
#******************** Get products that cost 100 or less *********************#
#*****************************************************************************#

query {
  products(filter: { field: "unitPrice", lte: 100 }) {
    nodes {
      attributes {
        name
        value
        type
      }
    }
  }
}

Here is the summary of available operators.

OperatorValuesDefinition
betweenObjectThe value is between two given numbers, including these numbers. For example, if we set a range from 40 to 43, the following numbers will be included: 40, 41, 42 and 43.
blankBooleanThe value is/isn't blank.

⚠️ Empty values and null are counted as blank.
eq/ neqNumberThe value equals/doesn't equal a given number.
in/ ninNumberThe value equals/doesn't equal one of given numbers.
lt/ gtNumberThe value is less/greater than a given number.
lte/ gteNumberThe value is less/greater than a given number or equals the number.

Fields required by the between object

FieldValuesDefinition
fromNumberThe minimum value to match
toNumberThe maximum value to match

Filtering products based on date attributes

All dates you submit must be in the combined date and time representation format (ISO 8601). The time portion will be ignored but the system, but it's still required. Example: 2025-08-03T00:00:00.000Z (August 3, 2025).

#*********** Get products that were last modified before March 20, 2025 ***********#
#**********************************************************************************#

query {
  products(
    filter: {
      field: "lastModifiedAt"
      before: "2025-03-20T00:00:00.000Z"
    }
  ) {
    nodes {
      attributes {
        name
        value
        type
      }
    }
  }
}
#** Get products that were last modified between March 7 and March 17, 2025 **#
#*****************************************************************************#

query {
  products (
    filter: {
      field: "lastModifiedAt"
      between: {
        from: "2025-03-07T00:00:00.000Z"
        to: "2025-03-17T00:00:00.000Z"
      } 
    }
  ){
    nodes {
      attributes {
        name
        value
        type
      }
    }
  }
}
#***** Get products that were modified on August 5, 2025 ***********#
#*******************************************************************#

query {
  products(
    filter: { field: "lastModifiedAt", eq: "2025-08-05T00:00:00.000Z" }
  ) {
    nodes {
      attributes {
        name
        value
        type
      }
    }
  }
}
#****************** Get products that were modified today *************************#
#**********************************************************************************#

query {
  products(filter: { field: "lastModifiedAt", isToday: true }) {
    nodes {
      attributes {
        name
        value
        type
      }
    }
  }
}

Here is the summary of available operators.

OperatorValuesDefinition
after / before StringThe value is after/before a given date.
between ObjectThe value is between two dates.

⚠️ The date range is inclusive (products matching the start and end dates are included in the response).
eq/ neq StringThe value equals/doesn't equal a given value.
IsLastMonthBoolean The value is in the last year from the current date.
IsLastWeekBooleanThe value is in the last week from the current date.
IsLastYearBooleanThe value is in the last year from the current date.
isTodayBooleanThe value is the current date.

Fields required by the between object

FieldValuesDefinition
fromStringThe start date of the period
toStringThe end date of the period

Fields

The products response has the nodes object at the root level. These are the fields nested into nodes.

FieldValuesRequiredDescription
attributesObjectRequiredSee nested fields.

You'll get a separate object for each attribute in the response.
metadataObjectOptionalSee nested fields.

Fields supported by objects in the attributes array

Field ValuesRequired?Definition
nameStringRequiredThe name of a product attribute. Keep in mind that for the predefined attributes this is an internal name, not the user-friendly label displayed in the GUI.
valueDepends on the type of attributeOptional The value set to the product attribute
typeOne of the following values:

- TEXT
- NUMBER
- BOOLEAN
- DATE
- ARRAY
- JSON
Optional The data format of the product attribute

Fields supported by the metadata object. All of them are optional.

FieldNested fieldValuesDescription
dataSetIdStringThe ID of your product catalog
trackingcreatedByStringThe login ID of the user who added the product to Connect. If a product originates from behavioral data, you'll get the signal-processor value.
createdAtA date-time string at UTC, such as 2025-02-03T09:54:33ZShows when the product was added to Connect.
lastModifiedByStringThe login name of the user who last modified the product. If a product originates from behavioral data, you'll get the signal-processor value.
lastModifiedAtA date-time string at UTC, such as 2025-02-03T09:54:33ZShows when the product was modified last time.