updateProduct
Version 2024-11-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
Update a Product.
Required scope(s)
View & Edit Catalog Data
Response
Return type UpdateProductResponse
Arguments
Argument | Description |
---|---|
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"
}
}
}
Updated 2 days ago