Skip to main content

Import Temu Payout Type Mappings

POST 

/api/temu/:integrationInstance/payout-type-mappings/import

Sets the account and mapping group of many line types at once from a CSV file, in the format Export Temu Payout Type Mappings downloads.

Required scope: accounting:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Two steps:

  1. Upload the CSV as multipart form data to POST /api/store-file with fields file and destination=models. The response contains stored_name.
  2. Call this endpoint with that stored_name.

CSV columns (header row required): Financial Code, Nominal Code, Mapping Group.

How each row is applied:

  • The row updates the mapping this store uses for that financial code: its own mapping where it has one, otherwise the mapping shared by all stores.
  • Nominal Code accepts code - name (for example 400 - Sales), a bare code (400) or an account name. A blank value clears the account.
  • Mapping Group is a group name. A blank value leaves the group as it is. A mapping shared by all stores can only use a group shared by all stores.
  • Rows with no financial code, a financial code this store has never seen, an account that does not exist, or a group that is not found or not allowed are not applied and are listed in skipped with their line number and the reason. Nothing is guessed.

Changes are dated like Update Payout Type Mappings: payouts dated on or after effective_from use the new mappings and are rebuilt; earlier payouts keep the accounts they posted with.

Body:

  • stored_name (required, string, max 255): the name returned by POST /api/store-file. The uploaded file is removed after the import attempt.
  • effective_from (optional, nullable, Y-m-d): the date the changes apply from. Defaults to today. Must be after the accounting lock date.

Response: data.updated is the number of rows applied; data.skipped lists the rows that were not.

Errors:

  • 400: the uploaded file was not found (upload it again), or the file has no rows.
  • 422: stored_name is missing, or effective_from is not a valid date or falls on or before the accounting lock date.

Authentication: Requires Bearer token and the integrations.update permission.

Request​

Responses​

OK

Response Headers
    Content-Type