---
title: "Preview what a consumer's sync would create"
method: POST
path: "/consumers/{consumer_id}/syncs/{syncid}/previews"
tags: ["Syncs"]
---

# Preview what a consumer's sync would create

`POST /consumers/{consumer_id}/syncs/{syncid}/previews`

## Request

- Base URL: `https://api.chift.eu`
- URL: `https://api.chift.eu/consumers/{consumer_id}/syncs/{syncid}/previews`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/chift/apis/chift-api/docs/consumers/:consumer_id/syncs/:syncid/previews/post.ts> (a function with typed inputs; its response is checked against the schema)

Queues an execution that writes nothing and records every object it would create (suppliers, invoices, payments…), linked to what they need, and what would fail. Each capability the consumer chose books at most `limit` objects changed in the last 14 days, unless dates are given. Read it with `GET …/previews/{preview_id}`. Refused with a 409 while another preview of the consumer is pending.

## Path parameters

- `consumer_id` string, uuid, required
- `syncid` string, uuid, required

## Request body

- StartPreview
  - `limit` integer: Objects each capability the consumer chose books at most. What they need (their suppliers) is previewed whatever its number.
  - `force_from_date` string, date, nullable: First day the preview covers. Defaults to 14 days ago.
  - `force_to_date` string, date, nullable: Last day it covers. Defaults to today.

## Response `202`

Successful Response

- PreviewStarted
  - `preview_id` string, uuid, required: Read the preview with it: the legacy routes know it as the preview execution.
  - `status` 'pending' | 'ready' | 'failed', required: Pending while it is queued or running, then ready or failed.

## Other responses

- `404`: Not Found
- `409`: Conflict
- `422`: Validation Error

## Changes

- **2026-11-03** `020884969534`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/chift/apis/chift-api/changes/consumers/:consumer_id/syncs/:syncid/previews/post.md)

---

[API](https://skmtc.dev/chift/apis/chift-api.md) - [All operations](https://skmtc.dev/chift/apis/chift-api/llms.txt) - [OpenAPI document](https://skmtc.dev/chift/apis/chift-api/revisions/020884969534?raw)
