Sunteți pe pagina 1din 34

The API System Document (v2.

0)

THE API SYSTEM


DOCUMENT

Revision
Date Author Activity Approver

01.10.2017 Harry Long Created James Quoc

20.12.2017 Lionel Dai Update Harry Long

18.10.2018 Dieter Tuan Update James Quoc

24.10.2018 Dieter Tuan Add Check Fee API James Quoc


The API System Document

Add Create Order


11.12.2018 Dieter Tuan
Partner

22.01.2019 Dieter Tuan Add Webhook

2|Page
The API System Document

CONTENT
A. INTRODUCTION.................................................................................................................... 2

B. OVERVIEW ............................................................................................................................. 2

1. Operating Process. ................................................................................................................................ 2

C. API INTEGRATED ................................................................................................................. 3

1. Workflow .............................................................................................................................................. 3

2. Specialist words .................................................................................................................................... 3

3. API list .................................................................................................................................................. 4

3.1. Formula for Creating Authorization ..............................................................................................................4

3.2. Create Order ..................................................................................................................................................4

3.4. Create Order Partner .................................................................................................................................. 10

3.5. Edit Order .................................................................................................................................................... 16

3.6. Cancel Order ............................................................................................................................................... 21

3.7. Tracking Order ............................................................................................................................................ 23

3.8. Get Status Order .......................................................................................................................................... 25

3.9. Check Transportation Fee ........................................................................................................................... 27

3.10. Webhook Order Status ............................................................................................................................... 30

1|Page
The API System Document

A. INTRODUCTION
The SPEEDLINK API is the system that allows shops, suppliers and units used forwarding services that
can be connecting their system to SPEEDLINK System. SPEEDLINK provides effectively services.

Current Version 2.0 includes many functions manages orders easily.

 Create Order on SPEEDLINK


 Cancel Order
 Tracking Order
 Automatic synchronization the shipments status from SPEEDLINK to Partners.

B. OVERVIEW
1. Operating Process.

 The partner sent transportation requesting from the Partner’s System to SPEEDLINK about:
Pickup Information, Shipping Information, Order Detail, …
 When the order was processed, SPEEDLINK will announce the status of shipments to partners.
The steps will be completed when the orders have been updated status: Delivered, Canceled or
Refund, …

2|Page
The API System Document

C. API INTEGRATED

1. Workflow
2. Specialist words
 API Key: are string of characters and integers which are encrypted follow to Speedlink structure
for identifying the Partners is connecting to Speedlink System. API Key will be provided by
Speedlink
 API Secret Key: are string of characters and integers which are encrypted follow to Speedlink
structure. Used to encrypt Authorization the partner information sent to Speedlink system. API
Secret Key will be provided by Speedlink
 Authorization: is the code which used to authenticate the information sent by the partner to the
Speedlink System allows information into the Speedlink System.

3|Page
The API System Document

3. API list
3.1. Formula for Creating Authorization

PHP
$Authorization = hash_hmac('sha1','SPEEDLINK', $parameters.$secret_key);

$parameters: is the json string of information to be passed to the API

$secret_key: is code which is provided by SPEEDLINK

C#
Authorization = ShaHash('SPEEDLINK', Parameters + Secret_key);

Parameters: is the json string of information to be passed to the API

Secret_key: is code which is provided by SPEEDLINK

public static string ShaHash(string value, string key)

var keyByte = Encoding.UTF8.GetBytes(key);

using (var hmac = new HMACSHA1(Encoding.UTF8.GetBytes(key)))

string[] combined = hmacsha1.ComputeHash(Encoding.UTF8.GetBytes(value))

Select(x => x.ToString("x2")).ToArray();

string hash = string.Concat(combined);

return hash;

3.2. Create Order


Link API

 Production : http://partner.speedlink.vn/Partner/createOrder
 Staging : http://staging.partner.speedlink.vn/Partner/createOrder

4|Page
The API System Document

Type: POST

