Shopee
Info toko, produk, stok dan harga, pesanan dan pengiriman, chat penjual
Eksperimental v0.1.0 Node.js 15 aksi Risiko ToS rendah
Tentang
Plugin Graphrt untuk toko seller di Shopee Open Platform v2 (partner.shopeemobile.com/api/v2). Mencakup toko, produk, stok dan harga, pesanan, pengiriman dan chat penjual. Setiap request ditandatangani dengan partner key aplikasi kamu, sesuai syarat Shopee.
Yang bisa dilakukan
- Shop: get_shop_info
- Products: - get_item_list (offset paging) and get_item_base_info (up to 50 items). - update_stock and update_price (node only, up to 50 models per call). The result shows Shopee's failure_list, so you can see which models were rejected. A model (or model and location) may appear only once per call.
- Orders: get_order_list (a window of at most 15 days, checked before the call) and get_order_detail (up to 50 orders)
- Shipping: get_shipping_parameter, ship_order (node only, pickup, drop-off or non-integrated) and get_tracking_number
- Seller chat: sellerchat_get_conversation_list, sellerchat_get_message and sellerchat_send_message (text, image URL, item card, order card)
- Token refresh (node only): refresh_access_token returns the new access token and the new refresh token
- api_request: any other v2 endpoint, signed. Use api_type: shop (the default) or api_type: public for partner-level APIs.
- Errors: Shopee's error envelope (error, message, request_id) is mapped to stable kinds, also when it arrives in an HTTP 200 body. A 2xx body without the envelope is an api_error. The partner key and tokens never appear in errors or in api_request results.
Aksi
Setiap aksi adalah langkah yang bisa ditambahkan ke workflow. Agent juga bisa memakai sebagian besar aksi sebagai tool.
- Get Shopee shop info
shopee-api.get_shop_info - List Shopee items
shopee-api.get_item_list - Get Shopee item details
shopee-api.get_item_base_info - Update Shopee stock
shopee-api.update_stock - Update Shopee price
shopee-api.update_price - List Shopee orders
shopee-api.get_order_list - Get Shopee order details
shopee-api.get_order_detail - Get Shopee shipping parameters
shopee-api.get_shipping_parameter - Ship a Shopee order
shopee-api.ship_order - Get Shopee tracking number
shopee-api.get_tracking_number
Tampilkan semua 15 aksi
- List Shopee chat conversations
shopee-api.sellerchat_get_conversation_list - Get Shopee chat messages
shopee-api.sellerchat_get_message - Send a Shopee chat message
shopee-api.sellerchat_send_message - Refresh Shopee access token
shopee-api.refresh_access_token - Shopee Open Platform v2 request
shopee-api.api_request
Pengaturan
Graphrt menyalakan plugin dengan environment yang bersih. Hanya nilai ini yang sampai ke plugin, dan secret tidak masuk log.
-
SHOPEE_PARTNER_IDWajibApp partner id (a number). Test and live apps have different ids -
SHOPEE_PARTNER_KEYWajibApp partner key, used to sign every request. Never an argument -
SHOPEE_SHOP_IDWajibThe authorized shop's id -
SHOPEE_ACCESS_TOKENFor shop operationsShop access token. It is valid for 4 hours -
SHOPEE_REFRESH_TOKENFor refresh_access_tokenRefresh token. It is valid for 30 days and can be used once -
SHOPEE_ENVOpsionallive (default, partner.shopeemobile.com) or test (sandbox, openplatform.sandbox.test-stable.shopee.sg)
Cara memakainya
Di Graphrt Desktop
- Buka Plugins dan cari Shopee.
- Klik Install lalu setujui.
- Ikuti langkah setup di halaman plugin, lalu tempel pengaturan yang dibutuhkan.
- Jelaskan pekerjaan yang membutuhkannya, dan builder menambahkan langkahnya.
Dengan CLI
terminal
$ graphrt plugin install shopee-api --yes workflow.yaml
- id: orders
type: shopee-api.get_order_list
time_from: 1763424000 # Unix seconds
time_to: 1764633600 # at most 15 days later
order_status: READY_TO_SHIP
- id: stock
type: shopee-api.update_stock
item_id: 800123
stock_list: [{ model_id: 0, stock: 25 }]
- id: reply
type: shopee-api.sellerchat_send_message
to_id: "556677"
text: "Terima kasih, pesanan sudah dikirim!"