Authentication#
This page describes how the ALPHA API authenticates requests. Every request
must include a valid API key in the Authorization header.
Create and manage keys in the Portal for your environment (see Base URLs). Keep keys on your server only. Do not embed them in browsers, mobile apps, or public repositories.
Create an API key#
-
Open the Portal URL for your environment from Base URLs.
-
Go to API Keys and select Create API Key.
-
Copy the key immediately. It may only be shown once.
Store the key in a secrets manager or server-side configuration before using it in requests below.
Required header#
Authorization: Api-Key YOUR_API_KEY
Warning
Do not URL-encode or base64-encode the key. Send it exactly as the portal
provided it, with a single space after Api-Key.
Example request#
Note
In the examples, BASE_URL is the base URL of your environment, for
example https://api.alphaaugmented.com. See Base URLs for the
complete list.
curl -sS -X POST "BASE_URL/api/v1/orders/submit-order/" \
-H "Authorization: Api-Key YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"shipper_name":"Supplier","consignee_name":"Consignee","transportation_mode":"Air","reference":"AIR-001","shipment_skus":[{"item":"PRD-001","quantity":2}]}'
Request headers#
|
Header |
Type |
Description |
|---|---|---|
|
|
string |
Required. Format: |
|
|
string |
Required when the body is JSON. Use |
Errors#
Failed authentication and authorization responses use JSON.
|
HTTP status |
Description |
|---|---|
|
|
Missing, malformed, or unknown API key |
|
|
The API key is valid, but it cannot access this resource |
{ "detail": "Invalid API key." }
{ "detail": "Authentication credentials were not provided." }
{ "detail": "You do not have permission to access this resource." }
See also#
Submit an Air order and download packing instructions.
Create-order endpoint reference.