Information
- OpenAPI version:
3.1.0
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.
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 are JSON numbers with up to 3 decimal places. A value with more decimal places is rejected with a validation error, not rounded.
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-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.
Every error response is an envelope: {error: {code, message, fields?}}. See the ErrorEnvelope schema below for the full list of codes.
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: