Skip to main content
GET
/
v1
/
products
/
{productId}
Get Product
curl --request GET \
  --url https://{cluster}.voucherify.io/v1/products/{productId} \
  --header 'Authorization: Bearer <token>' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>'
{
  "id": "prod_f1r5Tpr0DuC7",
  "source_id": "test_prod_id_1",
  "name": "Apple iPhone 8",
  "price": null,
  "attributes": [
    "color",
    "memory"
  ],
  "metadata": {
    "test": true,
    "vendor": "Cortland"
  },
  "image_url": null,
  "created_at": "2021-12-03T06:33:46.101Z",
  "updated_at": null,
  "object": "product",
  "skus": {
    "object": "list",
    "data_ref": "data",
    "data": [
      {
        "id": "sku_0a417bd1d9952f9d6f",
        "source_id": "test_iphone_8_silver_256gb",
        "product_id": "prod_f1r5Tpr0DuC7",
        "sku": "iPhone 8 Silver 256GB",
        "price": null,
        "currency": null,
        "attributes": {
          "color": "silver",
          "memory": "256"
        },
        "image_url": null,
        "metadata": {},
        "created_at": "2021-12-03T06:33:46.599097+00:00",
        "updated_at": null,
        "object": "sku"
      },
      {
        "id": "sku_0a417bd1d9952f9d6e",
        "source_id": "test_iphone_8_silver_64gb",
        "product_id": "prod_f1r5Tpr0DuC7",
        "sku": "iPhone 8 Silver 64GB",
        "price": null,
        "currency": null,
        "attributes": {
          "color": "silver",
          "memory": "64"
        },
        "image_url": null,
        "metadata": {},
        "created_at": "2021-12-03T06:33:46.598595+00:00",
        "updated_at": null,
        "object": "sku"
      }
    ],
    "total": 2
  }
}

Authorizations

X-App-Id
string
header
required
X-App-Token
string
header
required
Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

productId
string
required

A Voucherify product ID or source ID.

Example:

"prod_3ttSkdxGuAfcv3"

Response

Returns a product object if a valid identifier was provided.

Response body schema for GET v1/products/{productId}. This is an object representing a product.

This entity should be used to map product items from your inventory management system. The aim of products is to build which reflect product-specific campaigns.

id
string
required

Unique product ID assigned by Voucherify.

Example:

"prod_0b1da8105693710357"

source_id
string | null
required

Unique product source ID.

Example:

"productSourceID16"

name
string | null
required

Unique user-defined product name.

Example:

"T-shirt"

price
integer | null
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.

attributes
string[]
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.

metadata
object
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.

object
enum<string>
default:product
required

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

Available options:
product
skus
object

Contains information about child SKUs.

image_url
string | null

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

Example:

"https://images.com/original.jpg"

created_at
string<date-time>

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

Example:

"2022-05-23T06:52:55.008Z"

updated_at
string<date-time> | null

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

Example:

"2022-05-23T09:24:07.405Z"

I