openapi: 3.1.1
info:
title: HitPay Account Status Products API
description: 'Accept PayNow, FPX, QRIS, GrabPay, cards, and 40+ payment methods with a single API. Production base URL: https://api.hit-pay.com, Sandbox: https://api.sandbox.hit-pay.com'
version: '1.0'
servers:
- url: https://api.hit-pay.com
description: Production
- url: https://api.sandbox.hit-pay.com
description: Sandbox
tags:
- name: Products
paths:
/v1/products:
get:
summary: Get All Products
description: This endpoint allows you to retrieve all products. You can also filter the products by name, category, and status.
operationId: get-all-products
parameters:
- name: X-BUSINESS-API-KEY
in: header
required: true
style: simple
explode: false
schema:
type: string
example: b286daabf9921b5a01a4621f026c111e046f8911feba212996c92159b98427d
- name: statuses
in: query
schema:
type: array
items:
type: string
enum:
- draft
- published
- name: categories
in: query
schema:
type: array
items:
type: string
format: uuid
example:
- 9bbbd5f4-8e48-45e3-bb24-cc3baa060793
- name: source
in: query
schema:
type: array
items:
type: string
enum:
- shopify
- wooCommerce
- name: inventory
in: query
schema:
type: array
items:
type: string
enum:
- in_stock
- out_of_stock
- name: location_ids
in: query
schema:
type: array
items:
type: string
format: uuid
example:
- 9bbbd5f4-8e48-45e3-bb24-cc3baa060793
- name: channels
in: query
schema:
type: array
items:
type: string
enum:
- pos
- invoice
- online_store
- name: keywords
in: query
schema:
type: array
items:
type: string
- name: page
in: query
schema:
type: number
default: 1
- name: per_page
in: query
schema:
type: number
default: 10
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value:
data:
- id: 9a12fab4-d112-48af-9d6b-050d650b0a25
business_id: 9130c422-bf97-4bd1-b370-07a3a6f40708
category_id:
- 9a12fab0-d282-4437-9460-c3d26662d11a
name: Beanie
headline: null
description:
Stylish hat suitable for the winter.
currency: SGD
price: 15
price_display: SGD 15.00
price_stored: 1500
tax_id: null
is_manageable: 1
is_pinned: false
status: published
product_weight: 250
delivery_method_required: true
has_variations: true
is_shopify: false
product_url:
variations_count: 2
variations:
- id: 9a12fab4-d998-44ea-ad11-8753be88a1c9
stock_keeping_unit: null
description: Medium
weight: null
length: null
width: null
depth: null
price: 18
price_display: SGD 18.00
price_stored: 1800
quantity: 150
quantity_alert_level: 10
product_variation_weight: 250
variation_value_1: Medium
variation_value_2: null
variation_value_3: null
- id: 9a12fab4-dd20-4f8f-9e74-de28629f863a
stock_keeping_unit: null
description: Large
weight: null
length: null
width: null
depth: null
price: 20
price_display: SGD 20.00
price_stored: 2000
quantity: 148
quantity_alert_level: 10
product_variation_weight: 255
variation_value_1: Large
variation_value_2: null
variation_value_3: null
variation_key_1: Size
variation_key_2: null
variation_key_3: null
images:
- id: 9a12fab6-1e76-448e-8c45-e84e2e38f294
caption: Beanie
url:
other_dimensions:
- size: icon
path:
- size: large
path:
- size: small
path:
- size: medium
path:
- size: thumbnail
path:
is_published: true
created_at: '2023-09-07T13:04:22+08:00'
updated_at: '2023-09-18T14:36:54+08:00'
starts_at: null
ends_at: null
links:
first:
last:
prev: null
next: h
meta:
current_page: 1
from: 1
last_page: 49
links: []
path:
per_page: 25
to: 25
total: 1214
schema:
type: object
properties:
data:
type: array
items:
type: object
properties:
id:
type: string
business_id:
type: string
category_id:
type: array
items:
type: string
name:
type: string
headline:
type: string
nullable: true
description:
type: string
currency:
type: string
price:
type: number
price_display:
type: string
price_stored:
type: integer
tax_id:
type: string
nullable: true
is_manageable:
type: integer
is_pinned:
type: boolean
status:
type: string
product_weight:
type: integer
description: Weight in gram
nullable: true
delivery_method_required:
type: boolean
has_variations:
type: boolean
is_shopify:
type: boolean
product_url:
type: string
variations_count:
type: integer
variations:
type: array
items:
type: object
properties:
id:
type: string
stock_keeping_unit:
type: string
nullable: true
description:
type: string
weight:
type: string
nullable: true
length:
type: string
nullable: true
width:
type: string
nullable: true
depth:
type: string
nullable: true
price:
type: number
price_display:
type: string
price_stored:
type: integer
quantity:
type: integer
quantity_alert_level:
type: integer
product_variation_weight:
type: integer
description: Weight in gram
nullable: true
variation_value_1:
type: string
variation_value_2:
type: string
nullable: true
variation_value_3:
type: string
nullable: true
required:
- id
- stock_keeping_unit
- description
- weight
- length
- width
- depth
- price
- price_display
- price_stored
- quantity
- quantity_alert_level
- variation_value_1
- variation_value_2
- variation_value_3
variation_key_1:
type: string
nullable: true
variation_key_2:
type: string
nullable: true
variation_key_3:
type: string
nullable: true
images:
type: array
items:
type: object
properties:
id:
type: string
caption:
type: string
nullable: true
url:
type: string
other_dimensions:
type: array
items:
type: object
properties:
size:
type: string
path:
type: string
required:
- id
- caption
- url
- other_dimensions
is_published:
type: boolean
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
starts_at:
type: string
format: date-time
nullable: true
ends_at:
type: string
format: date-time
nullable: true
required:
- id
- business_id
- category_id
- name
- description
- currency
- price
- price_display
- price_stored
- is_manageable
- is_pinned
- status
- has_variations
- is_shopify
- product_url
- variations_count
- variations
- is_published
- created_at
- updated_at
links:
type: object
properties:
first:
type: string
last:
type: string
prev:
type: string
nullable: true
next:
type: string
nullable: true
meta:
type: object
properties:
current_page:
type: integer
from:
type: integer
last_page:
type: integer
links:
type: array
items:
type: object
properties:
url:
type: string
label:
type: string
active:
type: boolean
path:
type: string
per_page:
type: integer
to:
type: integer
total:
type: integer
deprecated: false
x-readme:
code-samples:
- language: curl
code: "curl --location 'https://api.sandbox.hit-pay.com/v1/products' \\n--header 'X-BUSINESS-API-KEY: 9011d0e1e03c1e2d79cdcf1fd7147eaa6d339e4ba5e42df38d8b495e7ed8e9fc' \\\n --header 'X-Requested-With: XMLHttpRequest'"
name: Example request
samples-languages:
- curl
tags:
- Products
post:
summary: Create a Product
description: This endpoint allows you to create a product.
operationId: create-product
parameters:
- name: X-BUSINESS-API-KEY
in: header
required: true
style: simple
explode: false
schema:
type: string
example: b286daabf9921b5a01a4621f026c111e046f8911feba212996c92159b98427d
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
name:
type: string
example: Product Beanie
description: The name of the product
description:
type: string
description: The description of the product
example: Stylish hat suitable for the winter.
barcode:
type: string
description: The barcode of the product
maxLength: 255
example: '1234567890123'
headline:
type: string
description: The headline of the product
example: Stylish hat suitable for the winter.
stock_keeping_unit:
type: string
description: The stock keeping unit of the product
example: SKU123456
maxLength: 255
quantity:
type: number
examples: 1
description: The quantity of the product
minimum: 0
quantity_alert_level:
type: number
examples: 1
description: The quantity alert level of the product. It is required when quantity alert level is present.
minimum: 0
currency:
type: string
description: The currency of the product
example: sgd
price:
type: number
description: The price of the product
example: 15
category_ids:
type: array
description: The list of business product category ids of the product
items:
type: string
format: uuid
description: The category ids of the product
example: 9a12fab0-d282-4437-9460-c3d26662d11a
example:
- 9a12fab0-d282-4437-9460-c3d26662d11a
channels:
type: array
items:
type: string
enum:
- online_store
- pos
- invoice
description: The channels of the product
location_ids:
type: array
items:
type: string
format: uuid
description: The location ids of the product
example: 9a12fab4-d112-48af-9d6b-050d650b0a25
locations:
type: array
items:
type: object
properties:
id:
type: string
format: uuid
description: The location id of the product
example: 9a12fab4-d112-48af-9d6b-050d650b0a25
manage_inventory:
type: string
description: The manage inventory of the product
enum:
- '1'
- '0'
default: '1'
quantity:
type: integer
description: The quantity of the product
minimum: 0
quantity_alert_level:
type: integer
description: The quantity alert level of the product
minimum: 0
open_amount:
type: string
description: The open amount of the product
enum:
- '1'
- '0'
default: '0'
is_manageable:
type: string
description: The is manageable of the product
enum:
- '1'
- '0'
default: '1'
is_pinned:
type: string
description: The is pinned of the product
enum:
- '1'
- '0'
default: '0'
product_weight:
type: integer
description: Weight in gram
example: 250
delivery_method_required:
type: boolean
default: true
variations:
type: array
items:
type: object
properties:
image:
type: string
format: binary
price:
type: number
quantity:
type: integer
quantity_alert_level:
type: integer
product_variation_weight:
type: integer
description: Weight in gram
nullable: true
variation_value_1:
type: string
variation_value_2:
type: string
nullable: true
variation_value_3:
type: string
nullable: true
required:
- price
- quantity
- quantity_alert_level
image:
type: array
items:
type: object
properties:
image:
type: string
format: binary
publish:
type: string
enum:
- '1'
- '0'
default: '1'
required:
- name
- price
responses:
'201':
description: '201'
content:
application/json:
examples:
Result:
value:
id: 9a12fab4-d112-48af-9d6b-050d650b0a25
business_id: 9130c422-bf97-4bd1-b370-07a3a6f40708
category_id:
- 9a12fab0-d282-4437-9460-c3d26662d11a
name: Beanie
headline: null
description: Stylish hat suitable for the winter.
currency: SGD
price: 15
price_display: SGD 15.00
price_stored: 1500
tax_id: null
is_manageable: 1
is_pinned: false
status: published
product_weight: 250
delivery_method_required: true
has_variations: true
is_shopify: false
product_url:
variations_count: 2
variations:
- id: 9a12fab4-d998-44ea-ad11-8753be88a1c9
stock_keeping_unit: null
description: Medium
weight: null
length: null
width: null
depth: null
price: 18
price_display: SGD 18.00
price_stored: 1800
quantity: 150
quantity_alert_level: 10
product_variation_weight: 250
variation_value_1: Medium
variation_value_2: null
variation_value_3: null
- id: 9a12fab4-dd20-4f8f-9e74-de28629f863a
stock_keeping_unit: null
description: Large
weight: null
length: null
width: null
depth: null
price: 20
price_display: SGD 20.00
price_stored: 2000
quantity: 148
quantity_alert_level: 10
product_variation_weight: 255
variation_value_1: Large
variation_value_2: null
variation_value_3: null
variation_key_1: Size
variation_key_2: null
variation_key_3: null
images:
- id: 9a12fab6-1e76-448e-8c45-e84e2e38f294
caption: Beanie
url:
other_dimensions:
- size: icon
path:
- size: large
path:
- size: small
path:
- size: medium
path:
- size: thumbnail
path:
is_published: true
created_at: '2023-09-07T13:04:22+08:00'
updated_at: '2023-09-18T14:36:54+08:00'
starts_at: null
ends_at: null
schema:
type: object
properties:
id:
type: string
business_id:
type: string
category_id:
type: array
items:
type: string
name:
type: string
headline:
type: string
nullable: true
description:
type: string
currency:
type: string
price:
type: number
price_display:
type: string
price_stored:
type: integer
tax_id:
type: string
nullable: true
is_manageable:
type: integer
is_pinned:
type: boolean
status:
type: string
product_weight:
type: integer
description: Weight in gram
delivery_method_required:
type: boolean
has_variations:
type: boolean
is_shopify:
type: boolean
product_url:
type: string
variations_count:
type: integer
variations:
type: array
items:
type: object
properties:
id:
type: string
stock_keeping_unit:
type: string
nullable: true
description:
type: string
weight:
type: string
nullable: true
length:
type: string
nullable: true
width:
type: string
nullable: true
depth:
type: string
nullable: true
price:
type: number
price_display:
type: string
price_stored:
type: integer
quantity:
type: integer
quantity_alert_level:
type: integer
variation_value_1:
type: string
product_variation_weight:
type: integer
description: Weight in gram
variation_value_2:
type: string
nullable: true
variation_value_3:
type: string
nullable: true
required:
- id
- stock_keeping_unit
- description
- weight
- length
- width
- depth
- price
- price_display
- price_stored
- quantity
- quantity_alert_level
- variation_value_1
- variation_value_2
- variation_value_3
variation_key_1:
type: string
nullable: true
variation_key_2:
type: string
nullable: true
variation_key_3:
type: string
nullable: true
images:
type: array
items:
type: object
properties:
id:
type: string
caption:
type: string
nullable: true
url:
type: string
other_dimensions:
type: array
items:
type: object
properties:
size:
type: string
path:
type: string
required:
- id
- caption
- url
- other_dimensions
is_published:
type: boolean
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
starts_at:
type: string
format: date-time
nullable: true
ends_at:
type: string
format: date-time
nullable: true
required:
- id
- business_id
- category_id
- name
- description
- currency
- price
- price_display
- price_stored
- is_manageable
- is_pinned
- status
- has_variations
- is_shopify
- product_url
- variations_count
- variations
- is_published
- created_at
- updated_at
'422':
description: '422'
content:
application/json:
examples:
Result:
value: '{"message":"The given data was invalid.","errors":{"name":["The name field is required."]}}'
schema:
type: object
properties:
message:
type: string
errors:
type: object
properties:
name:
type: array
items:
type: string
deprecated: false
x-readme:
code-samples:
- language: curl
code: 'curl --location --request POST ''https://api.sandbox.hit-pay.com/v1/products'' \n--header ''X-BUSINESS-API-KEY: 9011d0e1e03c1e2d79cdcf1fd7147eaa6d339e4ba5e42df38d8b495e7ed8e9fc'' \n--header ''X-Requested-With: XMLHttpRequest'' \n--header ''Content-Type: application/json'' \n--data-raw ''{"name":"Beanie","headline":"","description":"Stylish hat suitable for the winter.
","currency":"SGD","price":15,"price_display":"SGD 15.00","price_stored":1500,"tax_id":null,"is_manageable":1,"is_pinned":false,"status":"published","has_variations":true,"is_shopify":false,"product_url":"","variations_count":2,"variations":[{"id":"9a12fab4-d998-44ea-ad11-8753be88a1c9","stock_keeping_unit":null,"description":"Medium","weight":null,"length":null,"width":null,"depth":null,"price":18,"price_display":"SGD 18.00","price_stored":1800,"quantity":150,"quantity_alert_level":10,"variation_value_1":"Medium","variation_value_2":null,"variation_value_3":null},{"id":"9a12fab4-dd20-4f8f-9e74-de28629f863a","stock_keeping_unit":null,"description":"Large","weight":null,"length":null,"width":null,"depth":null,"price":20,"price_display":"SGD 20.00","price_stored":2000,"quantity":148,"quantity_alert_level":10,"variation_value_1":"Large","variation_value_2":null,"variation_value_3":null}],"variation_key_1":"Size","variation_key_2":null,"variation_key_3":null,"starts_at":null,"ends_at":null}'''
name: Example request
samples-languages:
- curl
tags:
- Products
/v1/products/{product_id}:
get:
summary: Get Product Detail
description: This endpoint allows you to get a product detail.
operationId: get-product
parameters:
- name: X-BUSINESS-API-KEY
in: header
required: true
style: simple
explode: false
schema:
type: string
example: b286daabf9921b5a01a4621f026c111e046f8911feba212996c92159b98427d
- name: product_id
in: path
required: true
schema:
type: string
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value:
id: 9a12fab4-d112-48af-9d6b-050d650b0a25
business_id: 9130c422-bf97-4bd1-b370-07a3a6f40708
category_id:
- 9a12fab0-d282-4437-9460-c3d26662d11a
name: Beanie
headline: null
description: Stylish hat suitable for the winter.
currency: SGD
price: 15
price_display: SGD 15.00
price_stored: 1500
tax_id: null
is_manageable: 1
is_pinned: false
status: published
product_weight: 250
delivery_method_required: true
has_variations: true
is_shopify: false
product_url:
variations_count: 2
variations:
- id: 9a12fab4-d998-44ea-ad11-8753be88a1c9
stock_keeping_unit: null
description: Medium
weight: null
length: null
width: null
depth: null
price: 18
price_display: SGD 18.00
price_stored: 1800
quantity: 150
quantity_alert_level: 10
product_variation_weight: 250
variation_value_1: Medium
variation_value_2: null
variation_value_3: null
- id: 9a12fab4-dd20-4f8f-9e74-de28629f863a
stock_keeping_unit: null
description: Large
weight: null
length: null
width: null
depth: null
price: 20
price_display: SGD 20.00
price_stored: 2000
quantity: 148
quantity_alert_level: 10
product_variation_weight: 255
variation_value_1: Large
variation_value_2: null
variation_value_3: null
variation_key_1: Size
variation_key_2: null
variation_key_3: null
images:
- id: 9a12fab6-1e76-448e-8c45-e84e2e38f294
caption: Beanie
url:
other_dimensions:
- size: icon
path:
- size: large
path:
- size: small
path:
- size: medium
path:
- size: thumbnail
path:
is_published: true
created_at: '2023-09-07T13:04:22+08:00'
updated_at: '2023-09-18T14:36:54+08:00'
starts_at: null
ends_at: null
schema:
type: object
properties:
id:
type: string
business_id:
type: string
category_id:
type: array
items:
type: string
name:
type: string
headline:
type: string
nullable: true
description:
type: string
currency:
type: string
price:
type: number
price_display:
type: string
price_stored:
type: integer
tax_id:
type: string
nullable: true
is_manageable:
type: integer
is_pinned:
type: boolean
status:
type: string
product_weight:
type: integer
description: Weight in gram
nullable: true
delivery_method_required:
type: boolean
nullable: true
has_variations:
type: boolean
is_shopify:
type: boolean
product_url:
type: string
variations_count:
type: integer
variations:
type: array
items:
type: object
properties:
id:
type: string
stock_keeping_unit:
type: string
nullable: true
description:
type: string
weight:
type: string
nullable: true
length:
type: string
nullable: true
width:
type: string
nullable: true
depth:
type: string
nullable: true
price:
type: number
price_display:
type: string
price_stored:
type: integer
quantity:
type: integer
quantity_alert_level:
type: integer
product_variation_weight:
type: integer
description: Weight in gram
nullable: true
variation_value_1:
type: string
variation_value_2:
type: string
nullable: true
variation_value_3:
type: string
nullable: true
required:
- id
- stock_keeping_unit
- description
- weight
- length
- width
- depth
- price
- price_display
- price_stored
- quantity
- quantity_alert_level
- variation_value_1
- variation_value_2
- variation_value_3
variation_key_1:
type: string
nullable: true
variation_key_2:
type: string
nullable: true
variation_key_3:
type: string
nullable: true
images:
type: array
items:
type: object
properties:
id:
type: string
caption:
type: string
nullable: true
url:
type: string
other_dimensions:
type: array
items:
type: object
properties:
size:
type: string
path:
type: string
required:
- id
- caption
- url
- other_dimensions
is_published:
type: boolean
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
starts_at:
type: string
format: date-time
nullable: true
ends_at:
type: string
format: date-time
nullable: true
required:
- id
- business_id
- category_id
- name
- description
- currency
- price
- price_display
- price_stored
- is_manageable
- is_pinned
- status
- has_variations
- is_shopify
- product_url
- variations_count
- variations
- is_published
- created_at
- updated_at
'404':
description: '404'
content:
application/json:
examples:
Result:
value: "{\n \"message\": \"No query results for model [App\\\\Business\\\\Product].\" 973ee456-d28f-4418-93c5-d37e4b311685\"\n}"
schema:
type: object
properties:
message:
type: string
deprecated: false
x-readme:
code-samples:
- language: curl
code: 'curl --location --request GET ''https://api.sandbox.hit-pay.com/v1/products/9a12fab4-d112-48af-9d6b-050d650b0a25'' \n--header ''X-BUSINESS-API-KEY: 9011d0e1e03c1e2d79cdcf1fd7147eaa6d339e4ba5e42df38d8b495e7ed8e9fc'' \n--header ''X-Requested-With: XMLHttpRequest'''
name: Example request
samples-languages:
- curl
tags:
- Products
post:
summary: Update the product
description: This endpoint allows you to update the product.
operationId: update-product
parameters:
- name: X-BUSINESS-API-KEY
in: header
required: true
style: simple
explode: false
schema:
type: string
example: b286daabf9921b5a01a4621f026c111e046f8911feba212996c92159b98427d
- name: product_id
in: path
required: true
schema:
type: string
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
name:
type: string
examples:
- Product Beanie
description: The name of the product
description:
type: string
description: The description of the product
headline:
type: string
description: The headline of the product
quantity:
type: number
examples:
- 1
description: The quantity of the product
minimum: 0
quantity_alert_level:
type: number
examples:
- 1
description: The quantity alert level of the product. It is required when quantity alert level is present.
minimum: 0
currency:
type: string
description: The currency of the product
example: sgd
price:
type: number
description: The price of the product
category_ids:
type: array
description: The list of business product category ids of the product
items:
type: string
format: uuid
description: The category ids of the product
example: 9a12fab0-d282-4437-9460-c3d26662d11a
example:
- 9a12fab0-d282-4437-9460-c3d26662d11a
is_manageable:
type: string
description: The is manageable of the product
enum:
- '1'
- '0'
default: '1'
is_pinned:
type: string
description: The is pinned of the product
enum:
- '1'
- '0'
default: '0'
product_weight:
type: integer
description: Weight in gram
nullable: true
delivery_method_required:
type: boolean
nullable: true
existing_variation:
type: array
items:
type: object
properties:
id:
type: string
format: uuid
image:
type: string
format: binary
price:
type: number
quantity:
type: integer
quantity_alert_level:
type: integer
product_variation_weight:
type: integer
description: Weight in gram
nullable: true
variation_value_1:
type: string
variation_value_2:
type: string
nullable: true
variation_value_3:
type: string
nullable: true
required:
- id
- price
- quantity
- quantity_alert_level
images:
type: array
items:
type: object
properties:
image:
type: string
format: binary
publish:
type: string
enum:
- '1'
- '0'
default: '1'
_method:
type: string
default: PATCH
value: PATCH
required:
- name
- price
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value:
id: 9a12fab4-d112-48af-9d6b-050d650b0a25
business_id: 9130c422-bf97-4bd1-b370-07a3a6f40708
category_id:
- 9a12fab0-d282-4437-9460-c3d26662d11a
name: Beanie
headline: null
description: Stylish hat suitable for the winter.
currency: SGD
price: 15
price_display: SGD 15.00
price_stored: 1500
tax_id: null
is_manageable: 1
is_pinned: false
status: published
product_weight: 250
delivery_method_required: true
has_variations: true
is_shopify: false
product_url:
variations_count: 2
variations:
- id: 9a12fab4-d998-44ea-ad11-8753be88a1c9
stock_keeping_unit: null
description: Medium
weight: null
length: null
width: null
depth: null
price: 18
price_display: SGD 18.00
price_stored: 1800
quantity: 150
quantity_alert_level: 10
product_variation_weight: 250
variation_value_1: Medium
variation_value_2: null
variation_value_3: null
- id: 9a12fab4-dd20-4f8f-9e74-de28629f863a
stock_keeping_unit: null
description: Large
weight: null
length: null
width: null
depth: null
price: 20
price_display: SGD 20.00
price_stored: 2000
quantity: 148
quantity_alert_level: 10
product_variation_weight: 255
variation_value_1: Large
variation_value_2: null
variation_value_3: null
variation_key_1: Size
variation_key_2: null
variation_key_3: null
images:
- id: 9a12fab6-1e76-448e-8c45-e84e2e38f294
caption: Beanie
url:
other_dimensions:
- size: icon
path:
- size: large
path:
- size: small
path:
- size: medium
path:
- size: thumbnail
path:
is_published: true
created_at: '2023-09-07T13:04:22+08:00'
updated_at: '2023-09-18T14:36:54+08:00'
starts_at: null
ends_at: null
schema:
type: object
properties:
id:
type: string
business_id:
type: string
category_id:
type: array
items:
type: string
name:
type: string
headline:
type: string
nullable: true
description:
type: string
currency:
type: string
price:
type: number
price_display:
type: string
price_stored:
type: integer
tax_id:
type: string
nullable: true
is_manageable:
type: integer
is_pinned:
type: boolean
status:
type: string
has_variations:
type: boolean
is_shopify:
type: boolean
product_url:
type: string
variations_count:
type: integer
variations:
type: array
items:
type: object
properties:
id:
type: string
stock_keeping_unit:
type: string
nullable: true
description:
type: string
weight:
type: string
nullable: true
length:
type: string
nullable: true
width:
type: string
nullable: true
depth:
type: string
nullable: true
price:
type: number
price_display:
type: string
price_stored:
type: integer
quantity:
type: integer
quantity_alert_level:
type: integer
variation_value_1:
type: string
variation_value_2:
type: string
nullable: true
variation_value_3:
type: string
nullable: true
required:
- id
- stock_keeping_unit
- description
- weight
- length
- width
- depth
- price
- price_display
- price_stored
- quantity
- quantity_alert_level
- variation_value_1
- variation_value_2
- variation_value_3
variation_key_1:
type: string
nullable: true
variation_key_2:
type: string
nullable: true
variation_key_3:
type: string
nullable: true
images:
type: array
items:
type: object
properties:
id:
type: string
caption:
type: string
nullable: true
url:
type: string
other_dimensions:
type: array
items:
type: object
properties:
size:
type: string
path:
type: string
required:
- id
- caption
- url
- other_dimensions
is_published:
type: boolean
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
starts_at:
type: string
format: date-time
nullable: true
ends_at:
type: string
format: date-time
nullable: true
required:
- id
- business_id
- category_id
- name
- description
- currency
- price
- price_display
- price_stored
- is_manageable
- is_pinned
- status
- has_variations
- is_shopify
- product_url
- variations_count
- variations
- is_published
- created_at
- updated_at
'422':
description: '422'
content:
application/json:
examples:
Result:
value: '{"message":"The given data was invalid.","errors":{"name":["The name field is required."]}}'
schema:
type: object
properties:
message:
type: string
errors:
type: object
properties:
name:
type: array
items:
type: string
deprecated: false
x-readme:
code-samples:
- language: curl
code: 'curl --location --request PATCH ''https://api.sandbox.hit-pay.com/v1/products/9a12fab4-d112-48af-9d6b-050d650b0a25'' \n--header ''X-BUSINESS-API-KEY: 9011d0e1e03c1e2d79cdcf1fd7147eaa6d339e4ba5e42df38d8b495e7ed8e9fc'' \n--header ''X-Requested-With: XMLHttpRequest'' \n--header ''Content-Type: application/json'' \n--data-raw ''{"name":"Beanie","headline":"","description":"Stylish hat suitable for the winter.
","currency":"SGD","price":15,"price_display":"SGD 15.00","price_stored":1500,"tax_id":null,"is_manageable":1,"is_pinned":false,"status":"published","has_variations":true,"is_shopify":false,"product_url":"","variations_count":2,"variations":[{"id":"9a12fab4-d998-44ea-ad11-8753be88a1c9","stock_keeping_unit":null,"description":"Medium","weight":null,"length":null,"width":null,"depth":null,"price":18,"price_display":"SGD 18.00","price_stored":1800,"quantity":150,"quantity_alert_level":10,"variation_value_1":"Medium","variation_value_2":null,"variation_value_3":null},{"id":"9a12fab4-dd20-4f8f-9e74-de28629f863a","stock_keeping_unit":null,"description":"Large","weight":null,"length":null,"width":null,"depth":null,"price":20,"price_display":"SGD 20.00","price_stored":2000,"quantity":148,"quantity_alert_level":10,"variation_value_1":"Large","variation_value_2":null,"variation_value_3":null}],"variation_key_1":"Size","variation_key_2":null,"variation_key_3":null,"starts_at":null"}'
samples-languages:
- curl
tags:
- Products
delete:
summary: Delete a Product
description: This endpoint allows you to delete a product.
operationId: delete-product
parameters:
- name: X-BUSINESS-API-KEY
in: header
required: true
style: simple
explode: false
schema:
type: string
example: b286daabf9921b5a01a4621f026c111e046f8911feba212996c92159b98427d
- name: product_id
in: path
required: true
schema:
type: string
responses:
'204':
description: '204'
content:
application/json:
examples:
Result:
value: '1'
schema:
type: integer
deprecated: false
x-readme:
code-samples:
- language: curl
code: 'curl --location --request DELETE ''https://api.sandbox.hit-pay.com/v1/products/9a12fab4-d112-48af-9d6b-050d650b0a25'' \n--header ''X-BUSINESS-API-KEY: 9011d0e1e03c1e2d79cdcf1fd7147eaa6d339e4ba5e42df38d8b495e7ed8e9fc'' \n--header ''X-Requested-With: XMLHttpRequest'''
name: Example request
samples-languages:
- curl
tags:
- Products
x-readme:
headers: []
explorer-enabled: true
proxy-enabled: true
samples-enabled: true
x-readme-fauxas: true