The product object

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

Attribute

Description

Example

id
string

prod_yKHc4SyG1agSww

source_id
string

A unique product identifier from your inventory system.

internal_prod_id_1477390384

object
string

Type of the object represented by JSON. Value is 'product'.

name
string

Apple iPhone 7

price
integer

A positive integer representing a current product price. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 is written as 10000.

created_at
string, ISO 8601 date format

2016-11-16T14:14:31Z

attributes
array of strings

A list of product attributes keys used to differentiate product variants.

["color", "memory"]

skus
object

An object storing the list of product variants.

  "skus": {
    "object": "list",
    "total": 1,
    "data": [
      {
        "id": "sku_jnw8vWYuyYTW7X",
        "source_id": "internal_erp_sku_id_1477399361",
        "sku": "APPLE_IPHONE_7",
        "currency": "USD",
        "price": 70000,
        "attributes": {
          "color": "black",
          "memory": "32"
        },
        "created_at": "2016-10-25T12:43:28Z",
        "object": "sku"
      }
    ]
  }

metadata
object

A set of custom key/value pairs that you can attach to a product object.

"metadata": { 
    "country": "us"
}

image_url
'string'

URL to the image associated with the product.

'https://voucherify.io/img_YegsAlQ4hu3zDJq20vsmdBbB.png'

{  
  "id":"prod_VOBfMBM3sCuGSy",
  "source_id":"internal_crm_id_1477475919",
  "object":"product",
  "name":"Apple iPhone 7",
  "attributes":[  
    "color",
    "memory"
  ],
  "image_url": "https://voucherify.io/img_YegsAlQ4hu3zDJq20vsmdBbB.png",
  "metadata":{  
    "test":true
  },
  "created_at":"2016-10-26T09:58:39Z",
  "skus":{  
    "object":"list",
    "total":1,
    "data":[  
      {  
        "id":"sku_0KtP4rvwEECQ2U",
        "source_id":"internal_erp_sku_id_1477475922",
        "sku":"APPLE_IPHONE_7",
        "currency":"USD",
        "price":70000,
        "attributes":{  
          "color":"black",
          "memory":"32"
        },
        "created_at":"2016-10-26T10:04:52Z",
        "object":"sku"
      }
    ]
  }
}