Skip to content
ZargoLogix

Authentication

The data API uses API keys sent as a bearer token. The tracking lookup is public and needs no key.

Getting a key

A ZargoLogix administrator creates keys in the Integration Center of the admin dashboard, on the API keys tab. Each key has a name, the scopes it may use, an optional expiry date and an optional rate limit of its own.

Keys start with zlx_live_. Treat a key like a password: keep it on your server, never in a web page, mobile app or public repository.

Sending the key

Send the key in the Authorization header of every request:

Header
Authorization: Bearer zlx_live_YOUR_KEY
curl
curl -H "Authorization: Bearer zlx_live_YOUR_KEY" \
  "https://api.zargologix.com/v1/invoices?status=OVERDUE"

Scopes

A key can only read what its scopes allow. Asking for anything else returns 403 insufficient_scope.

ScopeAllowsPages
shipments:readGET /v1/shipments…List and read shipments, including their event history.
invoices:readGET /v1/invoices…List and read invoices, including line items and payments.
quotes:readGET /v1/quotes…List and read quotes, including line items.

Give each integration its own key with only the scopes it needs, so one leaked key does not expose everything.

When authentication fails

SituationStatusError code
No key, or not a ZargoLogix key401unauthorized
Unknown key401unauthorized. The message is the same as for a missing key on purpose.
Key was revoked401key_revoked
Key has expired401key_expired
Key lacks the scope403insufficient_scope

Good practice