1
Create a secret key
In your dashboard, open Settings, API keys and create a key. Grant it only
what your integration needs. For this walkthrough tick Read on Products.Your key is shown once, at creation. Copy it then. Mercemur stores only a hash,
so nobody can recover the value for you later, including support.
2
Make your first read
Every request goes to A successful list response has your records in
https://api.mercemur.com/api/v1 and carries the key as a
bearer token.data and paging state in page:3
Handle the refusal you are most likely to hit first
If the key lacks the scope for the route, you get Add the scope in the dashboard and retry. Scope changes apply to the existing key,
so you do not need to issue a new one. See Scopes.
403 and the message names the
exact scope to tick:4
Make your first write
Writes need one extra header: a unique Generate a fresh key per logical operation, and reuse that same key when you retry
that operation. Replaying it returns the original response instead of creating a
second product. See Idempotency.
Idempotency-Key. It is required, not
optional, and it is what makes a retry safe after a timeout.This write needs
write_products. Read and write are separate grants, so a key
with only Read will be refused here.5
Page through a full collection
There is no See Pagination.
page or offset. You pass the previous response’s
page.next_cursor back as after, and stop when has_more is false.Next
API reference
Every endpoint, with a playground bound to your own store.
Money
Read this before you send an amount. Every value is an integer in minor units.
