To create a requisition you must send a JSON:API spec JSON object. The list of attributes and relationships can be found in the Body Params.
Warning
requisitionscreated through the API currently do not trigger sign-off workflows and are created as already approved.The
requisitionscreated through the API are not able to be used to extend the headcount of jobs.
Required Associations
When creating requisitions, you must have a relationship to a requisition_template. All of the required requisition_template_fields of the chosen template, must have requisition_details created for them which answer the fields' questions. All of the details must provide the correct value inline with the field's question type, eg, boolean_value for booleans and integer_value for integer fields.
You can check a requisition_template's fields and their types and if they are required by fetching the desired requisition_template and including its requisition_template_fields. More information about fetching Requisition Templates here.
How to construct relationship data in the request body
- List Requisition Templates and pick the
idof therequisition_templatewhich you want to use to create a new Requisition.- Using Fetch Requisition Template fetch the desired
requisition_templatewhilst also including itsrequisition_template_fields.- Use the
requisition_template's id in therelationships.requisition_templatein the request body for requisition creation.- For each
requisition_template_fieldsadd arequisition_detailsentries in therelationships.requisition_detailsandincludedsection of the request bodyIn the below example, we provide a
nameandidentifierfor the newrequisitionas well as define the relationships to therequisition_templateand to anyrequisition_detailsthat may be needed. Here the only field is a headcount field. We provide a temp-id to therequisition_detailthat we want to create in therelationshipssection which matches the temp-id of the correspondingrequisition_detailin theincludedsection. The attributes of the new detail should be provided in theincludedsection.{ "data": { "type": "requisitions", "attributes": { "name": "api test", "identifier": "example" }, "relationships": { "requisition_template": { "data": { "type": "requisition_templates", "id": "2" } }, "requisition_details": { "data": [ { "type": "requisition_details", "method": "create", "temp-id": "temp-id-1" } ] } } }, "included": [ { "type": "requisition_details", "temp-id": "temp-id-1", "attributes": { "integer_value": "3" }, "relationships": { "requisition_template_field": { "data": { "type": "requisition_template_fields", "id": "5" } } } } ] }
Relationship Error Handling
If a required field is not answered you will receive an error feedback informing you of which field was missing.
If when creating the requisition_detail, the wrong value_type input is provided (i.e. integer instead of text), the wrong data type is input into the correct value_type (i.e. "hello world" into a boolean_value) or is left blank, you will also receive an error feedback explaining that the necessary value_type is blank or the wrong type of data.
Notes
ImportantThe
requisition_detailsshould also be added to theincludedsection of the JSON.To see an example, select the
basicoption from the drop down on the top-right corner of the example code that is labelled 'EXAMPLES'.
ImportantAll requisitions created through the API will use your company's system_user as the creator.
All requisitions created through the API will automatically be approved and ready for use to create new jobs.


