Freight Mark Web API Technical Documentation v2.51 18dec18
Freight Mark Web API Technical Documentation v2.51 18dec18
51
Freight Mark Web API Technical documentation
(Customer Interface)
API Endpoint
Staging: http://27.131.53.78:8899
Production: https://api.freightmark.asia:4445
Authentication
This API is to allow customer obtain security token to be used for all other data posting for the API below. Each time
when a session / connection terminated, a new security token has to be retrieve again in order to connect
successfully. The Security token has to be included in the “Header” in each API call.
URL: /token
Content-Type: application/x-www-form-urlencoded
Field
Parameter Data Type Mandatory Description
System will generate a security token to be used in the next API call
"access_token": "9aih23pw2poPxI_j4ZDbZ3-
hfODYp_NNIfCiqDB2CmhvD8ZYtMnfqxgUWetUGKAydFw7iZAJpxr4IMWsz8Yi5h72_xXx-
lfO8Ooqqr7vLjNLAg93GZUsWX7M4IBHqw5f1Pr44o3neVtAi7kfWviXVnCTy9hLAxefpq3ysVVZqD8pCraenqM48w_8o8f
Uhrs4UvZ17aqNP6j0bSO9FWGuJ9Tsw38ReDOB_IV1RWbsaaIti9n2R9v_CwNAfWnZc-bSQGrS9Jsg-
oloaeDwsdXTe9s2Ft92EAOt9gUlbcwoeOCIFHvXrVMzHv_9uQvORea8NBwtKq9knWnCVoxPSAJrD1kgBeA2JTrcs4z1xqu
YgrhRKdHJnjON98CmSWeNK83Wv-
MK5Xgqb7ruVLkOxeLUHyi3Vbco7lxHH_rrRm0yhPywWiEhsCSD55_64IFDPnyp3oiKDTwIQtqmU-
H9tHoatiUimm_XYGiVaE4Lkpj_kbjfpOMiwRtWIhyF6JYH8tZg",
Prepare by: Freight Mark IT Department
Web API document V.2.51
"token_type": "bearer",
"expires_in": 1209599,
Fail Result:
"error": "invalid_grant",
Content-Type: application/json
{
[0] => Array
{
[APIStatus] => Sucess
[PODStatus] => 10
[PODDesc] => Shipment Received in Depot
[PODDate] => 2015-05-18 17:41:24
[PODBranch] => Petaling Jaya
Prepare by: Freight Mark IT Department
Web API document V.2.51
}
}
Error Result:
System will return error when mandatory fields are not provided, wrong account or other information as example
below:
{
[0] => Array
{
[APIStatus] => Fail
[Reason] => Invalid ConNo
}
}
{
[0] => Array
{
[APIStatus] => Fail
[Reason] => Invalid Account
}
}
Content-Type: application/json
Currency varchar(10) Yes Currency of goods value , e.g. MYR, SGD, USD
{
[APIStatus] => Success
Error Result:
{
[APIStatus] => Fail
Array
{
[APIStatus] => Fail
Content-Type: application/json
Field
Parameter Data Type Mandatory Description
consignmentno varchar(20) Yes Consignment no. received from congen API (eg. FX1234567)
{
[pdf] => JVBERi0xLjQKMSAwIG9iago8PAovVGl0bGUgKP7…
}
Content-Type: application/json
Currency varchar(10) Yes Currency of goods value , e.g. MYR, SGD, USD
"ConId" : "MYX1001300058",
"CompanyCode": "FXFX",
"ProgramId": "1",
"OrderDate": "2018-12-13",
"DeliveryDate": "2018-12-13",
"CustomerReference1": "SI-11063",
"CustomerReference2": "",
"AccountKey": "P000145",
"ServiceCode": "ECO",
"Currency": "USD",
"Quantity": "2",
"Uom": "PAR",
"ShipperName": "LF",
"ShipperAddress2": "",
"ShipperPostcode": "41500",
"ShipperCity": "Bangsar",
"ShipperState": "Selangor",
"ShipperRegion": "",
"ShipperCountry": "MY",
"ShipperContactTel": "037789017",
"ShipperMobileNo": "0167708911",
"ShipperEmail": "[email protected]",
"ReceiverAddress2": "",
"ReceiverPostcode": "31650",
"ReceiverState": "Perak",
"ReceiverRegion": "",
"ReceiverCountry": "MY",
"ReceiverContactTel": "056678901",
"ReceiverMobileNo": "0155879015",
"ReceiverEmail": "[email protected]",
"PickupDate": "2019-1-1",
"isCOD": "1",
"COD": "7.00",
"CargoDetails":
"Commodity": "Heat",
"value": "57",
"Weight": "19",
"Volume": "20",
"Width": "54",
"Length": "10",
"Height": "26"
},
"Commodity": "Cold",
"value": "20",
"Weight": "18",
"Volume": "20",
"Width": "30",
"Length": "20",
"Height": "15"
"APIStatus": "Success",
"Reasons": []
Error Result:
System will return error when mandatory fields are not provided, wrong account or other information as example
below:
{
"APIStatus": Fail
E00002 – Consignment No MYX1001300058 Have Different Cargo Details Line Number With Quantity