product

Version 2024-04-01

📘

Important

The Buy with Prime API is offered as a preview and might change as we receive feedback and iterate on the interfaces. We are sharing this early documentation to help you learn about the Buy with Prime API as we write and iterate on the content.

Overview

Returns a product

ℹ️

Required scope(s)

View & Edit Catalog Data

Response

Return type Product

Arguments

ArgumentDescription
identifier (ProductIdentifierInput)

Product identifiers to locate a product.

Examples


Query By Sku

Request

query product {
    product(identifier: {
        sku: "example-sku-1"
    }) {
        id
        externalId {
            value
        }
        sku {
            value
        }
        amazonSku {
            value
        }
        asin {
            value
            marketplaceId
        }
        offerPrime
        productDetailPageUrl
        image {
            displayReadyUrl
            sourceUrl
        }
        description {
            values {
                value
                locale
            }
            defaultLocale
        }
    }
}

Response

{
  "data": {
    "product": {
      "id": "abcdef01234567",
      "externalId": {
        "value": "example-external-id"
      },
      "sku": {
        "value": "example-sku"
      },
      "amazonSku": {
        "value": "example-amazon-sku"
      },
      "offerPrime": true,
      "productDetailPageUrl": "example.com",
      "image": {
        "displayReadyUrl": "example.com/display-ready-product-image.jpeg",
        "sourceUrl": "example.com/product-image.jpeg"
      },
      "description": {
        "values": [
          {
            "value": "<h2>This is an English description</h2>",
            "locale": "en-US"
          },
          {
            "value": "<p>这是一条中文产品描述</p>",
            "locale": "zh-CN"
          }
        ],
        "defaultLocale": "en-US"
      }
    }
  }
}

Query By Amazon Sku

Request

query product {
    product(identifier: {
        amazonSku: { value: "example-amazon-sku-1" }
    }) {
        id
        externalId {
            value
        }
        sku {
            value
        }
        amazonSku {
            value
        }
        asin {
            value
            marketplaceId
        }
        offerPrime
        productDetailPageUrl
        image {
            displayReadyUrl
            sourceUrl
        }
        description {
            values {
                value
                locale
            }
            defaultLocale
        }
    }
}

Response

{
  "data": {
    "product": {
      "id": "abcdef01234567",
      "externalId": {
        "value": "example-external-id"
      },
      "sku": {
        "value": "example-sku"
      },
      "amazonSku": {
        "value": "example-amazon-sku"
      },
      "asin": {
        "value": "example-asin",
        "marketplaceId": "example-marketplace-id"
      },
      "offerPrime": true,
      "productDetailPageUrl": "example.com",
      "image": {
        "displayReadyUrl": "example.com/display-ready-product-image.jpeg",
        "sourceUrl": "example.com/product-image.jpeg"
      },
      "description": {
        "values": [
          {
            "value": "This is a plain text English description",
            "locale": "en-US"
          }
        ],
        "defaultLocale": "en-US"
      }
    }
  }
}

Query By External Id

Request

query product {
    product(identifier: {
        externalId: "example-external-id-1"
    }) {
        id
        externalId {
            value
        }
        sku {
            value
        }
        amazonSku {
            value
        }
        asin {
            value
            marketplaceId
        }
        offerPrime
        productDetailPageUrl
        image {
            displayReadyUrl
            sourceUrl
        }
        description {
            values {
                value
                locale
            }
            defaultLocale
        }
    }
}

Response

{
  "data": {
    "product": {
      "id": "abcdef01234567",
      "externalId": {
        "value": "example-external-id"
      },
      "sku": {
        "value": "example-sku"
      },
      "amazonSku": {
        "value": "example-amazon-sku"
      },
      "asin": {
        "value": "example-asin",
        "marketplaceId": "example-marketplace-id"
      },
      "offerPrime": true,
      "productDetailPageUrl": "example.com",
      "image": {
        "displayReadyUrl": "example.com/display-ready-product-image.jpeg",
        "sourceUrl": "example.com/product-image.jpeg"
      },
      "description": {
        "values": [
          {
            "value": "<p>This is an English description</p>",
            "locale": "en-US"
          }
        ],
        "defaultLocale": "en-US"
      }
    }
  }
}

