On this page
What you will do#
Three steps: create an account, find your app's key, and send your first request to a product your app is subscribed to.
Before you start#
You need an account and a client that can make HTTPS requests. A call only succeeds on a product your app is subscribed to, and some products need the provider's approval before the subscription becomes active.
Get a key#
Register an account. Two apps are created for you, one for the Sandbox environment and one for Production, each with its own key. You find them under your apps.
Keep the key in an environment variable on your server:
# keep the key in an environment variable export API360_KEY="REPLACE_WITH_YOUR_KEY"
Send your first request#
Every published product has its own gateway address and endpoints, shown on its page in the marketplace. A request goes to the gateway address, then /v and the endpoint's major version, then the endpoint's path. Send your key in the api360key header:
curl "https://gate-stg.api360.sa/<product-slug>/v<n>/<endpoint>" \ -H "api360key: $API360_KEY" \ -H "Content-Type: application/json" \ -d '{"<field>": "<value>"}'
Use the Sandbox app's key with the Sandbox gateway address (gate-stg.api360.sa), and the Production app's key with gate.api360.sa.
Check that it worked#
- A response from the product means the gateway accepted your key and your subscription.
403with{"message": "No active subscription for this product"}means the app is not subscribed to this product, or the subscription is not active yet. The same answer comes back when the key is wrong.- Every response carries an
X-Kong-Request-Idheader. Keep it: support needs it to find your call.
Next steps#
- Sandbox and Production: which key and which address to use.
- Errors, status codes and retries
- Browse the products and subscribe your app.