API Data Exchange Service

Jasani offers a simple and efficient customer API service to retrieve information for various purposes like product information, pricing and stock levels, as well as, placing purchase orders for products directly into our system, with delivery and dropshipping options.

Eligibility for API's: To access Jasani's API, you must be a registered customer. For registration, you must request Jasani portal access by contacting your Jasani salesperson or filling up our contact us form

If you are registered already, then you will need to login first and return to this webpage to view the next section of this page

Jasani is offering an API service to use our product data within your own ecommerce and IT solutions.

 

In order to access this API service, you will need reseller authorization as well as a unique token to start using the API service. To request your token, kindly contact us.

 

With the API’s, you’ll be able to do the following:

 

Product API

You will make a GET request to www.jasani.ae/products/all/<token> or any of our other websites simply by replacing "jasani.ae" in the URL with the correct website address you would like to access.

You will receive an XML object containing following fields:


Field Name

type

Definition

id

integer

Unique identifier integer for a specific product. This is a database value

name

text

Full Name of the Product, as it appears on our website

default_code

char

Jasani Product Code as it appears on our website.

description_sale

text

This is a long text field containing the description of the product as it appears on our website

brand_id

Many2One array

This is a Many2One field defining the brand that the product belongs to

public_categ_ids

Many2Many array

This is a Many2Many field containing an array of category ids and category names that the product belongs to. Category names are the important values to extract here from the array. Most products belong to 1-5 categories in general, however there is not a fixed number of categories that a product can belong to.

product_template_attribute_value_ids

Many2Many array

This will return the array of product attributes, applicable for Garments only. The return array could look like this:
[{“id”: 312, “display_name”: “Size: M”}, {“id”: 313, “display_name”: “Color: Grey”}].

For other products, it will return an empty set

image_url

char

Contains the URL of the primary product image

product_variant_image_ids


to be removed

images

Many2Many array

Contains an array of additional secondary image URL’s

color

char

Product color mentioned in text format

configurable

boolean

true if product is configurable with a specific size and color parameter, applicable only for apparel / garment products

false for all other product types

parent_id

integer

refers to the Product Template id. Use this only to group configurable products that have the same parent_id. For example, all the color and size variants of a configurable product can be grouped based on having the same parent id.

For non-configurable products, this value is meaningless so can ignore.

color_options

array

Shows an array of parent_id integer values that are the alternative color option products of this product. This is applicable only to non-configurable products, as configurable products use a different system for color and size grouping mentioned in this field: product_template_attribute_value_ids



 

Price API

You will make a GET request to www.jasani.ae/products/price/<token>

Field Name

type

description

id

integer

Unique identifier integer of the product in database

default_code

text

Jasani Product Code

currency

char

Your currency

product_price

float

Your price

 

Stock API 

You will make a GET request to www.jasani.ae/products/stock/<token>

Field Name

type

description

id

integer

Unique identifier integer of the product in database

default_code

text

Jasani Product Code

blocked_qty

float

This quantity is reserved by other clients and not currently available to sell. It may become available in future in case this order does not confirm but cannot be guaranteed.

net_available_qty

float

This is the quantity of guaranteed stock available to sell. Use this field as the primary stock quantity available.

incoming_qty

float

This shows the quantity of product which is currently in production, and will become available in stock at a future date. The expected future date is also provided in the API call - incoming_date

total_qty

float

This is the Total Quantity in our warehouse, but includes Stock Blockings, which is potentially reserved for other clients and not available to sell.

total_qty = net_available_qty + blocked_qty

incoming_date

date

If there is a incoming_qty of stock which is in production, then this field provides an expected date of arrival of this stock. If not, it'll display False


 
Order API - requires additional authorization to use. Please contact us to use this feature.

You will make a POST request to www.jasani.ae/orders/place_order

The order details will be passed as a JSON object, with the headers as follows in Python:

Below example of POST request in Python:

import requests

data = {"customer_reference": "PO12345", ​"contact_number": "+971551234567", ​"products": [​​{​"product_id": 15059,​"quantity": 2}],
​​"order_type": "dropship", ​"shipping_method": "Deliver to My Address", ​"delivery_address": {
​​​"name": "ORDER API Test-1",
       "street": "123 Delivery St",
       "street2": "Apt 4B",
       "city": "Cityville",
       "state": "Dubai",
       "country": "AE",
       "zip": "12345",
       "phone": "1234567890" headers = {'Content-Type': 'application/json', 'Authorization': <token>}

response = requests.post("https://www.jasani.ae/orders/place_order", data=data, headers=headers)

# Example response: {"jsonrpc": "2.0", "id": null, "result": {"success": true, "order_id": 1753567}}


Below example of POST request in CURL:

curl -X POST https://www.jasani.ae/orders/place_order \
​-H "Authorization: Bearer <token>" \
​-H "Content-Type: application/json" \
​-d'{
​"customer_reference": "PO12345",
​"contact_number": "+971551234567",
​"products": [
​​{
​"product_id": 15059,
​"quantity": 2,
​}
​],
​"order_type": "dropship",
​"shipping_method": "Deliver to My Address",
​"delivery_address": {
​​"name": "ORDER API Test-1",
                "street": "123 Delivery St",
                "street2": "Apt 4B",
                "city": "Cityville",
                "state": "Dubai",
                "country": "AE",
                "zip": "12345",
                "phone": "1234567890"
            }
}'

# Example response: {"jsonrpc": "2.0", "id": null, "result": {"success": true, "order_id": 1753567}}

Below table to explain the parameter values for the JSON object:

Field

Type

Description

customer_reference

char

Enter your PO number for the order

contact_number

text

Enter the phone number of the recipient

products

Many2Many

Enter the array of product ID's and product quantity in the order. The product ID is the unique identifier 'id' field for product as per our database, and not the Jasani Product Code (i.e., internal_reference). 

Note: The pricing and taxes will be calculated automatically based on your pricelist. 

order_type

selection

Choose from the below options only:
"delivery" - to deliver to your address
"dropship" - to deliver direct to your client address

shipping_method

selection

Choose from available shipping options for your region. 

For UAE - "Deliver to my Address"
For other markets, just ask us for the option to use.

Note: The shipping costs are automatically calculated and billed as per the option selected.

delivery_address

array

The delivery address for the order to be setup as per the examples. The list of mandatory and optional fields are shown below.

name
street
street2 - optional
city
state - optional
country - use "AE" for UAE
zip - optional
phone - optional



Test Connection API

As our primary API's have rate limiters in place, we have a test website built specifically to allow you to test your API connections and data download before you start. The test website is https://api-test.jasani.ae. All integration and test code works in the exact same way as above.


Error Handling

You will receive a 403 Forbidden Error response in following situations:

1. Incorrect token or URL structure

2. If you exceed daily limit of 5 API calls. Day is measured as per UAE timezone. Order API's have no limit