Query By Product Id

Request

query product {
    product(identifier: {
        productId: "example-productId-1"
    }) {
        id
        externalId {
            value
        }
        sku {
            value
        }
        amazonSku {
            value
        }
        asin {
            value
            marketplaceId
        }
        offerPrime
        productDetailPageUrl
        image {
            displayReadyUrl
            sourceUrl
        }
        description {
            values {
                value
                locale
            }
            defaultLocale
        }
    }
}

Response

{
  "data": {
    "product": {
      "id": "abcdef01234567",
      "externalId": {
        "value": "example-external-id"
      },
      "sku": {
        "value": "example-sku"
      },
      "amazonSku": {
        "value": "example-amazon-sku"
      },
      "asin": {
        "value": "example-asin",
        "marketplaceId": "example-marketplace-id"
      },
      "offerPrime": true,
      "productDetailPageUrl": "example.com",
      "image": {
        "displayReadyUrl": "example.com/display-ready-product-image.jpeg",
        "sourceUrl": "example.com/product-image.jpeg"
      },
      "description": {
        "values": [
          {
            "value": "This is an English description",
            "locale": "en-US"
          }
        ],
        "defaultLocale": "en-US"
      }
    }
  }
}

Query By Sku With Inventory Item

Request

query {
  product(identifier: {
    sku: "example-sku-1"
  }) {
    id
    externalId {
      value
    }
    sku {
      value
    }
    amazonSku {
      value
    }
    asin {
      value
      marketplaceId
    }
    offerPrime
    productDetailPageUrl
    image {
      displayReadyUrl
      sourceUrl
    }
    description {
      values {
        value
        locale
      }
      defaultLocale
    }
    inventoryItem {
      inventoryItemId
      buyableQuantity {
        unit
        amount
      }
    }
  }
}

Response

{
  "data": {
    "product": {
      "id": "abcdef01234567",
      "externalId": {
        "value": "example-external-id"
      },
      "sku": {
        "value": "example-sku"
      },
      "amazonSku": {
        "value": "example-amazon-sku"
      },
      "asin": {
        "value": "example-asin",
        "marketplaceId": "example-marketplace-id"
      },
      "offerPrime": true,
      "productDetailPageUrl": "example.com",
      "image": {
        "displayReadyUrl": "example.com/display-ready-product-image.jpeg",
        "sourceUrl": "example.com/product-image.jpeg"
      },
      "description": {
        "values": [
          {
            "value": "<h2>This is an English description</h2>",
            "locale": "en-US"
          },
          {
            "value": "<p>这是一条中文产品描述</p>",
            "locale": "zh-CN"
          }
        ],
        "defaultLocale": "en-US"
      },
      "inventoryItem": {
        "inventoryItemId": "01234567abcdef",
        "buyableQuantity": {
          "unit": "UNIT",
          "amount": 10
        }
      }
    }
  }
}

Query By Amazon Sku With Inventory Item

Request

query {
  product(identifier: {
    amazonSku: { value: "example-amazon-sku-1" }
  }) {
    id
    externalId {
      value
    }
    sku {
      value
    }
    amazonSku {
      value
    }
    asin {
      value
      marketplaceId
    }
    offerPrime
    productDetailPageUrl
    image {
      displayReadyUrl
      sourceUrl
    }
    description {
      values {
        value
        locale
      }
      defaultLocale
    }
    inventoryItem {
      inventoryItemId
      buyableQuantity {
        unit
        amount
      }
    }
  }
}

Response

