Get started
API Endpoint
https://www.jeweal.com.hk/
The CMS provides programmatic access post new data. Retrieve a data, provide an auth connection.
To use this API, you need an API keys (Secrect_key, Appid). You can generate these keys from your account by creating add application. If you have any concern related to APIs integration please contact on abc.com
Get Authorization
Step 1: Request your App secret & Id
Login to your partner account and create application ,after creation will provide app id,secret key,
Step 2: Send authorization request to connect your app
# Here is a curl example
curl -X POST \
'https://www.jeweal.com.hk/api/authorize' \
--form 'app_id="dsc-1730811900547857"' \
--form 'app_secret="08f99f7a2c0c7f2e05b934853947a381"'
To get access token you need to make a POST call to the following url :
https://www.jeweal.com.hk/api/authorize
Result example :
{
"access_token": "d1f8add83408a4fc2e82b24fb12973f88971c40c39130d5fe1791a319e42a43fe3b80dc461dd8addc2e53372e30e1b0ac2c6f1501016436e35080227a4c1da00UifUqtTch1yGeRO4USUm0QxmZ2Tr+pL6ACcjkgueQEo=",
"refresh_token": "f1799903c9bc9f37f13b216fb58d945360b7ebdc81f7ff9a9624f566a062b8ebd1185c0eab741e11cd7a3b3564f95e367e4cb68984bbdd407607ecc392adeba3L0HNDA7ykE/eRxNAW40M5xWCzwWXaUSoFJfnrk1HcTs=",
"expires": 1650889009,
"expires_in": 10800,
"token_type": "Bearer"
}
QUERY PARAMETERS
Field
Type
Description
secret_key
String
Your Secret key.
App Id
String
Your APP Id.
Note:- Authorization code valid for 10 minutes
Step 3: Refresh the access token
Access tokens are valid for set amount of time. When an access token expires, get your application to request a new access token using the refresh token received in Step 3.
App Id
When you created app required
client_secret
When you created application required
refresh_token
from step 2 when get response on request access token
#Curl request for referesh Token
curl -X POST \
'https://www.jeweal.com.hk/api/refresh_token' \
-H 'app_id="dscss-7852446709037070"' \
-H 'app_secret="5db0b2785094c01c545412e049"' \
-H 'refresh_token="5beddfdfd4737c928a4b328b3310e49fa47f726977300a72b17f6988b56161af1b67a739fb4dedd840337d2f99001e8528ceeb1c24ceae1a1542445b6b81CvYwjHRfbCWpuZoz8HCTN3Xk4ZTiJu4ggvcxCVQ="'
To get referesh token you need to make a POST call to the following url :
https://www.jeweal.com.hk/api/refresh_token
Result example :
{
"access_token": "jujjtedssdxfgh",
"refresh_token": "dfdfffffddvfgbg",
"expires": 1652790037,
"expires_in": 10800,
"token_type": "Bearer"
}
ADD CUSTOMER
To add customer you need to make a POST call to the following url :
https://www.jeweal.com.hk/Api/customer
HEADER PARAMETERS
Field
Value
Access-Token
{YOUR TOKEN }
Content-Type
application/json
QUERY PARAMETERS
Field
Type
Description
salv
String
salv should be in String (Required)
name
String
name should be in String (Required)
address1
String
address1 should be in String (Required)
address2
String
address2 should be in String (Optional)
city
String
city should be in String (Required)
zip
String
zip should be in String (Required)
country
String
country should be in String (Required)
region
String
region should be in String (Required)
gender
String
gender should be in String (Required)
age
String
age should be in String (Required)
attention
String
attention should be in String (Optional)
mobile
String
mobile should be in String (Optional)
phone
String
phone should be in String (Optional)
email
String
email should be in String (Optional)
pan
String
pan should be in String (Optional)
gstin
String
gstin should be in String (Optional)
location
String
location should be in String (Optional)
remark
String
remark should be in String (Optional)
rc
String
rc should be in String (Optional)
dob
Date
String character by Birth Date (Required)
#Curl request for Customer post
curl -X POST \
'https://www.jeweal.com.hk/Api/customer' \
-H 'Access-Token: ab0605929a8bf81dfc36dd9b2b5268cbdf59aa9a6919eed7f2cf2c33cc671d2bc5e032df5e75de9da82bc201cdc6fd43adcf235710da964b3c680ee8b8256a4ceSbDyMOxzxPA9zcXIDnowh568oFhcZsytUENiwqZQiQ=' \
-H 'Content-Type: application/json' \
-d '{
"salv":"Mr",
"name":"john",
"address1":"your address",
"address2":"your address",
"city":"newyork",
"zip":"123456",
"country":"Thailand",
"region":"Bangkok",
"gender":"Male",
"age":"30-39",
"attention":"Your Attention",
"mobile":"1234567890",
"phone":"1234567890",
"email":"johndoe@gmail.com",
"pan":"12edw",
"gstin":"12rfE",
"location":"Bangkok",
"remark":"remark",
"rc":"8755",
"dob":"12/05/1993"
}'
Result example :
{
"status": true,
"message": "Customer successfully registered"
}
ADD Product
To add product you need to make a POST call to the following url :
https://www.jeweal.com.hk/Api/product
HEADER PARAMETERS
Field
Value
Access-Token
{YOUR TOKEN }
Content-Type
application/json
QUERY PARAMETERS
Field
Type
Description
name
String
name should be in String
product_name
String
product_name should be in String
item
String
item should be in String
metal
String
metal should be in String
color
String
color should be in String
size
String
size should be in String
sku_description
String
sKU description should be in String
family
String
family should be in String
style
String
style should be in String
gwt
String
gwt should be in String
nwt
String
nwt should be in String
collection
String
collection should be in String
design
String
design should be in String
mo_price
String
mo_price should be in Decimal
tag_price
String
tag_price should be in Decimal
stone_price
String
stone_price should be in Decimal
labour_price
String
labour_price should be in Decimal
active
String
true or false (Required)
stone
Array
Stone should be in array , see below for details.
Stone Array Item
Field
Type
Description
stone_group
String
stone group should be in String
stone
String
Stone should be in String
align
String
align should be in String
shape
String
Shape should be in String
quality
String
Quality should be in String
clarity
String
Clarity should be in String
color
String
Color should be in String
size
String
Size should be in String
pcs
String
Pcs should be in Integer
cts
String
Cts should be in String
price
String
Price should be in Decimal
setting_type
String
setting_type should be in String
# Curl request for New Product
curl --location --request POST 'https://www.jeweal.com.hk/Api/product' \
--header 'Access-Token: ccfd76522c4c146e03d855ab779865ed80ab4223028f4c0e33eca74540b6e02178338280818100e0eb8b03350719c97423adb45c1851e5e80492a5b60fbafe68s0Pwtu7bz8af+jbjvmQDPoiXNgJy8IuSk23GunNimOM=' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "10003-ONline-001",
"product_name": "Spiny Oyster Turquoise Ring size-7.5",
"item": "Partiware Ring",
"metal": "18KWW",
"color": "Platinum Gold",
"size": "60 MM",
"sku_description": "Testing online",
"family": "DIAMOND JEWELLERY",
"style": "PLAN CHAIN",
"gwt": "30.2",
"nwt": "25.0",
"collection": "Testing",
"design": "Testing",
"mo_price": "Testing",
"tag_price": "Testing",
"stone_price": "Testing",
"labour_price": "Testing",
"active": "true",
"stone": [
{
"stone_group": "Diamond",
"stone": "Diamond",
"align": "C",
"shape": "round",
"quality": "vvs",
"clarity": "-",
"color": "D",
"size": "1.50-2.00 MM",
"unit": "Cts",
"pcs": "1",
"cts": "0.035",
"price": "55000",
"setting_type": "PRONG"
},
{
"stone_group": "Diamond",
"stone": "Diamond",
"align": "C",
"shape": "round",
"quality": "vvs",
"clarity": "-",
"color": "D",
"size": "1.50-2.00 MM",
"unit": "Cts",
"pcs": "1",
"cts": "0.025",
"price": "55000",
"setting_type": "PRONG"
},
{
"stone_group": "Diamond",
"stone": "CATS EYE",
"align": "W",
"shape": "round",
"quality": "vvs",
"clarity": "-",
"color": "D",
"Size": "1.50-2.00 MM",
"unit": "Cts",
"pcs": "1",
"cts": "0.015",
"price": "55000",
"setting_type": "PRONG"
}
]
}'
Result example :
{
"status": true,
"message": "Product inserted successfully"
}
ADD Stone
To add stone you need to make a POST call to the following url :
https://www.jeweal.com.hk/Api/addstone
HEADER PARAMETERS
Field
Value
Access-Token
{YOUR TOKEN }
Content-Type
application/json
Stone Item
Field
Type
Description
sku
Text
sku should be in String (Required)
stone_group
Text
Stone Group should be in String (Required)
stone
Text
Stone should be in String (Required)
align
Text
Align should be in String (Required)
shape
Text
Shape should be in String (Required)
quality
Text
Quality should be in String (Required)
clarity
Text
Clarity should be in String (Required)
color
Text
Color should be in String (Required)
size
Text
Size should be in String (Required)
pcs
Text
Pcs should be in String (Required)
cts
Text
Cts should be in String (Required)
price
Text
Price should be in String (Required)
setting_type
Text
setting_type should be in String (Required)
# Curl request for add stone
curl --location --request POST 'https://www.jeweal.com.hk/Api/addstone' \
--header 'Access-Token: ccfd76522c4c146e03d855ab779865ed80ab4223028f4c0e33eca74540b6e02178338280818100e0eb8b03350719c97423adb45c1851e5e80492a5b60fbafe68s0Pwtu7bz8af+jbjvmQDPoiXNgJy8IuSk23GunNimOM=' \
--header 'Content-Type: application/json' \
--data-raw '{
"sku": "R001",
"stone_group": "Diamond",
"stone": "Diamond",
"align": "C",
"shape": "round",
"quality": "Rose Cut",
"clarity": "-",
"color": "D",
"size": "1.50-2.00 MM",
"unit": "Cts",
"pcs": "1",
"cts": "12.00",
"price": "55000",
"setting_type": "PRONG"
}'
Result example :
{
"status": true,
"message": "Stone inserted successfully"
}
Sale Order
To sale order you need to make a POST call to the following url :
https://www.jeweal.com.hk/Api/sale_order
HEADER PARAMETERS
Field
Value
Access-Token
{YOUR TOKEN}
Content-Type
application/json
QUERY PARAMETERS
Field
Type
Description
date
String
date should be in String (dd/mm/yyyy) (Required)
account
String
Account should be in String (Required)
ref
String
ref should be in String (Required)
voucher
String
voucher should be in String (Required)
deldate
String
deldate should be in String (Required)
items
Array
items should be in array (Required), see below for details.
Item Array Entity
Field
Type
Description
name
String
Name should be in String (Required)
cref
String
Cref should be in String (Required)
metal
String
Metal should be in String (Required)
color
String
Color should be in String (Required)
size
String
Size should be in String (Required)
gwt
Text
Gwt should be in String (Required)
gwt
Text
Nwt should be in String (Required)
price
Text
Price should be in String (Required)
stone
Array
Stone should be in array (Required), see below for details.
Stone Array Entity
Field
Type
Description
stone
String
stone should be in String (Required)
align
String
Align should be in String (Required)
shape
String
shape should be in String (Required)
quality
String
quality should be in String (Required)
clarity
String
clarity should be in String (Required)
color
String
color should be in String (Required)
size
String
Size should be in String (Required)
unit
String
Unit should be in String (Required)
pcs
Integer
Pcs should be in Numeric (Required)
cts
String
Cts should be in String (Required)
price
Text
Price should be in String (Required)
setting_type
String
setting_type should be in String (Required)
lab
String
Lab should be in String
certno
String
Certificate no in String
# Curl request for Sale Order
curl --location --request POST 'https://www.jeweal.com.hk/Api/sale_order' \
--header 'Access-Token: ccfd76522c4c146e03d855ab779865ed80ab4223028f4c0e33eca74540b6e02178338280818100e0eb8b03350719c97423adb45c1851e5e80492a5b60fbafe68s0Pwtu7bz8af+jbjvmQDPoiXNgJy8IuSk23GunNimOM=' \
--header 'Content-Type: application/json' \
--data-raw '{
"date": "07/07/2022",
"account": "Mr Narendra Sharma",
"ref": "testing gis so444",
"voucher": "Customer Order",
"deldate": "07/07/2022",
"items": [{
"name": "10003-ONline-002",
"cref": "Client504",
"metal": "18KWW",
"color": "Platinum Gold",
"size": "60 MM",
"gwt": "30.2",
"nwt": "25.0",
"price": "1000.0",
"stone": [{
"stone": "Diamond",
"align": "C",
"shape": "round",
"quality": "vvs",
"clarity": "-",
"color": "D",
"size": "1.50-2.00 MM",
"unit": "Cts",
"pcs": "1",
"cts": "0.035",
"price": "15000",
"setting_type": "PRONG",
"lab": "GIA",
"certno": "1215454"
},
{
"stone": "Diamond",
"align": "C",
"shape": "round",
"quality": "vvs",
"clarity": "-",
"color": "D",
"size": "1.50-2.00 MM",
"unit": "Cts",
"pcs": "1",
"cts": "0.025",
"price": "25000",
"setting_type": "PRONG",
"lab": "GIA",
"certno": "1215454"
},
{
"stone": "CATS EYE",
"align": "W",
"shape": "round",
"quality": "vvs",
"clarity": "-",
"color": "D",
"size": "1.50-2.00 MM",
"unit": "Cts",
"pcs": "1",
"cts": "0.015",
"price": "35000",
"setting_type": "PRONG",
"lab": "GIA",
"certno": "1215454"
}
]
}]
}'
Result example :
{
"status": true,
"message": "Sale Order inserted successfully"
}
Sale
To sale you need to make a POST call to the following url :
https://www.jeweal.com.hk/Api/sale
HEADER PARAMETERS
Field
Value
Access-Token
{YOUR TOKEN}
Content-Type
application/json
QUERY PARAMETERS
Field
Type
Description
date
String
date should be in String (dd/mm/yyyy) (Required)
account
String
Account should be in String (Required)
ref
String
ref should be in String (Required)
voucher
String
voucher should be in String (Required)
items
Array
items should be in array (Required), see below for details.
Item Array Entity
Field
Type
Description
stockid
String
Stockid should be in String (Required)
uuid
String
uuid should be in String (Required)
pcs
String
Pcs should be in String (Required)
gwt
String
Gwt should be in String (Required)
nwt
String
Nwt should be in String (Required)
price
Text
Price should be in String (Required)
remark
Text
Remark should be in String.
# Curl request for Sale Order
curl --location --request POST 'https://www.jeweal.com.hk/Api/sale' \
--header 'Access-Token: ccfd76522c4c146e03d855ab779865ed80ab4223028f4c0e33eca74540b6e02178338280818100e0eb8b03350719c97423adb45c1851e5e80492a5b60fbafe68s0Pwtu7bz8af+jbjvmQDPoiXNgJy8IuSk23GunNimOM=' \
--header 'Content-Type: application/json' \
--data-raw '{
"date": "07/07/2022",
"account": "Client",
"ref": "testing gis so444",
"voucher": "LOCAL SALE",
"items": [{
"stockid": "1000",
"uuid": "12445451254545",
"pcs": "1",
"gwt": "30.2",
"nwt": "25.0",
"price": "1000.0",
"remark": "Test"
}]
}'
Result example :
{
"status": true,
"message": "Sale inserted successfully"
}