Skip to main content
POST
/
v1
/
products
Create a Product
curl --request POST \
  --url https://api.sandbox.hit-pay.com/v1/products \
  --header 'Content-Type: multipart/form-data' \
  --header 'X-BUSINESS-API-KEY: <x-business-api-key>' \
  --form 'name=Product Beanie' \
  --form price=15 \
  --form 'description=<p>Stylish hat suitable for the winter.</p>' \
  --form barcode=1234567890123 \
  --form 'headline=Stylish hat suitable for the winter.' \
  --form stock_keeping_unit=SKU123456 \
  --form quantity=1 \
  --form quantity_alert_level=1 \
  --form currency=sgd \
  --form category_ids=9a12fab0-d282-4437-9460-c3d26662d11a \
  --form channels=online_store \
  --form location_ids=9a12fab4-d112-48af-9d6b-050d650b0a25 \
  --form 'locations={
  "id": "9a12fab4-d112-48af-9d6b-050d650b0a25",
  "manage_inventory": "1",
  "quantity": 1,
  "quantity_alert_level": 1
}' \
  --form open_amount=0 \
  --form is_manageable=1 \
  --form is_pinned=0 \
  --form product_weight=250 \
  --form delivery_method_required=true \
  --form 'variations={
  "price": 123,
  "quantity": 123,
  "quantity_alert_level": 123,
  "image": "<string>",
  "product_variation_weight": 123,
  "variation_value_1": "<string>",
  "variation_value_2": "<string>",
  "variation_value_3": "<string>"
}' \
  --form 'image={
  "image": "<string>"
}' \
  --form publish=1 \
  --form variations.items.image='@example-file' \
  --form image.items.image='@example-file'
{
  "id": "<string>",
  "business_id": "<string>",
  "category_id": [
    "<string>"
  ],
  "name": "<string>",
  "description": "<string>",
  "currency": "<string>",
  "price": 123,
  "price_display": "<string>",
  "price_stored": 123,
  "is_manageable": 123,
  "is_pinned": true,
  "status": "<string>",
  "has_variations": true,
  "is_shopify": true,
  "product_url": "<string>",
  "variations_count": 123,
  "variations": [
    {
      "id": "<string>",
      "stock_keeping_unit": "<string>",
      "description": "<string>",
      "weight": "<string>",
      "length": "<string>",
      "width": "<string>",
      "depth": "<string>",
      "price": 123,
      "price_display": "<string>",
      "price_stored": 123,
      "quantity": 123,
      "quantity_alert_level": 123,
      "variation_value_1": "<string>",
      "variation_value_2": "<string>",
      "variation_value_3": "<string>",
      "product_variation_weight": 123
    }
  ],
  "is_published": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "headline": "<string>",
  "tax_id": "<string>",
  "product_weight": 123,
  "delivery_method_required": true,
  "variation_key_1": "<string>",
  "variation_key_2": "<string>",
  "variation_key_3": "<string>",
  "images": [
    {
      "id": "<string>",
      "caption": "<string>",
      "url": "<string>",
      "other_dimensions": [
        {
          "size": "<string>",
          "path": "<string>"
        }
      ]
    }
  ],
  "starts_at": "2023-11-07T05:31:56Z",
  "ends_at": "2023-11-07T05:31:56Z"
}

Headers

X-BUSINESS-API-KEY
string
required
Example:

"b286daabf9921b5a01a4621f026c111e046f8911feba212996c92159b98427d"

Body

multipart/form-data
name
string
required

The name of the product

Example:

"Product Beanie"

price
number
required

The price of the product

Example:

15

description
string

The description of the product

Example:

"<p>Stylish hat suitable for the winter.</p>"

barcode
string

The barcode of the product

Maximum string length: 255
Example:

"1234567890123"

headline
string

The headline of the product

Example:

"Stylish hat suitable for the winter."

stock_keeping_unit
string

The stock keeping unit of the product

Maximum string length: 255
Example:

"SKU123456"

quantity
number

The quantity of the product

Required range: x >= 0
quantity_alert_level
number

The quantity alert level of the product. It is required when quantity alert level is present.

Required range: x >= 0
currency
string

The currency of the product

Example:

"sgd"

category_ids
string<uuid>[]

The list of business product category ids of the product

The category ids of the product

Example:
["9a12fab0-d282-4437-9460-c3d26662d11a"]
channels
enum<string>[]

The channels of the product

Available options:
online_store,
pos,
invoice
location_ids
string<uuid>[]

The location ids of the product

locations
object[]
open_amount
enum<string>
default:0

The open amount of the product

Available options:
1,
0
is_manageable
enum<string>
default:1

The is manageable of the product

Available options:
1,
0
is_pinned
enum<string>
default:0

The is pinned of the product

Available options:
1,
0
product_weight
integer

Weight in gram

Example:

250

delivery_method_required
boolean
default:true
variations
object[]
image
object[]
publish
enum<string>
default:1
Available options:
1,
0

Response

201

id
string
required
business_id
string
required
category_id
string[]
required
name
string
required
description
string
required
currency
string
required
price
number
required
price_display
string
required
price_stored
integer
required
is_manageable
integer
required
is_pinned
boolean
required
status
string
required
has_variations
boolean
required
is_shopify
boolean
required
product_url
string
required
variations_count
integer
required
variations
object[]
required
is_published
boolean
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
headline
string | null
tax_id
string | null
product_weight
integer

Weight in gram

delivery_method_required
boolean
variation_key_1
string | null
variation_key_2
string | null
variation_key_3
string | null
images
object[]
starts_at
string<date-time> | null
ends_at
string<date-time> | null