GET, and /api/v1 is added if you leave it off, so a path copied
straight out of the reference works too.
Why not curl
Every write to this API is rejected without anIdempotency-Key header. mercemur api sends one,
reuses it across retries so a repeat is recognised rather than applied twice, and carries your
stored key. A hand-written curl has to remember all three.
Fields
--raw-field exists for the case type inference gets wrong. A product code of 123 is a string,
and quietly turning it into a number is a corruption no error message would explain.
On GET, HEAD and DELETE the fields become query parameters instead of a body, because a body
on a read is ignored by most routers and --field limit=5 would otherwise do nothing at all.
Paging
page.next_cursor until has_more is false and merges every page into one JSON
document, so jq reads it in a single pass:
It stops and says so rather than looping: if the API ever repeats a cursor while still reporting
has_more, or if you pass 200 pages, you get an error instead of a command that never returns.
Silent truncation would read as “that is all there was”.Headers, request ids and your rate budget
RateLimit-Remaining is the only warning you get before a 429, and x-request-id is the first
thing support will ask for.
Headers are printed only with --include, so without it stdout stays a single JSON document
and | jq keeps working.
On a failure the request id is reported anyway, on stderr with the error message. Nobody re-runs
a failed write just to collect it.