Reading Webhook Docs for Delivery and Retry Rules
When you connect an HTTP endpoint to a webhook provider, the provider sends event notifications to that endpoint. HTTP status codes tell…
When a client asks an API for a list, the provider often splits the results into pages so each response carries only part of the list. Pagination rules define how many records the server returns in each response, how the client asks for the next page, and how the client knows the list has ended.
Before you design your request loop, read the documentation for the exact endpoint and API version you plan to call. Providers set most pagination rules themselves. HTTP standards explain how to format links in a response header, but they do not set a universal page-size limit, a standard way to ask for another page, or a fixed token lifetime. You will only find those details in the endpoint’s contract.
Look up the documentation for the specific list or search operation you need, and check which pagination parameters and response fields it supports. A provider’s general overview can introduce common patterns, but the endpoint reference is where you find the actual defaults, limits, sorting options, and exceptions. GitHub, for example, points readers to individual endpoint references for default and maximum per_page values, and notes in its pagination documentation that only some endpoints support that parameter.
Write down the API version next to every rule you collect. Do not assume a limit from one endpoint applies to a neighboring endpoint, and do not carry a rule from one API version into another without checking the docs first.
Scan the endpoint reference for parameter names like limit, per_page, page_size, count, top, or first. When your client sends a page-size parameter, it asks the server for a set number of records in one response. The server might still return a different count, so check whether it honors the requested size.
Look for three details: the default size when the client omits the parameter, the largest value the server accepts, and what the server does when a request exceeds that cap. Some servers reject an over-limit request with an error, while others quietly lower the number. GitHub documents that most of its endpoints cap an over-limit per_page value at the maximum without returning an error. Because its stated maximum of 100 applies to most endpoints rather than all of them, you still need to check the specific endpoint reference.
You also need to know whether the server can return fewer records than you asked for even when more results exist. Google’s AIP-158 pagination guidance allows a server to return short pages, or even an empty page, before the collection ends. Paddle’s pagination documentation similarly notes that a response can hold fewer items than per_page when another page is still available. Under rules like these, the client cannot use the record count to decide when to stop. It has to follow the documented end signal.
Finally, check whether the endpoint enforces limits beyond a single page. For example, Zendesk documents caps on the total number of pages and total resources for offset-based requests. That restriction is specific to Zendesk’s documented behavior, so check your own provider for similar ceilings before you start coding.
A client can only read pages in a reliable sequence if the server orders the results consistently. Check whether the endpoint requires a sort parameter, applies a default order, or lets you pick specific fields and directions.
Pay close attention to how the server handles ties when multiple records share the same sort value. If several records have the same value, the server needs a consistent way to order them across pages. Azure Resource Graph warns that if you sort on a non-unique column, the server can return duplicate or missing records across pages because tied records have no guaranteed order. Check whether the provider adds a unique tie-breaker, such as an item ID, when the requested sort field has duplicates.
When an API uses a cursor or marker to track where the client left off, check whether the next page starts after that item or includes it again. Paddle’s list documentation, for example, describes a cursor based on the last entity’s ID and excludes that entity from the next response. Other providers set their own boundary rules.
Remember that the underlying data can change while your client is still reading pages. If someone adds, edits, or deletes records mid-traversal, later pages can shift unless the server provides a snapshot that freezes the result set while you read it. Check the docs to see whether the provider guarantees a snapshot. For more on ordering guarantees, see stable ordering rules for cursor pagination.
Check how the endpoint expects the client to ask for the next page. The server might accept a page number, an offset that tells it how many records to skip, or a cursor or token from the previous response. Note where the client must send that value, such as in a query parameter, request body, or header, and whether the first request should leave it out or pass a documented starting value.
Next, identify the exact signal that tells the client there are no more pages. A missing token, an empty token, a missing link, and a has_more field set to false each mean different things depending on the API. For example, AIP-158 uses an empty next_page_token to mark the end of the list. Paddle documents a next value that can still appear on the final page, so it instructs clients to check has_more instead. Your client should follow the endpoint’s stated rule rather than guessing from a short page or the presence of a token.
Some APIs put pagination URLs in the HTTP Link header. RFC 8288 defines how to format web links in that header and how the rel parameter labels what each link points to. However, RFC 8288 does not define a universal pagination rule or end condition. The provider’s documentation tells you which link relation to follow and what it means when that link is missing.
Check whether the provider wants your client to request the full next-page URL or pull a token out of it. GitHub uses Link headers with relations such as next and prev, and notes that the header may be absent when all results fit on one page or when the endpoint does not support pagination. Microsoft Graph takes a different approach, returning an @odata.nextLink field in the response body and telling clients to call the entire URL rather than extract its token. If a server returns a relative link, your client needs a base URL to resolve it. RFC 8288 specifies using the URL of the response that carried the header.
A continuation token is a value the server returns so your client can ask for the next slice of results. Because the provider defines what that token represents, do not assume you can decode it, reuse it with different filters, or keep it indefinitely unless the documentation says so.
Check which request parameters must stay identical from one page to the next. AIP-158 states that an API following its guidance expects other arguments to match across requests, while allowing the client to change the page size. Paddle’s query-operation documentation sets a stricter rule, tying its cursor to the query body so that changing any part of the body invalidates the cursor. Always check how your specific endpoint handles parameter changes.
Look for rules on token expiration, whether using a token extends its lifetime, and which error response signals an expired or invalid token. Paddle specifies a one-hour lifetime for cursors on its documented metrics queries, extending that lifetime up to 24 hours when the client uses the cursor, and warns clients not to persist those cursors. That lifetime rule applies only to those query operations. If your provider does not document what happens after a token expires, ask whether your client should restart from the first page or use a supported resumption method. For a closer look at token semantics, see how to explain cursor tokens to API consumers.
If the endpoint documentation leaves a pagination rule unclear, ask the provider instead of guessing. Focus on questions that determine when your client should fetch another page, stop, or start over:
If the provider cannot answer one of these questions, write down your assumption and how your client will behave before you write the code.
Give Vroni a GitHub issue, bug report, spec, or rough idea. It reads the repo, plans the change, writes code, runs checks, and works toward a review-ready pull request.
Take a look at vroni.com