Engineering / Quickstart
Markdown ↓

Eduard's TikTok Shop quickstart

Phase 1: import orders into Hello Pine, synchronize their state and report fulfillment. Phase 2: export product data to TikTok Shop. Use existing test-shop products for phase 1.

Access status — checked 23 September 2026: our public app is a draft; scopes await review. Development Shops currently reports Sandbox unavailable in our region. Preparation can start; the token/API steps need an authorized test seller. TikTok requires test sellers for unpublished apps. Nabil needs to clarify test access with TikTok. No successful API call is recorded yet.

01

Set up the tools and orient yourself

Install Postman Desktop. Create a collection Hello Pine — TikTok Orders and a test environment. No TikTok SDK is required for this manual HTTP workflow.

Open our Hello-Pine app and TikTok's API Testing Tool. The tool guide explains selecting our own app key, authorizing a test seller and generating a cURL request. Once a request works there, import its cURL into Postman and save it in the collection. Keep secrets in local secret storage, outside shared exports.

Read the docs as needed: Developer Guide explains flows; API Reference provides each endpoint's scope, method, parameters and example; Webhooks explains event payloads. On every endpoint, check scope and version before copying its example.

Note: TikTok's test guide links a Postman walkthrough, but it returned “Kein Dokument gefunden” during this check. Use the working tool/import instructions above; this handoff does not depend on a downloadable TikTok collection.

02

Authorize a test seller and obtain the access token

Read Authorization overview. Our Partner Center login identifies the developer; the token represents a seller's grant.

  1. In app details, find App Key/App Secret and confirm a development Redirect URL. Check approved scopes for the chosen endpoints: orders use seller.order.info, shipment reporting uses seller.fulfillment.basic.
  2. Once test access is available, authorize our app from the test seller. Use the tool's authorization flow for manual testing. For Pine's own flow, use the guide's ROW seller link, validate state, and receive code at the Redirect URL.
  3. Exchange that code with GET https://auth.tiktok-shops.com/api/v2/token/get: app_key, app_secret, auth_code and grant_type=authorized_code. The code is single-use and expires after 30 minutes.
  4. Retain access_token, refresh_token, expiry timestamps and granted_scopes. The same guide documents /api/v2/token/refresh; implement refresh before expiry.

Check: the token belongs to the intended DE/local seller (user_type=0) and contains the required grants. Keep token request URLs and secrets out of logs and handoff files.

03

Make the first API calls

Follow Call Get Authorized Shops and Sign your API request. Resource requests use x-tts-access-token, app_key, timestamp and an HMAC sign; shop calls also require shop_cipher. In Postman, regenerate timestamp/signature for each send using a pre-request script based on the signing guide. An imported cURL's fixed signature is not a reusable signing implementation.

Run in this order Documentation Check
Get Authorized Shops First request code=0; save the intended shop's ID and cipher
Get Order List — POST, version 202309 Endpoint Use a narrow time window and page_size; follow next_page_token
Get Order Detail — GET, version 202507 Endpoint Retrieve one returned order ID; inspect line items, shipping mode, status and packages

Read the order lifecycle before deciding which state releases an order to fulfillment. Do not fulfill ON_HOLD orders. For incremental synchronization, order-list filters include update timestamps.

04

Report one test fulfillment

Read Fulfillment overview and inspect the order's fulfillment/shipping mode. For seller shipping in Germany:

  1. Resolve the carrier for the order's delivery_option_id with Get Shipping Providers.
  2. For an eligible synthetic test order, call Mark Package As Shipped with the order/line mapping, shipping-provider ID and test tracking data.
  3. Read the order/package back and verify TikTok accepted the shipment information.

TikTok shipping uses a different package/label flow; FBT is fulfilled by TikTok. Select the flow from the actual order instead of applying seller shipping universally.

05

Move the verified flow into Hello Pine

Build a channel-specific client and token store per shop. Map TikTok order/line IDs to Pine once, then reuse the existing order-transfer path. Make order import switchable per connection, with an explicit restart cutoff. Use webhooks for changes, verify their signatures, deduplicate deliveries and reconcile through polling.

Source entry points, inspected at Hello Pine commit 015277c49: order fetch pattern, transfer to the source shop, channel fulfillment subscriber. These are patterns to adapt, not existing TikTok support. The development background contains the account evidence and repository context.

First milestone: one authorized test shop → one order read → exactly one order in the connected test shop system → fulfillment returned to TikTok. Replaying the event must not create another order; disabling order import must prevent transfer.