v1

latestOpenAPI 3.0.1MIT2026-07-263151,3912.3 MB
Products

Create SKU

This method adds product variants to a created product.

📘 Upsert Mode

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

post/v1/products/{productId}/skus

Request body

idstring

Unique SKU ID.

source_idstring

A unique SKU identifier from your inventory system.

skustring

Unique user-defined SKU name.

priceinteger

SKU unit price. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.

currencystring

SKU price currency.

attributesobject

The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family.

image_urlstring

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

metadataobject

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

Example request

{
  "id": "sku_0c0c0012a9029bccef",
  "source_id": "sku_source_id_4",
  "sku": "Large Pink Shirt",
  "currency": "USD"
}

Response

Returns the created SKU object.

idstring required

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

source_idstring nullable required

A unique SKU identifier from your inventory system.

product_idstring required

The parent product's unique ID.

skustring nullable required

Unique user-defined SKU 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.

currencystring nullable

SKU price currency.

attributesobject required

The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family.

image_urlstring nullable required

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

metadataobject required

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

created_atstring date-time required

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

updated_atstring date-time nullable required

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

object'sku' required

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

Example response

{
  "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"
}