0% found this document useful (0 votes)
168 views15 pages

Franchise Apidoc v1.1.6

sdsd

Uploaded by

krit20india
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
168 views15 pages

Franchise Apidoc v1.1.6

sdsd

Uploaded by

krit20india
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Users

POST User Token

https://ship.xpressbees.com/api/users/franchise_login

Use this API endpoint to generate autorization token.


Parameters:

Params Required Data Type Description/Example


Email Yes string [email protected]

Password Yes string 123456789

HEADER

content-type application/json
Body raw
{
"email" : "[email protected]",
"password" : "12376767"
}

Response

Successful
{
"status": true,
"data":
"V4cCI6MTY0ODU3MDkwMywiZGF0YSI6eyJ1c2VyX2lkIjoiMSIsInBhcmVudF9pZCI6IjYwNDYifX0.YW
UCfgKew1FoEszjW97NfcAG2te1L7ZbgYhbt_lmb4hxjd9HUtUAjnBHlDjJjAx4Vx7LCQQ8VienQ"
}
Failed
{
"status": false,
"message": "Invalid email or password"
}

{
"status": false,
"message": "The Password field is required.\n"
}

{
"status": false,
"message": "The Email field must contain a valid email address.\n"
}

{
"status": false,
"message": "You have not authorised to login."
}

Couriers

GET Courier List

https://ship.xpressbees.com/api/franchise/shipments/courier

Use this API endpoint to Get the list of available couriers for your account.
No parameters are required.

AUTHORIZATION Bearer Token


Token <token>

HEADER

content-type application/json

Response

Successful
{
"status": true,
"data": [
{
"id": "01",
"name": "B2C Air"
},
{
"id": "02",
"name": "B2C surface"
}
]
}
Shipments

POST Create Shipment

https://ship.xpressbees.com/api/franchise/shipments

Use this API endpoint to generate AWB/tracking number for your order.
Note: Order total is not automatically calculated in API request. Be sure to input the correct calcu-
lated order_amount.

Parameters:

Params Required Description Example


Id Yes string - max length: 20 1234

Unique_order_number Yes String yes/no

payment_type Yes Valid Values - COD, COD


prepaid

consigner_name Yes String - max length: 100 Rishabh

consigner_phone Yes 10 digit numeric 9090909090

consigner_pincode Yes 6 digit numeric 122002

consigner_city Yes String - max length: 40 Gurugram

consigner_state Yes String - max length: 40 Haryana

consigner_address Yes String - max length: 200 Sikandarpur metro statio


n

consigner_gst_number No 15 digit alpha numeric 06DSALI2367U1Z1

consignee_name Yes String - max length: 100 Test Consignee

consignee_phone Yes 10 digit numeric 8989898989

consignee_pincode Yes 6 digit numeric 110011

consignee_city Yes String - max length: 40 New Delhi


consignee_state Yes String - max length: 40 Delhi

consignee_address Yes String - max length: 200 A1, Saket

consignee_gst_number No 15 digit alpha numeric 06DSALI2367U1QQ

products[product_name] Yes String - max length: 40 Prod123456

products[product_qty] Yes No. of product 1

products[product_price] Yes Total Order Amount. 1200

products[product_tax_per] No Required only if the


amount is greater
than 49999/-
products[product_sku] No String - max length: 20 SKU001

products[product_hsn] No String - max length: 200 3004

invoice[invoice_number] Yes String - max length: 40 INB001

invoice[invoice_date] Yes Date (YYYY-MM-DD) 2022-03-23

invoice[ebill_number] No String - max length: 40 ENB002

invoice[ebill_expiry_date] No Date (YYYY-MM-DD) 2022-03-25

weight Yes Weight in grams 500

length Yes Package length in cm. 12

breadth Yes Package breadth in cm. 12

height Yes Package height in cm. 12

courier_id Yes numeric courier id 5

pickup_location Yes String - max length: 20 customer or franchise


(Pickup location only
customer OR franchise)
shipping_charges No Shipping charges 40
applied.

cod_charges No COD charges applied. 40

discount No Discount applied. 40

order_amount Yes Total Order Amount. 2500

collectable_amount Yes For Prepaid: Collectable 1500


amount should be zero.
For cod: Collectable
amount should be less
than or equal to order
amount.

AUTHORIZATION Bearer Token


Token <token>

HEADER

