Authentication

Every API call is authenticated by an access token, generated in your store's panel.

Generating a token

Go to Dashboard → API and create a new token, giving it a name — something that will help you remember what it's for.

The plaintext value is shown once, at the moment it is created.

After that, only the hash is kept — if you lose the token, there is no way to recover it, only to revoke it and generate another one.

Each store can have up to 5 tokens. When creating one you can also set an expiration date — after it, the token stops working without having to be revoked.

Treat the token like a password: anyone who has it can do everything its access level allows — read your store's orders and customers and, with full access, create coupons, generate gift cards and credit balance to customers' wallets. If it leaks, revoke it in the panel immediately.

Sending the token

Every request needs the Authorization header, in Bearer format:

Shell
curl https://sellitex.com/api/v1/orders \
  -H "Authorization: Bearer sk_YOUR_TOKEN"

A valid token has its use recorded — the date of its last call shows up next to it in the panel, useful for knowing whether an old integration is still active.

Authentication errors

A request with no header, with an invalid, revoked or expired token, or for a store that is offline, gets a 401:

JSON
{
  "message": "Unauthenticated."
}

A valid token gets a 403 when it lacks the ability the route requires — for example, a license-validation-only token calling /api/v1/orders — or when the store's plan does not include API access:

JSON
{
  "message": "This token does not have the orders.read ability."
}
JSON
{
  "message": "The store's plan does not include API access."
}

Scope

A token always belongs to the store that generated it — it can never see another store's data on the platform, even if the IDs happen to match.

Access levels

When creating the token, pick one of three levels. Every route requires an ability — shown in the API reference next to each endpoint — and a token without it gets a 403.

LevelAbilities
License validation only
For embedding in the software you sell: the program is public, so the token inside it must not be able to read anything else from the store.
  • license-keys.validate
Read-only
Reads orders, products, customers, subscriptions, carts, coupons, affiliates, announcements, reviews, tickets and the blacklist, and validates licenses. Never changes anything and never sees gift card codes.
  • orders.read
  • products.read
  • customers.read
  • coupons.read
  • license-keys.validate
  • subscriptions.read
  • abandoned-carts.read
  • affiliates.read
  • notifications.read
  • reviews.read
  • tickets.read
  • blacklist.read
Full access
Everything read-only does, plus writes: coupons, affiliates, gift cards (redeeming included, which credits balance), tickets, announcements, subscriptions, carts, reviews and the blacklist. Every change lands in the store's audit log with the token's name.
  • orders.read
  • products.read
  • customers.read
  • coupons.read
  • license-keys.validate
  • subscriptions.read
  • abandoned-carts.read
  • affiliates.read
  • notifications.read
  • reviews.read
  • tickets.read
  • blacklist.read
  • gift-cards.read
  • gift-cards.write
  • gift-cards.redeem
  • subscriptions.cancel
  • abandoned-carts.write
  • coupons.write
  • affiliates.write
  • notifications.write
  • reviews.write
  • tickets.write
  • blacklist.write