API's for the diamond industry

Transaction API - Preparation

Overview: This API will give you the information you need to place your order on IDEX Online. You will need to know the shipping price of the diamonds, your branch number. This API will give you a list of your possible delivery addresses, branches, and get the shipping prices for the different shipping methods. You will need this information before placing your order.

Input Parameters

Note: you must use a valid Api Key that provides access to this service.
Parameter Details Format Mandatory
api_key Your API key, for example "HNNSSA1223311" String Yes
api_secret Your API secret, for example "DDccdaaedf123" String Yes
diamond_ids ID's of the diamonds for your order, e.g. [12344123,1234412]
Numeric Array Yes
branch_id Branch ID for delivery. For example 54312
You can get this information from the "Account Info API"
Integer Yes

Sample Request

HTTP JSON
Endpoint: https://api.idexonline.com/transactionapi/api/v3.0/preparation
{
	"authentication_details":{
		"api_key":"HNNSSA1223311",
		"api_secret":"DDccdaaedf123"
	},
	"parameters":{
		"diamond_ids": [12345678,55443322]
		"branch_id": null
	}
}

Sample Success Response

JSON Data
If all goes well, the HTTP code will be 200 and the JSON will contain a "response_code" with value 0
Note that if the shipping price is 'null', that means no shipping route is available for this transaction. You can ask you IDEX account manager for more details.
{
    "result_info": {
        "response_code": 0,
        "response_description": ""
    },
    "results": {
        "items_included": 2,
        "diamonds": [
            {
                "diamond_id": 387665879,
                "shape": "Round",
                "weight": 0.63,	
                "color_short": "G",
                "clarity": "VVS1",
                "lab": "EGL USA",
                "grading_report_number": "1361625",
                "diamond_price_per_carat": 1400,
                "diamond_net_price": 882.00,
                "auth_fee": 5
            },
            {
                "diamond_id": 380175681,
                "shape": "Round",
                "weight": 0.92,	
                "color_short": "H",
                "clarity": "VS2",
                "lab": "GIA",
                "grading_report_number": "31361625",
                "diamond_price_per_carat": 2020,
                "diamond_net_price": 1858.40,
                "auth_fee": 10
            }
        ],
        "pricing": {
            "total_diamond_net_price": 2738,
            "total_auth_fee": 15,
            "total_trans_fee": 82.59,
            "total_pay_fee": 30
        },
        "shipping": {
            "delivery_branch_id": 12345,
            "company": "Your Branch Name",
            "address": "Emekachu 44",
            "city": "Milano",
            "country": "Italy"
            "standard_shipping_fee": 98.2,
            "expedited_shipping_fee": null
        }
    }
}

Sample Error Response

JSON Data
In case of an exception, either the HTTP code will be 500 or the error message will be displayed in this format:
{
    "result_info": {
        "response_code": 32110,
        "response_description": "A description of the exception."
    }
}

Error Codes

Common error codes
51001
Missing authentication section in JSON
51002
Missing api_key
51003
Missing api_secret
52101
Api Secret does not match Api Key (authentication failed)
52201
Not authorized
52202
Not authorized to buy.
51299
Specific parameter missing (details in message)
53208
That's not your branch
53206
One or more diamonds not available

Go to the test page







© IDEX 2025, www.idexonline.com