Reading starts here
ChurnAtlas

Read 200 and 206 responses in a data pull: 5 log states

Short answer. How to read 200 and 206 responses in a paged customer data pull, and log the five states that keep your sync record accurate.

ChurnAtlas Editorial Team. How posts are made is set out in the editorial standards.

Published · Sources checked · 11 min read

  1. Inputs Your product plan, your permissions and the task you want to finish.
  2. Decision Whether the help page matches what you see on your screen.
  3. Next action Do the task on one test account, then record what you changed.

A 200 response normally means the full page arrived, while a 206 means the server sent only part of the content — a slice rather than the whole. Misreading either one corrupts your sync log, because both are logged as "success" unless you record the status code itself.

Key takeaways

  • 200 — the server fulfilled your request and sent back the page as asked for; confirm the body is complete (see the incomplete-200 condition) before moving to the next one.
  • 206 (Partial Content) — the server sent only part of the content. If your request asked for a byte range, a 206 is the expected response.
  • Both codes are valid HTTP responses and neither is an error on its own; what matters is whether the content covers what your job needed.
  • If your job needs whole pages, a 206 on a page request whose range does not cover the whole page means you received part of that page — re-request the full page or record that the page is incomplete.
  • The spec also describes a condition where a 200 response arrives with incomplete content. Your client can detect it by checking body length or stream truncation, and should log it as a distinct state, separate from a clean 200.

When you pull customer records from an API in pages, you will see two status codes again and again: 200 and 206. They tell you very different things about what you just received.

This post walks through both codes as they appear in a paged pull, what the HTTP specification says about them, and how to log what you see so that the next person reading the log understands what happened.

What 200 and 206 mean in plain words

A 200 response means the server fulfilled your request and sent back the content. In a paged pull, a 200 on a page request normally means you got the full page, but check the body length because the spec also describes an incomplete 200. The records you see are the records that exist for that page, once the body length checks out.

A 206 response means the server sent only part of the content you asked for. In HTTP this is called Partial Content. When you see a 206, you have received a slice, not the whole. For a customer data pull, a 206 is the expected response when your request asked for a byte range.

The distinction matters because your sync log records both as "success." If you only log success or failure, a 206 and a 200 look identical. The fix is to log the status code itself, not just a boolean. For a related set of checks, see Webhook and sync replies: 3 success code checks.

The RFC 9110 specification on HTTP semantics covers both codes. It addresses the 206 (Partial Content) response, and it describes conditions under which a 200 response may arrive with incomplete content. We will come back to that second condition, because it is the one that trips people up.

Why both codes show up in one paged pull

In a typical paged pull you send a series of requests, one per page. Each request asks for a chunk of records. Most servers answer each request with a 200 and the page you asked for.

Some requests return 206 instead. Check your own stack, including the client library, retry logic and any proxy, to see whether it asks for byte ranges.

The result is a sync log that contains both codes, sometimes interleaved. What matters is whether the content you received covers what your job needed.

If your job needs whole pages, a 206 on a page request whose range does not cover the whole page means you received part of that page. You must either re-request the full page or record that the page is incomplete. Logging it as a plain success will hide a gap in your data.

If your job explicitly asks for byte ranges, a 206 is exactly what you expected. In that case your log should record the range you asked for and the range you received, so a later audit can confirm they match.

The spec language you should know

The specification for HTTP semantics spells out the handling rules for both codes. When the most recent response is an incomplete 200, the spec describes a condition where the body did not fully arrive even though the status was 200. When the most recent response is a 206, the spec addresses the case where you hold partial content by design.

Those two sentences are the ones you will point to when someone on your team asks why the log flags a 200 as a problem. The status code alone does not guarantee completeness. The spec makes that explicit.

For caching behavior attached to these responses, the specification points to RFC 9111, which is titled HTTP Caching. If your pull path includes a cache, a cached 200 can be re-served later without a fresh fetch. Your log should note whether a response came from a cache when that information is available, because a stale cache changes what "most recent" means.

How the two codes compare

Status code Meaning Content you received Action in a sync log
200 Full response to your request Page as asked, body checked for completeness Record page number and record count
206 Partial content response A slice of the requested resource Record the range, or re-request the full page

Reading the sync log entry by entry

A good sync log entry for a paged pull carries five things: the request URI or page identifier, the status code, the record count returned, any range header you sent or received, and a timestamp. With those five, you can reconstruct what happened without re-running the pull.

When you see 200, check the record count against what your page size should return. If the count matches and the body length is as expected, the page is whole. Log it as complete.

When you see 206, check the range. If the range covers the full resource, treat it as complete. If the range covers part of the resource, log the page as partial and note the covered range. Your next step is a follow-up request for the missing part.

When you see a 200 that the spec describes as incomplete, your client can detect it by checking body length or stream truncation. Surface that as a distinct log state, separate from a clean 200. Do not fold it into a generic success.

If you run behind a corporate gateway or a vendor proxy, ask your network team what that layer does with range requests.

Handling retries without double-counting records

