TikTok Shop
Shops, products, inventory and price, orders, fulfillment, returns, customer service
Experimental v0.1.0 Node.js 15 actions ToS risk low
About
A Graphrt plugin for a seller's shop on TikTok Shop, through the TikTok Shop Partner API (open-api.tiktokglobalshop.com, versioned endpoints from 202309 on). It covers products, inventory and prices, orders, shipping, returns and buyer messages. Every request is signed with your app secret, as TikTok Shop requires.
What it can do
- Shops: get_authorized_shops, which returns each shop's cipher
- Products: - search_products and get_product. - update_inventory (node only, per SKU and warehouse, each SKU/warehouse pair once) and update_price (node only, per SKU, currency as an uppercase code such as IDR, IDR, JPY, KRW and VND prices must be whole numbers).
- Orders: search_orders and get_order_detail (up to 50 orders)
- Fulfilment: ship_package (node only, TikTok Shipping pickup or drop-off, or seller shipping) and get_package_shipping_document (a label or packing slip URL that is valid for 24 hours, the plugin does not download it)
- Returns: search_returns
- Customer service: get_conversations, get_conversation_messages and send_message (text or cards)
- Token refresh (node only): refresh_access_token calls auth.tiktok-shops.com and returns the new tokens
- api_request: any other Open API endpoint, signed. Set include_shop_cipher: false for app-level endpoints. Paths may use only letters, digits, _, - and ~ per segment (no % encodings or dots), so the signed path is exactly the path that is sent.
Actions
Each action is a step you can add to a workflow. Agents can also use most of them as tools.
- Get TikTok Shop authorized shops
tiktok-shop-api.get_authorized_shops - Search TikTok Shop products
tiktok-shop-api.search_products - Get a TikTok Shop product
tiktok-shop-api.get_product - Update TikTok Shop inventory
tiktok-shop-api.update_inventory - Update TikTok Shop price
tiktok-shop-api.update_price - Search TikTok Shop orders
tiktok-shop-api.search_orders - Get TikTok Shop order details
tiktok-shop-api.get_order_detail - Get TikTok Shop shipping document
tiktok-shop-api.get_package_shipping_document - Ship a TikTok Shop package
tiktok-shop-api.ship_package - Search TikTok Shop returns
tiktok-shop-api.search_returns
Show all 15 actions
- List TikTok Shop buyer conversations
tiktok-shop-api.get_conversations - Get TikTok Shop conversation messages
tiktok-shop-api.get_conversation_messages - Send a TikTok Shop buyer message
tiktok-shop-api.send_message - Refresh TikTok Shop access token
tiktok-shop-api.refresh_access_token - TikTok Shop API request
tiktok-shop-api.api_request
Settings
Graphrt starts plugins with a clean environment. Only these values reach the plugin, and secrets stay out of logs.
-
TIKTOK_SHOP_APP_KEYRequiredApp key from Partner Center -
TIKTOK_SHOP_APP_SECRETRequiredApp secret, used to sign every request. Never an argument -
TIKTOK_SHOP_ACCESS_TOKENFor API operationsSeller access token, sent in the x-tts-access-token header (valid about 7 days) -
TIKTOK_SHOP_CIPHERFor shop operationsThe shop's cipher from get_authorized_shops -
TIKTOK_SHOP_REFRESH_TOKENFor refresh_access_tokenRefresh token
How to use it
In Graphrt Desktop
- Open Plugins and search for TikTok Shop.
- Click Install and approve it.
- Follow the setup steps on the plugin's page, then paste the settings it needs.
- Describe a job that needs it, and the builder adds the steps.
With the CLI
terminal
$ graphrt plugin install tiktok-shop-api --yes workflow.yaml
- id: to_ship
type: tiktok-shop-api.search_orders
order_status: AWAITING_SHIPMENT
create_time_ge: 1763424000 # Unix seconds
- id: stock
type: tiktok-shop-api.update_inventory
product_id: "1729592969712207008"
skus: [{ sku_id: "1729592969712207013", quantity: 25 }]
- id: reply
type: tiktok-shop-api.send_message
conversation_id: "{{#start.conversation_id#}}"
text: "Terima kasih! Paket kakak sudah kami kirim."