# Create a location

Sets up a new place to recruit and roster people to. Venues are then created under
it, and roles are advertised against those venues rather than against the location
itself.
`code` has to be unique within the account and is stored in upper case whatever case
it is sent in, so `mainstadium` and `MAINSTADIUM` are the same code.
**The created location comes back with only the fields that were set on it**, not
the full record that reading it returns: anything left to its stored default is
absent rather than present and defaulted. Read the location back if you need its
complete state.

Endpoint: POST /api/v2/headcount/location
Version: 2.0.0
Security: default

## Header parameters:

  - `Rosterfy-Platform` (string)

## Request fields (application/json):

  - `name` (string, required)
    The name administrators see. Required.

  - `frontend_name` (string, required)
    The name volunteers see in the portal. Required, and shown in place of `name` to anyone without administrator access, so it is worth setting even when the two match.

  - `code` (string, required)
    A short reference for the location, unique within the account regardless of case. Letters, numbers, dashes and underscores only - spaces and punctuation are rejected. Stored and returned in upper case whatever case it is sent in.

  - `training_ids` (array)
    The IDs of the training modules assigned to anyone who accepts a role at this location. **Replaces the whole list** rather than adding to it, so send every module you want kept. Omitting the field leaves the stored list untouched.

  - `headcount_location_type_id` (integer)
    The ID of the location type to file this location under. Optional; omit or send null to leave the location untyped. Must be the ID of a type the account holds.

## Response 201 fields (application/json):

  - `object` (object)

  - `object.name` (string)

  - `object.frontend_name` (string)

  - `object.headcount_location_type_id` (integer)

  - `object.code` (string)

  - `object.training_ids` (array)

  - `object.account_id` (integer)

  - `object.uuid` (string)

  - `object.updated_at` (string)

  - `object.created_at` (string)

  - `object.id` (integer)

  - `nice` (object)

  - `nice.rrn` (string)

  - `nice.headcount_location_type_name` (string)

  - `relations` (object)

  - `relations.headcount_location_type` (object)

  - `relations.headcount_location_type.object` (object)

  - `relations.headcount_location_type.object.id` (integer)

  - `relations.headcount_location_type.object.name` (string)

  - `relations.headcount_location_type.object.sort_order` (integer)

  - `relations.headcount_location_type.object.uuid` (string)

  - `relations.headcount_location_type.nice` (array)

  - `relations.headcount_location_type.permissions` (object)

  - `relations.headcount_location_type.permissions.read` (boolean)

  - `relations.headcount_location_type.permissions.update` (boolean)

  - `relations.headcount_location_type.permissions.delete` (boolean)

  - `permissions` (object)

  - `permissions.read` (boolean)

  - `permissions.update` (boolean)

  - `permissions.delete` (boolean)