Retries are where paged pulls usually go wrong. A network blip causes a retry. The retry returns a different status than the original. If your log treats each attempt as a fresh page, you can either duplicate records or drop them. For more on retry mistakes, see CS integration errors: 9 mistakes in request retries.

The safe pattern is to key each log entry on the page identifier plus the attempt number. That way you can see that attempt one returned a 200 and attempt two returned a 206 covering the same range. You then resolve which attempt's content you kept.

Do not count records until you know the page is complete. For a 200 that your client confirms as complete, count at the point of confirmation. For a partial 206, hold the records in the received range uncounted until a follow-up response completes the page.

If a retry after a partial response returns a full 200, keep the 200 content as authoritative for that page and mark the earlier 206 as superseded. Your log should show both, with the superseded flag, so an auditor can see the sequence.

Illustrative example: one page, two attempts

Suppose your page size is 200 records. Attempt one returns a 206 that covers the first 135 records. The log records the page as 206 partial and holds those 135 records without counting them. Attempt two returns a full 200 with all 200 records. The log marks attempt one as 206 superseded and counts the 200 records once. Both attempts stay in the log, so an auditor can see the sequence.

What to put in the log for each case

Here is a compact set of log states that covers the situations this post discusses:

  • 200 complete — the status was 200 and the body matched the expected page size.
  • 200 incomplete — the status was 200 but the body was short or truncated, matching the incomplete-response condition in the spec.
  • 206 partial — the status was 206 and the received range covers part of the resource.
  • 206 complete by range — the status was 206 but the received range covers the whole resource.
  • 206 superseded — a later attempt returned a full 200 for the same page and replaced this content.

Five states is enough. Adding more makes the log harder to read without adding value. If your team later needs finer detail, add fields to the entry rather than new states.

Keep the raw status code in the entry alongside the state label. When you debug with a vendor or a network team, they will ask for the code. Having it saved avoids a re-run.

Time limits and timeouts around the pull

Some pulls run against an endpoint that enforces a time limit. The accessibility guidance from MDN gives a general example of time-limited operations, noting that purchases sometimes need to be completed within a time limit for security reasons. The same idea applies to data endpoints: an expired session or a closed window can end a pull mid-page.

When a time limit cuts a pull short, the last response you hold may be partial. That is the exact situation where the spec's incomplete-response language matters. Your log should record that the pull ended by time limit, not by error, so the next reader knows why the final page is short.

Set your client timeout above the server's time limit if you can, so you see the server's response rather than a local timeout. If you cannot see the server's limit, ask your API contact what it is. For a related sync pattern, see Customer sync rate limits: 6 steps to trace data gaps.

Dates and timestamps in the log

Paged pulls record timestamps for each request and response. If your log stores timestamps in a format that the HTML parsing rules touch, note how the spec treats the boundaries. The WHATWG HTML Standard describes a parsed range running from UTC on the morning of 1970-01-01 to midnight UTC on the morning of the parsed date, ignoring leap seconds. A second form runs from the local value 1970-01-01T00:00:00.0 to the parsed local date and time, ignoring leap seconds.

For a sync log this matters when you convert timestamps between formats. The leap-second note means two systems can disagree by a second around a leap second boundary. For a customer data pull, a one-second skew rarely changes which page you are on, but it can change which attempt looks most recent. Keep the raw timestamp string alongside any converted value.

A short checklist before you call the pull done

Before you mark a pull finished, walk this list:

  • Every page identifier appears at least once in the log with a terminal state.
  • No page sits in a partial state without a follow-up entry or a supersede entry.
  • Record counts per page match your expected page size for every complete page, except a last page that ends the result set.
  • Any 206 entry records the range you received.
  • Any 200 entry flagged as incomplete has a follow-up or an explicit note of why it was accepted.

This list is short on purpose. It is the set of checks that catch the failures this post describes. Longer lists get skipped.

Next step today: open your most recent sync log, find one 200 entry and one 206 entry, and check that each records the raw status code. If either is missing the status code, add that field before your next pull.

Related guides: Capped revenue in an account data pull: 3 rules · Paddle billing data: 6 checks before a customer pull · Bulk data export: 4 tools and their documented routes.

Common questions

Does a 206 always mean something went wrong?

No. A 206 is a normal, valid response when your request asked for a byte range. It only signals a problem when your job expected a whole page and got a slice instead. Read your own request headers before you read the status as a fault.

Can a 200 still leave me with incomplete data?

Yes. The spec describes a condition where the most recent response is an incomplete 200. Your client should detect a short or truncated body and log that state separately from a clean 200, so the gap does not hide inside a success line.

What should I do when a page comes back partial and my pull window is closing?

Log the page as partial, note the range you hold, and record that the window closed. Restart the pull later and resume from that page. Do not mark the pull complete while a page sits in a partial state.

How does caching affect what I see in the log?

A cached response can be re-served without a fresh fetch, which changes what "most recent" means for that URI. The caching rules live in the HTTP caching specification, and your log should note cache hits when your client exposes them.

Sources

Sources checked

Limits of this post

This post is general operational information, not legal advice about notice periods or renewal clauses. It does not promise that any method keeps a customer. Software can get a fact wrong, so open the sources before you act.