Kodrio Partner API /v1 — partner documentation

This page is built from the contract files themselves and has no text of its own, so the page and the contract cannot drift apart. Feature overview — if you are still choosing. Status — if you are already connected and something went wrong.

Wholesale delivery of digital goods over an API: a catalogue with wholesale prices, availability, orders, balance and events. Base address — https://kodrio.com, all paths below are appended to it. Contract version — v1. An access key is issued in the dashboard; reading this page requires no login.

0. What this is and where to start

Partner API gives wholesale access to digital goods: a catalogue with prices and availability, orders, balance and order events. There is one contract — v1; everything described below works on the base address https://kodrio.com, paths are appended to it.

Access is opened by a key kodrio_live_…: you issue it in the dashboard after company verification and send it only in the Authorization header. The key is shown once — save it immediately, it cannot be recovered.

What you needWhere it lives
catalogue and availabilityGET /v1/catalog, GET /v1/stock, GET /v1/catalog/export
order and code deliveryPOST /v1/orders, GET /v1/orders/{id}
moneyGET /v1/balance, GET /v1/balance/entries
eventsa webhook subscription and its registry

There are two classes of money in the contract. Account money (available_minor, amount_minor and other *_minor fields) is integer minor units of your company currency; the currency is named by the currency_code field in the response. Catalogue prices (price, market_price, tiers) are integer US dollar cents regardless of the account currency.

An order goes only to items in stock: before ordering, check available: true in GET /v1/stock. A closed intake and an unavailable item answer 422 rejected without any charge — the refusal branches are described in section 4. Intake changes are announced in the changelog.

The machine-readable contract is GET /v1/openapi.json (OpenAPI 3.1). It is opened by a key: without a key the response is 401. The page you are reading is public and contains everything needed for integration.

1. Quick start

The five steps below are walked in order; everything works on the live address https://kodrio.com.

1.1. Get access

The company is verified by an operator: without verification a live key is not issued. After verification you sign in to the dashboard via the link from the email — sign-in is confirmed by a one-time code, there is no password.

The key is issued in the dashboard, "Access keys" section. Scopes and the allowed address list are chosen at issue; the key is shown once, copy it immediately.

Choose scopes by integration task: catalog:read — catalogue and availability, balance:read — balance and journal, orders:create and orders:read — orders, webhooks:manage — subscriptions.

1.2. First request

Check the key with a balance request:

curl -sS "https://kodrio.com/v1/balance" \
  -H "Authorization: Bearer $KODRIO_API_KEY"

Response: {"data":{"currency_code":"USD","available_minor":5000,"overdraft_limit_minor":0}}. If the key is not accepted, 401 unauthorized arrives with a request_id.

The key is passed in the header only; it must not appear in the address or in the request body. A 403 forbidden_scope answer also means the key is alive: it lacks the right for this endpoint.

1.3. Catalogue

The catalogue is read in pages of 100 items, the brand filter is the ?brand= parameter:

curl -sS "https://kodrio.com/v1/catalog?brand=STEAM" \
  -H "Authorization: Bearer $KODRIO_API_KEY"

The next page is ?cursor= from meta.next_cursor; null means the page is the last one. The available field answers whether the minimum batch can be ordered right now, while closed_for_sale arrives only when the item is closed for sale.

The file price list is returned by GET /v1/catalog/export, bulk availability — by GET /v1/stock?skus=. For client generation there is GET /v1/openapi.json.

1.4. Subscribe to events

POST /v1/webhooks creates a subscription: the receiver address and the event list. The response carries the signing secret once — save it, it is not shown a second time. The subscription requires the webhooks:manage scope and the right to read the data of the chosen events.

Order events require the orders:read right, the balance.low event — balance:read; without the right the subscription is rejected with 403 forbidden_scope.

1.5. Place an order

Build an order from items in stock: check available: true with GET /v1/stock, take the price and the recipient fields from the catalogue (GET /v1/recipients/fields?sku=), and send POST /v1/orders with the Idempotency-Key header — without it the request is rejected with 400 validation_failed.

