Saltar al contenido principal

Bulk Operations Need Operation Resources

Model long-running or bulk REST API work as operation resources with status, links, and idempotency.

rest-apis5 min read

POST /bulk-adjust-prices updates thousands of SKUs and often takes two minutes. Create an operation resource: accept quickly, expose status, make retry dedupable, and link to results. A single blocking request couples client connection lifetime to backend work and makes duplicate submissions likely. Before Client sends one POST, waits, times out, and cannot tell whether prices changed. After POST /price-adjustment-jobs returns 202 and Location: /price-adjustment-jobs/job_18. The job resource exposes status, counts, result file, failed rows, and cancel link while queued. Name the work Model price-adjustment-jobs as a collection resource. The operation itself is now addressable and auditable. Accept fast Validate shape,…

Read the full lesson

Sign up free: one personalized lesson every day, matched to your role and goals.

← Back to library

Contáctanos