Contractor organization categories

Categories are used to describe the different functions of your contractor organizations. You can use them to sort your organizations and make it easier to report on them and create triggers.

Use the API to retrieve your categories list or add, update or delete a category.

Learn more about contractor organization categories in the OnLocation Help Center.

List of contractor organization categories

Returns a list of contractor organization categories.

Responses
200

List of contractor organization categories

400

Invalid Input

403

Access denied to this resource

500

Internal server error

get/sp/org/category
Request samples
curl -i -X GET \
  https://api.whosonlocation.com/v1/sp/org/category
Response samples
[
  • {
    }
]

Create a contractor organization category

Creates a new contractor organization category with the provided details.

Request
Request Body schema: application/json

Information used to create a new contractor organization category

name
string <string>

Name of the category

Responses
201

Created resource

400

Invalid input

403

Access denied to this resource

500

Internal server error

post/sp/org/category
Request samples
application/json
{
  • "name": "Transport Services"
}
Response samples
{
  • "id": 1,
  • "name": "Transport Services",
  • "created": "2023-05-12 09:30:00"
}

Retrieve a contractor organization category

Retrieves a contractor organization category by its ID.

Request
path Parameters
id
required
integer

ID of the contractor organization category to retrieve

Responses
200

Contractor organization category found

403

Access denied to this resource

404

Contractor organization category not found

500

Internal server error

get/sp/org/category/{id}
Request samples
curl -i -X GET \
  https://api.whosonlocation.com/v1/sp/org/category/:id
Response samples
{
  • "id": 1,
  • "name": "Transport Services",
  • "created": "2023-05-12 09:30:00"
}

Update a contractor organization category

Updates the details of a contractor organization category.

Request
path Parameters
id
required
integer <int32>

ID of the contractor organization category to update

Request Body schema: application/json

Information used to update the contractor organization category record

name
string <string>

Name of the category

Responses
200

Updated resource

400

Invalid Input

403

Access denied to this resource

404

Contractor organization category not found

500

Internal server error

put/sp/org/category/{id}
Request samples
application/json
{
  • "name": "Transport Services"
}
Response samples
{
  • "id": 1,
  • "name": "Transport Services",
  • "created": "2023-05-12 09:30:00"
}

Delete a contractor organization category

Deletes a contractor organization category by its ID.

Request
path Parameters
id
required
integer

ID of the contractor organization category to delete

Responses
204

Contractor organization category deleted successfully

403

Access denied to this resource

404

Contractor organization category not found

409

Not deleted as contractor organizations found under this category

500

Internal server error

delete/sp/org/category/{id}
Request samples
curl -i -X DELETE \
  https://api.whosonlocation.com/v1/sp/org/category/:id