Skip to main content

Job Titles

Overview

Job titles assigned to users indicate their job or position within the company. With this endpoint, users can be grouped into "pools" according to their job titles. A job title can also grant attributes or additional fields to users associated with it.

Get Job Titles

Returns all job titles within the company.

GET /jobtitles

Endpoint URL

https://www.cotalker.com/api/v2/jobtitles

Headers

HeaderDescriptionRequiredValues
AuthorizationSends your access token to make an API request.
Click here to see how to obtain an access token.
RequiredBearer $ACCESS_TOKEN
AdminGrants access to the endpoint.Requiredtrue

Query Parameters

ParameterDescriptionTypeRequiredNotes
limitLimits the amount of job titles returned in the response.numberOptionalBy default, the limit is set to 10.
pageMakes the response display data from the indicated page number.numberOptionalBest used in combination with the "limit" parameter.
countAdds the counter field with the total amount of job titles.booleanOptional
isActiveReturns job titles according to their jobtitles.active status.stringOptionalOptions are: all, true, false
idsReturns job titles with the indicated ObjectIds in their jobtitles._id field.ObjectId<COTJobTitle>[ ]Optional
searchReturns job titles that match the keyword. Searches through the values of jobtitles.name, jobtitles.permissions, and jobtitles.description fields.stringOptionalSee COTJobTitle for data model details.
debugAdds the debug field with error notifications and query values.stringOptionalOption: true

Request Sample

Request returns all job titles:

curl --location --request GET 'https://www.cotalker.com/api/v2/jobtitles' \
--header 'Admin: true' \
--header 'Authorization: Bearer $ACCESS_TOKEN'

Response Sample

The response follows the COTJobTitle data model.


Get a Job Title by Id

Returns the job title indicated by the Id.

GET /jobtitles/{id}

Endpoint URL

https://www.cotalker.com/api/v2/jobtitles/{id}

Path Parameters

ParameterDescriptionTypeRequiredNotes
idThe ObjectId of the job title that is to be returned.ObjectId<COTJobTitle>Required

Headers

HeaderDescriptionRequiredValues
AuthorizationSends your access token to make an API request.
Click here to see how to obtain an access token.
RequiredBearer $ACCESS_TOKEN
AdminGrants administrative access to view the job title.Requiredtrue

Query Parameters

ParameterDescriptionTypeRequiredNotes
debugAdds the debug field with error notifications.stringOptionalOption: true

Request Sample

curl --location --request GET 'https://www.cotalker.com/api/v2/jobtitles/619648a6f27b4eb1a9e319ba' \
--header 'Admin: true' \
--header 'Authorization: Bearer $ACCESS_TOKEN'

Response Sample

The response follows the COTJobTitle data model.


Create a Job Title

Creates a new job title within the company.

POST /jobtitles

Endpoint URL

https://www.cotalker.com/api/v2/jobtitles

Headers

HeaderDescriptionRequiredValues
AuthorizationSends your access token to make an API request.
Click here to see how to obtain an access token.
RequiredBearer $ACCESS_TOKEN
AdminGrants administrative access to create a job title.Requiredtrue
Content-TypeSets the body's format.Requiredapplication/json

Query Parameters

ParameterDescriptionTypeRequiredNotes
debugAdds the debug field with error notifications.stringOptionalOption: true

Request Body

Only required fields are listed below. For a complete schema description, please go to the COTJobTitle data model. Unrequired fields that are not submitted are either filled in automatically or left blank.

ElementDescriptionTypeRequiredNotes
codeThe job title's unique ID namestringRequiredMaximum 60 characters; only lowercase letters, numbers, and underscore allowed; must be unique.
displayThe job title's display namestringRequired

Request Sample

Job title created with the minimum required fields:

curl --location --request POST 'https://www.cotalker.com/api/v2/jobtitles?debug=true' \
--header 'Admin: true' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"code": "senior_technical_writer",
"display": "senior technical writer"
}'

Response Sample

Go to COTJobTitle for a complete description of the response.

{
"_id": "61966da4ac5644318a6c77c6",
"isActive": true,
"allowedExtensions": [],
"search": [
"senior",
"technical",
"writer",
"seniortechnicalwriter"
],
"code": "senior_technical_writer",
"display": "senior technical writer",
"company": "61966d9b217c9eb47cb35f8d",
"createdAt": "2021-11-18T14:07:35.519Z",
"modifiedAt": "2021-11-18T14:07:35.520Z"
}

Update a Job Title

Updates or edits an existing job title.

PATCH /jobtitles/{id}

Endpoint URL

https://www.cotalker.com/api/v2/jobtitles/{id}

Path Parameters

ParameterDescriptionTypeRequiredNotes
idThe ObjectId of the job title that is to be modified.ObjectId<COTJobTitle>Required

Headers

HeaderDescriptionRequiredValues
AuthorizationSends your access token to make an API request.
Click here to see how to obtain an access token.
RequiredBearer $ACCESS_TOKEN
AdminGrants administrative access to modify the job title.Requiredtrue
Content-TypeSets the body's format.Requiredapplication/json

Query Parameters

ParameterDescriptionTypeRequiredNotes
debugAdds the debug field with error notifications.stringOptionalOption: true

Request Body

Only the fields that are being updated or added are required to be put into the body. For a complete schema description, please go to the COTJobTitle data model.

Request Sample

curl --location --request PATCH 'https://www.cotalker.com/api/v2/jobtitles/61965e277c131a0007a6b111' \
--header 'Admin: true' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"allowedExtensions": [
"6192276efd8ef0bfb1176b0a",
"61922776ace7e2f9e5a9327a"
]
}'

Response Sample

Go to COTJobTitle for a complete description of the response.

{
"_id": "61966da4ac5644318a6c77c6",
"isActive": true,
"allowedExtensions": [
"6192276efd8ef0bfb1176b0a",
"61922776ace7e2f9e5a9327a"
],
"search": [
"senior",
"technical",
"writer",
"seniortechnicalwriter"
],
"code": "senior_technical_writer",
"display": "senior technical writer",
"company": "61966d9b217c9eb47cb35f8d",
"createdAt": "2021-11-18T14:07:35.519Z",
"modifiedAt": "2021-11-18T15:09:52.623Z"
}