nda666 / tokopedia-php

Unofficial Tokopedia REST client for PHP

Home Page:https://bakhtiar.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Packagist Packagist PHPUnit PHPStan codecov

Tokopedia PHP

Tokopedia Rest Client for PHP

Installation

composer require nda666/tokopedia-php

Usage

$tokopedia = new \TokopediaPhp\Tokopedia([
                'clientId' => env('TOKOPEDIA_CLIENT_ID'),
                'fsId' => env('TOKOPEDIA_FS_ID'),
                'clientSecret' => env('TOKOPEDIA_CLIENT_SECRET')
            ]);
$product = $tokopedia->product()->getProducts([
            'page' => $page,
            'per_page' => 50,
            'sort' => 1,
            'shop_id' => $shopId
        ])->getData();

echo json_encode($product);
// {
//   "header": {
//     "process_time": 5.871520385,
//     "messages": "Your request has been processed successfully"
//   },
//   "data": [
//     {
//       "basic": {
//         "productID": 15245228,
//         "shopID": 480829,
//         "status": 1,
//         "Name": "hxh wallpaper best la zzzz",
//         "condition": 1,
//         "childCategoryID": 1828,
//         "shortDesc": "Best wallpaper for hxh"
//       },
//       ...
//     }
//   ]
// }

Task List

  • Product API
  • Order API
  • Shop API
  • Category API
  • Logistic API
  • Campaign API
  • Webhook API
  • Interaction API
  • Finance API

About

Unofficial Tokopedia REST client for PHP

https://bakhtiar.vercel.app

License:MIT License


Languages

Language:PHP 100.0%