General search endpoint that returns all kinds of searchable entry types.
This includes foodsavers, stores, regions, working groups, food share points, chats and threads.
Query Parameters
- q string
Search query
- global string
Search globally
Responses
- 200
- 400
- 401
Success
- application/json
- Schema
- Example (from schema)
Schema
regions object[]
id Unique identifier of the entity represented by the search result.name Name of the entity represented by the search result.search_string Search criteria to test the search against.email Email address of the region.Includes the '@...' mail ending.
parent_id Unique identifier of the regions parent region.parent_name Name of the regions parent region.is_member Whether the searching user is member in the region.ambassadors object[]
id Unique identifier of the foodsaver.name Name of the Foodsaver.Might include the last name.
avatar URL of the foodsavers avatar image.workingGroups object[]
id Unique identifier of the entity represented by the search result.name Name of the entity represented by the search result.search_string Search criteria to test the search against.email Email address of the working group.Includes the '@...' mail ending.
parent_id Unique identifier of the working groups parent region.parent_name Name of the working groups parent region.is_member Whether the searching user is member in the working group.is_admin Whether the searching user is admin in the working group.admins object[]
id Unique identifier of the foodsaver.name Name of the Foodsaver.Might include the last name.
avatar URL of the foodsavers avatar image.stores object[]
id Unique identifier of the entity represented by the search result.name Name of the entity represented by the search result.search_string Search criteria to test the search against.cooperation_status object
oneOf- MOD1
integerPossible values: [
0
,1
,2
,3
,4
,5
,6
,7
]street Street in which the store lays.zipCode Zip code of the stores adress.city City of the stores adress.region_id Unique identifier of the stores region.region_name Name of the stores region.membership_status Identifier of the searching users membership to the store.is_manager Whether the searching user is manager of the store.chain_name Name of the chain the store belongs to, null if the store has no chain.foodSharePoints object[]
id Unique identifier of the entity represented by the search result.name Name of the entity represented by the search result.search_string Search criteria to test the search against.street Street in which the food share point lays.zipCode Zip code of the food share points adress.city City of the food share points adress.region_id Unique identifier of the food share points region.region_name Name of the food share points region.chats object[]
id Unique identifier of the entity represented by the search result.name Name of the entity represented by the search result.search_string Search criteria to test the search against.last_message_date Time of the last message was sent in the chat.last_foodsaver_id Unique identifier of the foodsaver who last sent a message in the chat.last_foodsaver_name Name of the foodsaver who last sent a message in the chat.last_message Last message that was sent in the chat.members object[]
This includes at most 5 members to be displayed in the search result.
id Unique identifier of the foodsaver.name Name of the Foodsaver.Might include the last name.
avatar URL of the foodsavers avatar image.member_count Number of members in the chat.threads object[]
id Unique identifier of the entity represented by the search result.name Name of the entity represented by the search result.search_string Search criteria to test the search against.time The time at which the last post was send in the thread.is_sticky Whether the thread is sticky / pinned.is_closed Whether the thread is closed.is_inside_ambassador_forum Whether the thread is located in the ambassador forum.region_id Unique identifier of the forums region.region_name Name of the forums region.users object[]
id Unique identifier of the entity represented by the search result.name Name of the entity represented by the search result.search_string Search criteria to test the search against.avatar URL of the users avatar.May be null.
last_name Last name of the user.mobile Mobile phone number of the user.is_buddy Whether the searching user and the found user are buddies.is_verified Whether the user is verified.region_id Unique identifier of the users home region.region_name Name of the users home region.email Name of the users home region.
{
"regions": [
{
"id": 1,
"name": "Name",
"search_string": "Münster;meunster",
"email": "muenster@foodsharing.network",
"parent_id": 1,
"parent_name": "Nordrhein-Westfalen",
"is_member": true,
"ambassadors": [
{
"id": 1,
"name": "Max Mustermann",
"avatar": "/api/uploads/bc476952-08be-45a7-b670-db27c966c9c2"
}
]
}
],
"workingGroups": [
{
"id": 1,
"name": "Name",
"search_string": "Münster;meunster",
"email": "bildung.muenster@foodsharing.network",
"parent_id": 1,
"parent_name": "Münster",
"is_member": true,
"is_admin": false,
"admins": [
{
"id": 1,
"name": "Max Mustermann",
"avatar": "/api/uploads/bc476952-08be-45a7-b670-db27c966c9c2"
}
]
}
],
"stores": [
{
"id": 1,
"name": "Name",
"search_string": "Münster;meunster",
"cooperation_status": 0,
"street": "Oskar-Michels-Ring 29",
"zipCode": "Oskar-Michels-Ring 29",
"city": "Münster",
"region_id": 1,
"region_name": "Münster",
"membership_status": 1,
"is_manager": true,
"chain_name": null
}
],
"foodSharePoints": [
{
"id": 1,
"name": "Name",
"search_string": "Münster;meunster",
"street": "Oskar-Michels-Ring 29",
"zipCode": "12345",
"city": "Münster",
"region_id": 1,
"region_name": "Münster"
}
],
"chats": [
{
"id": 1,
"name": "Name",
"search_string": "Münster;meunster",
"last_message_date": "2023-10-04 13:38:03",
"last_foodsaver_id": 1,
"last_foodsaver_name": "Max",
"last_message": "Have a nice day!",
"members": [
{
"id": 1,
"name": "Max Mustermann",
"avatar": "/api/uploads/bc476952-08be-45a7-b670-db27c966c9c2"
}
],
"member_count": 12
}
],
"threads": [
{
"id": 1,
"name": "Name",
"search_string": "Münster;meunster",
"time": "2023-10-04 15:21:52",
"is_sticky": true,
"is_closed": false,
"is_inside_ambassador_forum": false,
"region_id": 1,
"region_name": "Münster"
}
],
"users": [
{
"id": 1,
"name": "Name",
"search_string": "Münster;meunster",
"avatar": null,
"last_name": "Mustermann",
"mobile": "+49 1234 56789",
"is_buddy": true,
"is_verified": true,
"region_id": 1,
"region_name": "Münster",
"email": "Münster"
}
]
}
No query provided
Not logged in
Loading...