content-type application/json
Body raw
{
"id": "ord001",
"unique_order_number": "yes/no",
"payment_method": "COD",
"consigner_name": "Rishabh201",
"consigner_phone": "9880909090",
"consigner_pincode": "122002",
"consigner_city": "Gurugram",
"consigner_state": "Haryana",
"consigner_address": "Sikandarpur metro station",
"consigner_gst_number": "06DSALI2367U1ZL",
"consignee_name": "Test Consignee",
"consignee_phone": "8989898989",
"consignee_pincode": "110011",
"consignee_city": "NEW DELHI",
"consignee_state": "delhi",
"consignee_address": "A1",
"consignee_gst_number": "06DSALI2367U1ZE",
"products": [
{
"product_name": "prod123",
"product_qty": "1",
"product_price": "1200",
"product_tax_per": "",
"product_sku": "SKU001",
"product_hsn": "3004"
}
],
"invoice": [
{
"invoice_number": "INB002",
"invoice_date": "2022-03-23",
"ebill_number": "ENB002",
"ebill_expiry_date": "2022-03-25"
}
],
"weight": "700",
"length": "12",
"height": "12",
"breadth": "12",
"courier_id": "01",
"pickup_location": "franchise",
"shipping_charges":"40",
"cod_charges":"25",
"discount":"20",
"order_amount":"2500",
"collectable_amount":"1500"
}

Response

Successful
{
"response": true,
"message": "booked",
"shipping_id": 68668,
"awb_number": "14732222099821",
"courier_id": "15",
"label": "https://xb-files.s3.amazonaws.com/labels/20220430113805454-29.pdf"
}
Failed
{
"status": false,
"message": "The Payment Method field is required.\n"
}
Cancel Shipment

POST Cancel Shipment

https://ship.xpressbees.com/api/franchise/shipments/cancel_shipment

Use this API endpoint to cancel shipment AWB.


AUTHORIZATION Bearer Token
Token <token>

HEADER

content-type application/json
Body raw
{
"awb_number": "14732222071608"
}

Response

Successful
-----------------------------------------------------------------------------------------------------------------------------------
{
"response": true,
"message": "Shipment cancelled successfully.",
"awb_number": "14732222071608"
}
Failed
----------------------------------------------------------------------------------------------------------------------------------
{
"status": false,
"message": "The AWB Number field is required.\n"
}

{
"response": false,
"message": "Unable to cancel - current status: cancelled"
}

{
"response": false,
"message": "Please provide a valid AWB number"
}
Track Shipment

POST Track Shipment

https://ship.xpressbees.com/api/franchise/shipments/track_shipment

Use this API endpoint to track shipment via AWB.


AUTHORIZATION Bearer Token
Token <token>

HEADER

content-type application/json
Body raw
{
"awb_number": "14443421157830"
}

Response

Successful
{
"response": true,
"message": "Shipment track record found.",
"tracking_data": {
"delivered": [
{
"id": "81692392",
"awb_number": "14443421157830",
"event_time": "1648215180",
"status_code": "DLVD",
"location": "Chicholi, Chicholi, MADHYA PRADESH",
"message": "Delivered",
"status": "Delivered",
"ship_status": "delivered",
"rto_awb": ""
}
],
"out for delivery": [
{
"id": "81692393",
"awb_number": "14443421157830",
"event_time": "1648201200",
"status_code": "OFD",
"location": "Chicholi, Chicholi, MADHYA PRADESH",
"message": "Out for Delivery",
"status": "Out for Delivery",
"ship_status": "out for delivery",
"rto_awb": ""
}
],
"in transit": [
{
"id": "81692394",
"awb_number": "14443421157830",
"event_time": "1648103580",
"status_code": "RAD",
"location": "Chicholi, Chicholi, MADHYA PRADESH",
"message": "Reached at Destination",
"status": "Reached at Destination",
"ship_status": "in transit",
"rto_awb": ""
},
{
"id": "81692395",
"awb_number": "14443421157830",
"event_time": "1647279300",
"status_code": "IT",
"location": "DEL/PC1, Delhi NCR, DELHI",
"message": "InTransit",
"status": "InTransit",
"ship_status": "in transit",
"rto_awb": ""
},
{
"id": "81692397",
"awb_number": "14443421157830",
"event_time": "1647256080",
"status_code": "PUD",
"location": "PCK/BJE, Delhi NCR, DELHI",
"message": "PickDone",
"status": "PickDone",
"ship_status": "in transit",
"rto_awb": ""
}
],
"pending pickup": [
{
"id": "81692398",
"awb_number": "14443421157830",
"event_time": "1647251580",
"status_code": "DRC",
"location": "PCK/BJE, Delhi NCR, DELHI",
"message": "Pending",
"status": "Pending",
"ship_status": "pending pickup",
"rto_awb": ""
}
]
}
}
Failed
{
"status": false,
"message": "The AWB Number field is required.\n"
}

