Getting started: a key and the first request
How to get a key
- Open "API" in the "Developers" group of your account and press "Create key".
- Fill in "Name" and "Acts on behalf of" — you or an organization.
- Tick the "Permissions" for the integration task.
- Copy the key: it is shown once.
A request to an operation the key has no permission for is rejected. Before the key expires issue a new one, switch the integration to it and press "Revoke" at the old one.
How to call
The key goes in the X-API-Key header, the body and the response are JSON. The base address is https://api.opotopo.com.
curl -H "X-API-Key: $OPOTOPO_API_KEY" \
https://api.opotopo.com/rest/v1/advertisement/seller/ads
Rate limiting
Every response carries the RateLimit-Policy and RateLimit fields: the window quota, the remainder and the seconds until reset. Exhaustion answers with status 429 and a Retry-After header — do not retry earlier than stated.
Errors
An error arrives as problem+json: status, title, a machine-readable code and, for field errors, an errors map. Retrying a 4xx is pointless — fix the request; retry 5xx and network failures with a growing pause.
The operation reference
Operations with request and response schemas — "API reference" of the "API" section, the specification for a client generator — "Download the OpenAPI specification".
Did not find the answer to your question?
Create a request