You are on page 1of 9

API DOCUMENTATION

LAST MILE DELIVERY

Version 1
Revision 3
Date 24/07/2017
Author Herry, Devisa

Contents
1. AUTHENTICATION ...................................................................................................................... 2
2. TRANSPORT ............................................................................................................................... 3
3. TRACKING .................................................................................................................................. 5
4. CHECK CLIENT RATES ................................................................................................................. 7
5. CHECK PUBLISH RATES ............................................................................................................... 8
6. STATUS ...................................................................................................................................... 9

Page 1 of 9
1. AUTHENTICATION
a. Method : POST

b. Parameters

Parameters Datatype Mandatory Remarks


userkey String(225) Y

c. Request

POST /v1/ApiUser/login HTTP/1.1


Host: dev-api.irunapows.id
Content-Type: application/json

{"userkey":"userkey"}

d. Response

{
"status":"200",
"message":"string",
"id_token":"string"
}

Page 2 of 9
2. TRANSPORT
a. Method : POST

b. Parameters

Parameters Datatype Mandatory Remarks


order_id String (50) Y
pickup_request_date Date Y yyyy-mm-dd
merchant_id String (50) N
merchant_name String (100) Y
merchant _address_1 String (255) Y
merchant _address_2 String (255) N
merchant_sub_district String (100) Y
merchant_district String (100) Y
merchant_city String (50) Y
merchant_postal_code String (6) Y
merchant_phone String (25) Y
merchant_email String (100) Y
customer_address_id String (50) N
customer_name String (100) Y
customer _address_1 String (255) Y
customer _address_2 String (255) N
customer_sub_district String (100) Y
customer_district String (100) Y
customer_city String (50) Y
customer_postal_code String (6) Y
customer_phone String (25) Y
customer_email String (100) Y
REGULER,
SAMEDAY,
service_type String (5) Y PREMIUM
remark Text N
total_quantity Integer Y
uom String (5) Y i.e.: PCS
total_volume Integer Y
uov String (5) Y i.e.: CM3
total_weight Integer Y
uow String (5) Y i.e.: KG
Product
product_description Text Y description

c. Request

POST /v1/Transport/createob HTTP/1.1


Host: dev-api.irunapows.id
Content-Type: application/json
Authorization: {id_token}

Page 3 of 9
{
"order_id":"lm-0002",
"pickup_request_date":"2017-06-15",
"merchant_id":"M111",
"merchant_name":"Danesh Shop2",
"merchant_address_1":"Jl. Swakarya No.55",
"merchant_address_2":"",
"merchant_sub_district":"Meruya Selatan",
"merchant_district":"Kembangan",
"merchant_city":"Jakarta Barat",
"merchant_postal_code":"11650",
"merchant_phone":"0818818818",
"merchant_email":"devisa@iruna.id",
"customer_address_id":"customer-008",
"customer_name":"devisa",
"customer_address_1":"Jl. Sanur No.34",
"customer_address_2":"",
"customer_sub_district":"Kunciran",
"customer_district":"Pinang",
"customer_kota_kabupaten":"Tangerang",
"customer_postal_code":"11544",
"customer_phone":"08585858585",
"customer_email":"suryo@iruna.id",
"service_type":"EXPRESS",
"remark":"jemput pake mobil box yah",
"total_quantity":"2",
"uom":"pcs",
"total_volume":"10",
"uov":"M3",
"total_weight":"30",
"uow":"KG",
"product_description":"kursi kerja"
}

d. Response

{
"status": "200",
"data": [
{
"error_msg": null,
"new_tro_id": 40002772,
"new_tracking_id": 400028537801
}
]
}

Page 4 of 9
3. TRACKING
a. Method : POST

b. Parameters

Parameters Datatype Mandatory Remarks


q String (500) Y Tracking ID /
DO ID / Order ID

c. Request
POST /v1/History/tracking HTTP/1.1
Host: dev-api.irunapows.id
Content-Type: application/json
Authorization: {id_token}

{"q":"400031487201,SO-0213123"}

d. Response
{
"status": "200",
"data": [
{
"payload":
"[
{
"client_id":"OKTAGON",
"do_reference":"DO-03838",
"origin_name":"iruna FC Warehouse",
"origin_address":"Pergudangan Dunex Jl. Agung
Karya VII No.1 Sunter Jakarta 14340 ",
"origin_area":"JAKARTA",
"destination_name":"PT.MULTI RASA CITRA
SEJATI",
"destination_address":null,
"destination_area":"TANGERANG",
"track":
[
{
"tracking_id":"400026668401",
"tracking_reference":null,
"pod_code":"ZZ01",
"pod_description":"Address not
found",
"pod_date":"2017-04-20T00:00:00",
"receiver_name":""
},
{
"tracking_id":"400026668401",
"tracking_reference":null,
"pod_code":"P1",
"pod_description":"Delivered",

Page 5 of 9
"pod_date":"2017-04-21T00:00:00",
"receiver_name":"SURYO"
}
]
},

{
"client_id":"OKTAGON",
"do_reference":"SO-0213123",
"origin_name":"iruna FC Warehouse",
"origin_address":"Pergudangan Dunex Jl. Agung
Karya VII No.1 Sunter Jakarta 14340 ",
"origin_area":"JAKARTA",
"destination_name":"Panca Duta",
"destination_address":"Ruko Jaya Indah Jl.
Pegangsaan Timur No.20 Jakarta",
"destination_area":"JAKARTA",
"track":
[
{
"tracking_id":"400026608301",
"tracking_reference":null,
"pod_code":"01",
"pod_description":"Ready to ship",
"pod_date":null,
"receiver_name":null
}
]
}
]"
}
]
}

Page 6 of 9
4. CHECK CLIENT RATES
a. Method : POST

b. Parameters

Parameters Datatype Mandatory Remarks


origin String Y Origin POS Code
destination String Y Destination POS
Code
service_type String N “REGULER”,
“SAMEDAY”,
“PREMIUM”
volume String N Units of
measurement “cm3”
weight String N Units of
measurement “kg”

Note :
- If both parameter “volume” and “weight” filled, system will select largest price.
- If both parameter “volume” and “weight” is not filled, system will display basic
price per 1kg.
- Default “service_type” = “REGULER”.

c. Request
POST /v1/Orders/checkratesclients HTTP/1.1
Host: dev-api.irunapows.id
Content-Type: application/json
Authorization: {token_id}

{
"origin":"11650",
"destination":"15316",
"service_type":"REGULER",
"volume":"12000",
"weight":"3"
}

d. Response
{
"rates": 23400
}

Page 7 of 9
5. CHECK PUBLISH RATES
a. Method : POST

b. Parameters

Parameters Datatype Mandatory Remarks


origin String Y Origin POS Code
destination String Y Destination POS
Code
service_type String N “REGULER”,
“SAMEDAY”,
“PREMIUM”
volume String N Units of
measurement “cm3”
weight String N Units of
measurement “kg”

Note :
- If both parameter “volume” and “weight” filled, system will select largest price.
- If both parameter “volume” and “weight” is not filled, system will display basic
price per 1kg.
- Default “service_type” = “REGULER”.

c. Request
POST /v1/Orders/checkpublishrates HTTP/1.1
Host: dev-api.irunapows.id
Content-Type: application/json
Authorization: {token_id}

{
"origin":"11650",
"destination":"15316",
"service_type":"REGULER",
"volume":"12000",
"weight":"3"
}

d. Response
{
"rates": 23400
}

Page 8 of 9
6. STATUS

Status Value
200 Success
400 Error
500 Failed

Page 9 of 9

You might also like