An accepted order answers 202; the outcome is read from GET /v1/orders/{id} and arrives as an event at your webhook. A line refusal is 422 rejected with the reason in line_rejections; money is not charged. The order body and intake rules are in section 4.

2. Authentication

2.1. Header and key format

Authorization: Bearer kodrio_live_…

The scheme is parsed strictly: the word Bearer, one space, then the key. The key consists of the prefix kodrio_live_ and 40 lowercase hexadecimal characters. Case matters: a key converted to upper case answers 401.

2.2. Issuing, storing, rotation

The key is issued in the dashboard after company verification and is shown once; only its hash is stored. To change the key, issue a new one and revoke the previous one — revocation takes effect immediately.

The key is a bearer of your company money. Keep it in a secrets manager or environment variables, not in a repository, not in tickets and not in logs. In the examples the key is substituted from an environment variable.

2.3. Scopes

A key has a closed set of rights; each endpoint requires its own right. Without the right the answer is 403 forbidden_scope.

ScopeWhat it opens
catalog:readcatalogue, file price list, availability, recipient field set
balance:readbalance and movement journal
orders:createorder creation
orders:readreading an order and the order list
webhooks:manageregistry of event subscriptions

A subscription to events also requires the right to read the event data: for order events — orders:read, for balance.low — balance:read. The reason field of the refusal lists the missing scopes.

2.4. Allowed addresses

Each key has its own IP list. An empty list means there is no restriction; a filled one means requests are accepted only from the listed addresses, the rest receive 403 ip_not_allowed. The list holds up to 50 addresses; CIDR masks are not supported, addresses are listed one by one. An address is compared in canonical form, so different spellings of one address match.

2.5. Access refusals

ResponseWhat happenedWhat to do
401 unauthorizedthe key is not acceptedcheck the header and the key itself
403 forbidden_scopethe key lacks the right for the operationissue a key with the required scope
403 ip_not_allowedthe request came from an address outside the key listverify the outgoing address; on an unexpected refusal — section 11

3. Catalogue and availability

3.1. GET /v1/catalog — product shelf

Scope catalog:read. Parameters: ?brand=, ?region=, ?cursor=; value case does not matter. A page holds 100 items, the next cursor arrives in meta.next_cursor, null means the page is the last one. Unknown request parameters are ignored.

Catalogue row fields:

FieldMeaning
skuarticle, the key to everything else
brand, regionbrand and activation region
region_strictthe region is strict: the code does not activate in another one
region_countriesactivation countries, ISO 3166-1 alpha-2 codes
denominationdenomination; "VAR" — the product has no denomination
currencydenomination currency, not the settlement one
delivery_kinddelivery kind: key_code, game_key, topup_by_id, topup_by_login, gift_link
min_batchminimum batch
max_batchupper batch limit for a single order
title_rutitle
availablewhether the minimum batch can be ordered right now
closed_for_salethe item is closed for sale; arrives only with true

Money and format fields:

FieldMeaning
pricewholesale price per unit, US dollar cents; may be absent
price_tiersvolume → price tiers; only where they exist
market_priceretail market anchor, US dollar cents; may be absent
code_formatscode formats, an array; only for items delivered as a code

For dollar purchases the markup and wholesale discounts are calculated in USD, with no intermediate rounding into roubles. The per-unit price in CSV matches the price in the catalogue and in the order for the same partner and quantity. If a USDT/RUB rate is needed for the price or for checking the denomination and no confirmed rate exists, the item does not receive a price. The rouble retail market anchor is not published in this case either.

The delivery kind defines what arrives for an order:

delivery_kindWhat arrives
key_codeactivation code
game_keygame code with a regional restriction
topup_by_idconfirmation of top-up to an account by number
topup_by_loginconfirmation of top-up to an account by login
gift_linkgift link
{
  "data": [
    {
      "sku": "STEAM-TR-100TRY",
      "brand": "STEAM",
      "region": "TR",
      "region_strict": true,
      "denomination": 100,
      "currency": "TRY",
      "delivery_kind": "key_code",
      "min_batch": 1,
      "max_batch": 5,
      "title_ru": "Steam Турция 100 TRY",
      "available": true,
      "price": 31900,
      "market_price": 39900
    }
  ],
  "meta": { "next_cursor": null }
}

