curl --location 'http://fssportal.com/api/v1/room/add' \
--header 'X-API-Token: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"client_id": 1856,
"admin_room_id": 4,
"name": "Living Room"
}'
const response = await fetch('http://fssportal.com/api/v1/room/add', {
method: 'POST',
headers: {
'X-API-Token': 'YOUR_API_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"client_id": 1856,
"admin_room_id": 4,
"name": "Living Room"
})
});
const data = await response.json();
{
"message": "Room added successfully.",
"data": {
"id": 4945
}
}
Room Management
Add Room
Add a new room for a client
POST
/
api
/
v1
/
room
/
add
curl --location 'http://fssportal.com/api/v1/room/add' \
--header 'X-API-Token: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"client_id": 1856,
"admin_room_id": 4,
"name": "Living Room"
}'
const response = await fetch('http://fssportal.com/api/v1/room/add', {
method: 'POST',
headers: {
'X-API-Token': 'YOUR_API_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"client_id": 1856,
"admin_room_id": 4,
"name": "Living Room"
})
});
const data = await response.json();
{
"message": "Room added successfully.",
"data": {
"id": 4945
}
}
Endpoint
POST /api/v1/room/add
This endpoint requires authentication
Headers
string
required
Your API access token. You can also set this globally in the API playground.
string
required
The platform making the request:
WEB, IOS, or ANDROID.Request Body
integer
required
client id
integer
required
Reference to the predefined room type.
string
name
Response
string
message
curl --location 'http://fssportal.com/api/v1/room/add' \
--header 'X-API-Token: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"client_id": 1856,
"admin_room_id": 4,
"name": "Living Room"
}'
const response = await fetch('http://fssportal.com/api/v1/room/add', {
method: 'POST',
headers: {
'X-API-Token': 'YOUR_API_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"client_id": 1856,
"admin_room_id": 4,
"name": "Living Room"
})
});
const data = await response.json();
{
"message": "Room added successfully.",
"data": {
"id": 4945
}
}
Notes
- Authentication is required
