# Commerce publishing overview

Commerce publishing covers TikTok Shop commerce videos and photo posts only. Both share authorization, products, scheduling, task creation and records; the details differ in media and commerce settings.

- Web document: [Commerce publishing overview](/en/openapi/workflows/commerce-publishing)
- Markdown: [Markdown](/en/openapi/workflows/commerce-publishing.md)
- Operation index: [Operation index](/en/openapi/operations/index.json)

## Flow

```mermaid
flowchart TD
  A["Creator authorization"] --> B["Products and schedule"]
  B --> C["Media and commerce settings"]
  C --> D["Validate and create task"]
  D --> E["Publishing records"]
  C -. "video" .-> V["Commerce video detail"]
  C -. "photo" .-> P["Commerce photo detail"]
```

## Steps

1. Step 1 · Creator authorization: generate the authorization URL, creator confirms, list accounts with authSource=TIKTOK_SHOP_CREATOR.
2. Step 2 · Products and schedule: choose shop or showcase products and set dates or publish immediately.
3. Step 3 · Media and settings: video uses one file and optional pre-check/cover; photos use 1–15 ordered images and need photo permission.
4. Step 4 · Validate and create: call createPost per row with scheduledAt and scheduledTz.
5. After publishing: query records for status, post ID and failures.

## Key branches

- **Video**: one video, optional pre-check, cover frame or upload.
- **Photo**: 1–15 ordered images, photo permission, no pre-check or cover.
- **Creation is not publishing**: final status comes from records.
- **Scheduled or immediate**: scheduled tasks at least 5 minutes ahead.

## Endpoint sequence

| Step | Endpoints |
|---|---|
| 1 | [GET /v1/creatorAccount/tiktokShopOauth/authorize](/en/openapi/authorize-creator) · [GET /v1/creatorAccount/pageList](/en/openapi/creators) |
| 2 | [GET /v1/creator/tiktokshop/product/listByShop](/en/openapi/shop-products) · [GET /v1/creator/tiktokshop/product/listByShowcase](/en/openapi/showcase-products) |
| 3 | [POST /v1/file/presign](/en/openapi/presign) · `PUT presigned URL` · [POST /v1/file/confirm](/en/openapi/confirm) |
| 4 | [POST /v1/creator/post/create](/en/openapi/create-post) |
| 5 | [GET /v1/creator/post/pageList](/en/openapi/post-records) · [POST /v1/creator/post/submit](/en/openapi/submit-post) · [POST /v1/creator/post/update](/en/openapi/update-post) · [POST /v1/creator/post/cancel](/en/openapi/cancel-post) |

## Integration notes

- Detail pages: creator authorization, commerce video, commerce photo.
- Commerce publishing only accepts TikTok Shop authorized creators; photo posts also need photo permission.
- Use the account id for product queries and creatorId for publishing tasks.
- Keep products in stock before publishing.
