Skip to main content
POST
/
api
/
v1
/
hotel
/
hotels
/
{hotelId}
/
locations
Create Location with Sublocations
curl --request POST \
  --url https://api.xenia.team/api/v1/hotel/hotels/{hotelId}/locations \
  --header 'Content-Type: application/json' \
  --header 'x-client-key: <api-key>' \
  --header 'x-client-secret: <api-key>' \
  --data '{
  "LevelId": "98329f39-e263-484d-8fa7-e951fcddb9c1",
  "name": "test location add",
  "ParentId": "6c826259-28ea-4e16-8869-b16cbc147633",
  "memberIds": [
    "dfea8b8a-5b22-4668-b68d-dc641eb3a101",
    "e25dd448-7ae7-4588-8767-7e1a316547e5"
  ],
  "description": "location description",
  "isQREnable": true,
  "attachments": [
    "https://cdn.xenia.team/.../screenshot-1.png",
    "https://cdn.xenia.team/.../screenshot-2.png"
  ],
  "Sublocations": [
    {
      "name": "sub location name",
      "description": ""
    }
  ]
}'
{
  "data": {
    "id": "9300f92a-299b-4a55-9953-e96bc4a6954e",
    "HotelId": "cb363f7e-c52a-4478-911d-f6a6f791090e",
    "name": "test location add",
    "description": "location description",
    "slugCode": "test-location-add",
    "Members": [
      "..."
    ],
    "Sublocations": [
      "..."
    ],
    "Level": {
      "id": "98329f39-e263-484d-8fa7-e951fcddb9c1",
      "title": "Store",
      "isSite": true
    },
    "ParentLocation": {
      "id": "6c826259-28ea-4e16-8869-b16cbc147633",
      "name": "site a2"
    }
  },
  "meta": {}
}

Authorizations

x-client-key
string
header
required
x-client-secret
string
header
required

Path Parameters

hotelId
string<uuid>
required

UUID of the hotel/workspace.

Body

application/json
name
string
required
description
string | null
ParentId
string<uuid> | null
LevelId
string<uuid> | null
attachments
string<uri>[]
Sublocations
object[]
isQREnable
boolean
memberIds
string<uuid>[]
longitude
number | null
latitude
number | null
address
string | null

Response

Location created successfully.

The response is of type any.

I