Ping
Check a key
Section titled “Check a key”GET/ping
Which business the key belongs to, its mode (test or live), its type (secret or
publishable) and the scopes it holds. Make it the first call when you set up an integration, and
a health check afterwards.
curl "https://api.sabiwave.com/api/v1/public/ping" \ -H "Authorization: Bearer $SABIWAVE_SECRET_KEY"const res = await fetch('https://api.sabiwave.com/api/v1/public/ping', { headers: { Authorization: `Bearer ${process.env.SABIWAVE_SECRET_KEY}`, },});const result = await res.json();{ "success": true, "data": { "business": { "id": "01a21564-0f82-72f9-9f14-6826074cfba5", "name": "Payroll Demo Shop (walk-through)", "currency": "NGN" }, "mode": "test", "keyType": "secret", "scopes": [ "catalog:read", "promotions:read", "orders:read", "orders:write", "customers:read", "customers:write", "inventory:read" ] }}| Field | Meaning |
|---|---|
business.id |
Your business’s id. |
business.name |
Its name, as in Sabiwave. |
business.currency |
The currency every amount is in, such as NGN. |
mode |
test or live: see Test and live keys. |
keyType |
secret or publishable. |
scopes |
What this key may do. A publishable key shows only catalog:read and promotions:read, whatever its pair holds. |
With the publishable key:
curl "https://api.sabiwave.com/api/v1/public/ping" \ -H "X-Sabiwave-Public-Key: $SABIWAVE_PUBLISHABLE_KEY"const res = await fetch('https://api.sabiwave.com/api/v1/public/ping', { headers: { 'X-Sabiwave-Public-Key': SABIWAVE_PUBLISHABLE_KEY, },});const result = await res.json();{ "success": true, "data": { "business": { "id": "01a21564-0f82-72f9-9f14-6826074cfba5", "name": "Payroll Demo Shop (walk-through)", "currency": "NGN" }, "mode": "test", "keyType": "publishable", "scopes": [ "catalog:read", "promotions:read" ] }}Refusals: 401 MISSING_API_KEY, INVALID_API_KEY, API_KEY_REVOKED or API_KEY_EXPIRED. See
Authentication.