Skip to content

Inventory Resource Search API

Inventory Resource Search API can be used to search resources and groups owned by your company in the Mediani platform.

For searching reservations, see Inventory Reservation Search API.

Search example
Map view example
Count only example
Statistics only example

Endpoint supports POST for search and GET for listing supported filter fields.

Inventory resource search request

POST /api/inventory-resource-search/

Search filters are sent as JSON payload.

Attribute Type Description
page Number Page number starting from 1. Defaults to 1.
items_per_page Number Number of results per page. Defaults to 12.
order String Sorting field. Defaults to -name.
search_query String Full text search query.
show_resources Boolean Include resources (type = 1).
show_groups Boolean Include groups (type = 2).
show_active Boolean Include resources with status active.
show_deactivated Boolean Include resources with status deactivated.
show_planned Boolean Include resources with status planned.
capacity Number Capacity value used in capacity and availability checks.
capacity_search_type String Capacity filter mode. Supported values: all, atleast.
start_date Date Start date for free-capacity filtering.
end_date Date End date for free-capacity filtering.
start_hour Number Hour filter for hourly reservable resources (0-23).
end_hour Number Hour filter for hourly reservable resources (1-24).
saturation String or Number Saturation multiplier used in capacity filtering, for example 0.5, 1.0, 2.0.
map_view Boolean If true, returns map points instead of resource objects.
map_point_name String Filters resources or groups by map point name.
exact_match Boolean If true, matches search_query exactly against resource name.
get_only_count Boolean If true, response contains only count.
return_only_statistics Boolean If true, response contains only aggregate statistics.
search_by_capacity Boolean Accepted by API.
search_by_percent Boolean Accepted by API.
tags Array Accepted by API.
map_point_markers Array Accepted by API.

Resource search response

Default response when neither get_only_count nor return_only_statistics is enabled.

Attribute Type Description
resources Array List of Resource objects. If map_view is true, list of Map point (lightweight) objects.
page Number Current page number.
count Number Total number of matches.
num_pages Number Total number of pages.
items_per_page Number Page size.
next Number/null Next page number, or null.
prev Number/null Previous page number, or null.

Resource

Resource object serialized with InventoryResourceSerializer.

Attribute Type Description
id UUID ID of the resource or group.
type Number Type of resource. Values are:
1 = Resource
2 = Group
status String Resource status. Values include active, deactivated, planned.
company Number Company ID.
last_updated_by Number User ID of last updater.
created_at DateTime Creation timestamp.
modified_at DateTime Last modification timestamp.
name String Resource name.
description String Description text.
capacity Number Current capacity value.
capacity_unit Number Capacity unit, values are:
1 = Seconds
2 = Concurrent
image_file String Image URL/path.
resources Array List of nested resource IDs (for groups).
resources_obj Array List of Nested resource objects.
tags Array List of tag IDs.
tags_list Array List of Tag objects.
get_absolute_url String Absolute URL for resource in Mediani.
map_point_markers Array List of map point IDs.
map_point_marker_objs Array List of Map point objects.
material_profile Number/null Material profile ID.
material_profile_obj Object/null Material profile object. Structure is the same as Material profile.
default_product Number/null Default media product ID.
default_product_obj Object/null Default media product object.
is_hourly_reservable Boolean Is resource reservable by hour.
possible_start_hour_mon Number/null Earliest allowed start hour on Monday.
possible_end_hour_mon Number/null Latest allowed end hour on Monday.
possible_start_hour_tue Number/null Earliest allowed start hour on Tuesday.
possible_end_hour_tue Number/null Latest allowed end hour on Tuesday.
possible_start_hour_wed Number/null Earliest allowed start hour on Wednesday.
possible_end_hour_wed Number/null Latest allowed end hour on Wednesday.
possible_start_hour_thu Number/null Earliest allowed start hour on Thursday.
possible_end_hour_thu Number/null Latest allowed end hour on Thursday.
possible_start_hour_fri Number/null Earliest allowed start hour on Friday.
possible_end_hour_fri Number/null Latest allowed end hour on Friday.
possible_start_hour_sat Number/null Earliest allowed start hour on Saturday.
possible_end_hour_sat Number/null Latest allowed end hour on Saturday.
possible_start_hour_sun Number/null Earliest allowed start hour on Sunday.
possible_end_hour_sun Number/null Latest allowed end hour on Sunday.

Nested resource

Nested object inside resources_obj.

Attribute Type Description
id UUID Resource ID.
type Number Resource type.
company Number Company ID.
last_updated_by Number Last updater user ID.
created_at DateTime Creation timestamp.
modified_at DateTime Last modification timestamp.
name String Name.
description String Description.
capacity Number Capacity.
capacity_unit Number Capacity unit.
image_file String Image URL/path.
resources Array Nested resource IDs.
tags Array Tag IDs.
tags_list Array List of Tag objects.
get_absolute_url String Absolute URL in Mediani.
map_point_markers Array Map point IDs.
map_point_marker_objs Array List of Map point objects.

Tag

