Zum Hauptinhalt springen
The anny API follows the JSON-API v1.1 specification. This guide covers the conventions you need to know when making requests.

Content Type

Write operations use the JSON-API media type:
Standard application/json is not accepted for POST and PATCH operations. For GET requests, the API also accepts:
Some read-oriented and UI-oriented endpoints return normalized application/json payloads instead of JSON-API resources. Webhook deliveries are always sent as application/json.

Resource Objects

Every API response wraps data in a JSON-API resource object:
Collection responses return "data": [...] as an array.

Common Headers

Tenant Context

Admin API requests require an organization context. Pass it as a query parameter:
The backend resolves the active organization from:
  1. The tenant claim in the JWT (if present), or
  2. The o query parameter
For explicit control, always include ?o={organization_id}.

Master organizations

When the active organization is a master organization, admin list routes (bookings, customers, orders, invoices, resources, services, timeslots, add-ons, vouchers, businesses, communities, display panels, resource maps and others) cover the master and every organization it manages. Single-record routes stay on the active organization. Customers of the same person in different organizations of the group can be linked. master_customer_id on a customer points to the linked record. filter[exclude_linked]=true (or the plain query flag exclude_linked=1) leaves linked records out, so a group-wide customer list shows each person once. A master admin links or unlinks records with POST /api/v1/customers/{customer_id}/master-customer ({"master_customer_id": 123} or null). GET /api/v1/customers/{customer_id}/master-customer-candidates?search= lists up to 20 unlinked customers of the group’s other organizations.
Use the include parameter to sideload related resources in a single request, avoiding N+1 round-trips:
Nested relationships use dot notation. The response adds an included array:
Included entries are full resource objects of that type — the same attributes and stored resource meta you would get from fetching the resource as primary data. For example, community meta.members_count is the stored active_community_accounts_count on both GET /communities and ?include=communities. Resource-group meta.resources_count is likewise present on the index and on included groups (for example a community’s resource_groups relationship).
Each resource type defines its own set of allowed include paths. Requesting an unsupported path returns a 400 error.

Sparse Fieldsets

Request only the attributes you need to reduce payload size:
This returns only the listed attributes for each resource type.

Filtering

Filter collections using the filter query parameter.

Simple Filters

Multiple Values

Repeat the filter key with [] to pass multiple values as an OR condition:

Date Range Filters

Range filters accept nested from and to keys, a static YYYY-MM-DD:YYYY-MM-DD range (both ends inclusive), or a dynamic keyword such as today, this_week, this_quarter, last_3_months, next_7_days, or next_30_days.
next_7_days is today through six days later (seven calendar days in the organization timezone). next_30_days is today through 29 days later. this_quarter and last_quarter are calendar quarters in the organization timezone. last_3_months is the three full calendar months before the current month. See Get a list of bookings for the full keyword list. Admin bookings also accept filter[created_at_range] with the same keyword and YYYY-MM-DD:YYYY-MM-DD shape. That filter matches when the booking row was created, not the appointment start.

Boolean Filters

Some collections accept boolean flags. Send true to apply the restriction. false is a no-op.
filter[booked_today] keeps resources with an accepted or requested booking overlapping today. filter[active_today] keeps resources with a non-canceled timeslot overlapping today or a weekly schedule for today’s weekday. “Today” uses the active organization’s timezone. These filters are excluded from MCP tool schemas. See Admin Resources. Admin orders also accept filter[created_at_range] (same date-range shape as above, including presets such as today), filter[created_by] (creator IDs), and filter[created_by_type] (users or customers). Include created_by to sideload the staff user or customer who created the order. Creators are stamped on new admin and shop orders; a backfill covers roughly the last 90 days.
Full-text search across indexed fields:
Admin order search indexes any order whose expires_at is null, including unfinished admin drafts. Checkout carts set an expiry and stay out of the index. Admin community-invite search is a case-insensitive substring match on the invite email. It is not a Typesense full-text index.

Custom Field Filters

Filter by custom field values using the field’s UUID:
Each custom field filter entry requires:
Available filters vary per resource. Requesting an unsupported filter returns a 400 error.

Sorting

Sort results with the sort parameter. Prefix with - for descending:
Multiple sort fields are comma-separated:
Each resource type defines its allowed sort parameters. The default sort varies per resource.

Pagination

The API uses offset-based pagination:

Response Metadata

Paginated responses include navigation links:

Creating and Updating Resources


Error Responses

Errors follow the JSON-API error format:

Common Status Codes

Plan-gated features

Creating or switching on something the organization’s anny plan does not cover is refused with an error whose code names the reason and whose meta says what is missing: meta also carries feature (the feature slug) and contact_sales. Records of a feature a downgrade took away keep working but cannot be created, changed or deleted until the plan includes the feature again. A booking kept by a subscription’s resource assignment or a calendar integration (is_read_only: true) refuses every write with 403 and code booking_read_only.

Combining Parameters

All query parameters can be combined in a single request: