Introduction
To use the API document of Ronad company, it is recommended to read the guide for using the Ronad Panel to get familiar with the working process of Ronad. In short, to use Ronad services, you must do the following steps:
1- Define your products in Ronad
2- Send them to Ronad with parcel
3- Create your orders
Authentication
You need token for use Ronad API service. Please contact Ronad customer service or your account manager.
Seller/Provider
If you are a market place that you need to define your products with seller or provider, you need define them before define your produscs. Otherwise go to define products directly.
Create seller
This example is for create,get and edit seller. you can use this for define providers. Replace "seller" with "provider" in url.
curl POST 'https://api.ronad.ir/v1/seller?token=' \
--header 'Content-Type: application/json' \
--data-raw '{
"code": "123456890","name": "فروشنده 1"
}'
Parameters
value | type | Description |
---|---|---|
code | string | this code use for create product |
name | string | 2-50 character |
Get seller
curl GET 'https://api.ronad.ir/v1/seller?page=0&size=100&token=' \
--header 'Content-Type: application/json' \
Edit seller
curl PUT 'https://api.ronad.ir/v1/seller?token=' \
--header 'Content-Type: application/json' \
--data-raw '{
"code": "123456890","name": "فروشنده 1"
}'
Category
You can define your products with or without category. If number of your products are less than 2000 we recommend do not use category.
Create category
curl POST 'https://api.ronad.ir/v1/categories?token=' \
--header 'Content-Type: application/json' \
--data-raw '{
"code": "123456890","name": "الکترونیکی"
}'
Get category
curl GET 'https://api.ronad.ir/v1/categories?page=0&size=100&token=' \
--header 'Content-Type: application/json' \
Edit category
curl PUT 'https://api.ronad.ir/v1/category?token=' \
--header 'Content-Type: application/json' \
--data-raw '{
"code": "123456890","name": "الکترونیکی"
}'
Product
You can define your products with or without varaints. please watch the training video of product in Ronad panel. Product registration can be done individually or through an Excel file from the Ronad panel. It is recommended to use API in case of frequent need to define the product.
Product without variant
If you define product without variant or with one variant you can creat order only with product code.
curl POST 'https://api.ronad.ir/v1/products?token=' \
--header 'Content-Type: application/json' \
--data-raw '{
"code":"123",
"name":"آیفون 14 پرومکس سفید 256 گیگ",
"codingType": "SINGLE",
"unit":"عدد",
"weight":10,
"length":10,
"width":10,
"height":10,
"shippingWeight":10,
"shippingLength":10,
"shippingWidth":10,
"shippingHeight":10,
"description":"توضیحات کالا"
}'
Parameters
value | type | Description |
---|---|---|
code | string | this code use for order registration |
name | string | Max 100 character |
categoryCode | string | the code that you define in categories |
unit | string | |
weight | int | gram |
length | int | centemeter |
width | int | centemeter |
height | int | centemeter |
shippingWeight | int | gram |
shippingLength | int | centemeter |
shippingWidth | int | centemeter |
shippingHeight | int | centemeter |
description | string |
Product with variant
You can define variant of product if you want define your products with some sellers or providers. in this case you can counsel with Ronad team.
curl POST 'https://api.ronad.ir/v1/products?token=' \
--header 'Content-Type: application/json' \
--data-raw '{
"code":"123",
"name":"آیفون 14 پرومکس سفید 256 گیگ",
"codingType": "SINGLE",
"unit":"عدد",
"weight":10,
"length":10,
"width":10,
"height":10,
"shippingWeight":10,
"shippingLength":10,
"shippingWidth":10,
"shippingHeight":10,
"variants": [{ "code": "mask-white"}]
"providerCode":"xyz"
"description":"توضیحات کالا"
}'
Add variant to products
You can add variant to products after define it.
curl POST 'https://api.ronad.ir/v1/products/by-code/123/variants?token=' \
--header 'Content-Type: application/json' \
--data-raw '{
"code": "mask-white",
"providerCode":"xyz"
}
Get products
You can use this curl for get your products. this service use page and size ability to get products.
curl GET 'https://api.ronad.ir/v1/products?page=0&size=100&token={token}'
You can also filter your products with name and code of them like this: https://api.ronad.ir/v1/products?code.contains={code}&token= https://api.ronad.ir/v1/products?code.equals={code}&token= https://api.ronad.ir/v1/products?name.contains={name}&token= https://api.ronad.ir/v1/products?name.equals={name}&token=
Parcel
For send your products to Ronad warehouses you must create parcel. You can create your parcels from Ronad panel individually or through an Excel file. This part will be useful only for specific users.
Create parcel
curl POST 'https://api.ronad.ir/v1/parcels?token=' \
--header 'Content-Type: application/json' \
--data-raw '{
"destinationId": 4,
"transportationType": "PARTNER",
"deliveryDate": "2020-07-19",
"deliveryStartTime": "10:00:00",
"deliveryEndTime": "12:00:00",
"deliveryType": "BOX",
"items": [{
"productCode": "test123",
"packageAmount": 10,
"packageCount": 1,
"inventoryItems": [{
"productionDate": "2020-01-01",
"expirationDate": "2022-01-01",
"unitCost": 150000,
"amount": 10
}]
}],
"agentName": "احمدی",
"agentPhoneNumber": "09123456789"
}
'
Parameters
value | type | Description |
---|---|---|
destinationId | enum | always use 4 |
transportationType | enum | RONAD/ PARTNER |
deliveryType | enum | always use BOX |
productCode | string | code of products |
productionDate | only for FMCG products | |
expirationDate | only for FMCG products | |
unitCost | int | price of each item (IRR) |
Delivery time of parcel is 9 to 11, 11 to 13 and 14 to 16
Parcel status
curl GET 'https://api.ronad.ir/v1/parcels/14649/status?token='
response: |
---|
SUBMITTED |
CONFLICTED |
UNLOADED |
LOCATED |
RETURNED |
Order
Create order
Please watch the video of create order before use API to know about rules.
curl POST 'https://api.ronad.ir/v1/orders?token=' \
--header 'Content-Type: application/json' \
--data-raw '{
"orderType":"WITHOUT_CENTER",
"trackingCode":"test123",
"deliveryType":"COURIER",
"orderTPLType":"RONAD"
"fulfillmentWarehouseId":4,
"deliveryDate":"2023-02-13",
"deliveryStartTime":"15:00:00",
"deliveryEndTime":"21:00:00",
"items":[{"amount":"1","productCode":"test1"},
{"amount":"1","productCode":"test2"}],
"fulfillmentLineId":null,
"paymentType":"COD",
"codValue":"1500000",
"orderValue":"1200000",
"customerMobileNumber":"09121111111",
"customerPhoneNumber":"02177777777",
"customerName":"محمدرضا تهرانی",
"customerNationalCode":"1111111111",
"deliveryLocationType":"IN_CUSTOMER_ADDRESS",
"customerProvince":"تهران",
"customerCity":"تهران",
"customerZipCode":"1111111111",
"customerAddress":"خیابان 17 شهریور پلاک 244"}'
Parameters
value | type | Description |
---|---|---|
trackingCode | string | string 1-25 character |
deliveryType | enum | COURIER/ VIP |
orderTPLType | enum | choose the tpl that you want |
fulfillmentLineId | enum | 0/1 1 for digikala orders |
paymentType | enum | ONLINE/ COD |
codValue | int | for payment by end user |
orderValue | int | for insurance use (IRR) |
customerAddress | string | 10-25 character |
Tpl: you can choose order tpl form list:
"RONAD": for orders in Tehran, Ronad choose tpl to send orders
"POST"
"TAPIN_POST"
"TAPIN_KETAB"
"CHAPAR"
"NEDEX"
Get order status
Please see status flow. download here
curl GET 'https://api.ronad.ir/v1/orders/{id}/status?token='
Get order detail
curl GET 'https://api.ronad.ir/v1/orders?page=0&size=100&token='
Cancel order
curl POST 'https://api.ronad.ir/v1/orders/{id}/cancel?token=' \
--header 'Content-Type: application/json' \
--data-raw '{
"description":"دلیل کنسل کردن سفارش"
}
'
Inventory
Get inventory
curl GET 'https://api.ronad.ir/v1/inventory?page=0&size=100&token=' \
For get detail of inventory of specefic product use this filter
https://api.ronad.ir/v1/inventory?productCode.equals={code}&token=
Errors
This character is forbiden for "code" in seller/provider, product, order: ''
Error Code | Meaning |
---|---|
400 | Bad Request -- Your request is invalid. |
401 | Unauthorized -- Your API key is wrong. |
409 | |
500 | Internal Server Error -- We have a problem with our server. Try again later. |