Help
Connect other software with an API key

Connect other software with an API key

Let a website, accounting tool or custom report read your products, stock, sales and customers — read-only.

What you need first

  • The store owner’s login (or a login allowed into Settings).
  • The other software, or the developer setting it up, ready to paste a key.

Steps

  1. Open Settings → Data & API.

  2. Type a name that says who the key is for (Website, Accountant…) and press Generate key.

  3. Press Copy and paste the key into the other software straight away. It is shown once only — Sahel keeps just a scrambled copy and cannot show it again.

  4. The software sends the key with every request, as the header Authorization: Bearer followed by the key. Example: a request to https://getsahel.com/api/v1/products returns every product with its price and stock, in total and per branch. Sales are at /api/v1/sales (add ?from=2026-10-01&to=2026-10-31 for a period) and customers at /api/v1/customers.

  5. Lists come 50 at a time (up to 200 with ?limit=200). While the answer says has_more: true, ask again with ?offset= moved on by the same number.

What you should see

The other software shows your live data. Under the key in Data & API you see when it was last used. Nothing it does can change your store — the key only reads.

Common mistakes

  • Losing the key. It cannot be shown again — make a new one and Revoke the old one.
  • Putting the key inside a public web page. Anyone can read it there. Keep it on the other software’s server.
  • Sharing one key between several programs. Give each its own key, so you can switch one off without breaking the others.