Skip to main content
POST
/
v3
/
job-role-assignments
Create a new job role assignment
curl --request POST \
  --url https://api.ctrl-hub.com/v3/job-role-assignments \
  --header 'Content-Type: application/vnd.api+json' \
  --header 'X-Session-Token: <api-key>' \
  --data '
{
  "data": {
    "type": "<string>",
    "meta": {
      "type": "<string>"
    },
    "relationships": {
      "user": {
        "data": {
          "type": "<string>",
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
        }
      },
      "role": {
        "data": {
          "type": "<string>",
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
        }
      }
    }
  }
}
'
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "type": "<string>",
    "meta": {
      "created_at": "2023-11-07T05:31:56Z",
      "type": "<string>"
    },
    "relationships": {
      "user": {
        "data": {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "type": "<string>"
        }
      },
      "role": {
        "data": {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "type": "<string>"
        }
      }
    }
  },
  "jsonapi": {
    "version": "<string>"
  },
  "included": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "type": "<string>",
      "attributes": {
        "name": "<string>",
        "description": "<string>",
        "job_role_type": "<string>",
        "qualifications": {
          "optional": [
            "<string>"
          ],
          "required": [
            "<string>"
          ]
        }
      },
      "meta": {
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "deleted_at": "2023-11-07T05:31:56Z"
      },
      "relationships": {
        "organisation": {
          "data": {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "type": "<string>"
          }
        }
      }
    }
  ]
}

Authorizations

X-Session-Token
string
header
required

Session token for authentication.

Body

application/vnd.api+json

The job role assignment to create.

data
object
required

Response

Get a job role assignment.

JSON API response object

data
object
required

A job role assignment linking a user to a job role

jsonapi
object
required
included
object[]

Related resources that can be included when a job role assignment is returned

An internal job role