Booking Resi via API

Senin, 11 Sepember 2017 | 13:27 WIB azizalfian |

Fitur Booking resi adalah fitur khusus corporate yang sudah melakukan pengajuan permohonan integrasi sistem dengan TKD Express. Untuk menggunakan fitur Booking resi ini adalah sebagai berikut:

 

1. Membuat Data Booking:

Request API [POST]: https://global.tkd.co.id/api/booking/create/format/json/raw/?apikey={API Key Anda}

Type: raw
Value: formatted json

Example format json:

{
 "userid": "UCBDJ000xxx",
 "up": "Anggita",
 "name": "Coca Cola, PT",
 "address": "Jakarta Timur",
 "zip_code": "13910",
 "telp": "083806075xxx",
 "fax": ""
}

Response Output JSON:

{
    "result": {
        "booking_id": "UCBDJ000008000xxx",
        "from": {
            "userid": "UCBDJ000xxx",
            "name": "PT. INDOPACIFIK/KJP, PT. INDOPACIFIC / KJP",
            "address": "JL. TRANS KALIMANTAN, KOMP.PERSADA RAYA 3, JALUR 20, NO.20, RT.25",
            "telp": "082158992xxx",
            "fax": ""
        },
        "to": {
            "up": "ANGGITA",
            "name": "COCA COLA, PT",
            "address": "JAKARTA TIMUR",
            "zip_code": "13910",
            "telp": "083806075xxx",
            "fax": ""
        }
    },
    "status": "success",
    "code": "BK101",
    "message": "Proses membuat booking resi berhasil"
}

 

Keterangan format data json:

Parameter Deskripsi Value Type Mandatory
userid User ID corporate Anda [ID Corporate] string(11) Required
up Nama UP untuk penerima barang [Nama UP] string Optional
name Nama penerima barang [Nama] string Required
address Alamat penerima barang [Alamat] string Required
zip_code Kodepos alamat [Kodepos] number Optional
telp Telp penerima barang [Telp] number Required
fax Fax penerima barang [Fax] number Optional

 

 

 

 

 

 

 

2. Update Data Booking:

Request API [POST]https://global.tkd.co.id/api/booking/update/format/json/raw/?apikey={API Key Anda}

Type: raw
Value: formatted json

Example format json:

{
 "booking_id": "UCBDJ00000800xxxx",
 "userid": "UCBDJ000xxx",
 "up": "Anggita Salikha",
 "name": "Coca Cola, PT",
 "address": "Jakarta Timur",
 "zip_code": "13910",
 "telp": "083806075xxx",
 "fax": ""
}

Response Output JSON:

{
    "result": {
        "booking_id": "UCBDJ00000800xxxx",
        "from": {
            "userid": "UCBDJ000xxx",
            "name": "PT. INDOPACIFIK/KJP, PT. INDOPACIFIC / KJP",
            "address": "JL. TRANS KALIMANTAN, KOMP.PERSADA RAYA 3, JALUR 20, NO.20, RT.25",
            "telp": "082158992xxx",
            "fax": ""
        },
        "to": {
            "up": "ANGGITA SALIKHA",
            "name": "COCA COLA, PT",
            "address": "JAKARTA TIMUR",
            "zip_code": "13910",
            "telp": "083806075xxx",
            "fax": ""
        }
    },
    "status": "success",
    "code": "BK102",
    "message": "Proses memperbaharui booking resi berhasil"
}

 

Keterangan format data json:

Parameter Deskripsi Value Type Mandatory
booking_id Booking ID Anda [Booking ID] string(17) Required
userid User ID corporate Anda [ID Corporate] string(11) Required
up Nama UP untuk penerima barang [Nama UP] string Optional
name Nama penerima barang [Nama] string Required
address Alamat penerima barang [Alamat] string Required
zip_code Kodepos alamat [Kodepos] number Optional
telp Telp penerima barang [Telp] number Required
fax Fax penerima barang [Fax] number Optional

 

 

 

 

 

 

 

 

3. Delete Data Booking:

Request API [POST]https://global.tkd.co.id/api/booking/delete/format/json/raw/?apikey={API Key Anda}

Type: raw
Value: formatted json

Example format json:

{
 "booking_id": "UCBDJ00000800xxxx",
 "userid": "UCBDJ000xxx"
}

Response Output JSON:

{
    "status": "success",
    "code": "BK103",
    "message": "Proses menghapus booking resi berhasil"
}

 

Keterangan format data json:

Parameter Deskripsi Value Type Mandatory
booking_id Booking ID Anda [Booking ID] string(17) Required
userid User ID corporate Anda [ID Corporate] string(11) Required

 

 

 

 

 

 

4. Histori Data Booking:

Request API [GET]https://global.tkd.co.id/api/booking/data/{userid}/search/{page}/{itemsperpage}/?apikey={API Key Anda}&firstdate={yyyy-mm-dd}&lastdate={yyyy-mm-dd}&query={pencarian data}

Response Output JSON:

