Developers
On this page

Authentication and keys

A program signs in with an API key that the store owner creates in the store panel. There are no user names, passwords, sessions or cookies.

Send the key in the Authorization header of every request:

http
Authorization: Bearer osk_xxxxxxxx_...

# only if your program cannot set the Authorization header
X-Api-Key: osk_xxxxxxxx_...
  • Authorization: Bearer is the form to use. X-Api-Key exists for programs that cannot set it, and for servers that do not pass the Authorization header on to the store (the server check in the store panel tells the owner).
  • Never put the key into the address, a form field or the request body. The API does not read it from there, and addresses end up in logs.

What a key looks like

A key is 62 characters long and starts with osk_, followed by eight characters that name the key (the store panel and its logs show this prefix, never the rest). The store shows the full key once, at the moment it is created, and stores only a fingerprint. A lost key cannot be recovered: the owner revokes it and creates a new one.

Each key carries a name, a purpose, a fixed set of permissions, an optional IP list and an expiry date. Permissions cannot be changed afterwards. A store can have up to ten active keys, so give every program its own.

HTTPS only

The API answers over HTTPS only. A request over plain HTTP gets 400 https_required, and it is never redirected.

A key that travels over plain HTTP is revoked at once, wherever in the request it was found, and the store owner is told by e-mail. The key has crossed the network unprotected, so it cannot be trusted any more. Write https:// in your configuration, do not follow redirects, and restrict your HTTP client to HTTPS if it can do that.

IP list

The owner can tie a key to IP addresses or ranges. A request with that key from any other address gets 403 forbidden, the same answer as a missing permission. If your program has a fixed outgoing address, ask for the list to be set: a stolen key is then useless elsewhere.

Expiry

A key expires after 30 days, 90 days or one year (the default), or never, as the owner chose. GET /v1/store returns the date in key.expires_at; check it now and then and ask for a new key in good time. After that date the key answers 401.

What 401 and 403 mean

AnswerMeaningWho can fix it
401 unauthorizedThe store does not accept this key: none was sent, it is mistyped, revoked or expired. The answer is the same in all four cases.You (header, typing) or the owner (new key).
403 forbiddenThe key is fine, but it lacks the permission for this endpoint, or the request comes from outside its IP list.The owner, with a new key.
403 license_inactiveThe key is fine, but the store's licence is not active, so the API is closed.The owner.
404 not_foundAmong other things: the API of this store is switched off. A switched-off API cannot be told apart from an address that does not exist.The owner.

Many failed sign-ins from one address in a short time are answered with 429 for a few minutes. Do not retry a 401 in a loop.

http
HTTP/1.1 401 Unauthorized
Content-Type: application/json; charset=utf-8
X-Request-Id: 3f9a1c0b7e4d2a68
WWW-Authenticate: Bearer

{
  "error": {
    "code": "unauthorized",
    "message": "A valid API key is required.",
    "request_id": "3f9a1c0b7e4d2a68"
  }
}

Am I connected to the right store?

Call GET /v1/store once when your program is set up and whenever its configuration changes. It needs no particular permission and tells you:

  • domain and name: the store that answered;
  • store_ref: a stable reference of this installation. Save it on first contact and compare it later, so that a changed address cannot silently point your program at another store;
  • key.name, key.scopes, key.expires_at: which key you hold and what it may do;
  • currency, time_zone, server_time: what you need to read amounts and to set your clock for updated_since.

Looking after a key

  • Keep it in a secret store or an environment variable. Not in source code, not in a repository, not in a shared document, not in a chat, a ticket or an e-mail.
  • One key per program and per purpose, with the narrowest permissions that do the job.
  • Do not log it. If you must show which key is in use, show the first twelve characters (osk_ and the prefix).
  • Ask for an IP list and an expiry date.
  • If a key may have leaked, the owner revokes it in System > API keys; it stops working with the next request. A revoked key cannot be switched back on.
  • The store keeps a log of the requests of each key, and the owner can see when a key was last used.

Origela Store API v1, store software 1.0.31. Last updated 2026-12-01. Origela is e-commerce software sold as a yearly licence.

openapi.json · llms.txt · origela.com