Skip to content

Create a location type

Request

Adds a category that locations can be filed under. Point a location at it with headcount_location_type_id on the create or update endpoint for that location.

A type created without sort_order comes back without that field, rather than with its stored default of 0. Read the type back if you need its complete state.

Security
default
Headers
Rosterfy-Platformstring
Bodyapplication/jsonrequired
namestringrequired

The name of the location type. Required.

sort_orderinteger

Where this type sits in the list, lowest first. Optional; types created without one sort as 0.

curl -i -X POST \
  https://developer.rosterfy.com/_mock/api-docs/openapi/api/v2/headcount/location/type \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Rosterfy-Platform: admin' \
  -d '{
    "name": "Stadium",
    "sort_order": 1
  }'

Responses

Bodyapplication/json
objectobject
niceArray of any
relationsArray of any
permissionsobject
Response
{ "object": { "id": 1, "name": "Stadium", "sort_order": 1, "uuid": "bf46e175-87a9-4968-8e58-21efec6873a2" }, "nice": [], "relations": [], "permissions": { "read": true, "update": true, "delete": true } }