Skip to content

Create location

POST
/api/locations
curl --request POST \
--url http://localhost:3000/api/locations \
--header 'Content-Type: application/json' \
--cookie session=<session> \
--data '{ "name": "example", "slug": "example", "siteId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "status": "active", "description": "example" }'
Media type application/json
object
name
required
string
slug

Auto-generated from name when omitted

string
siteId
string format: uuid
status
string
default: active
description
string

Location created

Media type application/json
object
data
object
id
required
string format: uuid
siteId
string format: uuid
nullable
name
required
string
slug
string
nullable
status
required
string
default: active
description
string
nullable
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{
"data": {
"status": "active"
}
}

Validation error

Media type application/json
object
error
required
string
Example
{
"error": "Not found"
}

Not authenticated

Media type application/json
object
error
required
string
Example
{
"error": "Not found"
}