HTTP 202 Accepted

An accepted job envelope sits in a queue in front of the server

HTTP 202 Accepted means the server took the request for processing and its outcome is still pending. The server might finish the operation later or report that the job failed. The 202 response is the end of this particular HTTP exchange.

Follow the job identifier

For an export request, the response may contain a job ID and an address such as /exports/184/status. Read the API’s instructions for that address and its polling schedule. Keep the original response available so you can correlate a later result with the submission.

Checking 202 through a proxy

Treat the submission and each progress lookup as separate requests. If the submission returns 202 and the lookup fails, capture the lookup’s own path and status, then compare both requests at the gateway. Repeated submissions may enqueue duplicate work. Check the job you already have before sending another write.

Follow an export from submission to completion

HTTP/1.1 202 Accepted
Content-Type: application/json

{"jobId":"184","state":"queued","statusUrl":"/exports/184/status"}

In this example, the body gives the client a URL for progress. The API could later return {"state":"complete"} or explain why the job failed. Use the documented status resource and poll at the interval the service allows. If responses to the status requests begin coming back with 429 Too Many Requests, observe the rate limit and keep the original job ID.

Tell submission, processing and delivery apart

Record the timestamp of the 202 and the first useful answer from the status endpoint. The gap can include queueing and processing long after the HTTP request through the proxy completed. If the status endpoint reports success but the download later fails, collect the download’s URL and its own HTTP code. Those three exchanges can fail independently. For an API you operate, use the job ID to match the client trace with the worker’s log.

RFC 9110.

All HTTP status codes · All proxy testing guides · Open the proxy tester