An optional field is simply absent from the response: neither null nor 0 comes instead of it. An absent price means the price is not determined, and an order for such an item will not pass on price. An absent max_batch means there is no batch limit.

available: false and closed_for_sale: true answer different questions: the first is "cannot be ordered now", the second is "the item is closed for sale". An item with available: false stays in the catalogue: availability may return.

The price_tiers tiers arrive in ascending min_qty, the fields min_qty and unit_price_minor are required. price is the per-unit price below the first tier. The quantity in an order line cannot exceed this item's max_batch.

region is always included in region_countries. The list arrives only for items that have one; its absence does not mean "activates nowhere".

When the catalogue declares code_formats, a delivered code must pass at least one format in the array. Items delivered without a code (top-ups) never have this field. Use delivery_kind to identify them.

Examples of current alphabets in code_formats: {"alphabet": "ABCDEFGHJKLMNPQRSTUVWXYZ23456789"} and {"alphabet": "0123456789"}. Validate a particular code using its format from the catalog response, not this example.

3.2. GET /v1/stock — availability in bulk

Scope catalog:read. The required parameter ?skus=A,B,C — up to 100 articles; without it the endpoint answers 400 validation_failed. The response is {"data":[{"sku","available"}],"meta":{"unknown_skus":[…]}}. An unknown article does not receive available: false — it goes into meta.unknown_skus. The sku field in the response arrives in canonical form, so match rows by the field, not by position in the array.

3.3. GET /v1/catalog/export — price list as a file

Scope catalog:read. Format — CSV, UTF-8 without BOM, comma separator, CRLF line ending. One file row is one price: the base price goes in the row with min_qty=1, each tier goes in its own row. There is no pagination; the ?brand= and ?region= filters work the same way as in the catalogue.

sku,brand,region,region_strict,denomination,currency,delivery_kind,min_batch,title_ru,available,closed_for_sale,min_qty,unit_price_minor,market_price,region_countries

An item without a price stays in the file with an empty unit_price_minor cell. The X-Kodrio-Snapshot header names the moment the snapshot was built: it matches between the catalogue and the price list if both responses are built from one snapshot.

4. Orders

Order intake opens and closes as a whole; its state is announced in the changelog. A closed intake answers 422 rejected with the line {"sku": "*", "code": "supplier-unavailable"} before any charge. An order for an out-of-stock item gets the same 422 with that item's article and its reason code. Order items with available: true: availability before an order is shown by GET /v1/stock.

4.1. Creating an order

POST /v1/orders, scope orders:create, the Idempotency-Key header is required.

POST /v1/orders
Authorization: Bearer kodrio_live_…
Idempotency-Key: zakaz-0001
Content-Type: application/json

{ "lines": [ { "sku": "STEAM-TR-100TRY", "quantity": 2, "unit_price_minor": 31900 } ] }

Order line:

FieldRequiredMeaning
skuyesarticle from the catalogue
quantityyesquantity, up to 50 per line
unit_price_minoryesprice from the catalogue, an echo
recipientfor top-ups by loginrecipient as one string
recipient_fieldsfor top-ups by fieldsrecipient as named fields

lines is a non-empty array of up to 100 lines, duplicate sku values are forbidden. unit_price_minor is an echo of the catalogue price: a mismatch is rejected before the charge. The delivery region is set by the article, there is no separate region field in the line.

The response to an accepted order is 202 with {"order_id": …, "status": "accepted"}: the order is executed asynchronously, the outcome is read by status. Orders and subscriptions belong to the company, not to a key: a second key sees the same orders.

Not every item needs a recipient. The field set is answered by

GET /v1/recipients/fields — with the required parameter ?sku=, without it 400 validation_failed.

Forms are net, stroka, polya; fields are key, type, secret and options for lists. net means there is no recipient, stroka — one string, polya — named fields; with secret: true the value must not be shown or stored.