Attribute Type Description
id Number Tag ID.
created_at DateTime Creation timestamp.
modified_at DateTime Last modification timestamp.
name String Tag name.
company Number Company ID.
type Number Type marker. Value is 4 for tag.

Map point

Map point object used in map_point_marker_objs.

Attribute Type Description
id Number Map point marker ID.
name String Map point name.
lat Decimal Latitude.
lng Decimal Longitude.
created_at DateTime Creation timestamp.
modified_at DateTime Last modification timestamp.
resources Array List of resources linked to map point.

Map point lightweight

Used in search response when map_view = true.

Attribute Type Description
id Number Map point marker ID.
name String Map point name.
lat Decimal Latitude.
lng Decimal Longitude.

Search example

POST /api/inventory-resource-search/
{
    "page": 1,
    "items_per_page": 12,
    "order": "-name",
    "search_query": "billboard",
    "show_resources": true,
    "show_groups": true,
    "show_active": true,
    "show_deactivated": false,
    "show_planned": true,
    "capacity": 1,
    "capacity_search_type": "atleast",
    "start_date": "2026-06-01",
    "end_date": "2026-06-30",
    "start_hour": 8,
    "end_hour": 20,
    "saturation": "1.0"
}
{
    "resources": [
        {
            "id": "3dbca171-6dcf-4c7b-a8a4-f96067f46f75",
            "type": 1,
            "status": "active",
            "company": 120,
            "last_updated_by": 918,
            "created_at": "2026-05-20T12:00:00.000000Z",
            "modified_at": "2026-05-26T10:30:00.000000Z",
            "name": "Main street billboard",
            "description": "Roadside LED billboard",
            "capacity": 10,
            "capacity_unit": 2,
            "image_file": null,
            "resources": [],
            "resources_obj": [],
            "tags": [
                11,
                27
            ],
            "tags_list": [
                {
                    "id": 11,
                    "created_at": "2026-05-20T12:00:00.000000Z",
                    "modified_at": "2026-05-20T12:00:00.000000Z",
                    "name": "outdoor",
                    "company": 120,
                    "type": 4
                }
            ],
            "get_absolute_url": "/resource/main-street-billboard/",
            "map_point_markers": [
                52
            ],
            "map_point_marker_objs": [
                {
                    "id": 52,
                    "name": "Helsinki center",
                    "lat": "60.170833000000000",
                    "lng": "24.937500000000000",
                    "created_at": "2026-05-01T09:00:00.000000Z",
                    "modified_at": "2026-05-26T10:30:00.000000Z",
                    "resources": []
                }
            ],
            "material_profile": null,
            "material_profile_obj": null,
            "default_product": null,
            "default_product_obj": null,
            "is_hourly_reservable": true,
            "possible_start_hour_mon": 8,
            "possible_end_hour_mon": 20,
            "possible_start_hour_tue": 8,
            "possible_end_hour_tue": 20,
            "possible_start_hour_wed": 8,
            "possible_end_hour_wed": 20,
            "possible_start_hour_thu": 8,
            "possible_end_hour_thu": 20,
            "possible_start_hour_fri": 8,
            "possible_end_hour_fri": 20,
            "possible_start_hour_sat": null,
            "possible_end_hour_sat": null,
            "possible_start_hour_sun": null,
            "possible_end_hour_sun": null
        }
    ],
    "page": 1,
    "count": 34,
    "num_pages": 3,
    "items_per_page": 12,
    "next": 2,
    "prev": null
}

Map view example

POST /api/inventory-resource-search/
{
    "page": 1,
    "items_per_page": 50,
    "search_query": "",
    "show_resources": true,
    "show_groups": true,
    "show_active": true,
    "show_deactivated": true,
    "show_planned": true,
    "map_view": true
}
{
    "resources": [
        {
            "id": 52,
            "name": "Helsinki center",
            "lat": "60.170833000000000",
            "lng": "24.937500000000000"
        },
        {
            "id": 53,
            "name": "Tampere station",
            "lat": "61.497752000000000",
            "lng": "23.760954000000000"
        }
    ],
    "page": 1,
    "count": 2,
    "num_pages": 1,
    "items_per_page": 50,
    "next": null,
    "prev": null
}

Count only example

POST /api/inventory-resource-search/
{
    "search_query": "",
    "show_resources": true,
    "show_groups": true,
    "show_active": true,
    "show_deactivated": true,
    "show_planned": true,
    "get_only_count": true
}
{
    "count": 278
}

Statistics only example

POST /api/inventory-resource-search/
{
    "search_query": "",
    "show_resources": true,
    "show_groups": true,
    "show_active": true,
    "show_deactivated": true,
    "show_planned": true,
    "start_date": "2026-06-01",
    "end_date": "2026-06-30",
    "return_only_statistics": true
}
{
    "count": 240,
    "total_capacity": 1540,
    "average_usage": 43.2,
    "daily": [
        {
            "date": "2026-06-01",
            "usage": 41.6
        },
        {
            "date": "2026-06-02",
            "usage": 44.5
        }
    ]
}

Get supported filter fields

GET /api/inventory-resource-search/

Returns 405 Method not allowed and includes supported_filter_fields so you can inspect currently accepted filter names.