Introduction
The Allio API provides programmatic access to your orders, customers, products, bookings, reviews, and inbox. Use it to integrate Allio with your existing systems, CRM, booking tools, or build custom applications.
https://api.allio.dkv1Authentication
All API requests require authentication using a Bearer token. You can generate API keys from your Settings page under the "API Keys" section.
Include your API key in the Authorization header:
curl -X GET "https://api.allio.dk/v1/orders" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"The key can also be sent in an X-API-Key header. A key only ever gives access to data belonging to the organization of the user who created it.
Important: Keep your API keys secure. Never expose them in client-side code or public repositories. If a key is compromised, revoke it immediately and generate a new one.
Rate Limiting
API requests are limited to 100 requests per 60 seconds per API key. If you exceed this limit, you'll receive a 429 Too Many Requests response.
{
"success": false,
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Please wait before retrying."
}
}Response Format
All API responses are returned in JSON format with a consistent structure:
{
"success": true,
"data": { ... },
"meta": {
"page": 1,
"limit": 20,
"total": 42
}
}HTTP Status Codes
| Code | Description |
|---|---|
| 200 | Success |
| 201 | Resource created |
| 400 | Bad request / Validation error |
| 401 | Unauthorized / Invalid API key |
| 403 | Forbidden / Feature not enabled for the organization |
| 404 | Resource not found |
| 409 | Conflict (e.g. the time slot is no longer available) |
| 422 | Request is valid JSON but violates business rules |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Orders
/v1/ordersRetrieve a list of your orders with optional filtering and pagination.
Parameters
| Name | Type | Description |
|---|---|---|
| limit | integer | Number of results to return (default: 20, max: 100) |
| page | integer | Page number for pagination (default: 1) |
| status | string | Filter by status: pending, paid, cancelled |
Request
curl -X GET "https://api.allio.dk/v1/orders?limit=10&page=1" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"Response
{
"success": true,
"data": [
{
"id": "ord_123abc",
"customer_name": "John Doe",
"customer_email": "john@example.com",
"total_amount": 62500,
"status": "paid",
"payment_link": "https://pay.allio.dk/abc123",
"created_at": "2026-01-15T10:30:00Z"
}
],
"meta": { "page": 1, "limit": 10, "total": 42 }
}/v1/orders/:idRetrieve a single order by its ID, including order items.
Request
curl -X GET "https://api.allio.dk/v1/orders/ord_123abc" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"Response
{
"success": true,
"data": {
"id": "ord_123abc",
"customer_name": "John Doe",
"customer_email": "john@example.com",
"customer_id": "cus_456def",
"total_amount": 62500,
"status": "paid",
"payment_link": "https://pay.allio.dk/abc123",
"payment_method": "card",
"paid_at": "2026-01-15T11:45:00Z",
"created_at": "2026-01-15T10:30:00Z",
"items": [
{ "id": "item_789", "description": "Oil change", "quantity": 1, "amount": 50000 }
]
}
}/v1/ordersCreate a new order with automatic payment link generation. Returns a ready-to-share payment link and QR code URL.
Parameters
| Name | Type | Description |
|---|---|---|
| customer_id | string | ID of an existing customer (optional if name/email provided) |
| customer_name* | string | Customer name (required if no customer_id) |
| customer_email* | string | Customer email (required if no customer_id) |
| items* | array | Array of order items |
| items[].description* | string | Item description |
| items[].amount* | integer | Item price in øre (ex. VAT) |
| items[].quantity | integer | Item quantity (default: 1) |
| items[].product_id | string | Link to existing product (optional) |
| generate_payment_link | boolean | Generate Stripe payment link (default: true) |
Request
curl -X POST "https://api.allio.dk/v1/orders" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"customer_name": "John Doe",
"customer_email": "john@example.com",
"items": [
{ "description": "Olieskift", "amount": 50000, "quantity": 1 }
]
}'Response
{
"success": true,
"data": {
"id": "ord_neworder123",
"customer_name": "John Doe",
"customer_email": "john@example.com",
"status": "pending",
"total_amount": 62500,
"payment_link": "https://pay.allio.dk/abc123",
"stripe_checkout_url": "https://checkout.stripe.com/c/pay/...",
"qr_code_url": "https://api.allio.dk/v1/orders/ord_neworder123/qr",
"created_at": "2026-01-29T14:00:00Z"
}
}/v1/orders/:idUpdate an order's status.
Parameters
| Name | Type | Description |
|---|---|---|
| status | string | New status: pending, paid, cancelled |
Request
curl -X PATCH "https://api.allio.dk/v1/orders/ord_123" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{ "status": "cancelled" }'Response
{
"success": true,
"data": {
"id": "ord_123",
"status": "cancelled",
"total_amount": 62500,
"created_at": "2026-01-29T14:00:00Z"
}
}/v1/orders/:idDelete a pending order. Paid orders cannot be deleted.
Request
curl -X DELETE "https://api.allio.dk/v1/orders/ord_123" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"Response
{
"success": true,
"data": { "deleted": true, "id": "ord_123" }
}/v1/orders/:id/qrGenerate a QR code for the order's payment link.
Parameters
| Name | Type | Description |
|---|---|---|
| size | integer | QR code size in pixels (default: 300, max: 1000) |
Request
curl -X GET "https://api.allio.dk/v1/orders/ord_123/qr?size=400" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"Response
{
"success": true,
"data": {
"qr_code_base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEU...",
"payment_link": "https://pay.allio.dk/abc123"
}
}/v1/orders/:id/sendMark payment link as sent (integrates with your notification system).
Parameters
| Name | Type | Description |
|---|---|---|
| channel | string | Notification channel: email or sms (default: email) |
Request
curl -X POST "https://api.allio.dk/v1/orders/ord_123/send" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{ "channel": "email" }'Response
{
"success": true,
"data": {
"sent_via": "email",
"sent_at": "2026-01-30T14:00:00Z"
}
}Customers
/v1/customersRetrieve a list of your organization's customers with optional search and pagination.
Parameters
| Name | Type | Description |
|---|---|---|
| limit | integer | Number of results to return (default: 20, max: 100) |
| page | integer | Page number for pagination (default: 1) |
| search | string | Search by name, email, or phone |
Request
curl -X GET "https://api.allio.dk/v1/customers?limit=20" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"Response
{
"success": true,
"data": [
{
"id": "cus_456def",
"first_name": "John",
"last_name": "Doe",
"name": "John Doe",
"email": "john@example.com",
"phone": "+4512345678",
"sms_opt_in": true,
"email_opt_in": true,
"created_at": "2026-01-10T09:00:00Z"
}
],
"meta": { "page": 1, "limit": 20, "total": 156 }
}/v1/customers/:idRetrieve a single customer by their ID.
Request
curl -X GET "https://api.allio.dk/v1/customers/cus_456def" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"Response
{
"success": true,
"data": {
"id": "cus_456def",
"first_name": "John",
"last_name": "Doe",
"name": "John Doe",
"email": "john@example.com",
"phone": "+4512345678",
"address": "123 Main Street, Copenhagen",
"cvr_number": null,
"is_company": false,
"sms_opt_in": true,
"email_opt_in": false,
"created_at": "2026-01-10T09:00:00Z"
}
}/v1/customersCreate a new customer. Customers are shared across your organization: the customer is owned by the organization (not the team member whose API key is used), and an email or phone number that already belongs to a customer in the organization returns 409 with the existing customer id — whether that customer was created in Allio or via the API.
Parameters
| Name | Type | Description |
|---|---|---|
| first_name* | string | Customer first name |
| last_name* | string | Customer last name |
| email* | string | Customer email address |
| phone | string | Customer phone number |
| address | string | Customer address |
| cvr_number | string | Danish CVR number (for companies) |
| sms_opt_in | boolean | Marketing permission: SMS campaigns and marketing automations. Does not affect SMS about bookings (see sms_consent on bookings). Default: true, as for customers created in Allio |
| email_opt_in | boolean | Marketing permission: e-mail campaigns and marketing automations. Default: true |
Request
curl -X POST "https://api.allio.dk/v1/customers" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Jane",
"last_name": "Smith",
"email": "jane@example.com",
"phone": "+4587654321",
"sms_opt_in": true,
"email_opt_in": false
}'Response
{
"success": true,
"data": {
"id": "cus_newcust789",
"first_name": "Jane",
"last_name": "Smith",
"name": "Jane Smith",
"email": "jane@example.com",
"phone": "+4587654321",
"sms_opt_in": true,
"email_opt_in": false,
"created_at": "2026-01-29T14:30:00Z"
}
}/v1/customers/:idUpdate an existing customer's information. Send only the fields you want to change. A customer who opted out of SMS themselves (replied STOP) cannot be opted back in via the API: sms_opt_in: true then returns 409 CUSTOMER_OPTED_OUT and nothing is changed.
Parameters
| Name | Type | Description |
|---|---|---|
| first_name | string | Customer first name |
| last_name | string | Customer last name |
| string | Customer email | |
| phone | string | Customer phone number |
| address | string | Customer address |
| sms_opt_in | boolean | Marketing permission: SMS campaigns and marketing automations. Does not affect SMS about bookings |
| email_opt_in | boolean | Marketing permission: e-mail campaigns and marketing automations |
Request
curl -X PATCH "https://api.allio.dk/v1/customers/cus_456def" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{ "phone": "+4599887766", "sms_opt_in": false }'Response
{
"success": true,
"data": {
"id": "cus_456def",
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": "+4599887766",
"sms_opt_in": false,
"email_opt_in": true,
"created_at": "2026-01-10T09:00:00Z"
}
}/v1/customers/:idDelete a customer (soft delete - customer data is retained for order history).
Request
curl -X DELETE "https://api.allio.dk/v1/customers/cus_456def" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"Response
{
"success": true,
"data": { "deleted": true, "id": "cus_456def" }
}/v1/customers/:id/ordersRetrieve all orders for a specific customer.
Parameters
| Name | Type | Description |
|---|---|---|
| limit | integer | Number of results (default: 20, max: 100) |
| page | integer | Page number (default: 1) |
| status | string | Filter by status: pending, paid |
Request
curl -X GET "https://api.allio.dk/v1/customers/cus_456def/orders?status=paid" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"Response
{
"success": true,
"data": [
{
"id": "ord_123abc",
"customer_name": "John Doe",
"total_amount": 62500,
"status": "paid",
"payment_link": "https://pay.allio.dk/abc123",
"created_at": "2026-01-15T10:30:00Z",
"paid_at": "2026-01-15T11:45:00Z"
}
],
"meta": { "page": 1, "limit": 20, "total": 5 }
}Products
/v1/productsRetrieve a list of your products with optional pagination.
Parameters
| Name | Type | Description |
|---|---|---|
| limit | integer | Number of results to return (default: 20, max: 100) |
| page | integer | Page number for pagination (default: 1) |
Request
curl -X GET "https://api.allio.dk/v1/products?limit=50" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"Response
{
"success": true,
"data": [
{
"id": "prod_abc123",
"name": "Oil Change",
"description": "Standard oil change service",
"price": 50000,
"unit": "stk",
"service_interval_months": 12,
"created_at": "2026-01-05T08:00:00Z"
}
],
"meta": { "page": 1, "limit": 50, "total": 23 }
}/v1/productsCreate a new product.
Parameters
| Name | Type | Description |
|---|---|---|
| name* | string | Product name |
| price* | integer | Price in øre (ex. VAT) |
| description | string | Product description |
| unit | string | Unit type (default: stk) |
| service_interval_months | integer | Service interval in months |
Request
curl -X POST "https://api.allio.dk/v1/products" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Premium Olieskift",
"description": "Inkl. kvalitetsolie og filter",
"price": 89900,
"unit": "stk",
"service_interval_months": 12
}'Response
{
"success": true,
"data": {
"id": "prod_new123",
"name": "Premium Olieskift",
"description": "Inkl. kvalitetsolie og filter",
"price": 89900,
"unit": "stk",
"service_interval_months": 12,
"created_at": "2026-01-29T14:00:00Z"
}
}/v1/products/:idUpdate an existing product.
Parameters
| Name | Type | Description |
|---|---|---|
| name | string | Product name |
| price | integer | Price in øre |
| description | string | Product description |
Request
curl -X PATCH "https://api.allio.dk/v1/products/prod_abc123" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{ "price": 55000 }'Response
{
"success": true,
"data": {
"id": "prod_abc123",
"name": "Oil Change",
"price": 55000,
"created_at": "2026-01-05T08:00:00Z"
}
}/v1/products/:idDelete a product permanently.
Request
curl -X DELETE "https://api.allio.dk/v1/products/prod_abc123" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"Response
{
"success": true,
"data": { "deleted": true, "id": "prod_abc123" }
}Reviews
Access and manage your Google Business reviews programmatically. Requires an active Google Business integration.
/v1/reviewsRetrieve a list of your Google Business reviews.
Parameters
| Name | Type | Description |
|---|---|---|
| limit | integer | Number of results (default: 20, max: 100) |
| page | integer | Page number (default: 1) |
| min_rating | integer | Minimum star rating (1-5) |
| has_reply | boolean | Filter by reply status (true/false) |
Request
curl -X GET "https://api.allio.dk/v1/reviews?min_rating=4" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"Response
{
"success": true,
"data": [
{
"id": "rev_abc123",
"google_review_id": "AbCdEf...",
"reviewer_name": "John Doe",
"reviewer_photo_url": "https://...",
"star_rating": 5,
"comment": "Fantastisk service!",
"reply_comment": "Tak for din anmeldelse!",
"reply_update_time": "2026-01-30T14:00:00Z",
"create_time": "2026-01-28T10:00:00Z"
}
],
"meta": { "page": 1, "limit": 20, "total": 42 }
}/v1/reviews/:idRetrieve a single review by its ID.
Request
curl -X GET "https://api.allio.dk/v1/reviews/rev_abc123" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"Response
{
"success": true,
"data": {
"id": "rev_abc123",
"google_review_id": "AbCdEf...",
"reviewer_name": "John Doe",
"star_rating": 5,
"comment": "Fantastisk service!",
"reply_comment": null,
"create_time": "2026-01-28T10:00:00Z"
}
}/v1/reviews/:id/replyReply to a review. The reply will be synced to Google.
Parameters
| Name | Type | Description |
|---|---|---|
| comment* | string | Reply text |
Request
curl -X POST "https://api.allio.dk/v1/reviews/rev_abc123/reply" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{ "comment": "Tak for din anmeldelse! Vi sætter pris på din feedback." }'Response
{
"success": true,
"data": {
"id": "rev_abc123",
"reply_comment": "Tak for din anmeldelse! Vi sætter pris på din feedback.",
"reply_update_time": "2026-01-30T14:00:00Z"
}
}/v1/reviews/statsGet review statistics including rating distribution.
Request
curl -X GET "https://api.allio.dk/v1/reviews/stats" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"Response
{
"success": true,
"data": {
"total_reviews": 156,
"average_rating": 4.7,
"rating_distribution": {
"5": 120,
"4": 25,
"3": 8,
"2": 2,
"1": 1
},
"reviews_this_month": 12,
"replied_count": 140,
"unreplied_count": 16
}
}Inbox
Access your unified inbox across all channels (email, SMS, Messenger, Instagram).
/v1/inbox/threadsRetrieve a list of conversation threads.
Parameters
| Name | Type | Description |
|---|---|---|
| limit | integer | Number of results (default: 20, max: 100) |
| page | integer | Page number (default: 1) |
| channel | string | Filter by channel: email, sms, messenger, instagram, all |
| status | string | Filter by status: open, closed, all |
| customer_id | string | Filter by customer ID |
Request
curl -X GET "https://api.allio.dk/v1/inbox/threads?channel=email&status=open" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"Response
{
"success": true,
"data": [
{
"thread_id": "email_abc123",
"channel": "email",
"subject": "Spørgsmål om service",
"customer_id": "cus_xxx",
"customer_name": "John Doe",
"message_count": 5,
"unread_count": 1,
"is_closed": false,
"latest_message": {
"id": "msg_123",
"direction": "inbound",
"body": "Hvornår kan I tage min bil?",
"received_at": "2026-01-30T10:00:00Z"
},
"created_at": "2026-01-28T08:00:00Z"
}
],
"meta": { "page": 1, "limit": 20, "total": 28 }
}/v1/inbox/threads/:idRetrieve all messages in a conversation thread.
Request
curl -X GET "https://api.allio.dk/v1/inbox/threads/email_abc123" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"Response
{
"success": true,
"data": {
"thread_id": "email_abc123",
"channel": "email",
"subject": "Spørgsmål om service",
"customer_id": "cus_xxx",
"is_closed": false,
"messages": [
{
"id": "msg_001",
"direction": "inbound",
"from_address": "kunde@example.com",
"to_address": "mekaniker@example.com",
"subject": "Spørgsmål om service",
"body": "Hej, hvornår kan I tage min bil?",
"is_read": true,
"received_at": "2026-01-28T08:00:00Z"
},
{
"id": "msg_002",
"direction": "outbound",
"from_address": "mekaniker@example.com",
"to_address": "kunde@example.com",
"subject": "Re: Spørgsmål om service",
"body": "Vi kan tage den i morgen kl. 10.",
"is_read": true,
"received_at": "2026-01-28T09:30:00Z"
}
]
}
}/v1/inbox/messagesSend a new message via email or SMS.
Parameters
| Name | Type | Description |
|---|---|---|
| channel* | string | Channel: email or sms |
| to* | string | Recipient email or phone |
| subject | string | Email subject (required for email) |
| body* | string | Message body |
| customer_id | string | Link to customer |
Request
curl -X POST "https://api.allio.dk/v1/inbox/messages" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"channel": "email",
"to": "kunde@example.com",
"subject": "Vedr. din ordre",
"body": "Din ordre er klar til afhentning.",
"customer_id": "cus_xxx"
}'Response
{
"success": true,
"data": {
"id": "msg_xyz789",
"channel": "email",
"direction": "outbound",
"to": "kunde@example.com",
"subject": "Vedr. din ordre",
"body": "Din ordre er klar til afhentning.",
"sent_at": "2026-01-30T14:00:00Z"
}
}/v1/inbox/threads/:idUpdate thread status (mark as read, close thread).
Parameters
| Name | Type | Description |
|---|---|---|
| is_read | boolean | Mark all messages as read |
| is_closed | boolean | Close/reopen the thread |
Request
curl -X PATCH "https://api.allio.dk/v1/inbox/threads/email_abc123" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{ "is_read": true, "is_closed": true }'Response
{
"success": true,
"data": {
"thread_id": "email_abc123",
"updated": { "is_read": true, "is_closed": true }
}
}/v1/inbox/statsGet inbox statistics across all channels. Thread counts use the same threading model as the Inbox UI. A thread is closed only when all messages in that thread are closed.
Request
curl -X GET "https://api.allio.dk/v1/inbox/stats" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"Response
{
"success": true,
"data": {
"total_threads": 156,
"open_threads": 12,
"closed_threads": 144,
"unread_messages": 5,
"messages_today": 8,
"channels": {
"email": 89,
"sms": 45,
"messenger": 15,
"instagram": 7
}
}
}Bookings
Create, read, update and cancel bookings in Allio Booking. The API uses exactly the same booking rules as the Allio calendar: services, employees, opening hours, blocked times, buffers, resources and overlapping bookings are validated server-side, and the same confirmations, reminders and automations run as for bookings created in Allio.
Requirements: the organization must use Allio Booking as its booking system (not Gecko or Onlinebooq) and have booking set up. Otherwise every booking endpoint returns 403 NATIVE_BOOKING_DISABLED.
Times are ISO 8601 with a timezone offset (e.g. 2026-10-15T10:00:00+02:00) and are always returned in UTC. end_time and duration_minutes are computed from the selected services. Amounts are in øre (DKK cents).
Statuses: confirmed, completed, no_show, cancelled. Bookings imported from other systems are not part of this API.
/v1/bookingsList bookings, ordered by start time (or by updated_at when updated_since is used).
Parameters
| Name | Type | Description |
|---|---|---|
| limit | integer | Number of results (default: 20, max: 100) |
| page | integer | Page number (default: 1) |
| status | string | Comma-separated statuses, e.g. confirmed,completed |
| customer_id | string | Only bookings for this customer |
| employee_id | string | Only bookings for this employee |
| from | datetime | start_time >= from |
| to | datetime | start_time < to |
| updated_since | datetime | Only bookings changed since this time (for incremental sync) |
Request
curl -X GET "https://api.allio.dk/v1/bookings?from=2026-10-01T00:00:00Z&status=confirmed" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"Response
{
"success": true,
"data": [
{
"id": "8f0c2a1e-5b7d-4c3e-9a41-2d6f0b9e1c11",
"customer_id": "3b9d6c0a-1e2f-4a5b-8c7d-9e0f1a2b3c4d",
"customer_name": "Mette Hansen",
"customer_email": "mette@example.com",
"customer_phone": "+4512345678",
"employee_id": "c2e4f6a8-0b1d-4f3e-8a5c-7e9f1b3d5a7c",
"service_ids": ["a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"],
"start_time": "2026-10-15T08:00:00.000Z",
"end_time": "2026-10-15T09:00:00.000Z",
"duration_minutes": 60,
"status": "confirmed",
"total_price_cents": 65000,
"notes": "Booket via partner-integration",
"created_at": "2026-10-11T10:30:00.000Z",
"updated_at": "2026-10-11T10:30:00.000Z"
}
],
"meta": { "page": 1, "limit": 20, "total": 1 }
}/v1/bookings/:idRetrieve a single booking.
Request
curl -X GET "https://api.allio.dk/v1/bookings/8f0c2a1e-5b7d-4c3e-9a41-2d6f0b9e1c11" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"Response
{
"success": true,
"data": {
"id": "8f0c2a1e-5b7d-4c3e-9a41-2d6f0b9e1c11",
"customer_id": "3b9d6c0a-1e2f-4a5b-8c7d-9e0f1a2b3c4d",
"customer_name": "Mette Hansen",
"customer_email": "mette@example.com",
"customer_phone": "+4512345678",
"employee_id": "c2e4f6a8-0b1d-4f3e-8a5c-7e9f1b3d5a7c",
"service_ids": ["a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"],
"start_time": "2026-10-15T08:00:00.000Z",
"end_time": "2026-10-15T09:00:00.000Z",
"duration_minutes": 60,
"status": "confirmed",
"total_price_cents": 65000,
"notes": "Booket via partner-integration",
"created_at": "2026-10-11T10:30:00.000Z",
"updated_at": "2026-10-11T10:30:00.000Z"
}
}/v1/bookingsCreate a booking. The customer receives the same confirmation as for bookings created in Allio. Returns 201 with the booking.
Parameters
| Name | Type | Description |
|---|---|---|
| customer_id* | string | Existing customer (create one with POST /v1/customers). Same identity rules as booking in the calendar. |
| service_ids* | string[] | One or more service IDs, in order (max 20) |
| start_time* | datetime | Start time with timezone offset |
| employee_id | string | Employee to book. Omit for a clinic-wide booking (same as in the calendar). |
| notes | string | Internal notes (max 5000 characters) |
| allow_outside_opening_hours | boolean | Allow booking outside opening hours, like staff can in the calendar (default: false) |
| sms_consent | boolean | SMS about this booking: confirmation, reminders and reschedule notice (needs a phone number on the customer). Separate from the customer's marketing permission sms_opt_in; neither changes the other. Default: true, unless the customer has replied STOP |
Request
curl -X POST "https://api.allio.dk/v1/bookings" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "3b9d6c0a-1e2f-4a5b-8c7d-9e0f1a2b3c4d",
"service_ids": ["a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"],
"start_time": "2026-10-15T10:00:00+02:00",
"employee_id": "c2e4f6a8-0b1d-4f3e-8a5c-7e9f1b3d5a7c",
"notes": "Booket via partner-integration",
"sms_consent": true
}'Response
{
"success": true,
"data": {
"id": "8f0c2a1e-5b7d-4c3e-9a41-2d6f0b9e1c11",
"customer_id": "3b9d6c0a-1e2f-4a5b-8c7d-9e0f1a2b3c4d",
"customer_name": "Mette Hansen",
"customer_email": "mette@example.com",
"customer_phone": "+4512345678",
"employee_id": "c2e4f6a8-0b1d-4f3e-8a5c-7e9f1b3d5a7c",
"service_ids": ["a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"],
"start_time": "2026-10-15T08:00:00.000Z",
"end_time": "2026-10-15T09:00:00.000Z",
"duration_minutes": 60,
"status": "confirmed",
"total_price_cents": 65000,
"notes": "Booket via partner-integration",
"created_at": "2026-10-11T10:30:00.000Z",
"updated_at": "2026-10-11T10:30:00.000Z"
}
}
// 409 when the slot was taken in the meantime
{
"success": false,
"error": {
"code": "BOOKING_CONFLICT",
"message": "Tidspunktet er ikke længere ledigt",
"details": { "reason": "employee_not_available" }
}
}/v1/bookings/:idUpdate a booking. Send only the fields you want to change. Changing start_time or employee_id reschedules the booking with the same availability checks as the calendar (rescheduling sets the status to confirmed; a cancelled booking must be reactivated with status first). Changes are applied in the order: time/employee, customer, notes, status. If a later step fails, error.details.applied lists the changes that were already saved.
Parameters
| Name | Type | Description |
|---|---|---|
| start_time | datetime | New start time (end time follows the booking duration) |
| employee_id | string | Move the booking to another employee |
| status | string | confirmed, completed, no_show or cancelled |
| customer_id | string | Attach the booking to another customer of your organization |
| notes | string | null | Replace internal notes (null clears them) |
| notify_customer | boolean | Send the reschedule SMS/email to the customer (default: false) |
| allow_double_booking | boolean | Allow the new time or employee to overlap another booking (default: false) |
Request
curl -X PATCH "https://api.allio.dk/v1/bookings/8f0c2a1e-5b7d-4c3e-9a41-2d6f0b9e1c11" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{ "start_time": "2026-10-15T13:00:00+02:00", "notify_customer": true }'Response
{
"success": true,
"data": {
"id": "8f0c2a1e-5b7d-4c3e-9a41-2d6f0b9e1c11",
"start_time": "2026-10-15T11:00:00.000Z",
"end_time": "2026-10-15T12:00:00.000Z",
"status": "confirmed",
...
}
}/v1/bookings/:idCancel a booking. Like “Aflys” in the Allio calendar, the booking is kept with status cancelled so history, statistics and automations remain intact. Calling DELETE on an already cancelled booking is a no-op and returns the booking.
Request
curl -X DELETE "https://api.allio.dk/v1/bookings/8f0c2a1e-5b7d-4c3e-9a41-2d6f0b9e1c11" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"Response
{
"success": true,
"data": {
"id": "8f0c2a1e-5b7d-4c3e-9a41-2d6f0b9e1c11",
"status": "cancelled",
...
}
}Statistics
/v1/statsGet dashboard statistics including order counts and revenue.
Request
curl -X GET "https://api.allio.dk/v1/stats" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"Response
{
"success": true,
"data": {
"orders_today": 5,
"revenue_today": 245000,
"orders_this_month": 42,
"revenue_this_month": 1850000,
"pending_orders": 3,
"total_customers": 156
}
}Webhooks
Subscribe to real-time events using webhooks. You can register webhooks via the API or in your settings.
Available Events
| Event | Description |
|---|---|
| order.created | New order created |
| order.paid | Order payment received |
| order.cancelled | Order cancelled |
| customer.created | New customer created |
| payment_link.clicked | Payment link viewed |
| message.received | New message received in inbox |
| message.sent | Message sent from inbox |
| review.received | New Google review received |
| review.replied | Review reply sent |
| booking.created | A booking was created (Allio calendar, online booking, the API or Allio's assistant) |
| booking.updated | Time, employee, services, customer, status, price or notes of a booking changed |
| booking.deleted | A booking was cancelled or deleted |
Event format
Every delivery is an HTTPS POST with a JSON body and these headers: X-Allio-Event, X-Allio-Event-Id, X-Allio-Timestamp, X-Allio-Signature, X-Allio-Webhook-Id, X-Allio-Delivery-Attempt.
{
"id": "evt_5d0f3c9a-8b1e-4a7c-9f2d-6e4b1a0c3d57",
"type": "booking.updated",
"created_at": "2026-10-11T10:30:00.000Z",
"data": { ... },
"previous_attributes": { ... }
}Booking payloads
data is the booking in the same format as GET /v1/bookings/:id. Booking events are generated centrally in Allio, so they fire no matter where the change was made. An update that does not change any of the booking fields (e.g. a reminder being sent) does not produce an event.
booking.updatedincludesprevious_attributeswith the old values of the changed fields only.booking.deletedincludesdata.deletion_type:cancelled(status changed to cancelled — the booking still exists) ordeleted(permanently removed). A cancelled booking that is later removed does not produce a second event.- Reactivating a cancelled booking produces
booking.updated.
{
"id": "evt_5d0f3c9a-8b1e-4a7c-9f2d-6e4b1a0c3d57",
"type": "booking.updated",
"created_at": "2026-10-11T10:30:00.000Z",
"data": {
"id": "8f0c2a1e-5b7d-4c3e-9a41-2d6f0b9e1c11",
"customer_id": "3b9d6c0a-1e2f-4a5b-8c7d-9e0f1a2b3c4d",
"customer_name": "Mette Hansen",
"customer_email": "mette@example.com",
"customer_phone": "+4512345678",
"employee_id": "c2e4f6a8-0b1d-4f3e-8a5c-7e9f1b3d5a7c",
"service_ids": ["a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"],
"start_time": "2026-10-15T08:00:00.000Z",
"end_time": "2026-10-15T09:00:00.000Z",
"duration_minutes": 60,
"status": "confirmed",
"total_price_cents": 65000,
"notes": "Booket via partner-integration",
"created_at": "2026-10-11T10:30:00.000Z",
"updated_at": "2026-10-11T10:30:00.000Z"
},
"previous_attributes": {
"start_time": "2026-10-15T07:00:00.000Z",
"end_time": "2026-10-15T08:00:00.000Z"
}
}Verifying signatures
Each request is signed with HMAC-SHA256. The signed message is {X-Allio-Timestamp}.{raw request body} and the key is the SHA-256 hex digest of your webhook secret (the whsec_… value shown once when the webhook was created). Always use the raw body bytes — not a re-serialized JSON object — compare in constant time, and reject timestamps older than 5 minutes.
// Node.js / Express
const crypto = require('crypto');
app.post('/allio-webhooks', express.raw({ type: 'application/json' }), (req, res) => {
const timestamp = req.get('X-Allio-Timestamp');
const signature = req.get('X-Allio-Signature') || '';
if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return res.sendStatus(400);
const key = crypto.createHash('sha256').update(process.env.ALLIO_WEBHOOK_SECRET).digest('hex');
const expected = 'sha256=' + crypto.createHmac('sha256', key)
.update(`${timestamp}.${req.body.toString('utf8')}`)
.digest('hex');
const valid = signature.length === expected.length &&
crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected));
if (!valid) return res.sendStatus(401);
const event = JSON.parse(req.body.toString('utf8'));
// Deduplicate on event.id before processing
res.sendStatus(200);
});# Python
import hashlib, hmac, time
def verify_allio_webhook(raw_body: bytes, timestamp: str, signature: str, secret: str) -> bool:
if abs(time.time() - int(timestamp)) > 300:
return False
key = hashlib.sha256(secret.encode()).hexdigest().encode()
expected = "sha256=" + hmac.new(key, f"{timestamp}.".encode() + raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, signature)Retries & idempotency
- Respond with any
2xxstatus within 10 seconds. Redirects are not followed. - Booking events are delivered asynchronously (normally within a minute) and retried with exponential backoff after 30 s, 2 min, 10 min, 30 min, 1 h, 3 h, 6 h and 12 h (9 attempts, about 22 hours).
- A retry has the same
id/X-Allio-Event-Idand an identical body. Store processed event ids and ignore duplicates. Events may arrive out of order — usecreated_atanddata.updated_atto discard stale updates. - After 3 events in a row have exhausted all retries, the webhook is deactivated. Re-enable it with
PATCH /v1/webhooks/:idand{"is_active": true}.
Managing subscriptions
Webhooks can be managed in Settings or via the API (max 5 per account, HTTPS only). The secret is only returned once, when the webhook is created. Subscribing to booking.* events requires the same access as the Bookings API.
# Create
curl -X POST "https://api.allio.dk/v1/webhooks" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com/allio-webhooks", "events": ["booking.created", "booking.updated", "booking.deleted"] }'
# Response (201)
{ "success": true, "data": { "id": "wh_…", "url": "https://example.com/allio-webhooks",
"events": ["booking.created", "booking.updated", "booking.deleted"],
"secret": "whsec_…", "is_active": true, "created_at": "2026-10-11T10:30:00Z" } }
# List / get (incl. the 20 most recent deliveries)
curl "https://api.allio.dk/v1/webhooks" -H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"
curl "https://api.allio.dk/v1/webhooks/WEBHOOK_ID" -H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"
# Change events or deactivate
curl -X PATCH "https://api.allio.dk/v1/webhooks/WEBHOOK_ID" \
-H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{ "events": ["booking.created"], "is_active": false }'
# Send a signed test event
curl -X POST "https://api.allio.dk/v1/webhooks/WEBHOOK_ID/test" -H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"
# Delete
curl -X DELETE "https://api.allio.dk/v1/webhooks/WEBHOOK_ID" -H "Authorization: Bearer allio_sk_xxxxxxxxxxxxx"Error Handling
When an error occurs, the API returns a JSON response with success: false and an error object containing details:
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request body"
}
}Booking errors include error.details.reason with the precise cause (e.g. employee_not_available, resource_not_available, service_not_found, employee_cannot_perform_service, customer_identity_required), and validation errors include error.details.field.
Error Codes
| Code | Description |
|---|---|
| VALIDATION_ERROR | Request body validation failed |
| NOT_FOUND | Requested resource does not exist |
| UNAUTHORIZED | Missing or invalid API key |
| STRIPE_NOT_CONNECTED | Stripe Connect not configured |
| GOOGLE_NOT_CONNECTED | Google Business not connected |
| RATE_LIMIT_EXCEEDED | Too many requests |
| FORBIDDEN | The API key's user may not access this resource for the organization (HTTP 403) |
| NATIVE_BOOKING_DISABLED | Allio Booking is not enabled or set up for the organization (HTTP 403) |
| BOOKING_CONFLICT | The time is taken, blocked, or a required employee/resource is busy (HTTP 409) |
| BOOKING_CANCELLED | The booking is cancelled and cannot be rescheduled (HTTP 409) |
| INVALID_BOOKING_TIME | Outside opening hours or an invalid booking time (HTTP 422) |
| BOOKING_ERROR | The booking operation failed unexpectedly (HTTP 500); see details.reason |
| METHOD_NOT_ALLOWED | HTTP method not supported for this endpoint (HTTP 405) |
| DUPLICATE_EMAIL | An active customer in the organization already has this email — details.existing_customer_id holds its id (HTTP 409) |
| DUPLICATE_PHONE | An active customer in the organization already has this phone number — details.existing_customer_id holds its id (HTTP 409) |
| INTERNAL_ERROR | Unexpected server error |
Integration Use Cases
🗓️ Booking Systems
Sync bookings both ways with /v1/bookings and the booking.* webhooks. When a booking is confirmed, create an order with generate_payment_link: true to automatically generate a payment link and send it to your customer.
📊 CRM Integration
Sync customers, conversations, and order history between Allio and your CRM. Use webhooks to get real-time notifications when orders are paid or messages are received.
💬 Helpdesk Integration
Import inbox messages into your helpdesk or ticket system using the /v1/inbox endpoints.
⭐ Review Management
Build custom dashboards or automate responses using the /v1/reviews endpoints.
📱 POS Systems
Use the /v1/orders/:id/qr endpoint to generate QR codes for in-store payments.
⚡ Automation
Build custom workflows using webhooks. Trigger actions in your systems when orders are created, payments received, or messages arrive.
Support
Need help with the API? Contact us at support@allio.dk or visit the Settings page to manage your API keys.