Header

 Content-Type : support 2 types


- application/x-www-form-urlencoded
- application/json
 Authorization : Transmit to Verification Code which was created by the above formula

Body

 parameters : is json string transmit information to that table below

Parameters

Field Datatypes Compulsory Note

The Current Unix Timestamp (From


timestamp Int Yes Epoch)
VD: 1507884060

api_key String Yes Key was provided by SPEEDLINK

data Array Yes Data array about order information

data [‘order_no’] String Yes Order Code on the Partner Sys

data [‘order_note’] String No Note

data [‘pickup_address’] String Yes Full pickup address

District Address Code are provided by


data [‘pickup_address_code’] String Yes
SPEEDLINK

data [‘shipper_name’] String Yes Shipper name

data [‘shipper_phone’] String Yes Shipper phone

data [’receiver_address’] String Yes Full delivery address

District Address Code are provided by


data [‘receiver_address_code’] String Yes
SPEEDLINK

data [‘receiver_name’] String Yes Receiver name

data [‘receiver_phone’] String Yes Receiver phone

5|Page
The API System Document

data [’weight’] Float Yes Weight (Kg), round up two decimal

Service Code are provided by


data [‘service_code’] String Yes
SPEEDLINK
Payment method
1 : Cash
data [‘payment_method’] Int Yes
2 : Bank Transfer
3 : Net off
Pay for transport fee
1 : Shipper
data [‘payer’] Int Yes
2 : Receiver
3 : The 3rd party
Transport Fee (Cash) must be collected
data [‘cash’] Float No If you choose it, this value must be
greater than 0
The value which must be collected from
data [‘cod_value’] Float No
Receiver
The Volumetric Order
Ex:
[
{
"pcs":"13",
"height":"120", //cm
"width":"130", //cm
"length":"140" //cm
data [‘dimensions’] Array No
},
{
"pcs":"31",
"height":"250", //cm
"width":"231", //cm
"length":"450" //cm
}
]

data[‘shipment_value’] Float No Value of shipment

Value insurance of shipment. Round up


data[‘insurance_value’] Float No
three decimal
True: Drop off.
data[‘drop_off’] Boolean No
False : Not drop off

data[‘coupon_code’] String No Coupon code of Speedlink

data[‘coupon_value’] Float No Value of coupon

6|Page
The API System Document

Parameters Example:

"api_key":"9589DB3159129AE6FBC6C850A39AABA0544A4B7C",

"timestamp":1539939852,

