Quickstart
Send a test order to Alrik's staging environment and see it arrive. You need a
terminal with curl, and about five minutes.
1. Get a staging key
API keys are issued by Alrik. Ask tech@alrik.com for a staging key — staging
is fully separate from production, so nothing you do here reaches a real
planner or driver.
Then set two variables for the commands below:
export ALRIK_API_BASE="https://api-staging.alrik.com"
export ALRIK_API_KEY="your-staging-key"
2. See what your key can do
curl "$ALRIK_API_BASE/v1/integration" -H "x-api-key: $ALRIK_API_KEY"
The answer lists what your key is allowed to do and the locations — the
branches — it can act on. Pick one and note its origin_reference:
"locations": [
{ "id": 111, "origin_reference": "STORE-01", "location_name": "Stockholm Central Store" }
]
export ALRIK_LOCATION="STORE-01"
3. Send an order
curl -X POST "$ALRIK_API_BASE/v2/order/draft" \
-H "x-api-key: $ALRIK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"origin_order_number": "QUICKSTART-001",
"origin_reference": "'"$ALRIK_LOCATION"'",
"pickup_address": "Sveavägen 1, 111 57 Stockholm",
"dropoff_address": "Blekingegatan 1, 117 59 Stockholm"
}'
{ "status": "ok", "order_draft_id": 31391 }
The order is now waiting in the location's inbox in Alrik Connect, for a planner to review.
4. Check it arrived
curl "$ALRIK_API_BASE/v1/order_drafts?origin_reference=$ALRIK_LOCATION&origin_order_numbers=QUICKSTART-001" \
-H "x-api-key: $ALRIK_API_KEY"
Your order is in the list. converted_at is null because no planner has
planned it yet.
Alrik does not deduplicate order numbers, so repeating step 3 creates a second
QUICKSTART-001. That matters in a real integration — see
Send orders from your ERP.