{
    "results": [
        {
            "booking_id": "UCBDJ00000800xxxx",
            "connote": null,
            "up": "IBU DEWI",
            "name": "MAJU MUNDUR, PT",
            "address": "JL. H.TAIMAN UJUNG NO.8
TENGAH KRAMAT JATI",
            "zip_code": "13910",
            "telp": "083806075xxx",
            "fax": "",
            "created_at": "2017-09-08 21:45:14",
            "updated_at": null,
            "userid": "UCBDJ000xxx",
            "status_delivery": "ON PROCESS",
            "received_by": null,
            "date_pod": null,
            "detail_pod": null
        }
    ],
    "status": "success",
    "code": "RS501",
    "message": "Data ditemukan.",
    "metadata": {
        "records_total": 1,
        "records_count": 1,
        "number_item_first": 1,
        "number_item_last": 1,
        "items_per_page": 10,
        "page_now": 1,
        "page_total": 1
    }
}

 

Keterangan Request:

Parameter Deskripsi Value Type Mandatory
userid User ID corporate Anda [ID Corporate] string(11) Required
page Nomor halaman [Page] integer Required
itemsperpage Total data yang ingin ditampilkan [ItemPerPage] integer Required
firstdate Tanggal Awal periode [yyyy-mm-dd] date Required
lastdate Tanggal Akhir periode [yyyy-mm-dd] date Required
query Data yang ingin di cari [Query] string Optional

 

 

 

 

 

 

5. Read Data Booking:

Request API [GET]https://global.tkd.co.id/api/booking/data/read/{booking_id}/?apikey={API Key Anda}&show={lite or full}

Response Output JSON with show=full:

{
    "result": {
        "booking_id": "UCBDJ00000800xxxx",
        "connote": null,
        "status_delivery": "ON PROCESS",
        "received_by": null,
        "date_pod": null,
        "detail_pod": null,
        "created_at": "2017-09-11 13:56:28",
        "updated_at": "2017-09-11 14:39:30",
        "from": {
            "userid": "UCBDJ000xxx",
            "name": "PT. INDOPACIFIK/KJP, PT. INDOPACIFIC / KJP",
            "address": "JL. TRANS KALIMANTAN, KOMP.PERSADA RAYA 3, JALUR 20, NO.20, RT.25",
            "telp": "082158992xxx",
            "fax": ""
        },
        "to": {
            "up": "ANGGITA SHALIKHA",
            "name": "COCA COLA, PT",
            "address": "JAKARTA TIMUR",
            "zip_code": "13910",
            "telp": "083806075xxx",
            "fax": ""
        }
    },
    "status": "success",
    "code": "RS501",
    "message": "Data ditemukan."
}

Response Output JSON with show=lite:

{
    "result": {
        "booking_id": "UCBDJ00000800xxxx",
        "connote": null,
        "created_at": "2017-09-11 13:56:28",
        "updated_at": "2017-09-11 14:39:30",
        "from": {
            "userid": "UCBDJ000xxx",
            "name": "PT. INDOPACIFIK/KJP, PT. INDOPACIFIC / KJP",
            "address": "JL. TRANS KALIMANTAN, KOMP.PERSADA RAYA 3, JALUR 20, NO.20, RT.25",
            "telp": "082158992xxx",
            "fax": ""
        },
        "to": {
            "up": "ANGGITA SHALIKHA",
            "name": "COCA COLA, PT",
            "address": "JAKARTA TIMUR",
            "zip_code": "13910",
            "telp": "083806075xxx",
            "fax": ""
        }
    },
    "status": "success",
    "code": "RS501",
    "message": "Data ditemukan."
}

 

Keterangan Request:

Parameter Deskripsi Value Type Mandatory
booking_id Nomor Booking ID Anda [Booking ID] string(17) Required
show Menampilkan data. Default adalah full [lite or full] string Optional

 

 

 

 

 

Catatan:

Untuk aplikasi web base, agar lebih mudah kami menyarankan menggunakan type form-data sebagai berikut:

Request Create API [POST]https://global.tkd.co.id/api/booking/update/format/json/?apikey={API Key Anda}

Request Update API [POST]https://global.tkd.co.id/api/booking/update/format/json/?apikey={API Key Anda}

Request Delete API [POST]https://global.tkd.co.id/api/booking/update/format/json/?apikey={API Key Anda}

Buat form input dengan attribute name="data" kemudian value sesuaikan dengan format masing - masing request yang di inginkan.

Untuk lebih jelasnya, Anda dapat menghubungi pihak IT TKD Express via email div.it@tkd.co.id.

Terima kasih.


#API #JSON #Developer


Popular Post
Kategori
CEK TARIF DAN RESI TKD Express
TKD Express Head Office

Jl. I Gusti Ngurah Rai blok 1J, Klender, Jakarta Timur
CS : 021- 22086086 / 021-22086381 / 021-22086382
Email : sales@tkd.co.id | cs@tkd.co.id
Jam : Senin - Sabtu 8.00 - 19.00 WIB