Developers
On this page

Origela Store API

Every store that runs the Origela e-commerce software has its own API. Accounting, warehouse and shipping programs and AI tools use it to read the store's data and to write five things back.

What you can do with it

  • Read products with variants and prices, stock quantities, orders with their lines and amounts, shipment tracking, the store's shipping carriers and, with separate permissions, customers and the billing details on orders.
  • Write stock quantities, by stock code (SKU), as a fixed figure or as a change.
  • Write prices and sale prices, by stock code, in the store's own currency. Every change appears in the history of the store's price manager, where the owner can undo it.
  • Create a product: one simple product per request, always as a draft that the owner publishes in the admin panel.
  • Mark an order as shipped with carrier and tracking number; the customer gets the store's "shipped" e-mail.
  • Write the document number another program keeps for an order, for example the invoice number of the accounting program.

Version 1 deliberately stops there. It cannot publish, change or delete a product and takes no images or variants; it has no order creation, cancellation or refunds, no customer writes, no webhooks (you follow changes by polling with updated_since) and no OAuth: a program signs in with an API key that the store owner creates.

Switch it on and create a key

The API belongs to the store, and its owner decides who may use it. It is off by default.

  1. In the store's admin panel open System > API keys and switch the API on. Only the main administrator of the store sees this screen.
  2. Create a key: give it a name and a purpose, tick only the permissions the program needs, and, if the program has a fixed address, enter its IP addresses. Choose when the key expires (the default is one year).
  3. Copy the key. It starts with osk_ and is shown once; the store keeps only a fingerprint of it. Put it straight into the secret store or the environment of the program that will use it.

While the API is off, or while the store has no active key, every address under /api/ answers 404. Demo stores have no API.

Base address

Each store answers on its own domain. With a store at example.com:

FormAddress
Usualhttps://example.com/api/v1/…
Fallbackhttps://example.com/api/index.php?r=/v1/…

Use the fallback only when the usual form does not work, which happens on servers that do not rewrite addresses. The store panel shows both forms and has a check that tells the owner which one the server needs. If the store lives in a folder, the folder is part of the address (https://example.com/shop/api/v1/…).

Your first request

Put the key into an environment variable, then ask the store who it is. GET /v1/store works with any key and is the quickest way to check that address, key and store belong together.

shell
# the key comes from the store owner; keep it out of files and out of the shell history
read -rs ORIGELA_API_KEY && export ORIGELA_API_KEY
curl
curl -sS "https://example.com/api/v1/store" \
  -H "Authorization: Bearer $ORIGELA_API_KEY"
json
{
  "data": {
    "name": "Example Store",
    "domain": "example.com",
    "store_ref": "5b1f0c9a7d3e42f8a6c0d1e2",
    "api_version": "v1",
    "currency": "EUR",
    "default_language": "en",
    "languages": ["en", "tr"],
    "time_zone": "Europe/Istanbul",
    "server_time": "2026-12-01T10:00:00Z",
    "key": {
      "name": "Accounting",
      "scopes": ["orders:read", "orders:billing", "orders:reference"],
      "expires_at": "2027-12-01T09:00:00Z"
    }
  }
}

On a server without address rewriting the same request reads:

curl
curl -sS "https://example.com/api/index.php?r=/v1/store" \
  -H "Authorization: Bearer $ORIGELA_API_KEY"

# further parameters follow with &
curl -sS "https://example.com/api/index.php?r=/v1/orders&limit=20" \
  -H "Authorization: Bearer $ORIGELA_API_KEY"

The same in PHP, Python and JavaScript

The samples list the twenty oldest orders. They read the key from the environment variable ORIGELA_API_KEY, refuse to leave HTTPS and report the error code when the store says no.

PHP

php
<?php
$base = 'https://example.com/api';
$key = getenv('ORIGELA_API_KEY');

$ch = curl_init($base . '/v1/orders?limit=20');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $key, 'Accept-Language: en'],
    CURLOPT_PROTOCOLS => CURLPROTO_HTTPS,        // never plain HTTP
    CURLOPT_FOLLOWLOCATION => false,
    CURLOPT_TIMEOUT => 30,
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);

$answer = json_decode((string)$body, true);
if ($status !== 200) {
    fwrite(STDERR, $status . ' ' . ($answer['error']['code'] ?? 'no answer') . "\n");
    exit(1);
}
foreach ($answer['data'] as $order) {
    echo $order['order_number'], ' ', $order['total'], ' ', $order['currency'], "\n";
}

Python

python
import json
import os
import urllib.error
import urllib.request

BASE = "https://example.com/api"
KEY = os.environ["ORIGELA_API_KEY"]

request = urllib.request.Request(
    BASE + "/v1/orders?limit=20",
    headers={"Authorization": "Bearer " + KEY, "Accept-Language": "en"},
)
try:
    with urllib.request.urlopen(request, timeout=30) as response:
        answer = json.load(response)
except urllib.error.HTTPError as failure:
    error = json.load(failure)["error"]
    raise SystemExit(f"{failure.code} {error['code']} (request {error['request_id']})")

for order in answer["data"]:
    print(order["order_number"], order["total"], order["currency"])

JavaScript (fetch)

javascript
// Node.js 18 or newer; save as orders.mjs
const BASE = "https://example.com/api";
const KEY = process.env.ORIGELA_API_KEY;

const response = await fetch(BASE + "/v1/orders?limit=20", {
  headers: { Authorization: "Bearer " + KEY, "Accept-Language": "en" },
  redirect: "error",
});
const answer = await response.json();
if (!response.ok) {
  throw new Error(response.status + " " + answer.error.code + " (request " + answer.error.request_id + ")");
}
for (const order of answer.data) {
  console.log(order.order_number, order.total, order.currency);
}

Call the API from a server or a desktop program, never from a web page in a visitor's browser: whoever can read the page can read the key.

All endpoints at a glance

EndpointWhat it doesPermission needed
GET /v1/storeThe store this key belongs toany key
GET /v1/productsList productsproducts:read
POST /v1/productsCreate a product (draft)products:write
PATCH /v1/pricesWrite pricesprices:write
GET /v1/products/{id}One productproducts:read
GET /v1/stockStock quantitiesstock:read
PATCH /v1/stockWrite stock quantitiesstock:write
GET /v1/ordersList ordersorders:read
GET /v1/orders/{id}One orderorders:read
GET /v1/orders/{id}/trackingShipment tracking of an orderorders:read
POST /v1/orders/{id}/shipmentMark an order as shippedorders:shipment
PUT /v1/orders/{id}/referenceWrite the document number of another programorders:reference
GET /v1/shipping/carriersActive shipping carriersshipping:read
GET /v1/customersList customerscustomers:read
GET /v1/customers/{id}One customercustomers:read

Where to go next

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