{
  "data": {
    "product": {
      "id": "abcdef01234567",
      "externalId": {
        "value": "example-external-id"
      },
      "sku": {
        "value": "example-sku"
      },
      "amazonSku": {
        "value": "example-amazon-sku"
      },
      "asin": {
        "value": "example-asin",
        "marketplaceId": "example-marketplace-id"
      },
      "offerPrime": true,
      "productDetailPageUrl": "example.com",
      "image": {
        "displayReadyUrl": "example.com/display-ready-product-image.jpeg",
        "sourceUrl": "example.com/product-image.jpeg"
      },
      "description": {
        "values": [
          {
            "value": "This is a plain text English description",
            "locale": "en-US"
          }
        ],
        "defaultLocale": "en-US"
      },
      "inventoryItem": {
        "inventoryItemId": "01234567abcdef",
        "buyableQuantity": {
          "unit": "UNIT",
          "amount": 10
        }
      }
    }
  }
}

Query By External Id With Inventory Item

Request

query {
  product(identifier: {
    externalId: "example-external-id-1"
  }) {
    id
    externalId {
      value
    }
    sku {
      value
    }
    amazonSku {
      value
    }
    asin {
      value
      marketplaceId
    }
    offerPrime
    productDetailPageUrl
    image {
      displayReadyUrl
      sourceUrl
    }
    description {
      values {
        value
        locale
      }
      defaultLocale
    }
    inventoryItem {
      inventoryItemId
      buyableQuantity {
        unit
        amount
      }
    }
  }
}

Response

{
  "data": {
    "product": {
      "id": "abcdef01234567",
      "externalId": {
        "value": "example-external-id"
      },
      "sku": {
        "value": "example-sku"
      },
      "amazonSku": {
        "value": "example-amazon-sku"
      },
      "asin": {
        "value": "example-asin",
        "marketplaceId": "example-marketplace-id"
      },
      "offerPrime": true,
      "productDetailPageUrl": "example.com",
      "image": {
        "displayReadyUrl": "example.com/display-ready-product-image.jpeg",
        "sourceUrl": "example.com/product-image.jpeg"
      },
      "description": {
        "values": [
          {
            "value": "<p>This is an English description</p>",
            "locale": "en-US"
          }
        ],
        "defaultLocale": "en-US"
      },
      "inventoryItem": {
        "inventoryItemId": "01234567abcdef",
        "buyableQuantity": {
          "unit": "UNIT",
          "amount": 10
        }
      }
    }
  }
}

Query By Product Id With Inventory Item

Request

query {
  product(identifier: {
    productId: "example-productId-1"
  }) {
    id
    externalId {
      value
    }
    sku {
      value
    }
    amazonSku {
      value
    }
    asin {
      value
      marketplaceId
    }
    offerPrime
    productDetailPageUrl
    image {
      displayReadyUrl
      sourceUrl
    }
    description {
      values {
        value
        locale
      }
      defaultLocale
    }
    inventoryItem {
      inventoryItemId
      buyableQuantity {
        unit
        amount
      }
    }
  }
}

Response

{
  "data": {
    "product": {
      "id": "abcdef01234567",
      "externalId": {
        "value": "example-external-id"
      },
      "sku": {
        "value": "example-sku"
      },
      "amazonSku": {
        "value": "example-amazon-sku"
      },
      "asin": {
        "value": "example-asin",
        "marketplaceId": "example-marketplace-id"
      },
      "offerPrime": true,
      "productDetailPageUrl": "example.com",
      "image": {
        "displayReadyUrl": "example.com/display-ready-product-image.jpeg",
        "sourceUrl": "example.com/product-image.jpeg"
      },
      "description": {
        "values": [
          {
            "value": "This is an English description",
            "locale": "en-US"
          }
        ],
        "defaultLocale": "en-US"
      },
      "inventoryItem": {
        "inventoryItemId": "01234567abcdef",
        "buyableQuantity": {
          "unit": "UNIT",
          "amount": 10
        }
      }
    }
  }
}