"data":{

"order_no":"124SP702313189",

"order_note":"alo tr\u01b0\u1edbc khi qua",

"pickup_address":"171 Nguy\u1ec5n S\u01a1n, Ph\u01b0\u1eddng


Nguy\u1ec5n Trung Tr\u1ef1c",

"pickup_address_code":"VN034018004",

"shipper_phone":"01245678901",

"shipper_name":"Trung Qu\u00e2n",

"receiver_address":"753 Gi\u1ea3i Ph\u00f3ng, P. Gi\u00e1p B\u00e1t",

"receiver_address_code":"VN034018005",

"receiver_name":"anh A",

"receiver_phone":"0123456789",

"weight":1200,

"service_code":"ES2",

"payment_method":2,

"payer":1,

"cod_value":0,

"cash":0,

7|Page
The API System Document

"dimensions":[

{"pcs":1,"height":130,"width":100,"length":100},

{"pcs":1,"height":100,"width":100,"length":100}

],

"shipment_value": 10000.500,

"insurance_value": 10000.500,

"drop_off": true,

"coupon_code": "SPL10K",

"coupon_value": 10000

Response Example:

"error_code": 1 ,

"description":"Create booking success",

"booking_no":"001479/09102018/bk-qs",

"estimated_fee": 150000,

"estimated_time_from": 1,

"estimated_time_to": 2,

"coupon_code":"FREE",

"coupon_code_status": true,

"coupon_value": 1,

"remaining_use_times": 1,

8|Page
The API System Document

"remain": 0

Result Error Code:

Error code Description

1 Create booking success

2 Authorization token is expired

3 Authorization token failed

4 Account not exist in speedlink system

101 order_no is required

102 pickup_address is required

103 pickup_address_code is required

104 pickup_address_code is wrong

105 receiver_address is required

106 receiver_address_code is required

107 receiver_address_code is wrong

108 shipper_phone is required

109 shipper_name is required

110 receiver_phone is required

111 receiver_name is required

112 weight is required and must be a number greater than 0

113 charge_to is required or not in array (1,2,3)

114 payment_method is required or not in array (1,2,3)

115 cash value smaller than 0 when payment_method is cash

116 service_code is required

9|Page
The API System Document

117 Invalid service_code

118 cod_value can not empty because the service used is supported

119 cod_value must be a number

121 cod_value must be 0 because the service used is not supported

700 api_key is required

701 timestamp is required

702 data is required

703 Account does not match with any user

704 parameters is must be json type

800 Content-Type is missing

-1 Duplicate order no, please change

3.4. Create Order Partner


Link API

 Production : http://partner.speedlink.vn/Partner/ createOrderPartner


 Staging : http://staging.partner.speedlink.vn/Partner/ createOrderPartner

Type: POST

Header

 Content-Type : support 2 types


- application/x-www-form-urlencoded
- application/json
 Authorization : Transmit to Verification Code which was created by the above formula

Body

 parameters : is json string transmit information to that table below

Parameters

Field Datatypes Compulsory Note

The Current Unix Timestamp (From


timestamp Int Yes
Epoch)

10 | P a g e
The API System Document

VD: 1507884060

api_key String Yes Key was provided by SPEEDLINK

data Array Yes Data array about order information

data [‘order_no’] String Yes Order Code on the Partner Sys

data [‘order_note’] String No Note

data [‘pickup_address’] String Yes Full pickup address

Address Code are provided by


data [‘pickup_address_code’] String Yes
SPEEDLINK

data [‘pickup_country_code’] String Yes Country Code of Partner

data [‘pickup_city_code’] String Yes City Code of Partner

data [‘pickup_district_code’] String Yes District Code of Partner

data [‘pickup_ward_code’] String Yes Ward Code of Partner

data [‘shipper_name’] String Yes Shipper name

data [‘shipper_phone’] String Yes Shipper phone

data [’receiver_address’] String Yes Full delivery address

Address Code are provided by


data [‘receiver_address_code’] String Yes
SPEEDLINK

data [‘receiver_country_code’] String Yes Country Code of Partner

data [‘receiver_city_code’] String Yes City Code of Partner

data [‘receiver_district_code’] String Yes District Code of Partner

data [‘receiver_ward_code’] String Yes Ward Code of Partner

data [‘receiver_name’] String Yes Receiver name

data [‘receiver_phone’] String Yes Receiver phone

11 | P a g e
The API System Document

data [’weight’] Float Yes Weight (Kg), round up two decimal

Service Code are provided by


data [‘service_code’] String Yes
SPEEDLINK
Payment method
1 : Cash
data [‘payment_method’] Int Yes
2 : Bank Transfer
3 : Net off
Pay for transport fee
1 : Shipper
data [‘payer’] Int Yes
2 : Receiver
3 : The 3rd party
Transport Fee (Cash) must be collected
data [‘cash’] Float No If you choose it, this value must be
greater than 0
The value which must be collected from
data [‘cod_value’] Float No
Receiver
The Volumetric Order
Ex:
[
{
"pcs":"13",
"height":"120", //cm
"width":"130", //cm
"length":"140" //cm
data [‘dimensions’] Array No
},
{
"pcs":"31",
"height":"250", //cm
"width":"231", //cm
"length":"450" //cm
}
]

data[‘shipment_value’] Float No Value of shipment

data[‘insurance_value’] Float No Value insurance of shipment

True: Drop off.


data[‘drop_off’] Boolean No
False : Not drop off

data[‘coupon_code’] String No Coupon code of Speedlink

data[‘coupon_value’] Float No Value of coupon

12 | P a g e
The API System Document

Parameters Example:

"api_key":"9589DB3159129AE6FBC6C850A39AABA0544A4B7C",

"timestamp":1539939852,

"data":{

"order_no":"124SP702313189",

"order_note":"alo tr\u01b0\u1edbc khi qua",

"pickup_address":"171 Nguy\u1ec5n S\u01a1n, Ph\u01b0\u1eddng


Nguy\u1ec5n Trung Tr\u1ef1c",

"pickup_address_code":"",

"pickup_country_code": "VIETNAM",

"pickup_city_code": "1",

"pickup_district_code": "14",

"pickup_ward_code": "26941",

"shipper_phone":"01245678901",

"shipper_name":"Trung Qu\u00e2n",

"receiver_address":"753 Gi\u1ea3i Ph\u00f3ng, P. Gi\u00e1p B\u00e1t",

"receiver_address_code": "",

"receiver_country_code": "VIETNAM",

"receiver_city_code": "1",

"receiver_district_code": "14",

"receiver_ward_code": "26941",

13 | P a g e
The API System Document

"receiver_name":"anh A",

"receiver_phone":"0123456789",

"weight":1200,

"service_code":"ES2",

"payment_method":2,

"payer":1,

"cod_value":0,

"cash":0,

"dimensions":[

{"pcs":1,"height":130,"width":100,"length":100},

{"pcs":1,"height":100,"width":100,"length":100}

],

"shipment_value": 10000.500,

"insurance_value": 10000.500,

"drop_off":true,

"coupon_code": "SPL10K",

"coupon_value": 10000

Response Example:

"error_code": 1 ,

"description":"Create booking success",

14 | P a g e
The API System Document

"booking_no":"001479/09102018/bk-qs",

"estimated_fee": 150000,

"estimated_time_from": 1,

"estimated_time_to": 2,

"coupon_code":"FREE",

"coupon_code_status": true,

"coupon_value": 1,

"remaining_use_times": 1,

"remain": 0

Result Error Code:

Error code Description

1 Create booking success

2 Authorization token is expired

3 Authorization token failed

4 Account not exist in speedlink system

101 order_no is required

102 pickup_address is required


Either pickup_address_code or pickup_country_code, pickup_city_code,
103
pickup_district_code is required
Either pickup_address_code or pickup_country_code, pickup_city_code,
104
pickup_district_code is wrong
105 receiver_address is required
Either receiver_address_code or receiver_country_code, receiver_city_code,
106
receiver_district_code is required
Either receiver_address_code or receiver_country_code, receiver_city_code,
107
receiver_district_code is wrong
108 shipper_phone is required

109 shipper_name is required

15 | P a g e
The API System Document

110 receiver_phone is required

111 receiver_name is required

112 weight is required and must be a number greater than 0

113 charge_to is required or not in array (1,2,3)

114 payment_method is required or not in array (1,2,3)

115 cash value smaller than 0 when payment_method is cash

116 service_code is required

117 Invalid service_code

118 cod_value can not empty because the service used is supported

119 cod_value must be a number

121 cod_value must be 0 because the service used is not supported

700 api_key is required

701 timestamp is required

702 data is required

703 Account does not match with any user

704 parameters is must be json type

800 Content-Type is missing

-1 Duplicate order no, please change


3.5. Edit Order
Link API

 Production : http://partner.speedlink.vn/Partner/editOrder
 Staging : http://staging.partner.speedlink.vn/Partner/editOrder

Type: POST

Header

 Content-Type : support 2 types


- application/x-www-form-urlencoded
- application/json

16 | P a g e
The API System Document

 Authorization : Transmit to Verification Code which was created by the above formula

Body

 parameters : is json string transmit information to that table below

Parameters

Field Datatypes Compulsory Note

The Current Unix Timestamp (From


timestamp Int Yes Epoch)
VD: 1507884060

api_key String Yes Key was provided by SPEEDLINK Sys

data Array Yes Data array about order information

data [‘order_no’] String Yes Order Code on the Partner Sys

data [‘order_note’] String No Note

data [‘pickup_address’] String No Full pickup address

District Address Code are provided by


data [‘pickup_address_code’] String No
SPEEDLINK

data [‘shipper_name’] String No Shipper name

data [‘shipper_phone’] String No Shipper phone

data [’receiver_address’] String No Full delivery address

District Address Code are provided by


data [‘receiver_address_code’] String No
SPEEDLINK

data [‘receiver_name’] String No Receiver name

data [‘receiver_phone’] String No Receiver phone

data [’weight’] Float No Weight (Kg), round up two decimal

Service Code are provided by


data [‘service_code’] String No
SPEEDLINK
Payment method
data [‘payment_method’] Int No 1 : Cash
2 : Bank Transfer

17 | P a g e
The API System Document

3 : Net off

Pay for transport fee


1 : Shipper
data [‘payer’] Int No
2 : Receiver
3 : The 3rd party
Transport Fee (Cash) must be collected
data [‘cash’] Float No If you choose it, this value must be
greater than 0
The value which must be collected from
data [‘cod_value’] Float No
Receiver
The Volumetric Order
Ex:
[
{
"pcs":"13",
"height":"120", //cm
"width":"130", //cm
"length":"140" //cm
data [‘dimensions’] Array No
},
{
"pcs":"31",
"height":"250", //cm
"width":"231", //cm
"length":"450" //cm
}
]

18 | P a g e
The API System Document

Parameters Example:

"api_key":"9589DB3159129AE6FBC6C850A39AABA0544A4B7C",

"timestamp":1539940432,

"data":{

"order_no":"124SP702313189",

"order_note":"alo tr\u01b0\u1edbc khi qua ban",

"pickup_address":"171 Nguy\u1ec5n S\u01a1n, Ph\u01b0\u1eddng


Nguy\u1ec5n Trung Tr\u1ef1c",

"pickup_address_code":"VN034018004",

"shipper_phone":"01245678901",

"shipper_name":"Trung Qu\u00e2n",

"receiver_address":"753 Gi\u1ea3i Ph\u00f3ng, P. Gi\u00e1p B\u00e1t",

"receiver_address_code":"VN034018005",

"receiver_name":"anh A",

"receiver_phone":"0123456789",

"weight":1200,

"service_code":"ES2",

"payment_method":2,

"payer":1,

"cod_value":0,

"cash":0,

19 | P a g e
The API System Document

"dimensions":[

{"pcs":1,"height":130,"width":100,"length":100},

{"pcs":1,"height":100,"width":100,"length":100}

Result Example:

"error_code":1 ,

"description":"Update booking and shipment success"

Result Error Code:

Error code Description

1 Update booking and shipment success

2 Authorization token is expired

3 Authorization token failed

4 Account not exist in speedlink system

101 Invalid service_code

102 cod_value can not empty because the service used is supported

103 cod_value must be a number

104 cod_value must be greater than 0 because the service used is supported

105 cod_value must be 0 because the service used is not supported

108 cash value smaller than 0 when payment_method is cash


Booking had Picked Up, cant not update Pick Up Address Code or Delivery Address
109
Code

20 | P a g e
The API System Document

110 order_no is not exist in system

111 order_no is required

700 api_key is required

701 timestamp is required

702 data is required

703 Account does not match with any user

704 parameters is must be json type

800 Content-Type is missing

3.6. Cancel Order


Link API

 Production : http://partner.speedlink.vn/Partner/cancelOrder
 Staging : http://staging.partner.speedlink.vn/Partner/cancelOrder

Type: POST

Header

 Content-Type : support 2 types


- application/x-www-form-urlencoded
- application/json
 Authorization : Transmit to Verification Code which was created by the above formula

Body

 parameters : is json string transmit information to that table below

Parameters

Field Datatypes Compulsory Note

The Current Unix Timestamp (From


timestamp Int Yes Epoch)
VD: 1507884060

api_key String Yes Key was provided by SPEEDLINK Sys

21 | P a g e
The API System Document

order_no String Yes Order Code on the Partner Sys


Parameters Example:

"api_key":"9589DB3159129AE6FBC6C850A39AABA0544A4B7C",

"timestamp":1539940710,

"order_no":"124SP702313189"

Response Example:

"error_code":1 ,

"description":"Cancel order on Speedlink system success"

Result Error Code:

Error code Description

1 Cancel order on Speedlink system success

2 Authorization token is expired

3 Authorization token failed

4 Account not exist in speedlink system

101 order_no' can not empty and minimum length 5 characters

102 order_no is not exist in speedlink system

700 api_key is required

701 timestamp is required

22 | P a g e
The API System Document

703 Account does not match with any user

704 parameters is must be json type

800 Content-Type is missing

3.7. Tracking Order


Link API

 Production : http://partner.speedlink.vn/Partner/trackingOrder
 Staging : http://staging.partner.speedlink.vn/Partner/trackingOrder

Type: POST

Header

 Content-Type : support 2 types


- application/x-www-form-urlencoded
- application/json
 Authorization : Transmit to Verification Code which was created by the above formula

Body

 parameters : is json string transmit information to that table below

Parameters

Field Datatypes Compulsory Note

The Current Unix Timestamp (From


timestamp Int Yes Epoch)
VD: 1507884060

api_key String Yes Key was provided by SPEEDLINK Sys

order_no String Yes Order Code on the Partner Sys

Parameters Example:

"api_key":"9589DB3159129AE6FBC6C850A39AABA0544A4B7C",

"timestamp":1539940852,

23 | P a g e
The API System Document

"order_no":"124SP70231321"

Response Example: (View full example in response_example.txt)

"error_code": 1,

"description": "Tracking order on Speedlink system success",

"order": {

"detail": {

//Information detail booking

},

"tracking": [

// Information tracking booking

},

// Information tracking booking

],

"history": [

// Information history booking

},

// Information history booking

24 | P a g e
The API System Document

Result Error Code:

Error code Description

1 Tracking order on Speedlink system success

2 Authorization token is expired

3 Authorization token failed

4 Account not exist in speedlink system

101 order_no can not empty and minimum length 5 characters

102 order_no is not exist in speedlink system

700 api_key is required

701 timestamp is required

703 Account does not match with any user

704 parameters is must be json type

800 Content-Type is missing

3.8. Get Status Order


Link API

 Production : http://partner.speedlink.vn/Partner/getStatusOrder
 Staging : http://staging.partner.speedlink.vn/Partner/getStatusOrder

Type: POST

Header

 Content-Type : support 2 types


- application/x-www-form-urlencoded
- application/json
 Authorization : Transmit to Verification Code which was created by the above formula

Body

25 | P a g e
The API System Document

 parameters : is json string transmit information to that table below

Parameters

Field Datatypes Compulsory Note

The Current Unix Timestamp (From


timestamp Int Yes Epoch)
VD: 1507884060

api_key String Yes Key was provided by SPEEDLINK Sys

order_no String Yes Order Code on the Partner Sys

Parameters Example:

"api_key":"9589DB3159129AE6FBC6C850A39AABA0544A4B7C",

"timestamp":1539941493,

"order_no":"124SP70231321"

Response Example:

"error_code":1 ,

"description”: "Get status order on Speedlink system success “,

“order”: {

"tracking_no":"124SP70231326",

"status" : “Processing”,

"reason" : ”Verifying booking”,

"reason_code" : 1300

26 | P a g e
The API System Document

Result Error Code:

Error code Description

1 Get status order on Speedlink system success

2 Authorization token is expired

3 Authorization token failed

4 Account not exist in speedlink system

101 order_no can not empty and minimum length 5 characters

102 order_no is not exist in speedlink system

103 Reason code is not exist on system

700 api_key is required

701 timestamp is required

703 Account does not match with any user

704 parameters is must be json type

800 Content-Type is missing

3.9. Check Transportation Fee

Link API

 Production : http://partner.speedlink.vn/Partner/checkTransportationFee
 Staging : http://staging.api.speedlink.vn/Partner/checkTransportationFee

Type: POST

Header

 Content-Type : support 2 types


- application/x-www-form-urlencoded
- application/json
 Authorization : Transmit to Verification Code which was created by the above formula

Body

27 | P a g e
The API System Document

 parameters : is json string transmit information to that table below

Parameters

Field Datatypes Compulsory Note

Real – time send SPEEDLINK Sys


timestamp Int Yes
VD: 1507884060

api_key String Yes Key was provided by SPEEDLINK Sys

data Array Yes Data array about order information

District Address Code are provided by


data[‘pickup_address_code’] String Yes
SPEEDLINK or POSTAL Code
District Address Code are provided by
data[‘receive_address_code’] String Yes
SPEEDLINK or POSTAL Code
Service Code are provided by
data[‘service’] String Yes
SPEEDLINK

data[‘weight’] Float Yes Weight (Kg)

data[‘is_ras’] Boolean No Area deep in the distance

The value which must be collected from


data[‘cod_value’] Float No
Receiver

Param Example:

"api_key":"E455A7DC358CB61CD49C5FA0EDD6FFBF67AB5166",

"timestamp":1540362936,

"data":{

"pickup_address_code":"VN039006006",

"receive_address_code":"VN039006006",

"service":"ES1",

"weight":2,

"is_ras":true,

28 | P a g e
The API System Document

"cod_value":20000

Result Example:

"error_code": 1 ,

"description'":"Check Transport Fee Success!",

"data":[

"service":"Chuyển phát nhanh TMĐT",

"price":20849,

"surcharge":"15%",

"cod_fee":20000,

"vat":4398,

"total":48374

Result Error Code:

Error code Description

1 Check Transport Fee Success

2 Authorization token is expired

3 Authorization token failed

4 Account not exist in speedlink system

101 data is required

29 | P a g e
The API System Document

102 receive_address_code is required

103 receive_address_code is incorrect

104 pickup_address_code is required

105 pickup_address_code is incorrect

106 weight is required

107 weight must be a number

108 cod_value must be a number

109 service is required

110 Cod value is required with this service

112 service is incorrect

700 api_key is required

701 timestamp is required

703 Account does not match with any user

704 parameters is must be json type

800 Content-Type is missing

3.10. Webhook Order Status

Link API: Partner will provide for speedlink IT

Method: POST

Header

 Content-Type : application/json
 Authorization : Partner provide for speedlind IT

Body

 parameters : is json string transmit information to that table below


{

"tracking_no_spl":"SPL0282371032",

30 | P a g e
The API System Document

"tracking_no": "0124742389",

"status": "Detained",

"reason_code": "3220",

"reason_eng": "Wrong address (can NOT find address)",

"date_status": "2018-06-05 05:52:08",

"cash": 28900,

"weight": 6,

"pod_name": "Nguyễn Đắc Pháp",

Parameters

Field Datatypes Note

tracking_no String Tracking no of partner

status String Status of order

reason_code String Reason code with status

reason_eng String Reason in English

date_status Date Time when bill have been updated

tracking_no_spl String Tracking no of Speedlink

cash Float Transport Fee (Cash) must be collected

weight Float Weight (Kg), round up two decimal

pod_name String Receiver name

31 | P a g e
The API System Document

Response status example from Partner

"status":"200",

"message":"Update Success"

Status code

Status code Description

200 Success

!= 200 Fail

32 | P a g e

S-ar putea să vă placă și