{
"response": false,
"message": "Please provide a valid AWB number"
}

{
"response": false,
"message": "Unable to cancel - current status: cancelled"
}
{
"response": false,
"message": "No record found."
}

Pickup Shipment

POST Pickup Shipment

https://ship.xpressbees.com/api/franchise/shipments/pickup

Use this API endpoint to pickup shipment via AWB.


AUTHORIZATION Bearer Token
Token <token>

HEADER

content-type application/json
Body raw
{
"awb_numbers": "1473222201002,1473222202006"
}
Response
Successful
{
"response": true,
"message": "Pickup manifest generated successfully.",
"data": "https://xb-files.s3.amazonaws.com/manifest/19900220180243-11.pdf"
}
Failed
{
"status": false,
"message": "The AWB Numbers field is required.\n"
}

{
"response": false,
"message": "No AWB Found"
}

{
"response": false,
"message": "Invalid Request"
}
{
"response": false,
"message": "No Shipments Found For Pickup"
}

Rate Calculator B2C


POST Calculate Pricing

https://ship.xpressbees.com/api/franchise/shipments/calculate_pricing

Use this API endpoint to get pricing for B2C.


AUTHORIZATION Bearer Token
Token <token>

HEADER

content-type application/json
Body raw
{
"order_type_user":"ecom",
"origin":"122002",
"destination":"122006",
"weight":"0.5",
"length":"10",
"height":"10",
"breadth":"10",
"cod_amount":"23",
"cod":"no"
}

Response
Successful
{
"status": true,
"message": [
{
"name": "B2C Air",
"courier_charges": 20.8,
"cod_charges": 0,
"total_price": 20.8
},
{
"name": "B2C surface",
"courier_charges": 20.8,
"cod_charges": 0,
"total_price": 20.8
}
]
}
Failed
{
"status": false,
"message": "Missing or invalid Token in request"
}

{
"status": false,
"message": "The order type user field is required."
}

{
"status": false,
"message": "The Origin Pincode field is required."
}
{
"status": false,
"message": "The Destination Pincode field is required."
}
{
"status": false,
"message": "The Weight field is required."
}
{
"status": false,
"mesage": "The length field is required.\nThe height field is required.\nThe breadth
field is required.\n"
}

NDR List

Method: GET

https://ship.xpressbees.com/api/franchise/ndr

Use this API endpoint to get NDR List for B2C or B2B.

AUTHORIZATION Bearer Token


Token <token>

HEADER

content-type Application / JSON


Body raw

No Parameters are Required

Response

Successful
{
{
"status": true,
"data": [
{
"awb_number": "14650122075909",
"event_date": "2021-04-05",
"courier_remarks": "Customer Not Responding",
"total_attempts": "1"
},
{
"awb_number": "14650122075909",
"event_date": "2021-04-05",
"courier_remarks": "No customer response from IVR call",
"total_attempts": "2"
},
{
"awb_number": "14650122075909",
"event_date": "2021-04-05",
"courier_remarks": "Customer Refused To Accept",
"total_attempts": "1"
}
]
}
}

Failed
{
"status": false,
"message": "No record found"
}

CREATE NDR
Method: POST

https://ship.xpressbees.com/api/franchise/ndr/create

Use this API endpoint to generate Take Action against any AWB. Action against 50 AWBs are
allowed in one request.

Note: Action is allowed only when Exception is raised by courier company.

Supported Action Types: re-attempt, update-address, update-phone

Check sample request body for supported action_data for each action type.

AUTHORIZATION Bearer Token


Token <token>

HEADER

content-type Application / JSON


Body raw
[
{
"awb": "14757890000041",
"action": "update-phone",
"action_data": {
"name": "Rishabh",
"phone": "9090888811 "
},
"re_attempt_date": "2022-12-21",
"remarks": "Test remark"
},
{
"awb": "14757890000042",
"action": "update-address",
"action_data": {
"address_1": "Only initial address required"
},
"re_attempt_date": "2022-12-22",
"remarks": "Test remark"
},
{
"awb": "14757890000043",
"action": "re-attempt",
"re_attempt_date": "2022-12-23",
"remarks": "Test remark"
}
]
Response

Successful
{
[
{
"status": true,
"awb": "14757890000042",
"message": "NDR Submitted Successfully"
},
{
"status": false,
"awb": "14757890000043",
"message": "No Courier Exception Available"
},
]
}

False
[
{
"status": false,
"awb": "14757890000041",
"message": "NDR not found"
}
]

You might also like