How to handle RFC 8288 next links in freight API exports
If a partner uses an HTTP Link header for pagination, follow its documented next relation. Treat the cursor as opaque. Do not assume a short response means the export is complete when the partner still supplies a continuation link.
Preserve the query and authorisation scope.
RFC 8288 defines how links are represented in HTTP headers and how relative targets are resolved. It does not define the provider’s cursor lifetime, data consistency or completion policy. Verify that each continuation stays on an approved destination and preserves tenant and filter scope. Never forward credentials to an unapproved destination. Read the source guidance
The next page fails after the first page was stored.
A synthetic feed supplies a next link after page one. The next request fails. Save the verified progress and report the export as incomplete. Resume only according to the provider’s cursor policy or start a fresh reconciliation rather than silently publishing the first page as the full result.
Test failures before going live.
- Test a relative next link, repeated continuation and an expired cursor.
- Test whether concurrent changes can introduce gaps or duplicates under the provider’s consistency rules.
- Keep API traversal success distinct from reconciliation of the expected shipment set.