createProduct
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
Create a Product.
Required scope(s)
View & Edit Catalog Data
Response
Return type CreateProductResponse
Arguments
Argument | Description |
---|---|
input (CreateProductInput required) | Specifies the input fields required to create a new Product. |
Examples
Create Product
Request
mutation CreateProduct {
createProduct(
input: {
externalId: "product-externalId"
amazonSku: {
value: "product-amazon-sku"
}
sku: "product-sku"
offerPrime: true
productDetailPageUrl: "https://example.com/products/my-product"
image: {
sourceUrl: "https://example.com/products/my-product.jpg"
}
description: {
values: [
{
value: "<h2>This is an English description</h2>",
locale: "en-US"
},
{
value: "<p>这是一条中文产品描述</p>",
locale: "zh-CN"
}
],
defaultLocale: "en-US"
}
}
) {
id
}
}
Response
{
"data": {
"createProduct": {
"id": "abcdef01234567"
}
}
}
Updated 1 day ago