Skip to content

Authentication

Authenticate with an API key or with OAuth. Access tokens last 1 hour. Refresh tokens do not rotate. A key or connection unused for 90 days stops working. Every path starts with the store prefix, given in the response from /me and in the token response’s api_base_url.

Money

Amounts are integer cents. A sale line’s list_price, unit_price and unit_discount are integers with 4 decimal places (1.2345 = 12345). Rates are integer basis points (1/100 of a percent). SaleDiscount.value is cents when value_type is fixed and basis points when value_type is percent.

Quantities

Quantities are JSON numbers with up to 3 decimal places. A value with more decimal places is rejected with a validation error, not rounded.

Pagination and polling

List endpoints take limit, cursor and order, and return next_cursor and has_more. Store the last non-null next_cursor and pass it back as cursor to poll for changes. A page with no rows returns next_cursor: null, so keep the cursor you already have. A cursor is opaque: pass it back byte for byte as you received it. A cursor the server cannot read is rejected with a 400 VALIDATION_FAILED rather than silently restarting you at the first page. Pass include_deleted=true to also receive deleted rows back as tombstones.

Idempotency

Idempotency-Key is required on the stock adjustment and stock batch endpoints, and optional elsewhere. A retry with the same key and the same body replays the first response. A retry with the same key and a different body answers IDEMPOTENCY_KEY_REUSED.

Errors

Every error response is an envelope: {error: {code, message, fields?}}. See the ErrorEnvelope schema below for the full list of codes.

Information

  • OpenAPI version: 3.1.0

Security scheme type: http

Security scheme type: oauth2

Flow type: authorizationCode

Authorization URL: https://admin.oletapp.com/oauth/authorize

Token URL: https://api.oletapp.com/oauth/token

Refresh URL: https://api.oletapp.com/oauth/token

Scopes:

  • catalog:read - View your catalog, including products, prices, categories, brands, tags and suppliers.
  • catalog:write - Create, update and delete products, brands, categories, tags and suppliers in your catalog.
  • customers:read - View your customers. Includes names, emails and phone numbers.
  • customers:write - Create and update customer records, and permanently erase a customer's personal details. Erasure cannot be undone.
  • inventory:read - View stock levels across your outlets.
  • inventory:write - Adjust stock levels across your outlets.
  • sales:read - View your completed sales and refunds.