Skip to main content

Pickup Request

Here's how you connect to 3PL to get pickup request and also get awb for courier driver reference.

[POST] /api/mitra/v4/instant/pickup/request

Payload

PayloadValuesTypeRequired
serviceCourier code grab_express, borzo, gosendStringYES
service_typePrice result.costs.[].service_typeStringYES
vehiclemotor (Bike) or mobil (Car)StringYES
order_prefixYour seller order Prefix, we will use for generate order idStringYES
packagesPackages ObjectArray of ObjectYES

Packages Object

PayloadValuesTypeRequired
origin_nameSender NamestringYES
origin_phoneSender Phone Number, use a country phone scopestringYES
origin_latSender Origin LatitudefloatYES
origin_longSender Origin LongitudefloatYES
origin_addressSender Origin Address DetailstringYES
origin_address_noteSender Origin Address Detail Note e.g "Dekat Kantor"stringYES
destination_nameReceiver NamestringYES
destination_phoneReceiver Phone Number, use a country phone scopestringYES
destination_latReceiver Origin LatitudefloatYES
destination_longReceiver Origin LongitudefloatYES
destination_addressReceiver Origin Address DetailstringYES
destination_address_noteReceiver Origin Address Detail Note e.g "Dekat Kantor"stringYES
shipping_priceYour shipping cost value, we use for validationintYES
itemItem detailobjectYES

Item Object

PayloadValuesTypeRequired
nameThe item namestringYES
descriptionThe item descriptionstringYES
priceYour goods value for insurance purposeintYES
weight_kgWeight for the package in KG. Please use volumetric if higher volumetric value detected.intYES

Example

curl --location 'https://tdev.kiriminaja.com/api/mitra/v4/instant/pickup/request' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {token}' \
--data '
{
"service" : "gosend",
"service_type" : "instant",
"vehicle" : "motor",
"order_prefix" : "NBL2",
"packages" : [
{
"destination_name" : "Arfian",
"destination_phone" : "081280045616",
"destination_lat" : -7.734943400000001,
"destination_long" : 110.405355,
"destination_address" : "Minomartani, Kec. Ngaglik, Kabupaten Sleman, Daerah Istimewa Yogyakarta, Indonesia",
"destination_address_note" : "Tidak Ada Destination",
"origin_name" : "Arfian",
"origin_phone" : "081280045616",
"origin_lat" : -7.8032616,
"origin_long" : 110.350244,
"origin_address" : "Wirobrajan, Kota Yogyakarta, Daerah Istimewa Yogyakarta, Indonesia",
"origin_address_note" : "Tidak Ada Origin",
"shipping_price" : 34000,
"item" : {
"name" : "Barang 1",
"description" : "Barang 1 Description",
"price" : 20000,
"weight_kg" : 2
}
}
]
}'

Response

{
"status": true,
"text": "success",
"code": 0,
"method": null,
"result": {
"payment": {
"payment_id": "PID-1705636897",
"amount": 35000,
"status_code": "Billing siap dibayar",
"qr_content": "some-random-qr-string",
"pay_time": "2024-01-19T04:01:38.450035Z"
},
"packages": [
{
"awb": "",
"order_id": "NBL2-1705636897084",
"service": "gosend",
"service_type": "instant",
"status": 100,
"live_track_url": null,
"poly_line": "jasn@_xo`TPwD@WwEm@iDa@mFo@a@M}K{AgEe@wAQmEi@y@MyBSwBWiC[iCSaGw@qAKmCOKAFwALqBCmAWwAw@}BeAqC_@gAqCKaAEUIKu@o@sCUo@Wg@c@s@GAIIGKAEk@_@g@YsBeAaEkB[Iu@EsGIiCE}@@wEEyFK_KUkQYyJQsIMmUe@iEE}JQ}FKuXe@oP[oLOqEK}KKsEGeAC{AC_BCGPQRMBI?QCOKCGEQBQFOLGVw@`@_AjA_Ej@wBTc@l@aERgDP{BJsD`@eGh@cEj@cE`@qERoAf@yEx@iHHiA@o@IyAIsAEi@EeADmAB_@\\eBBOICXuAr@qC^aAd@kAjAmC`AwBj@_AbAwAb@g@dA{@Dc@ASGQOKeAq@sAm@w@e@{GcDaAa@eAk@eAg@kAk@mHqD_CgAkBaAgD}AeG_DmFoCgAa@gAe@eDeBwDoByAs@mB_AsAq@{CyAsAq@uAu@eIcE{EcCuBaAkBy@iDcBqB_AcD}AmB{@gEsB_Ak@_Bu@KEf@cANY`CiFr@mAZs@?MIo@Bk@PoAJa@BMFMTSPMPQ^]^g@B[DkALyCDg@L@f@BbDD|@?pBDv@BAg@C}@G]E_ADOn@k@DuAHu@@KqAMWCB[",
"origin": {
"name": "Arfian",
"address": "Wirobrajan, Kota Yogyakarta, Daerah Istimewa Yogyakarta, Indonesia",
"phone": "081280045616",
"lat_long": "-7.8032616,110.350244"
},
"destination": {
"name": "Arfian",
"address": "Minomartani, Kec. Ngaglik, Kabupaten Sleman, Daerah Istimewa Yogyakarta, Indonesia",
"phone": "081280045616",
"lat_long": "-7.7349434,110.405355"
},
"driver": {
"name": null,
"phone": null,
"image": null
}
}
]
}
}

Response – Error

{
"status": false,
"text": "cannot process the request, distance more than 40km",
"code": 2,
"method": null,
"result": null
}