Solid Commerce Docs

Bulk operations

When you need to write more than a handful of items, use a bulk endpoint instead of a loop. Bulk endpoints:

Synchronous bulk

PATCH /v1/catalog/products/bulk-update — up to 1,000 items.

The response includes a per-row ok/error array preserving input order.

Asynchronous bulk (jobs)

For larger payloads, the API returns 202 Accepted with a job resource. Poll GET /v1/jobs/{id} until status is completed or failed.

const { data: job } = await client.raw.POST('/v1/listings/listing_apply_jobs', {
body: { listing_ids: bigArray, channels: ['amazon-us'] },
});

while (true) {
const { data: status } = await client.raw.GET('/v1/jobs/{id}', { params: { path: { id: job.id } } });
if (status.state === 'completed' || status.state === 'failed') break;
await new Promise((r) => setTimeout(r, 2_000));
}