Idempotency-Key is a string of up to 255 characters, its own for every order; leading and trailing spaces are trimmed, the sandbox: prefix is reserved.

4.2. Responses and retries

ResponseMeaning
202 acceptedthe order is accepted for processing
200a repeat of the same key with the same body: the same response, no second charge
409 processingthe key is held by an order whose outcome is not confirmed yet; safe to repeat
409 idempotency_conflictthe key is held by an order with a different body
422 rejectedthe order is rejected, reasons in line_rejections[]; money is untouched
429 rate_limitedthe limit is exceeded, the pause is in Retry-After

The answer while intake is closed:

{
  "error": {
    "code": "rejected",
    "message": "Заказ отклонён. Причины — по строкам.",
    "request_id": "9d4f2b1e-…",
    "line_rejections": [
      { "sku": "*", "code": "supplier-unavailable", "reason": "закупка по этому заказу сейчас недоступна" }
    ]
  }
}

A missing required line field — the price echo, for example — answers 400 validation_failed before the availability check; 422 rejected comes only for a checked line and names the reason in line_rejections.

The line reason code is a closed set: no code outside this list ever appears. Every refusal arrives before the charge; "sku": "*" means the reason applies to the whole order:

codeMeaning
supplier-unavailablethere is nobody to buy from right now (redemption lines are not ready, or there is nobody to verify the recipient with); with sku: "*" — the whole order, retry later
insufficient-balancethe company balance is not enough for the order; sku: "*", money is untouched — top up the balance and retry
unknown-skuthe SKU is not in the catalogue — check it against GET /v1/catalog
invalid-quantitythe quantity is not an integer or is below 1
invalid-pricethe price echo is meaningless: not an integer, below 1, or above the line-total ceiling
below-min-batchthe total quantity of the SKU's lines is below the catalogue min_batch
above-max-batchthe total quantity of the SKU's lines is above the catalogue max_batch
region-unknownthe item has a region restriction and no activation region is named in the order — there is nothing to check against
region-mismatchthe named activation region is not among the item's activation countries
not-enough-stockthe item is temporarily out of stock — stock may return, retry later
closed-for-salethe item is closed for sale — reordering it will not help
kind-not-supportedthe delivery kind is not orderable through the API; orderable kinds are visible in the catalogue
recipient-requireda top-up needs a recipient: a string in recipient or named fields in recipient_fields
recipient-invalidthe recipient is named in the wrong form: recipient and recipient_fields are mixed up, or the value breaks the line's rule
recipient-unknownthe supplier did not confirm the recipient — check the account login
price-changedour price is different; the current one arrives in expected_unit_price_minor — retry with it

A repeat with the same key and the same body returns the previous response: the order is not created a second time and money is not charged again. The same key with a different body answers 409 idempotency_conflict. After 422 the key is free: the body can be fixed and retried. The key lives together with the order and does not expire: use a new key for a new order.

There is no partial delivery: a rejection of any line rejects the whole order, an accepted order is delivered in full or the money is returned in full. An order must reach a terminal status.

4.3. Reading an order

GET /v1/orders/{id}, scope orders:read — the source of truth about an order.

FieldMeaning
order_idorder number
statusprocessing, delivered or failed
status_detailwith processing: queued or stuck; the field may be absent
itemscomposition with codes; only with delivered

items contains sku, quantity and codes. With processing and failed the field is absent entirely — not an empty array: the codes are either not there yet or no longer there.

Another company's order and a non-existent one answer the same way — 404 not_found.

4.4. Listing orders

GET /v1/orders?cursor=, scope orders:read. Newest first, a page holds 50 rows, ?limit= up to 200, the next cursor is in meta.next_cursor.

FieldMeaning
order_idorder number
status, status_detailthe same as when reading one order
created_atthe moment the order was accepted
sandboxtest order marker
currency_code, amount_minorthe amount; the pair may be absent when the amount cannot be named
linescomposition without codes; may be absent

?limit= defaults to 50; the cursor is an opaque value from meta.next_cursor. The order is by order number descending, which is also the chronology.

