Order to Dashboard

Every time an order is created a unique waybill is dynammically assigned to it. Order creation required all the important details of products like ,seller details, warehouse details, quality checks, consignee name, phone and address and other important information. The process of order creation is same for both the forward flow (client warehouse to end customer) and reverse flow (customer to client warehouse) with the only difference in the package_type key. (Pickup for reverse package and COD or Prepaid for forward package) Two type of shipments can be there: Single Piece Shipment - One waybill here represents a package which can have multiple items in it. (Example, An order at marketplace can have multiple items like tshirts, shoes, shampoo package together in a box) Multi Piece Shipment - This type of shipments contain multiple boxes in one order. All the shipments are packed in separate boxes and so should be assigned separate waybill numbers as well. **E-waybill**: As per government guidelines, if the total shipment cost exceeds 50,000, then there is requirement of e-waybill, which needs to be passed from the client end.This is a mandatory field required at the time of order creation (if the shipment cost exceeds 50,000 INR)

Production Environment URL
https://api.sarlogistics.in/api/order_to_dashboard

Important Points which needs to be considered while order creation:

  1. Waybill: In case of single piece shipment, Waybill can be passed in the payload or can be skipped as well which can have multiple products inside it, but in case of MPS, waybill needs to be passed for each box explicitly in the API.
  2. format=json&data= This line is a must to have in the payload JSON body.
  3. Order ID should be unique for every new order manifested in our system ideally when the waybill is passed and must when the waybill is not passed and randomly assigns from SAR logistics end. It can only be same when the waybill is passed explicitly in the payload The uniqueness of order in our network is identified with order+waybill as primary keys. Order ID may not be unique in case the client is providing the waybill as well. In case, a waybill is not passed by the client in the API and SAR logistics will be generating the waybills, order ID passed needs to be unique.
  4. Payment_mode will be COD or Pre-paid when the order is created for forwarding shipment else Pickup if it is created for reverse flow.
  5. Pickup location to be passed in the API needs to be exactly the same as the name of the warehouse registered The name is also case sensitive. An error is thrown to indicate any differences in the name of the pickup location.
  6. There is a field which identifies the client at our end, its value should be exactly the same with the name the client registered in the SAR logistics.
  7. In case of fragile content, fragile_shipment: true should be passed in manifestation payload at root level.
    Key Name: fragile_shipmentKey
    Value: true or false
    Please Note: If any Shipment is not applicable then don't pass this key in Manifestation Payload.
  8. Also, our system does not accept special characters in the payload, Characters: &,#, %, ; ,\If '' is present in the payload, it should be escaped as shown '\\'. Only if the payload is JSON encoded, then there is no issue.
  9. Mandatory Fields: Pin, phone and address are the mandatory keys to be passed in all shipment flows.
  10. For Last-Mile Delivery in Bangladesh:- "country" should be pass as "BD" and valid "pin" for the Bangladesh country while creating order via order creation API. In case you don't pass any "country" then the system will automatically consider the country "India" by default.
  11. In any scenario if you are not passing any optional key value, the default value which will be linked to your account will be assigned automatically, it would be safe to pass maximum keys to get an order created successfully.

CURL

curl --request POST \ 
         --url "https://api.sarlogistics.in/api/order-creation " \
         --header "Content-Type:application/json"\ 
         --header "Authorization: Token XXXXXXXXXXXXXXXXXX" \ 
--data '
     {
            "orderid": "", 
            "warehousename": " ",
            "order_date": "",
            "shipment_description": "",
            "item_count": "", 
            "total_value": "",
            "fragile_items": "",
            "delivery_first_name": "",
            "delivery_last_name": "",
            "delivery_phone_number": "",
            "delivery_address1": "",
            "delivery_country": "",
            "delivery_pincode": "", 
            "delivery_state": "",
            "delivery_city": "",
            "shipment_length": "",
            "shipment_height": "", 
            "shipment_width": "",
            "shipment_weight": "", 
            "mode_of_shipment": "", 
            "mode_of_payment": "",
            "cod_amount": ""
    }'

Pin-code Serviceability

The Pincode Serviceability API is used to validates whether the specific pincodes are serviceable by SAR logistics or not.

The Serviceability API in response gives you a list of all pincode serviced by SAR logistics, with flags donating if the pincode is serviceable for both prepaid and COD package or not. Also, an “NSZ” response for an AWB would mean that the pin code is not serviceable.
Test Environment URL
https://workstation.cnetworq.com/API-sar/API/Pin-code-Serviceability?token=XXXXXXXXXXXXXXXXXX&filter_codes=
Production Environment URL
https://api.sarlogistics.in/api/Pin-code-Serviceability?token=XXXXXXXXXXXXXXXXXX&filter_codes=

*** Parameters ***

Params Mandatory Value Type Description
filter_codes Optional Integer Pincodes which you want to check for Serviceability, please enter one pincode at a time.

CURL

curl --request GET \
           --url "​https://api.sarlogistics.in/api/Pin-code-Serviceability?token=XXXXXXXXXXXXXXXXXX&filter_codes="\
          --header "Content-Type:application/json"\ 

Cancellation

Test Environment URL
https://workstation.cnetworq.com/sarlogistics/testing/order-cancel
Production Environment URL
https://api.sarlogistics.in/api/order-cancel

Cancel Order API

Cancel Order API facilitates cancellation of an existing package/order. It comes under advance API integration, as order can be cancelled from CL Panel as well.

It is POST API call. It accepts the payload data in JSON format and also returns a response in JSON.

Keys that can be updated :

"cancellation": "true"

Allowed statuses to cancel a package :

Manifested In Transit Pending Open Scheduled

Note: When an order is cancelled via the cancellation API the following conditions hold good for each type of package:

Prepaid / COD - Status of the package changes to "Returned". Pick Up - Status of the package changes to "Cancelled".

curl

curl --request POST \
           --url "​https://api.sarlogistics.in/api/order-cancel" \ 
           --header "Content-Type:application/json"\
           --header "Accept:application/json"\ 
           --header "Authorization: Token XXXXXXXXXXXXXXXXXX" \
   --data '{"waybill":"","phone":"","name":"","add":"","product_details":"","shipment_length":,"shipment_width":,"shipment_height":,"weight":"","pt":"","cod":""}'