product

Fetch product records matching the supplied arguments.

Arguments

ArgumentTypeRequiredDefaultDescription
idStringNo

Filter by ID; pass the public API ID unless the field name says legacy ID.

skuStringNo

Filter by SKU. SKU matching is case-insensitive and ignores surrounding whitespace.

barcodeStringNo

Filter by barcode.

customer_account_idStringNo

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

analyzeBooleanNo

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

Return Type

ProductQueryResult

Query

query product(
  $id: String,
  $sku: String,
  $barcode: String,
  $customer_account_id: String,
  $analyze: Boolean
) {
  product(
    id: $id,
    sku: $sku,
    barcode: $barcode,
    customer_account_id: $customer_account_id,
    analyze: $analyze
  ) {
    request_id
    complexity
    data {
      ...ProductFragment
    }
  }
}

Variables

{
  "id": "UmVjb3JkOjEyMzQ=",
  "sku": "BLUE-TEE-M",
  "barcode": "012345678905",
  "customer_account_id": "QWNjb3VudDoxMjM0",
  "analyze": true
}

Response

{
  "data": {
    "product": {
      "request_id": "UmVjb3JkOjEyMzQ=",
      "complexity": 100,
      "data": {sku: "BLUE-TEE-M", name: "Blue Tee"}
    }
  }
}