> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anny.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Admin Resources

List resources with occupancy and opening-hours filters, read bookable vs view-only counts, and bulk-create child resources.

For general request conventions, see [JSON:API Conventions](/developers/guides/json-api-conventions). For timeslots on a resource, see [Admin Timeslot Management](/developers/guides/admin/timeslot-management).

***

## Prerequisites

* A valid Bearer token with admin access — see [Authentication](/developers/guides/authentication)
* Organization context (`?o={organization_id}`)

***

## List resources

```http theme={null}
GET /api/v1/resources?o={org_id}
```

The same `filter` keys work on the public related list `GET /api/v1/organizations/{organization_slug}/resources`.

### Occupancy and opening hours ("today")

`today` is the current calendar day in the **active organization's timezone** (UTC if there is no organization context). Passing `false` is a no-op: the filter is not applied.

| Filter                 | Effect when `true`                                                                                                                                                                             |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `filter[booked_today]` | Only resources that have at least one **accepted** or **requested** booking whose period overlaps today. Canceled bookings are ignored.                                                        |
| `filter[active_today]` | Only resources that have a non-canceled timeslot overlapping today, **or** a weekly schedule for today's weekday in a schedule group that is active today (`available_from` / `available_to`). |

```http theme={null}
GET /api/v1/resources?o={org_id}&filter[booked_today]=true
GET /api/v1/resources?o={org_id}&filter[active_today]=true
GET /api/v1/organizations/{organization_slug}/resources?filter[booked_today]=true&filter[active_today]=true
```

You can combine both filters. A resource must then be booked today **and** have opening hours or a timeslot today.

<Note>
  These filters restrict the resource collection. They do not return the bookings or timeslots themselves. Use [Booking Calendars](/developers/guides/admin/calendar-events) or [Availability & Booking Search](/developers/guides/availability) for slot-level data. They are valid on HTTP resource index requests but are excluded from MCP tool schemas.
</Note>

***

## Bookable vs view-only counts

The admin resource overview uses a dedicated JSON endpoint (not a JSON:API resource):

```http theme={null}
GET /api/v1/resources/status-counts?o={org_id}
```

Response fields:

| Field                            | Meaning                                                              |
| -------------------------------- | -------------------------------------------------------------------- |
| `bookable_resource_count`        | Top-level resources with no children and bookings enabled            |
| `bookable_child_resource_count`  | Children of bookable parents that themselves have bookings enabled   |
| `view_only_resource_count`       | Top-level resources with no children and bookings disabled           |
| `view_only_child_resource_count` | Children of view-only parents that themselves have bookings disabled |
| `total_resource_count`           | Bookable + view-only top-level resources                             |
| `total_child_resource_count`     | Bookable + view-only children                                        |
| `min_resource_count`             | Organization minimum resource usage                                  |
| `min_child_resource_count`       | Organization minimum child-resource usage                            |

The same `filter` query object as `GET /api/v1/resources` is applied to the base query before the counts are split. This is distinct from `GET /api/v1/resources/counts`, which returns a view-uuid map for admin list tabs.

***

## Create child resources

```http theme={null}
POST /api/v1/resources/{resource_id}/children?o={org_id}

{
  "child_resources": [
    { "name": "Desk 1" },
    { "name": "Desk 2" }
  ]
}
```

| Field             | Type  | Required | Description                                 |
| ----------------- | ----- | -------- | ------------------------------------------- |
| `child_resources` | array | Yes      | At least one child. Each item needs `name`. |

A successful response is HTTP `200` with a JSON:API **collection** of the resources that were just created (`type: resources`). Use those records for follow-up assignment (maps, services, properties) instead of re-listing the parent.

The parent is marked as having children. If the organization cannot exceed its child-resource quota, the request fails with HTTP `400` and `sales_quota_exceeded`.

***

## Common errors

| Error                          | Cause                                                         | Solution                                                                           |
| ------------------------------ | ------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `400` — `sales_quota_exceeded` | Creating the children would exceed `min_child_resource_usage` | Remove children from the payload, or raise the organization's child-resource quota |
| `403`                          | Missing create permission on resources                        | Use a role that can create resources                                               |
| `422`                          | `child_resources` missing or a child has no `name`            | Send a non-empty array of objects with `name`                                      |