4.5. Statuses and events

What you seeEvent
processing + queuednone
processing + stucknone
deliveredorder.delivered
failedorder.failed
a refund after deliveryorder.refunded

queued and stuck are not a rejection but a wait: read the status again later. A refund after delivery arrives as the order.refunded event, while reading such an order answers failed.

One terminal event arrives per order; a second delivery is possible, so deduplication by event_id is mandatory.

5. Webhooks

An event arrives at your address and notifies about an outcome; the source of truth is reading the order. Subscriptions belong to the company, not to a key.

5.1. Subscription

POST /v1/webhooks, scope webhooks:manage plus the right to read the data of every chosen event (orders:read for order events, balance:read for balance.low).

{ "url": "https://hooks.example.com/kodrio", "events": ["order.delivered", "order.failed"] }

The response is 201. It carries the secret field once — the signing secret; save it immediately, it is not shown a second time. The secret is stored encrypted: it cannot be recovered, on loss create a new subscription and revoke the old one.

Eventdata
order.deliveredorder_id, status, amount_minor, currency_code
order.failedorder_id, status, amount_minor, currency_code
order.refundedorder_id, status, amount_minor, currency_code
balance.lowcurrency_code, available_minor, threshold_minor

Event envelope:

{ "event_id": "pwev_…", "event": "order.delivered", "created_at": "<ISO-8601>", "data": { "order_id": "pord_…", "status": "delivered", "amount_minor": 63800, "currency_code": "USD" } }

The event list is closed: a subscription to an unknown event is rejected with 400 validation_failed. The address must be https:// and public only: private, loopback and link-local addresses are rejected with 422 url_rejected and a reason code in reason, redirects are not followed.

A company may have up to 10 active subscriptions (409 webhook_limit), one address may have one active subscription (409 webhook_duplicate_url).

The address is checked at registration and on every send: a DNS change does not bypass the check.

5.2. Signature

The header X-Kodrio-Signature: sha256=<HMAC-SHA256(secret, body)>: the HMAC is computed over the raw body bytes before JSON parsing. Next to it go X-Kodrio-Event, X-Kodrio-Event-Id and X-Kodrio-Attempt — they are not signed, make decisions from the body.

const crypto = require("crypto")

// Raw body before JSON.parse; the secret comes from an environment variable.
const expected = "sha256=" + crypto
  .createHmac("sha256", process.env.KODRIO_WEBHOOK_SECRET)
  .update(rawBody)
  .digest("hex")

const got = String(req.headers["x-kodrio-signature"] || "")
if (expected.length !== got.length) return res.sendStatus(401)
if (!crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(got))) return res.sendStatus(401)

5.3. Delivery

A 2xx answer within 10 seconds means delivered; everything else, including 3xx, is a failure. Retries start with a 30 second pause, then the pause doubles up to one hour, with a ±20 % spread. The retry window is 24 hours from the birth of the event; after that the event stays in the delivery journal but will not arrive by itself.

Delivery is at-least-once: one event may arrive twice, deduplication by event_id from the body is mandatory. Order is not guaranteed: sort by created_at. The delivery journal is kept for 30 days. The event carries no product codes: they are returned by reading the order.

5.4. Registry and replay

GET /v1/webhooks returns the company subscriptions, including revoked ones; a live one is the one with revoked_at: null.

FieldMeaning
idsubscription number
sandboxtest subscription marker
urlreceiver address
eventschosen events
secret_prefix, secret_last4the edges of the secret; the secret itself is absent
created_atcreation moment
revoked_atrevocation moment; null for a live subscription
last_success_atthe last successful delivery
consecutive_failuresfailures in a row
last_http_statusthe last HTTP response of the receiver
last_failure_codethe code of the last failure

consecutive_failures, last_http_status and last_failure_code show the health of the receiver: they reveal a falling-apart channel without waiting for a complaint.

DELETE /v1/webhooks/{id} revokes a subscription and answers {"id": …, "revoked": true}. Events already queued for a revoked channel are not sent.

