Skip to content

Update a location type

Request

Updates the fields supplied and returns the type in the same shape as reading it. Only the fields sent are touched, so an empty body is a valid request that changes nothing.

Renaming a type does not affect which locations are filed under it.

Security
default
Path
idintegerrequired

The ID of the location type.

Headers
Rosterfy-Platformstring
Bodyapplication/json
namestring

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 PUT \
  'https://developer.rosterfy.com/_mock/api-docs/openapi/api/v2/headcount/location/type/{id}' \
  -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 } }