Create Labour: /labours
Purpose
This endpoint is used to create a new labour resource in the system. It allows defining core labour details, associating the labour with an existing labour profile, configuring custom attributes, and setting custom availability schedules that determine when the labour is available for assignment.
Use Case
• Creating a new labour resource for workforce management.
• Assigning skills or expertise to a labour via custom attributes.
• Defining custom working days and time ranges for a labour.
• Linking a labour to an existing labour profile for standardized settings.
• Preparing labour resources for scheduling, dispatching, and job allocation.
Path Parameters
This endpoint does not require any path parameters.
Query Parameters
This endpoint does not support query parameters.
Request Body
{
"labour": {
"name": "LABOUR_NAME",
"display_name": "LABOUR_DISPLAY_NAME",
"description": "DESCRIPTION",
"image_name": "IMAGE_NAME",
"email_address": "EMAIL_ADDRESS",
"use_custom_availability": "USE_CUSTOM_AVAILABILITY",
"labour_profile": "LABOUR_PROFILE_NAME",
"custom_form_template": "CUSTOM_FORM_TEMPLATE",
"custom_attributes": [
{
"name": "CUSTOM_ATTRIBUTE_NAME",
"value": "CUSTOM_ATTRIBUTE_VALUE"
}
],
"labour_custom_availability": [
{
"start_time": "START_TIME",
"end_time": "END_TIME",
"available": "AVAILABLE_FLAG",
"preferred_day": "PREFERRED_DAY"
}
]
}
}
| Attribute | Type | Description |
|---|---|---|
| labour | object | Root object containing labour details. |
| labour.name | string | Name of the labour. |
| labour.display_name | string | Display name of the labour. |
| labour.description | string | Description of the labour. |
| labour.image_name | string | Image file name associated with the labour. |
| labour.email_address | string | Email address of the labour. |
| labour.use_custom_availability | boolean | Indicates whether custom availability is enabled. |
| labour.labour_profile | string | Name of the labour profile to associate with the labour. |
| labour.custom_form_template | string | Custom form template assigned to the labour. |
| labour.custom_attributes | array | List of custom attributes assigned to the labour. |
| custom_attributes.name | string | Name of the custom attribute. |
| custom_attributes.value | string | Value of the custom attribute. |
| labour.labour_custom_availability | array | Custom availability schedules for the labour. |
| availability.start_time | string | Start time of the availability window. |
| availability.end_time | string | End time of the availability window. |
| availability.available | string | Indicates whether the labour is available during the time slot. |
| availability.preferred_day | string | Preferred working day for the availability entry. |
Response
The API returns the newly created labour resource with its system-generated identifiers, current status, associated labour profile details, custom availability entries, and audit metadata. The response confirms successful creation and provides all information required to immediately use the labour in scheduling, assignment, and workforce workflows.
Response Body
{
"labour": {
"labour": {
"status": "LABOUR_STATUS",
"uuid": "LABOUR_UUID",
"code": "LABOUR_CODE",
"name": "LABOUR_NAME",
"display_name": "LABOUR_DISPLAY_NAME",
"description": "DESCRIPTION",
"image_name": "IMAGE_NAME",
"email_address": "EMAIL_ADDRESS",
"use_custom_availability": "USE_CUSTOM_AVAILABILITY",
"labour_profile": {
"status": "PROFILE_STATUS",
"uuid": "PROFILE_UUID",
"name": "PROFILE_NAME",
"display_name": "PROFILE_DISPLAY_NAME",
"link": "PROFILE_LINK"
},
"custom_form_template": "CUSTOM_FORM_TEMPLATE",
"created_by": "CREATED_BY",
"created_on": "CREATED_ON",
"last_updated_by": "LAST_UPDATED_BY",
"last_updated_on": "LAST_UPDATED_ON",
"custom_attributes": [],
"labour_contacts": [],
"labour_custom_availability": [
{
"status": "AVAILABILITY_STATUS",
"uuid": "AVAILABILITY_UUID",
"start_time": "START_TIME",
"end_time": "END_TIME",
"available": "AVAILABLE_FLAG",
"preferred_day": "PREFERRED_DAY"
}
],
"labour_availability": []
}
}
}
| Attribute | Type | Description |
|---|---|---|
| labour | object | Wrapper object containing the created labour. |
| labour.labour | object | Created labour resource details. |
| status | string | Current status of the labour. |
| uuid | string | Unique identifier of the labour. |
| code | string | System-generated labour code. |
| name | string | Name of the labour. |
| display_name | string | Display name of the labour. |
| description | string | Description of the labour. |
| image_name | string | Image file name associated with the labour. |
| email_address | string | Email address of the labour. |
| use_custom_availability | boolean | Indicates whether custom availability is enabled. |
| labour_profile | object | Associated labour profile details. |
| labour_profile.uuid | string | Unique identifier of the labour profile. |
| labour_profile.name | string | Name of the labour profile. |
| labour_profile.display_name | string | Display name of the labour profile. |
| labour_profile.link | string | API link to the labour profile. |
| custom_form_template | string | Custom form template assigned to the labour. |
| created_by | string | User who created the labour record. |
| created_on | string | Timestamp when the labour was created. |
| last_updated_by | string | User who last updated the labour record. |
| last_updated_on | string | Timestamp of the last update. |
| custom_attributes | array | Custom attributes associated with the labour. |
| labour_contacts | array | Contact information associated with the labour. |
| labour_custom_availability | array | Custom availability schedule entries. |
| availability.status | string | Status of the availability entry. |
| availability.uuid | string | Unique identifier of the availability entry. |
| availability.start_time | string | Start time of availability. |
| availability.end_time | string | End time of availability. |
| availability.available | string | Availability indicator. |
| availability.preferred_day | string | Preferred working day. |
| labour_availability | array | Default availability configuration, if applicable. |