Call createReport with the reportType and optional dataStartTime/dataEndTime and marketplaceIds to request the report; save the reportId from the response
Poll getReport by reportId until processingStatus is DONE; note the reportDocumentId in the response
Call getReportDocument with the reportDocumentId to retrieve the download URL and compressionAlgorithm field
If compressionAlgorithm is GZIP, download the URL and decompress with gzip before reading; some report types are plain text even when the field is absent
Parse the decompressed content as tab-separated values (TSV) — the first line is the header row; map columns to fields and handle any missing or empty cells gracefully
Known gotchas
The presigned download URL from getReportDocument expires within a short window (typically a few minutes); download immediately after calling getReportDocument rather than storing the URL for later
Some report types return UTF-8 with BOM; strip the BOM before parsing or your header row will have a garbled first column name
The processingStatus can transition to CANCELLED or FATAL on Amazon's side; always handle these states and implement a retry with a new createReport call rather than looping on a failed reportId
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp