v1

latestOpenAPI 3.0.1MIT2026-07-263151,3912.3 MB
Products

Create Product

Creates a product object.

📘 Upsert Mode

If you pass an id or a source_id that already exists in the product database, Voucherify will return a related product object with updated fields.

post/v1/products

Request body

idstring

A unique identifier that represents the product and is assigned by Voucherify.

source_idstring

Unique product source ID.

namestring

Unique user-defined product name.

priceinteger

Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as $100.00 being expressed as 10000.

attributesstring[]

A list of product attributes whose values you can customize for given SKUs: ["color","size","ranking"]. Each child SKU can have a unique value for a given attribute.

metadataobject

The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format.

image_urlstring

The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image.

Example request

{
  "id": "prod_5h0wc453_1",
  "source_id": "productSourceID16",
  "name": "T-shirt",
  "image_url": "https://images.com/original.jpg"
}

Response

Returns a product object if the operation succeeded.

idstring required

Unique product ID assigned by Voucherify.

source_idstring nullable required

Unique product source ID.

namestring nullable required

Unique user-defined product name.

priceinteger nullable required

Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as $100.00 being expressed as 10000.

attributesstring[] required

A list of product attributes whose values you can customize for given SKUs: ["color","size","ranking"]. Each child SKU can have a unique value for a given attribute.

metadataobject required

The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.

image_urlstring nullable

The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image.

created_atstring date-time

Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format.

updated_atstring date-time nullable

Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format.

object'product' required

The type of the object represented by JSON. This object stores information about the product.

Example response

{
  "id": "prod_0b1da8105693710357",
  "source_id": "productSourceID16",
  "name": "T-shirt",
  "image_url": "https://images.com/original.jpg",
  "created_at": "2022-05-23T06:52:55.008Z",
  "updated_at": "2022-05-23T09:24:07.405Z",
  "skus": {
    "data": [
      {
        "id": "sku_0b1621b319d248b79f",
        "source_id": "sku_source_id_4",
        "product_id": "prod_0b15f6b9f650c16990",
        "sku": "Large Pink Shirt",
        "currency": "USD",
        "created_at": "2022-05-17T10:36:30.187Z",
        "updated_at": "2022-05-17T10:55:09.137Z"
      }
    ]
  }
}