curl --request PUT \
--url https://api-sandbox.appcharge.com/components/v1/product/{externalId} \
--header 'Content-Type: application/json' \
--header 'x-publisher-token: <api-key>' \
--data '{
"name": "Premium Gold Coins Pack",
"displayName": "Premium Gold Coins",
"publisherProductId": "gold_coins_100",
"type": "Quantity",
"prefix": "Get",
"suffix": "premium coins",
"textFontColorHex": "#d4af37",
"productImageUrl": "https://example.com/images/premium_gold_coins.png",
"productPrefixImageUrl": "https://example.com/images/premium_gold_coin_icon.png"
}'
{
"id": "507f1f77bcf86cd799439015",
"name": "Gold Coins Pack",
"displayName": "Gold Coins",
"publisherProductId": "gold_coins_100",
"type": "Quantity",
"description": "A pack of 100 gold coins.",
"prefix": "Get",
"suffix": "coins",
"textFontColorHex": "#f5c518",
"productImageUrl": "https://cdn.appcharge.com/507f1f77bcf86cd799439015_product.png",
"productPrefixImageUrl": "https://cdn.appcharge.com/507f1f77bcf86cd799439015_prefix.png",
"productImageExternalUrl": "https://example.com/images/gold_coins.png"
}
Updates a product.
curl --request PUT \
--url https://api-sandbox.appcharge.com/components/v1/product/{externalId} \
--header 'Content-Type: application/json' \
--header 'x-publisher-token: <api-key>' \
--data '{
"name": "Premium Gold Coins Pack",
"displayName": "Premium Gold Coins",
"publisherProductId": "gold_coins_100",
"type": "Quantity",
"prefix": "Get",
"suffix": "premium coins",
"textFontColorHex": "#d4af37",
"productImageUrl": "https://example.com/images/premium_gold_coins.png",
"productPrefixImageUrl": "https://example.com/images/premium_gold_coin_icon.png"
}'
{
"id": "507f1f77bcf86cd799439015",
"name": "Gold Coins Pack",
"displayName": "Gold Coins",
"publisherProductId": "gold_coins_100",
"type": "Quantity",
"description": "A pack of 100 gold coins.",
"prefix": "Get",
"suffix": "coins",
"textFontColorHex": "#f5c518",
"productImageUrl": "https://cdn.appcharge.com/507f1f77bcf86cd799439015_product.png",
"productPrefixImageUrl": "https://cdn.appcharge.com/507f1f77bcf86cd799439015_prefix.png",
"productImageExternalUrl": "https://example.com/images/gold_coins.png"
}
Publisher token, as displayed in the Publisher Dashboard.
External ID that you defined.
"gold_coins_pack"
Product updated successfully.
The response is of type object
.
Was this page helpful?