Calculator
Calculator
POST
/v1/order-calculator
Calculator
REQUEST
Request Body
{
"senderCityCode": "1001",
"receiverCityCode":"7001",
"pickup_type":"branch",
"dropoff_type": "branch",
"is_multiple_cost": 1,
"weight":2,
"volume": {
"x": 10,
"y": 10,
"z": 10
}
}
| Field | Type | Description |
|---|---|---|
senderCityCode |
string | Filial code |
receiverCityCode |
string | Qabul qiluvchi filial code |
pickup_type |
string | Yuborish turi, ENUM type ('courier', 'branch', 'self') |
dropoff_type |
string | Qabul qilish turi, ENUM type ('courier', 'branch', 'self') |
is_multiple_cost |
integer | 0-> faqat belgilangan yo'nalish bo'yicha 1ta qiymat qaytadi 1-> barcha narxlar chiqadi |
weight |
float | Buyurtma o'g'irligi |
volume |
object | Volume ichida [x,y,z] larga qiymat berish kerak |
RESPONSE
200
Success
Masalan: Success.
Content-Type:
application/json
Response Body
{
"status": true,
"message": "success.retrieved",
"status_code": 200,
"data": {
"branch_to_branch": {
"available": true,
"price": 76000,
"reason": null
},
"branch_to_courier": {
"available": true,
"price": 83000
},
"courier_to_branch": {
"available": true,
"price": 108000
},
"courier_to_courier": {
"available": true,
"price": 138000
}
}
}
No schema defined.
422
Validate
Masalan: Validate.
Content-Type:
application/json
Response Body
{
"status": false,
"message": "error.validation",
"status_code": 422,
"errors": {
"senderCityCode": [
"«Sender City Code» to`ldirish shart."
]
}
}
No schema defined.