Skip to main content

Create Integration Instance

POST 

/api/temu

Creates a Temu integration instance directly from the supplied settings and credentials, and creates the linked sales channel record in the same transaction. Most production connections are established through the OAuth flow instead (POST /api/temu/oauth/initialize followed by POST /api/temu/oauth/complete), which populates the connection credentials automatically — use this endpoint when you already hold valid credentials.

Authorization

Any valid API token can call this endpoint — no specific scope required. Manage tokens.

Request body fields:

  • name (string, required) — must be unique across all integration instances.
  • integration_id (integer, required) — id of the Temu integration definition.
  • connection_settings (object, optional) — appKey, appSecret, url, accessToken, expiresAt (all nullable strings).
  • integration_settings (object, required):
    • start_date (string, required) — orders before this date are not imported.
    • store_id (integer, required) — must reference an existing store.
    • auto_link_products (boolean, default true), auto_create_products (boolean, default false).
    • Optional accounting fields: sales_nominal_code_id, cogs_nominal_code_id, shipping_revenue_nominal_code_id, shipping_refund_nominal_code_id, sales_returns_allowances_nominal_code_id (nullable integers referencing nominal codes), sync_sales_order_invoices_to_accounting, sync_sales_credit_to_accounting (booleans).
    • Optional pricing and inventory objects, emailCustomers (boolean), proforma_marketplace_cost_percentage, proforma_payment_cost_percentage (nullable numbers).
  • is_automatic_sync_enabled (boolean, default false).
  • environment (string, optional) — production or sandbox. On production servers the environment is always pinned to production.

The response returns the created instance. Note that the API normalizes all success status codes to 200.

Authentication: Requires Bearer token.

Request

Responses

OK

Response Headers
    Content-Type