nda666/tokopedia-php

Tokopedia Partner API PHP SDK

v0.1.10 2024-12-05 02:53 UTC

This package is auto-updated.

Last update: 2024-12-05 02:55:34 UTC


README

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