v1

latestOpenAPI 3.1.02026-07-2665153355.3 KB
Products

Updates a product.

put/components/v1/product/{externalId}

Request body

namestring

Product name.

displayNamestring

Product display name.

publisherProductIdstring

Product ID that you define

type'Quantity' | 'Time'

Product unit type.

prefixstring

Product prefix text.

suffixstring

Product suffix text.

textFontColorHexstring

Product text font color in hex format.

productImageUrlstring url

Product image URL in PNG or JPEG format.

For uploaded files, this is the Appcharge-hosted CDN URL. For external image URLs, this is the original image URL served from the provided URL. External image URLs are saved and used as-is, and Appcharge doesn't download, copy, upload, or host them. Images must remain available at the provided URLs.

We recommend uploading image files instead of using external URLs when possible.

productPrefixImageUrlstring url

Product prefix image URL in PNG or JPEG format.

For uploaded files, this is the Appcharge-hosted CDN URL. For external image URLs, this is the original image URL served from the provided URL. External image URLs are saved and used as-is, and Appcharge doesn't download, copy, upload, or host them. Images must remain available at the provided URLs.

We recommend uploading image files instead of using external URLs when possible.

Example request

{
  "name": "Premium Gold Coins Pack",
  "displayName": "Premium Gold Coins",
  "publisherProductId": "gold_coins_100",
  "type": "Quantity",
  "prefix": "Get",
  "suffix": "premium coins",
  "textFontColorHex": "#d4af37",
  "productImageUrl": "https://media.appcharge.com/media/69133d595af23405d8e843a5",
  "productPrefixImageUrl": "https://media.appcharge.com/media/69133d595af23405d8e843a5"
}

Response

Product updated successfully.

idstring

Product ID.

namestring

Product name.

displayNamestring

Product display name.

publisherProductIdstring

Product ID that you defined.

type'Quantity' | 'Time'

Product unit type.

descriptionstring

Product description.

prefixstring

Product prefix text.

suffixstring

Product suffix text.

textFontColorHexstring

Product text font color in hex format.

productImageUrlstring url

Product image URL. For uploaded files, this is the Appcharge-hosted CDN URL. For external image URLs, this is the original image URL served from the provided URL.

productPrefixImageUrlstring url

Product prefix image URL. For uploaded files, this is the Appcharge-hosted CDN URL. For external image URLs, this is the original image URL served from the provided URL.

productImageExternalUrlstring url

Original product image URL when the product uses an external image URL. This URL is used as provided to serve the image.

Example response

{
  "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://media.appcharge.com/media/69133d595af23405d8e843a5",
  "productPrefixImageUrl": "https://media.appcharge.com/media/69133d595af23405d8e843a5",
  "productImageExternalUrl": "https://images.pexels.com/photos/35406321/pexels-photo-35406321.jpeg"
}