Skip to Content
YuzeDocs

API keys

Create a key, send it with every request, and what a 401 or 403 means.

Create a key

In the Yuze dashboard, go to Company, then API, and choose Create key.

  1. Name it after the tool it is for, for example Supy.
  2. Tick the access it needs. Give it only what that tool reads.
  3. Leave every branch ticked, or untick the branches it should not see.
  4. Set an expiry date if the key is only needed for a while.
AccessWhat it reads
company:readYour company
branches:readBranches and payment methods
transactions:readTransactions and their line items
payments:readPayments, and the payment totals on transactions
reports:readSales summary, product sales and payment types

The key is shown once, when you create it. Copy it into a password manager or your tool's secret store straight away. Yuze cannot show it again. If you lose it, delete it and create a new one.

Only the account owner, or a user given the Company permission, can create or delete keys. A company can have up to 20.

Send a key

Send it in the Authorization header on every request.

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://europe-west2-fyre-pos.cloudfunctions.net/publicApi/v1/me"

GET /v1/me needs no access, so it is the quickest check that a key works. It returns the key's name, branches and access.

Keep the key out of source code and browser apps. Use one key per tool, so deleting one does not break the others. A deleted key stops working on the next request.

401 and 403

StatusCodeWhat it means
401missing_api_keyNo Authorization: Bearer header was sent
401invalid_api_keyThe key is wrong, deleted, or for the wrong environment
401expired_api_keyThe key's expiry date has passed
401revoked_api_keyThe key was revoked
403insufficient_scopeThe key does not have the access this endpoint needs. details.requiredScope names it
403branch_forbiddenYou asked for a branch the key cannot read

A transaction or payment in a branch the key cannot read returns 404, as if it did not exist.

On this page