Inventory Check API
The API is used by the merchant partners to check the skus availability, discounts, applicable other charges, and the final payable amount for the cart.
Merchant partners must call this API before the Create Order API to check the final calculation for the cart. This API confirms the availability of the skus in the 1mg system, discounts, and additional changes and returns the final payable amount for the cart.
The order can be placed for the available quantity for the skus only returned in this API response. Also, merchant partners must collect the payable amount returned in this API call response from the customers if the payment method is to be online.
The user field is optional but recommended to avoid pricing issues.
Path Parameters
- merchant_id string required
Header Parameters
- X-Access-Key string
Default value:
1mg_client_access_key
- application/json
Request Body
skus object
248941 integer- pincode string
user object
email stringmobile stringfirst_name stringlast_name string- coupon_code string
- 200
- 400
OK
Response Headers
Date string
Content-Type string
Transfer-Encoding string
Connection string
Vary string
X-Request-ID string
VISITOR-ID string
X-VISITOR-ID string
Server string
Access-Control-Allow-Methods string
Access-Control-Allow-Headers string
Access-Control-Allow-Origin string
Content-Encoding string
- application/json
- Schema
- Example (from schema)
- Example
Schema
- object
{}
{
"data": {
"vas_charges": {
"details": [
{
"amount": 99,
"type": "handling_fee",
"display_text": "REDISTRIBUTIONTEST"
}
],
"total_amount": 99
},
"skus": {
"248941": {
"offered_price": 157,
"price": 157,
"quantity": 10,
"discounted_price": 53.38
}
},
"payable_amount": 632.8,
"eta": null
},
"partial_complete": false,
"is_success": true,
"status_code": 200
}
Bad Request
Response Headers
Date string
Content-Type string
Content-Length integer
Connection string
X-Request-ID string
VISITOR-ID string
X-VISITOR-ID string
Server string
Access-Control-Allow-Methods string
Access-Control-Allow-Headers string
Access-Control-Allow-Origin string
- application/json
- Schema
- Example (from schema)
- example-0
- example-1
Schema
- object
{}
Bad Request / Invalid JSON
{
"is_success": false,
"status_code": 400,
"error": {
"message": "Invalid request",
"errors": [
{
"message": "Invalid request"
}
]
}
}
400 Merchant Not Found
{
"is_success": false,
"status_code": 400,
"error": "Merchant not found"
}