POST /v1/webhooks/{id}/replay with the body {"event_id": …} queues the event for immediate sending and answers {"event_id": …, "queued": true}. A delivered event or an event whose window is exhausted can be replayed; an event still in the queue answers 409 replay_not_terminal. A replay gives one attempt and does not reset the window.

6. Balance and movement journal

6.1. GET /v1/balance — balance

Scope balance:read. The currency is taken from the company profile, it is not passed in the request.

{ "data": { "currency_code": "USD", "available_minor": 150000, "overdraft_limit_minor": 0 } }
FieldMeaning
currency_codecompany account currency
available_minoravailable balance, minor units of the account currency
overdraft_limit_minorhow far below zero is allowed; 0 by default

6.2. GET /v1/balance/entries — movement journal

Scope balance:read. Entries go newest first, a page holds 50 rows, the next cursor arrives in meta.next_cursor.

FieldMeaning
operationdebit — charge, credit — top-up or refund
amount_minormovement amount, minor units of the account currency
reasonhuman-readable description; the wording changes, it does not need parsing
order_idthe order the movement belongs to; only for movements on an order
atmoment of the movement, ISO 8601 in UTC

The cursor is an opaque value from meta.next_cursor: do not derive it from order_id or at. Read the link between a movement and an order from order_id, the direction from operation.

The journal is append-only: entries are not changed or deleted, a new entry appears on top.

7. Rate limits

Quotas are counted per company, not per key: a second key does not increase the limit.

CategoryEndpointsLimit
readcatalogue, availability, recipient field sets, balance, journal, order reads, subscription registry120/min
order creationPOST /v1/orders30/min
event replayPOST /v1/webhooks/{id}/replay10/min

Order creation is counted separately from reading: reading a status does not spend the order quota.

The window is 60 seconds. Every response carries the quota headers:

X-RateLimit-Limit: 120
X-RateLimit-Remaining: 118
X-RateLimit-Reset: 41

X-RateLimit-Reset is seconds until the window resets, not a timestamp.

When the limit is exceeded, 429 rate_limited arrives with the Retry-After header in seconds — it is present on every 429. Build the pace from X-RateLimit-Remaining, not from the rejection.

If the counter is unavailable, the headers do not arrive: treat the limit as unknown, not unlimited. A 429 is not a contract error: repeat the request after the pause.

8. Errors

An error arrives in one envelope: code, message, request_id and, where needed, reason. A response without a key (live):

{"error":{"code":"unauthorized","message":"Ключ доступа отсутствует, неверен или отозван.","request_id":"9d4f2b1e-…"}}
HTTPcodeWhen
401unauthorizedthe key is absent, wrong or revoked
403forbidden_scopethe key lacks the required right
403ip_not_allowedthe address is outside the key list
403verification_requiredthe company is not verified; the order is not accepted
403currency_not_supportedthe company account is not in US dollars
400validation_failedthe body or parameters do not match the schema
404not_foundthe object is absent or belongs to another company; an unknown path answers the same
409idempotency_conflictthe key is held by an order with a different body
409processingthe key is held, the outcome is not confirmed yet
409webhook_limitthere are already 10 active subscriptions
409webhook_duplicate_urlan active subscription to this address already exists
409replay_not_terminalthe event is still in the queue
422rejectedthe order is rejected, reasons in line_rejections[]; the line-code dictionary is in section 4.2
422url_rejectedthe subscription address is not accepted
429rate_limitedthe limit is exceeded, the pause is in Retry-After
500internala failure on our side
503secret_not_configuredsubscription issuing is unavailable, retry later
503recipient-unavailablethe recipient field set could not be obtained, retry later
503sandbox_not_availablethe key is of a withdrawn type, issue a live one

A 4xx answer means the request must be fixed. A 5xx answer means the request is correct and the failure is on our side: retry later, an order — with the same Idempotency-Key. The reason field, where present, is a code from a closed set, not free text.

500 and 503 differ like this: 500 is a failure worth reporting, 503 is temporary unavailability, retry without changes. A 400 validation_failed answer does not name the line: per-line rejection reasons arrive only in 422.

