Requests

The Found Hero API allows you to programmatically manage your requests. A location is a lost item request where a guest claim that he lost an item in a specific location

Available requests status

Status

INCOMPLETE

PENDING

MATCHED

REJECTED

get
Retrieve a Request

https://api.joinfoundhero.com/v1/locations/:lid/requests/:id
Retrieves the details of a request that has previously been created. Supply lid that is the unique ID of location and id that is the id of the request
Request
Response
Request
Path Parameters
lid
required
string
The unique location ID
id
required
string
The unique request ID
Response
200: OK
{
"status": true,
"data": {
"_id": "60e99edfcb90adfe2658a42d",
"archived": false,
"location": {
"_id": "5ff8a9d374334bcad6a44140",
"pickupTime": {
"from": "08:00",
"to": "17:00"
},
"storageDuration": 30,
"active": true,
"account": "5f608dee4565e4a213cd5c07",
"name": "Demo US Hotel (Marriott)",
"permalink": "demo-us-hotel",
"identifier": "zguUfC5SqYVy",
"website": "",
"description": "",
"type": "hotel",
"contact": {
"name": "Greg Bessoni",
"email": "[email protected]",
"email2": "",
"phone": "8609649001"
},
"storagePlace": "Reception",
"address1": "220 Old Boston Post Rd.",
"address2": "",
"city": "Old Saybrook",
"state": "CT",
"zipCode": "06475",
"country": "US",
"createdAt": "2021-01-08T18:52:03.989Z",
"updatedAt": "2021-03-11T16:51:43.168Z",
"__v": 0,
"featured": false,
"hidden": false,
"noindex": false,
"logoUrl": "https://cdn.joinfoundhero.com/l/7473d225-64c5-4b4f-b8c7-23a33582680e.png",
"latitude": null,
"longitude": null
},
"identifier": "7jXm9EW8VGZh",
"description": "test",
"lostPlace": "test",
"checkoutDate": "2021-07-06T00:00:00.000Z",
"owner": {
"firstName": "test",
"lastName": "test",
"email": "[email protected]",
"phone": "3333333333"
},
"status": "PENDING",
"proof": "test",
"createdAt": "2021-07-10T13:21:35.026Z",
"updatedAt": "2021-07-10T13:21:35.026Z",
"__v": 0
}
}

get
Retrieve all requests

https://api.joinfoundhero.com/v1/locations/:lid/requests
Retrieve all requests created previously. By default, this method returns a set of top 10 requests. This method also supports pagination. You can use limit and page query parameters to control pagination.
Request
Response
Request
Path Parameters
lid
required
string
The unique location ID
Query Parameters
page
optional
integer
The current page number. the default value is 1
limit
optional
integer
the number of results per page. The value must be between 10 and 100. The default value is 10.
Response
200: OK
{
"status": true,
"data": {
"requests": [
{
"_id": "60e99edfcb90adfe2658a42d",
"archived": false,
"location": "5ff8a9d374334bcad6a44140",
"identifier": "7jXm9EW8VGZh",
"description": "test",
"lostPlace": "test",
"checkoutDate": "2021-07-06T00:00:00.000Z",
"owner": {
"firstName": "test",
"lastName": "test",
"email": "[email protected]",
"phone": "3333333333"
},
"status": "PENDING",
"proof": "test",
"createdAt": "2021-07-10T13:21:35.026Z",
"updatedAt": "2021-07-10T13:21:35.026Z",
"__v": 0
},
{
"_id": "60e99e97cb90adfe2658a42c",
"archived": false,
"location": "5ff8a9d374334bcad6a44140",
"identifier": "zZ3kVF7hdNyB",
"description": "LALALALAL",
"lostPlace": "sjsjsjsjsjs",
"checkoutDate": "2021-07-10T00:00:00.000Z",
"owner": {
"firstName": "Test",
"lastName": "Test",
"email": "[email protected]",
"phone": "29292929"
},
"status": "PENDING",
"createdAt": "2021-07-10T13:20:23.197Z",
"updatedAt": "2021-07-10T13:20:23.197Z",
"__v": 0
}
],
"page": 1,
"limit": 10,
"count": 22,
"totalPages": 3,
"hasMore": true
}
}

put
Update Request Status

https://api.joinfoundhero.com/v1/locations/:lid/requests/:id/update-status
Using this endpoint you can accept/reject a request by sending a body parameters type .
Request
Response
Request
Path Parameters
id
required
string
The unique request ID
lid
required
string
The unique location ID
Body Parameters
type
required
string
reject or accept
Response
200: OK
{
"status": true,
"message": "Lost item request is updated",
"data": {
"owner": {
"firstName": "test",
"lastName": "test",
"email": "[email protected]",
"phone": "3333333333"
},
"archived": false,
"_id": "60e99edfcb90adfe2658a42d",
"location": "5ff8a9d374334bcad6a44140",
"identifier": "7jXm9EW8VGZh",
"description": "test",
"lostPlace": "test",
"checkoutDate": "2021-07-06T00:00:00.000Z",
"status": "REJECTED",
"proof": "test",
"createdAt": "2021-07-10T13:21:35.026Z",
"updatedAt": "2021-07-13T10:39:21.431Z",
"__v": 0,
"matchDate": "2021-07-13T10:39:21.428Z"
}
}

post
Create new lost item request

https://api.joinfoundhero.com/v1/locations/:lid/requests
Request
Response
Request
Path Parameters
lid
required
string
The unique location ID
Body Parameters
proof
optional
string
Describe why this item is yours
owner
required
object
an object containing : firstName lastName email phone
checkoutDate
required
string
Request lost date
lostPlace
required
string
Request last known place
description
required
string
Request description
Response
200: OK
{
"status": true,
"message": "Lost item request created successfully",
"data": {
"archived": false,
"_id": "60ed7c70cb90adfe2658a433",
"location": "5ff8a9d374334bcad6a44140",
"identifier": "iMelZWZdi4rp",
"description": "test",
"lostPlace": "test",
"checkoutDate": "2021-07-06T00:00:00.000Z",
"owner": {
"firstName": "test",
"lastName": "test",
"email": "[email protected]",
"phone": "3333333333"
},
"status": "PENDING",
"createdAt": "2021-07-13T11:43:44.706Z",
"updatedAt": "2021-07-13T11:43:44.706Z",
"__v": 0
}
}