WMS Integration - Predicted SLA API
Fetch Expected Date of Delivery via WMS Integration
Overview
This API extends the Expected Date of Delivery (IN) service for brands that do not want to pass a pickup pincode explicitly.
Instead, the brand passes a SKU code and the WMS system to query. Clickpost calls the brand's upstream WMS (using credentials configured during onboarding) to:
- Resolve the warehouse location(s) where the SKU has available stock (quantity > 0).
- Derive the pickup pincode(s) for those warehouse locations.
- Compute the Estimated Delivery Date (EDD) — the predicted min/max SLA — from each pickup pincode to the customer's drop pincode.
In short: SKU + WMS → pickup pincode(s) → EDD, in a single API call.
Multiple pickups supported. If the WMS returns more than one eligible pickup location for the SKU, the EDD is computed for each, and the
resultarray contains one entry per pickup pincode.
Pre-requisites
Before a brand can be onboarded to this API, both of the following must be in place. The API call will not succeed otherwise.
1. The WMS must be supported
The brand's warehouse management system must be one of the WMSes Clickpost supports (see table below). Onboarding requests for any other WMS cannot be served until support is added.
| WMS | wms_code | WMS URL scope |
|---|---|---|
| Vinculum | vinculum | Enterprise-specific |
| EasyEcom | easyecom | Common / same for all enterprises |
| Unicommerce | unicommerce | Enterprise-specific |
| Increff | increff | Enterprise-specific |
wms_codeis matched against this list. A misspelt or unsupportedwms_codeis treated as "service not subscribed" (see Error reference).
2. The brand must share valid upstream WMS credentials
Clickpost calls the brand's WMS on their behalf, so the brand must provide valid upstream credentials during onboarding. These are stored against the brand's enterprise profile and used at request time. The required fields differ per WMS:
Vinculum
| Field key | Label | Type | Required |
|---|---|---|---|
wms_url | WMS URL | string | Yes |
wms_username | API Owner | string | Yes |
wms_key | API Key | string | Yes |
EasyEcom
| Field key | Label | Type | Required |
|---|---|---|---|
oauth_username | Authentication Email | string | Yes |
oauth_password | Authentication Password | string | Yes |
oauth_key | Location Key | string | Yes |
wms_key | X API Key | string | Yes |
Unicommerce
| Field key | Label | Type | Required |
|---|---|---|---|
oauth_username | Authentication Username | string | Yes |
oauth_password | Authentication Password | string | Yes |
wms_url | WMS URL | string | Yes |
Increff
| Field key | Label | Type | Required |
|---|---|---|---|
wms_username | WMS Username | string | Yes |
wms_password | WMS Password | string | Yes |
Note on WMS URLs: For EasyEcom, the WMS URL is common to all enterprises. For Vinculum and Unicommerce, the WMS URL is enterprise-specific and must be provided by the brand.
Endpoint & Method
- URL:
https://ds.clickpost.in/api/v1/predicted_sla_wms_integration_api/ - HTTP Method:
POST
Authentication
Authentication is via query parameters:
| Query param | Type | Required | Description |
|---|---|---|---|
username | string | Yes | Username, unique to the enterprise profile |
key | string | Yes | Unique key to authenticate the enterprise profile |
Request
Headers
| Header | Value |
|---|---|
Content-Type | application/json |
Body
A JSON array of shipment objects. Each object supports the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
sku | string | Yes | SKU code used to look up stock and warehouse location(s) in the WMS |
drop_pincode | string | Yes | Customer's delivery pincode |
wms_code | string | Yes | The WMS to query. One of: vinculum, easyecom, unicommerce, increff |
If any of
sku,drop_pincode, orwms_codeis missing, the API returns a validation / bad request error.
Example request
curl --request POST \
--url 'https://ds.clickpost.in/api/v1/predicted_sla_wms_integration_api/?username=*****&key=*****' \
--header 'Content-Type: application/json' \
--data '[
{
"sku": "8904413454561",
"drop_pincode": "421302",
"wms_code": "unicommerce"
}
]'How it works
Based on the wms_code in the request, the corresponding WMS API is called using the stored upstream credentials.
- Vinculum — The WMS response is used to collect the location IDs where stock quantity is > 0. These location IDs are mapped to their pickup pincodes, and the EDD is computed from each pickup pincode to the drop pincode. The response returns one entry per pickup pincode.
- Unicommerce — Authentication is performed against the enterprise-specific URL using the configured username and password. The returned auth token is then used to call the enterprise-specific WMS URL to fetch the pickup pincodes for the given SKU where quantity > 0. EDD is then computed for each.
- EasyEcom — Authentication is performed first, then the WMS API is called with the auth token. EasyEcom returns the EDD directly, so no separate EDD computation is performed. In this case
pickup_pincodeis returned asnull.
If the WMS returns no data or the call fails, a third-party failure error is returned. If the enterprise is not subscribed to this service (or an unrecognised wms_code is supplied), a subscription error is returned.
Response
Meta object
| Field | Type | Description |
|---|---|---|
status | integer | Status code (see Error reference) |
message | string | Result message |
success | boolean | Whether the request succeeded |
Result array
The result array contains one entry per resolved pickup pincode (multiple entries when the WMS returns multiple eligible pickups):
| Field | Type | Description |
|---|---|---|
min_sla | integer | Minimum predicted delivery time, in days |
max_sla | integer | Maximum predicted delivery time, in days |
pickup_pincode | string | null | Resolved warehouse pickup pincode. null when the WMS returns the EDD directly (e.g. EasyEcom) |
drop_pincode | string | Customer's delivery pincode (echoed from the request) |
Example response
{
"meta": {
"status": 200,
"message": "SUCCESS",
"success": true
},
"result": [
{
"min_sla": 3,
"max_sla": 4,
"pickup_pincode": "560049",
"drop_pincode": "756019"
}
]
}Example response — multiple pickups
When the WMS returns more than one eligible pickup location for the SKU, result contains one entry per pickup pincode (illustrative):
{
"meta": {
"status": 200,
"message": "SUCCESS",
"success": true
},
"result": [
{
"min_sla": 1,
"max_sla": 2,
"pickup_pincode": "421302",
"drop_pincode": "110019"
},
{
"min_sla": 3,
"max_sla": 4,
"pickup_pincode": "560049",
"drop_pincode": "110019"
}
]
}Response scenarios
Success — Vinculum (pickup pincode resolved)
SKU, drop_pincode, and wms_code are passed and all credentials are present.
Request
curl --location 'https://ds.clickpost.in/api/v1/predicted_sla_wms_integration_api/?username=*****&key=*****' \
--header 'Content-Type: application/json' \
--data '[
{
"sku": "71-371-OLV-43-1",
"drop_pincode": "110019",
"wms_code": "vinculum"
}
]'Response
{
"meta": { "status": 200, "message": "SUCCESS", "success": true },
"result": [
{
"min_sla": 1,
"max_sla": 2,
"pickup_pincode": "421302",
"drop_pincode": "110019"
}
]
}Success — EasyEcom (EDD returned directly, pickup_pincode is null)
pickup_pincode is null)Request
curl --location 'https://ds.clickpost.in/api/v1/predicted_sla_wms_integration_api/?username=*****&key=*****' \
--header 'Content-Type: application/json' \
--data '[
{
"sku": "EMAOR183190AAB",
"drop_pincode": "533003",
"wms_code": "easyecom"
}
]'Response
{
"meta": { "status": 200, "message": "SUCCESS", "success": true },
"result": [
{
"min_sla": 4,
"max_sla": 5,
"pickup_pincode": null,
"drop_pincode": "533003"
}
]
}Failure — no data from the WMS / third-party failure
The WMS returns nothing or the upstream call fails.
Response
{
"meta": {
"status": 5001,
"message": "Request to third party service failed",
"success": false
}
}Failure — enterprise not subscribed
The enterprise is not subscribed to this service.
Response
{
"meta": {
"status": 320,
"message": "This service is not subscribed by you",
"success": false
}
}Failure — misspelt / unsupported wms_code
wms_codeAn unrecognised wms_code (e.g. vinculume) is treated the same as "service not subscribed".
Request
curl --location 'https://ds.clickpost.in/api/v1/predicted_sla_wms_integration_api/?username=*****&key=*****' \
--header 'Content-Type: application/json' \
--data '[
{
"sku": "71-371-OLV-43-1",
"drop_pincode": "110019",
"wms_code": "vinculume"
}
]'Response
{
"meta": {
"status": 320,
"message": "This service is not subscribed by you",
"success": false
}
}Error reference
meta.status | meta.message | Meaning |
|---|---|---|
200 | SUCCESS | Request succeeded; result contains the EDD(s) |
320 | This service is not subscribed by you | Enterprise is not subscribed to the service, or an unsupported/misspelt wms_code was supplied |
5001 | Request to third party service failed | The upstream WMS returned no data or the call failed |
400 | — | Validation error — a mandatory field (sku, drop_pincode, or wms_code) was missing or the payload was malformed |
401 | — | Invalid username or key |
Updated 4 months ago