A closed order intake answers 422 rejected with the line {"sku": "*", "code": "supplier-unavailable"} before any charge: money is untouched, the idempotency key is free. An order for an out-of-stock item is the same 422 with the article in sku and the line's reason code.

Name the request_id when you write about a failure: it locates the specific request.

9. Compatibility and contract boundaries

9.1. Changes and deprecation

A breaking change is announced in the changelog and takes effect no earlier than 90 days after the announcement. Breaking means removing an endpoint or a field, narrowing allowed values, a new required request field, changing the meaning of an error code, as well as changing the unit or meaning of a field while its name and type stay the same.

See the changelog for removed fields.

9.2. What is not breaking

  • a new optional field in a response;

  • a new value in a list: brand, region, delivery kind;

  • a new error code within an existing HTTP class;

  • a new event you are not subscribed to.

9.3. What v1 does not have

What is missingWhat is used instead
a sandbox for partnersa live key and live orders
a machine check of the recipientthe catalogue declares the field set, the order checks the value
balance top-up over the APItop-up through the dashboard
an order status filterthe status field in every list row

9.4. Versions

The version is in the path: /v1. A breaking change ships as a new version, not as an edit of v1; both versions can work at the same time.

9.5. Changelog

Every contract change is recorded in the changelog: new endpoints, fields, codes and events. The changelog is the only place where timelines are announced.

10. Endpoint reference

MethodPathScope
GET/v1/catalogcatalog:read
GET/v1/catalog/exportcatalog:read
GET/v1/stockcatalog:read
GET/v1/recipients/fieldscatalog:read
GET/v1/balancebalance:read
GET/v1/balance/entriesbalance:read
GET/v1/webhookswebhooks:manage
POST/v1/webhookswebhooks:manage
DELETE/v1/webhooks/{id}webhooks:manage
POST/v1/webhooks/{id}/replaywebhooks:manage
POST/v1/ordersorders:create
GET/v1/orders/{id}orders:read
GET/v1/ordersorders:read
GET/v1/openapi.jsonany live key

Endpoints that are not in the table do not exist: an unknown path under /v1 answers 404 not_found with the same error envelope.

What arrivesShape
success{"data": …} and meta if present
error{"error": {"code", "message", "request_id"}}

GET /v1/openapi.json returns the same contract as an OpenAPI 3.1 file: a client can be generated from it or imported into Postman. No scope is needed, any active key works. Without a key the endpoint answers 401 unauthorized.

curl -sS "https://kodrio.com/v1/openapi.json" \
  -H "Authorization: Bearer $KODRIO_API_KEY"

The file arrives without the {"data": …} envelope — client generators accept it that way. The other responses of the contract arrive in the envelope: success — {"data": …} with meta where needed, error — {"error": …}.

11. If something went wrong

An error arrives in a single envelope: code, message, request_id. Name the request_id when you write about a failure: it locates the specific request.

What you seeWhat to check
401 unauthorizedthe Authorization header, key case and completeness
403 forbidden_scopekey scopes and the reason field
403 ip_not_allowedthe outgoing address and the key address list
429 rate_limitedthe pause from Retry-After, the request rate
500 internalthe request_id and a retry of the request

A 4xx answer means the request must be fixed; a 5xx answer means the request is correct and the failure happened on our side, so the request should be retried later. Attach the request_id, the request time in UTC, the endpoint and the request body without the key to your message.

Suspected key leak: 403 ip_not_allowed with an unchanged outgoing network, movements in the balance journal you did not make, an event subscription you did not create.

  1. Revoke the key in the dashboard — access stops immediately.

  2. Check the subscription registry and revoke everything you did not create: subscriptions belong to the company and survive key revocation.

  3. Reconcile the movement journal for the period since the key could have leaked, and write to us via the support channel in the dashboard.

The support channel is the "Support" section in the dashboard; when writing, name the request_id, the time and the endpoint.

In case of any discrepancy between the English and Russian versions, the Russian version prevails.


Open the changelog

Cookies — for the site to work and for analytics. Details

Partner API documentation | Kodrio