8000 GitHub - clumsyjohnny/shopeeAPI: wrote the code for shopeeAPI using PHP and hope somebody might find it useful.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

clumsyjohnny/shopeeAPI

Repository files navigation

shopee API V2.2

2025-04-24 update(refactor) the code to accomodate version 2 of SHOPEE open API, and document the code better.

  1. getauthUrl_example.php added example how to use the shopee shop API.
  2. getshop_example.php added example how to use the shopee get shop API to return your shop information.

p/s: you may contact me if you need me to troubleshoot the code jeep1188@gmail.com / whatsapp me

shopee API V2.0

2024-08-24 update the code to accomodate version 2 of SHOPEE open API.

shopeeAPI

wrote the code for shopeeAPI using PHP and hope somebody might find it useful.

//1. example of getting items Detail
$item_id = 123; #{some id of the shopee porudcts}
$shopee = new shopeeAPI($shopeeShopId, $shopeePartnerId, $shopeeSecretKey, $shopeeUrl);
$product = $shopee->retrieveItemDetail($item_id);
var_dump($product); #output the product in JSON format

//2. example of update product quantity
$item_id = 123; #{some id of the shopee porudcts}
$qty = 100; #{quantity of the shopee porudcts}
$shopee = new shopeeAPI($shopeeShopId, $shopeePartnerId, $shopeeSecretKey, $shopeeUrl);
$shopee->updateItemStock($item_id, $qty);
//when successfully updated it will show u modified time and item_id in JSON format

//3. retrieve order list
$shopee = new shopeeAPIOrder($shopeeShopId, $shopeePartnerId, $shopeeSecretKey, $shopeeUrl);
$ordersList = $shopee->getOrderList(null);
$ordersListJSON = json_decode($ordersList, true);
//returns orderList in JSON with attributes "ordersn", "order_status", "order_datetime"

//4. retrieve order Details
$shopee = new shopeeAPIOrder($shopeeShopId, $shopeePartnerId, $shopeeSecretKey, $shopeeUrl);
$ordersn[] = array(123, 456, 789);
$ordersList = $shopee->getOrderDetail($ordersn);
$ordersListJON = json_decode($ordersList, true);
//returns to you order Detail like recipient info., items ordered, status of order, etc.

About

wrote the code for shopeeAPI using PHP and hope somebody might find it useful.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0