products

Arguments

ArgumentTypeRequiredDefaultDescription
skuStringNo
created_fromISODateTimeNo
created_toISODateTimeNo
updated_fromISODateTimeNo
updated_toISODateTimeNo
customer_account_idStringNo

If you are a 3PL you can specify one of your customer's account

has_kitsBooleanNo
tag[String]No

Filters products that have ANY of the specified tags (OR)

tag_not_in[String]No

Excludes products that have ANY of the specified tags; untagged products are included

analyzeBooleanNo

If true, the query will only be analyzed (cost estimated) without executing it.

Return Type

ProductsQueryResult

Query

query products(
  $sku: String,
  $created_from: ISODateTime,
  $created_to: ISODateTime,
  $updated_from: ISODateTime,
  $updated_to: ISODateTime,
  $customer_account_id: String,
  $has_kits: Boolean,
  $tag: [String],
  $tag_not_in: [String],
  $analyze: Boolean
) {
  products(
    sku: $sku,
    created_from: $created_from,
    created_to: $created_to,
    updated_from: $updated_from,
    updated_to: $updated_to,
    customer_account_id: $customer_account_id,
    has_kits: $has_kits,
    tag: $tag,
    tag_not_in: $tag_not_in,
    analyze: $analyze
  ) {
    request_id
    complexity
    data {
      ...ProductConnectionFragment
    }
  }
}

Variables

{
  "sku": "abc123",
  "created_from": ISODateTime,
  "created_to": ISODateTime,
  "updated_from": ISODateTime,
  "updated_to": ISODateTime,
  "customer_account_id": "abc123",
  "has_kits": true,
  "tag": ["abc123"],
  "tag_not_in": ["abc123"],
  "analyze": true
}

Response

{
  "data": {
    "products": {
      "request_id": "abc123",
      "complexity": 987,
      "data": ProductConnection
    }
  }
}