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
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.
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"
}
]
}
}