» Labour PATCH API Documentation

Update Labour: /labours/{labour_uuid}

PATCH
https://dev-api.exsited.com/api/v3/labours/{labour_uuid}
Try It Out
Purpose

This API is used to update an existing Labour resource. It allows modification of basic labour details such as name, display name, and description, and also supports partial updates to the labour’s custom availability configuration through additive, update, or delete operations without recreating the entire labour record.

Use Case
  • Update the name or display name of an existing labour.
  • Modify the labour description to reflect updated responsibilities or roles.
  • Add new custom availability slots for specific days.
  • Update existing availability time ranges or availability flags.
  • Remove existing custom availability entries using their UUID.
  • Maintain accurate labour scheduling data without affecting unrelated attributes.
Path Parameters
AttributeTypeDescription
labour_uuidUUIDUnique identifier of the labour record to be updated
Query Parameters

This endpoint does not support query parameters

Request Body
{
  "labour": {
    "name": "LABOUR_NAME",
    "display_name": "DISPLAY_NAME",
    "description": "DESCRIPTION",
    "labour_custom_availability": [
      {
        "operation": "DELETE",
        "uuid": "AVAILABILITY_UUID"
      },
      {
        "operation": "ADD",
        "start_time": "START_TIME",
        "end_time": "END_TIME",
        "available": "AVAILABLE",
        "preferred_day": "PREFERRED_DAY"
      },
      {
        "operation": "UPDATE",
        "uuid": "AVAILABILITY_UUID",
        "start_time": "START_TIME",
        "end_time": "END_TIME",
        "available": "AVAILABLE",
        "preferred_day": "PREFERRED_DAY"
      }
    ]
  }
}
AttributeTypeDescription
labourObjectRoot object containing labour update details
labour.nameStringUpdated internal name of the labour
labour.display_nameStringUpdated display name shown in UI
labour.descriptionStringDescription of the labour
labour.labour_custom_availabilityArrayList of custom availability operations
labour.labour_custom_availability.operationStringOperation to perform: ADD, UPDATE, or DELETE
labour.labour_custom_availability.uuidUUIDUnique identifier of the availability entry (required for UPDATE and DELETE)
labour.labour_custom_availability.start_timeTimeStart time of availability (HH:mm:ss)
labour.labour_custom_availability.end_timeTimeEnd time of availability (HH:mm:ss)
labour.labour_custom_availability.availableBoolean/StringIndicates whether labour is available during the time slot
labour.labour_custom_availability.preferred_dayStringDay of the week for availability
Response

On successful execution, the API returns the updated labour object reflecting all applied changes. The response includes the labour’s current status, identifying information, associated labour profile details, audit metadata, and the complete set of custom availability entries after applying all add, update, and delete operations. Any unchanged attributes are preserved, ensuring partial updates do not overwrite existing data unintentionally.

Response Body
{
  "labour": {
    "status": "STATUS",
    "uuid": "LABOUR_UUID",
    "code": "LABOUR_CODE",
    "name": "LABOUR_NAME",
    "display_name": "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",
        "preferred_day": "PREFERRED_DAY"
      }
    ],
    "labour_availability": []
  }
}
AttributeTypeDescription
labourObjectUpdated labour object
labour.statusStringCurrent status of the labour
labour.uuidUUIDUnique identifier of the labour
labour.codeStringSystem-generated labour code
labour.nameStringLabour name
labour.display_nameStringLabour display name
labour.descriptionStringLabour description
labour.image_nameStringImage file name associated with labour
labour.email_addressStringEmail address of the labour
labour.use_custom_availabilityBooleanIndicates whether custom availability is enabled
labour.labour_profileObjectAssociated labour profile details
labour.labour_profile.uuidUUIDUnique identifier of the labour profile
labour.labour_profile.nameStringLabour profile name
labour.labour_profile.display_nameStringDisplay name of the labour profile
labour.labour_profile.linkStringAPI link to the labour profile resource
labour.custom_form_templateStringAssigned custom form template
labour.created_byStringUser who created the labour
labour.created_onDateTimeLabour creation timestamp
labour.last_updated_byStringUser who last updated the labour
labour.last_updated_onDateTimeLast update timestamp
labour.custom_attributesArrayList of custom attributes associated with the labour
labour.labour_contactsArrayContact details linked to the labour
labour.labour_custom_availabilityArrayList of custom availability entries
labour.labour_custom_availability.uuidUUIDUnique identifier of availability entry
labour.labour_custom_availability.start_timeStringAvailability start time
labour.labour_custom_availability.end_timeStringAvailability end time
labour.labour_custom_availability.availableBoolean/StringAvailability status
labour.labour_custom_availability.preferred_dayStringDay of the week
labour.labour_availabilityArraySystem-generated availability records

Looking to build next big project?

With our robust set of tools and resources, you can create custom solutions that integrate seamlessly with our system and take your business to the next level.

Join Our Partner Program