Top
Developers Your place to code all things handmade

Welcome to the Shopclues Developer Platform

We believe in code as craft. Join the community of developers, creators and build tools that enrich the ways you can shop, sell and connect with the India's largest merchant base most easily.

Get Started

Register, Upload, Search and Connect

Explore Shopclues' marketplace of over 8.5 million products from over 3.5 lakh merchants. Connect buyers with the items they'll love.

Learn More About Catalog Management

Login, Integrate and Create

Build the best tools for Shopclues merchants. Simply login, Integrate and start developing you own apps.

Learn More About Start Developing
<
>
Jump to: navigation, search

Get Order Shipping Lable

This API will help in Generating Shipping Label/invoice .API will return request id against orders from which shipping label/Invoice pdf can be generated using 'getOrderShippingLabel' Api.

Method= POST

Headers

Field name Description Mandatory
Header - “Authorization” Access token is passed to identify the user. Eg- ”Bearer bc1f461de4f193" Yes
Header - “Content-Type” Input Content Type here it would be “application/json" Yes

Field Description:

Field name Description Data type
order_id Order Id to be passed Array
I If type set to ‘I’ invoice request will be generated else shipping Label along with invoice will be generated Varchar

Field Description:

Field name Description Data type
invalid_hsn_orders Orders having products without HSN Code Array
already_manifested_orders Orders are already manifested Array
not_valid_order_status Orders are not in Valid status to be processed Array
no_dss_carrier_orders Carrier not assigned to the order Array
no_awbno_orders AWB Number not assigned to the Order Array
orders_not_ready_for_shipping_label Order status is not applicable to generate Label Array
request_id Id which can be used to download Shipping Label Int

  • JSON
  • PHP
Production Url: :
http://developer.shopclues.com/api/v2/app/fulfillmentorderapi/getOrderShippingLabel
Sandbox Url: :
 http://sandbox.shopclues.com/api/v2/app/fulfillmentorderapi/getOrderShippingLabel

Sample Request:

{
  "order_id" : ["124062795", "124067176","124063412"],

   “type” :”I”    

}

Sample Response: when type is not set to ‘I’

{
    "status": 1,
    "code": 200,
    "message": "success",
    "data": {
        "invalid_hsn_orders": [],
        "already_manifested_orders": [],
        "not_valid_order_status": [],
        "no_dss_carrier_orders": [],
        "no_awbno_orders": [],
        "orders_not_ready_for_shipping_label ": ["124063412"],
       "request_id": 91
    },
    "extra": null
}

Sample Response: Id which can be used to download Shipping Label:

{
    "status": 1,
    "code": 200,
    "message": "success",
    "data": {
        "invalid_hsn_orders": [],
        "already_manifested_orders": [],
        "not_valid_order_status": [],
        "no_dss_carrier_orders": [],
        "no_awbno_orders": [],
        "orders_not_ready_for_invoice ": ["124063412"],
        "request_id": 91
    },
    "extra": null
}

Sample Response(Failure case):

{  
   "status":0,
   "code":200,
   "message":"OK",
   "data":{  
      "message":{  
         "description":"Please send the Valid JSON in Request Parameter",
         "error":"1"
      }
   },
   "extra":null
}
Click here for access token documentation.
<?php
$token="<token>";
$curl = curl_init();

  curl_setopt_array($curl, array(
  CURLOPT_URL => " http://sandbox.shopclues.com/api/v2/app/fulfillmentorderapi/getOrderShippingLabel",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => '{
  "order_id" : ["124062795", "124067176","124063412"],

   “type” :”I”    

}',
        

  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer .$token",
    "content-type: application/json",
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>

Looking for ShopClues Apps?

Check out our new
App Gallery!

It's the best way to find cool and useful tools built upon Shopclues's API.