---
title: "Create a new sub location"
method: POST
path: "/v1/public/locations/{locationId}/subLocations"
tags: ["Public", "SubLocations"]
---

# Create a new sub location

`POST /v1/public/locations/{locationId}/subLocations`

## Request

- Base URL: `https://api.evolia.com`
- URL: `https://api.evolia.com/v1/public/locations/{locationId}/subLocations`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/evolia/apis/public-evolia/docs/v1/public/locations/:locationId/subLocations/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `locationId` string, required

## Request body

- CreatePublicSubLocationRequest
  - `names` object, required: The name of the sub location in various locales. Accepted locales are en, fr, es. Must be unique across all sub locations of the parent location.
  - `abbrev` string: An abbreviation text, used in various place in the application where space is tight. Like on shifts of the schedule view. Must be unique across all sub locations of the parent location.
  - `code` string: A human readable ID that can be use has an ID for other API calls. The code is also used to map a sub location to an external system structural element.

## Response `201`

- PublicSubLocation
  - `uid` string, required: unique sub-location id
  - `names` object, required: Multilingual sub-location name as a map indexed by locale ("en" or "fr")
  - `abbrev` string: Sub-location abbreviation
  - `code` string: The sub-location code. The code is often used as a mapping value between Evolia and an external system
  - `parentLocationId` string, required: unique parent location id
  - `parentLocationCode` string, required: unique parent location code

---

[API](https://skmtc.dev/evolia/apis/public-evolia.md) - [All operations](https://skmtc.dev/evolia/apis/public-evolia/llms.txt) - [OpenAPI document](https://skmtc.dev/evolia/apis/public-evolia/revisions/e42abb18d4b6?raw)
