updateProduct

Version 2024-04-01

Overview

Update a Product.

ℹ️

Required scope(s)

View & Edit Catalog Data

Response

Return type UpdateProductResponse

Arguments

ArgumentDescription
identifier (ProductIdentifierInput)

Product identifiers to locate a product.

input (UpdateProductInput required)

Specifies the input fields required to update a Product.

Examples


Update Product Offer Prime By External Id

Request

mutation UpdateProduct {
    updateProduct(
        identifier: { externalId: "product-externalId" }
        input: {
            offerPrime: false
        }
    ) {
        id
    }
}

Response

{
    "data": {
        "updateProduct": {
            "id": "abcdef01234567"
        }
    }
}

Update Product By Sku

Request

mutation UpdateProduct {
    updateProduct(
        identifier: { sku: "product-sku" }
        input: {
            externalId: "updated-product-externalId"
            amazonSku: {
                value: "updated-product-amazon-sku"
            }
            offerPrime: true
            productDetailPageUrl: "https://example.com/products/my-product"
            image: {
                sourceUrl: "https://example.com/products/my-product.jpg"
            }
        }
    ) {
        id
    }
}

Response

{
  "data": {
    "updateProduct": {
      "id": "abcdef01234567"
    }
  }
}

Update Product By Product Id

Request

mutation UpdateProduct {
    updateProduct(
        identifier: { productId: "abcdef01234567" }
        input: {
            externalId: "updated-product-externalId"
            amazonSku: {
                value: "updated-product-amazon-sku"
            }
            sku: "updated-product-sku"
            offerPrime: true
            productDetailPageUrl: "https://example.com/products/my-product"
            image: {
                sourceUrl: "https://example.com/products/my-product.jpg"
            }
        }
    ) {
        id
    }
}

Response

{
    "data": {
        "updateProduct": {
            "id": "abcdef01234567"
        }
    }
}

Update Product By External Id

Request

mutation UpdateProduct {
    updateProduct(
        identifier: { externalId: "product-externalId" }
        input: {
            amazonSku: {
                value: "updated-product-amazon-sku"
            }
            sku: "updated-product-sku"
            offerPrime: true
            productDetailPageUrl: "https://example.com/products/my-product"
            image: {
                sourceUrl: "https://example.com/products/my-product.jpg"
            }
        }
    ) {
        id
    }
}

Response

{
    "data": {
        "updateProduct": {
            "id": "abcdef01234567"
        }
    }
}

Update Product By Amazon Sku

Request

mutation UpdateProduct {
    updateProduct(
        identifier: {
            amazonSku: {
                value: "product-amazon-sku"
            }
        }
        input: {
            externalId: "updated-product-externalId"
            sku: "updated-product-sku"
            offerPrime: true
            productDetailPageUrl: "https://example.com/products/my-product"
            image: {
                sourceUrl: "https://example.com/products/my-product.jpg"
            }
        }
    ) {
        id
    }
}

Response

{
    "data": {
        "updateProduct": {
            "id": "abcdef01234567"
        }
    }
}