---
title: "Queue every unsynced spark code for sync"
method: POST
path: "/gmv-max/spark-codes/sync-all"
tags: ["GMV Max"]
---

# Queue every unsynced spark code for sync

`POST /gmv-max/spark-codes/sync-all`

Queue every spark code for the shop that isn't already ``synced``. Writes pending rows to ``gmv_max_spark_code_sync``; the offline CRJ fires the TikTok ``/tt_video/authorize/`` calls on its next run.

Returns immediately with ``{queued, skipped, message}``. Shops without an active TikTok Business connection return 422 ``TIKTOK_NOT_CONNECTED``. Single shop only.

## Headers

- `Idempotency-Key` string, nullable
- `X-Dry-Run` string, nullable

## Request body

- SparkCodeSyncAllRequestPublic — ``POST /public/v1/gmv-max/spark-codes/sync-all`` — queue every unsynced code for the shop. Returns immediately with a queue count; the offline CRJ actually fires the TikTok calls. Has no body fields (shop_id comes from `x-shop-id`); kept as a model so we can still ``extra="forbid"`` against accidental payloads.

## Response `200`

Codes queued for async sync.

- unknown

## Other responses

- `403` — API key lacks `read_write` scope.
- `409` — Idempotency-Key conflict.
- `422` — Shop not connected to TikTok Business.
- `429` — Write rate limit exceeded.

---

[API](https://skmtc.dev/reacherapp/apis/reacher-data-api.md) · [All operations](https://skmtc.dev/reacherapp/apis/reacher-data-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/reacherapp/reacher-data-api/revisions/d4fe3e380424/schema)
