AQRAllergenQR

Developer documentation · v1.0.0

AllergenQR API

UK statutory allergen registers, QR menus and PPDS (Natasha's Law) validation.

UK statutory allergen registers, QR menus and PPDS (Natasha's Law) validation. The AllergenQR API is a HTTP/JSON API with predictable resource URLs, Bearer or API-key authentication and published rate limits on every response. All monetary values are in pence; all times are UTC.

Base URL & versioning

All endpoints are relative to https://allergenqr.co.uk. The API version is in the path (/api/v1/) so breaking changes are introduced under a new prefix.

Authentication

FREE endpoints may be called anonymously. Paid endpoints require either Authorization: Bearer <token> or X-API-Key: <key>. Keys are scoped to a plan and carry their own quota; never expose them in client-side code.

API keys & Bearer tokens

Create and revoke keys in your account dashboard. A rotated key takes effect immediately. Sending both headers is supported; the Bearer token takes precedence.

Plans & quotas

TierRate limitMonthly quotaIncludes
FREE20 requests/minute100 requests/monthAllergen register and public menus
PRO300 requests/minute25,000 requests/monthMenu item CRUD and PPDS validation
SCALE1500 requests/minute150,000 requests/monthMulti-venue audit logs (GROUP plan)

Rate-limit headers

Every 200 response includes X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Quota-Monthly-Limit and X-Quota-Monthly-Remaining. On 429, read Retry-After (seconds) before retrying.

Errors & status codes

Errors use RFC 9457 application/problem+json: type, title, status, detail and optionally instance.

StatusMeaning
400Invalid parameters or body
401Missing or invalid credentials
403Plan Upgrade Required
429Rate limit exceeded — see Retry-After

Plan Upgrade Required

A 403 response includes an upgrade_url and required_plan so tools can direct the user to the correct tier.

Webhooks

Menu and allergen-change events are delivered as HTTPS POST requests with an X-Webhook-Signature header. GROUP plans may subscribe to venue audit events.

GET/api/v1/allergens/uk-statutory
FREE

List UK statutory allergens

Returns all 14 UK statutory allergens plus cereal sub-types, tree-nut sub-types and icon slugs for label rendering.

curl -X GET 'https://allergenqr.co.uk/api/v1/allergens/uk-statutory'

Sample 200 response

{
  "count": 14,
  "allergens": [
    {
      "slug": "gluten",
      "name": "Gluten",
      "statutory": true,
      "icon_slug": "gluten-wheat",
      "sub_types": [
        "wheat",
        "barley",
        "rye",
        "oats",
        "spelt"
      ],
      "bold_markup_required": true
    },
    {
      "slug": "milk",
      "name": "Milk",
      "statutory": true,
      "icon_slug": "milk",
      "sub_types": [],
      "bold_markup_required": true
    }
  ]
}

Sample 401 response

{
  "type": "https://httpstatuses.com/401",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Provide a valid Bearer token or X-API-Key header.",
  "instance": "/api/v1/"
}

Sample 403 response — Plan Upgrade Required

{
  "type": "https://httpstatuses.com/403",
  "title": "Plan Upgrade Required",
  "status": 403,
  "detail": "This operation requires a higher plan tier.",
  "instance": "/api/v1/",
  "upgrade_url": "https://allergenqr.co.uk/pricing",
  "required_plan": "PRO"
}

Sample 429 response — problem+json

{
  "type": "https://httpstatuses.com/429",
  "title": "Too Many Requests",
  "status": 429,
  "detail": "Rate limit exceeded for the current window.",
  "instance": "/api/v1/",
  "retry_after_seconds": 30
}

Try It Live

FREE endpoint — call it directly, no key needed.

GET/api/v1/menus/public/{slug}
FREE

Get a public menu

Returns a published allergen menu by its public slug. No authentication is required.

Path & query parameters

NameInTypeDescriptionConstraints
slugpathstringPublic menu slug.required, minLength: 1
curl -X GET 'https://allergenqr.co.uk/api/v1/menus/public/summer-menu'

Sample 200 response

{
  "menu": {
    "slug": "summer-menu",
    "venueId": "venue_9Kp2",
    "name": "Summer Menu",
    "updated_at": "2026-06-01T10:00:00Z"
  },
  "items": [
    {
      "id": "item_3Fq",
      "name": "Ploughman's Sandwich",
      "allergens": [
        "gluten",
        "milk"
      ],
      "ppds": true
    }
  ]
}

Sample 401 response

{
  "type": "https://httpstatuses.com/401",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Provide a valid Bearer token or X-API-Key header.",
  "instance": "/api/v1/"
}

Sample 403 response — Plan Upgrade Required

{
  "type": "https://httpstatuses.com/403",
  "title": "Plan Upgrade Required",
  "status": 403,
  "detail": "This operation requires a higher plan tier.",
  "instance": "/api/v1/",
  "upgrade_url": "https://allergenqr.co.uk/pricing",
  "required_plan": "PRO"
}

Sample 429 response — problem+json

{
  "type": "https://httpstatuses.com/429",
  "title": "Too Many Requests",
  "status": 429,
  "detail": "Rate limit exceeded for the current window.",
  "instance": "/api/v1/",
  "retry_after_seconds": 30
}

Try It Live

FREE endpoint — call it directly, no key needed.

GET/api/v1/menus/{menuId}/items
PRO

List menu items

Lists all items on a menu, including their allergen tags and PPDS flags. Requires the PRO plan.

Path & query parameters

NameInTypeDescriptionConstraints
menuIdpathstringMenu identifier.required
curl -X GET 'https://allergenqr.co.uk/api/v1/menus/menu_2Ld8/items' \
-H 'Authorization: Bearer $API_TOKEN'

Sample 200 response

{
  "items": [
    {
      "id": "item_3Fq",
      "name": "Ploughman's Sandwich",
      "allergens": [
        "gluten",
        "milk"
      ],
      "ppds": true
    }
  ]
}

Sample 401 response

{
  "type": "https://httpstatuses.com/401",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Provide a valid Bearer token or X-API-Key header.",
  "instance": "/api/v1/"
}

Sample 403 response — Plan Upgrade Required

{
  "type": "https://httpstatuses.com/403",
  "title": "Plan Upgrade Required",
  "status": 403,
  "detail": "This operation requires a higher plan tier.",
  "instance": "/api/v1/",
  "upgrade_url": "https://allergenqr.co.uk/pricing",
  "required_plan": "PRO"
}

Sample 429 response — problem+json

{
  "type": "https://httpstatuses.com/429",
  "title": "Too Many Requests",
  "status": 429,
  "detail": "Rate limit exceeded for the current window.",
  "instance": "/api/v1/",
  "retry_after_seconds": 30
}

Try It Live

Paid endpoint — paste a Bearer key below. It is used only in this browser session.

POST/api/v1/menus/{menuId}/items
PRO

Create a menu item

Adds an item to a menu with its allergen tags. Requires the PRO plan.

Path & query parameters

NameInTypeDescriptionConstraints
menuIdpathstringMenu identifier.required

Request body

FieldTypeDefaultDescriptionConstraints
namestring—required, minLength: 1, maxLength: 120
allergensarray<string>[]—
ppdsbooleanFalse—
curl -X POST 'https://allergenqr.co.uk/api/v1/menus/menu_2Ld8/items' \
-H 'Authorization: Bearer $API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"name": "Ploughman's Sandwich", "allergens": ["gluten", "milk"], "ppds": true}'

Sample 200 response

{
  "id": "item_3Fq",
  "name": "Ploughman's Sandwich",
  "allergens": [
    "gluten",
    "milk"
  ],
  "ppds": true
}

Sample 401 response

{
  "type": "https://httpstatuses.com/401",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Provide a valid Bearer token or X-API-Key header.",
  "instance": "/api/v1/"
}

Sample 403 response — Plan Upgrade Required

{
  "type": "https://httpstatuses.com/403",
  "title": "Plan Upgrade Required",
  "status": 403,
  "detail": "This operation requires a higher plan tier.",
  "instance": "/api/v1/",
  "upgrade_url": "https://allergenqr.co.uk/pricing",
  "required_plan": "PRO"
}

Sample 429 response — problem+json

{
  "type": "https://httpstatuses.com/429",
  "title": "Too Many Requests",
  "status": 429,
  "detail": "Rate limit exceeded for the current window.",
  "instance": "/api/v1/",
  "retry_after_seconds": 30
}

Try It Live

Paid endpoint — paste a Bearer key below. It is used only in this browser session.

PATCH/api/v1/menus/{menuId}/items
PRO

Update a menu item

Partially updates an item's name, allergen tags or PPDS flag. Requires the PRO plan.

Path & query parameters

NameInTypeDescriptionConstraints
menuIdpathstringMenu identifier.required
itemIdquerystringItem identifier.required

Request body

FieldTypeDefaultDescriptionConstraints
namestring—minLength: 1, maxLength: 120
allergensarray<string>——
ppdsboolean——
curl -X PATCH 'https://allergenqr.co.uk/api/v1/menus/menu_2Ld8/items' \
-H 'Authorization: Bearer $API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"allergens": ["gluten", "milk", "nuts"]}'

Sample 200 response

{
  "id": "item_3Fq",
  "name": "Ploughman's Sandwich",
  "allergens": [
    "gluten",
    "milk",
    "nuts"
  ],
  "ppds": true
}

Sample 401 response

{
  "type": "https://httpstatuses.com/401",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Provide a valid Bearer token or X-API-Key header.",
  "instance": "/api/v1/"
}

Sample 403 response — Plan Upgrade Required

{
  "type": "https://httpstatuses.com/403",
  "title": "Plan Upgrade Required",
  "status": 403,
  "detail": "This operation requires a higher plan tier.",
  "instance": "/api/v1/",
  "upgrade_url": "https://allergenqr.co.uk/pricing",
  "required_plan": "PRO"
}

Sample 429 response — problem+json

{
  "type": "https://httpstatuses.com/429",
  "title": "Too Many Requests",
  "status": 429,
  "detail": "Rate limit exceeded for the current window.",
  "instance": "/api/v1/",
  "retry_after_seconds": 30
}

Try It Live

Paid endpoint — paste a Bearer key below. It is used only in this browser session.

DELETE/api/v1/menus/{menuId}/items
PRO

Delete a menu item

Permanently removes an item from a menu. Requires the PRO plan.

Path & query parameters

NameInTypeDescriptionConstraints
menuIdpathstringMenu identifier.required
itemIdquerystringItem identifier.required
curl -X DELETE 'https://allergenqr.co.uk/api/v1/menus/menu_2Ld8/items' \
-H 'Authorization: Bearer $API_TOKEN'

Sample 200 response

{
  "deleted": true
}

Sample 401 response

{
  "type": "https://httpstatuses.com/401",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Provide a valid Bearer token or X-API-Key header.",
  "instance": "/api/v1/"
}

Sample 403 response — Plan Upgrade Required

{
  "type": "https://httpstatuses.com/403",
  "title": "Plan Upgrade Required",
  "status": 403,
  "detail": "This operation requires a higher plan tier.",
  "instance": "/api/v1/",
  "upgrade_url": "https://allergenqr.co.uk/pricing",
  "required_plan": "PRO"
}

Sample 429 response — problem+json

{
  "type": "https://httpstatuses.com/429",
  "title": "Too Many Requests",
  "status": 429,
  "detail": "Rate limit exceeded for the current window.",
  "instance": "/api/v1/",
  "retry_after_seconds": 30
}

Try It Live

Paid endpoint — paste a Bearer key below. It is used only in this browser session.

POST/api/v1/validate/ppds
PRO

Validate PPDS allergen markup

Checks Natasha's Law PPDS labelling: statutory allergens must appear in bold on the label. Requires the PRO plan (GROUP for multi-venue).

Request body

FieldTypeDefaultDescriptionConstraints
label_markupstring—required, minLength: 1
allergensarray<string>—required, minItems: 1
curl -X POST 'https://allergenqr.co.uk/api/v1/validate/ppds' \
-H 'Authorization: Bearer $API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"label_markup": "Contains <strong>milk</strong> and <strong>gluten</strong>.", "allergens": ["milk", "gluten"]}'

Sample 200 response

{
  "valid": true,
  "missing_bold": [],
  "group_id": "group_4Tp"
}

Sample 401 response

{
  "type": "https://httpstatuses.com/401",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Provide a valid Bearer token or X-API-Key header.",
  "instance": "/api/v1/"
}

Sample 403 response — Plan Upgrade Required

{
  "type": "https://httpstatuses.com/403",
  "title": "Plan Upgrade Required",
  "status": 403,
  "detail": "This operation requires a higher plan tier.",
  "instance": "/api/v1/",
  "upgrade_url": "https://allergenqr.co.uk/pricing",
  "required_plan": "PRO"
}

Sample 429 response — problem+json

{
  "type": "https://httpstatuses.com/429",
  "title": "Too Many Requests",
  "status": 429,
  "detail": "Rate limit exceeded for the current window.",
  "instance": "/api/v1/",
  "retry_after_seconds": 30
}

Try It Live

Paid endpoint — paste a Bearer key below. It is used only in this browser session.

GET/api/v1/venues/{venueId}/audit-log
SCALE

Get a venue audit log

Returns the allergen-change audit trail for a venue across a group. Requires the GROUP plan.

Path & query parameters

NameInTypeDescriptionConstraints
venueIdpathstringVenue identifier.required
pagequeryintegerPage number.optional, minimum: 1, default: 1
curl -X GET 'https://allergenqr.co.uk/api/v1/venues/venue_9Kp2/audit-log' \
-H 'Authorization: Bearer $API_TOKEN'

Sample 200 response

{
  "events": [
    {
      "at": "2026-06-01T10:00:00Z",
      "actor": "user_1Qw",
      "change": "allergen_added:nuts"
    }
  ],
  "page": 1
}

Sample 401 response

{
  "type": "https://httpstatuses.com/401",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Provide a valid Bearer token or X-API-Key header.",
  "instance": "/api/v1/"
}

Sample 403 response — Plan Upgrade Required

{
  "type": "https://httpstatuses.com/403",
  "title": "Plan Upgrade Required",
  "status": 403,
  "detail": "This operation requires a higher plan tier.",
  "instance": "/api/v1/",
  "upgrade_url": "https://allergenqr.co.uk/pricing",
  "required_plan": "PRO"
}

Sample 429 response — problem+json

{
  "type": "https://httpstatuses.com/429",
  "title": "Too Many Requests",
  "status": 429,
  "detail": "Rate limit exceeded for the current window.",
  "instance": "/api/v1/",
  "retry_after_seconds": 30
}

Try It Live

Paid endpoint — paste a Bearer key below. It is used only in this browser session.

Advertisement