https://github.com/ar-android/tiki-ongkir
Cek ongkos kirim tiki.id
https://github.com/ar-android/tiki-ongkir
Last synced: 6 months ago
JSON representation
Cek ongkos kirim tiki.id
- Host: GitHub
- URL: https://github.com/ar-android/tiki-ongkir
- Owner: ar-android
- License: mit
- Created: 2017-10-02T06:18:05.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-02T07:37:18.000Z (over 8 years ago)
- Last Synced: 2024-04-19T20:03:36.664Z (about 2 years ago)
- Language: PHP
- Size: 11.7 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tiki Ongkir
[](https://packagist.org/packages/ocittwo/tiki-ongkir)
Library untuk cek ongkos kirim dengan jasa pengiriman tiki.
## Install
```composer
composer require ocittwo/tiki-ongkir
```
## Usage
```php
origin = 'Jakarta';
$tiki->destination = 'Bandung';
$tiki->tariff_code_origin = 'CGK01.00';
$tiki->tariff_code_destination = 'BDO01.00';
$tiki->weight = 1;
echo json_encode($tiki->getResult());
```
### Result
```json
{
"success": true,
"origin": "Jakarta",
"destination": "Bandung",
"weight": "1 Kg",
"result": [
{
"product_code": "REG",
"product_price": "Rp 10.000"
},
{
"product_code": "ECO",
"product_price": "Rp 8.000"
},
{
"product_code": "ONS",
"product_price": "Rp 20.000"
},
{
"product_code": "SDS",
"product_price": "Rp 181.000"
},
{
"product_code": "HDS",
"product_price": "Rp 42.000"
},
{
"product_code": "TRC",
"product_price": "Rp 25.000"
}
]
}
```
## Get Origin and Destination
Untuk mendapatkan data origin dan destination silahkan buka pada URL berikut ini dengan method GET.
```
https://tiki.id/etc/CariDaerah/...
Contoh :
https://tiki.id/etc/CariDaerah/Bandung
json =>
[
{
"daerah": "Andir, Bandung",
"tariff_code": "BDO01.00",
"importance": "3",
"tariff_diff": "0"
},
{
"daerah": "Antapani (Cicadas), Bandung",
"tariff_code": "BDO01.00",
"importance": "3",
"tariff_diff": "0"
},
{
"daerah": "Arcamanik, Bandung",
"tariff_code": "BDO01.00",
"importance": "3",
"tariff_diff": "0"
},
{
"daerah": "Arjasari, Bandung",
"tariff_code": "BDO80.00",
"importance": "3",
"tariff_diff": "0"
},
{
"daerah": "Astana Anyar, Bandung",
"tariff_code": "BDO01.00",
"importance": "3",
"tariff_diff": "0"
},
{
"daerah": "Babakan Ciparay, Bandung",
"tariff_code": "BDO01.00",
"importance": "3",
"tariff_diff": "0"
}
]
```
# License
Read [MIT License](LICENSE)