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:

  1. Resolve the warehouse location(s) where the SKU has available stock (quantity > 0).
  2. Derive the pickup pincode(s) for those warehouse locations.
  3. 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 result array 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.

WMSwms_codeWMS URL scope
VinculumvinculumEnterprise-specific
EasyEcomeasyecomCommon / same for all enterprises
UnicommerceunicommerceEnterprise-specific
IncreffincreffEnterprise-specific

wms_code is matched against this list. A misspelt or unsupported wms_code is 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 keyLabelTypeRequired
wms_urlWMS URLstringYes
wms_usernameAPI OwnerstringYes
wms_keyAPI KeystringYes

EasyEcom

Field keyLabelTypeRequired
oauth_usernameAuthentication EmailstringYes
oauth_passwordAuthentication PasswordstringYes
oauth_keyLocation KeystringYes
wms_keyX API KeystringYes

Unicommerce

Field keyLabelTypeRequired
oauth_usernameAuthentication UsernamestringYes
oauth_passwordAuthentication PasswordstringYes
wms_urlWMS URLstringYes

Increff

Field keyLabelTypeRequired
wms_usernameWMS UsernamestringYes
wms_passwordWMS PasswordstringYes

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 paramTypeRequiredDescription
usernamestringYesUsername, unique to the enterprise profile
keystringYesUnique key to authenticate the enterprise profile

Request

Headers

HeaderValue
Content-Typeapplication/json

Body

A JSON array of shipment objects. Each object supports the following fields:

FieldTypeRequiredDescription
skustringYesSKU code used to look up stock and warehouse location(s) in the WMS
drop_pincodestringYesCustomer's delivery pincode
wms_codestringYesThe WMS to query. One of: vinculum, easyecom, unicommerce, increff

If any of sku, drop_pincode, or wms_code is 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_pincode is returned as null.

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

FieldTypeDescription
statusintegerStatus code (see Error reference)
messagestringResult message
successbooleanWhether the request succeeded

Result array

The result array contains one entry per resolved pickup pincode (multiple entries when the WMS returns multiple eligible pickups):

FieldTypeDescription
min_slaintegerMinimum predicted delivery time, in days
max_slaintegerMaximum predicted delivery time, in days
pickup_pincodestring | nullResolved warehouse pickup pincode. null when the WMS returns the EDD directly (e.g. EasyEcom)
drop_pincodestringCustomer'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)

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

An 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.statusmeta.messageMeaning
200SUCCESSRequest succeeded; result contains the EDD(s)
320This service is not subscribed by youEnterprise is not subscribed to the service, or an unsupported/misspelt wms_code was supplied
5001Request to third party service failedThe 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

Did this page help you?