# Unit Change

The Unit Change webhook triggers:

- Unit created
- Unit updated.


## Summary

The following gives and overview of the fields in the json.

| **Field** | **Description** |
|  --- | --- |
| type | The type of webhook event, e.g., webhookUnitOutboundDto. |
| id | Unique identifier for this webhook event (775e62a9-6d99-47e8-a8be-1c26f54af40a). |
| createdDate | The date and time the webhook was created, in array format (2024-11-28T07:55:06.892Z). |
| detailDto.id | Unique identifier for the unit (2). |
| detailDto.name | Name of the unit (1.1). |
| detailDto.bookable | Indicates if the unit is bookable (true). |
| detailDto.inactive | Indicates if the unit is inactive (false). |
| detailDto.sellableFrom | Date from which the unit is sellable (2024-10-01). |
| detailDto.sellableTo | Date until which the unit is sellable (2025-12-31). |
| detailDto.occupancyFrom | Date from which the unit is available for occupancy (2024-10-01). |
| detailDto.occupancyTo | Date until which the unit is available for occupancy (2025-12-31). |
| detailDto.unitTypeName | Name of the unit type (Studio). |
| detailDto.unitTypeType | Type of the unit (STUDIO). |
| detailDto.buildingId | Unique identifier for the building (2). |
| detailDto.buildingName | Name of the building (Demo Property 1). |
| detailDto.address | Address details of the unit, including street, city, postcode, and country. |
| detailDto.costCentre | Cost centre associated with the unit (001). |
| detailDto.shortDescription | Short description of the unit. |
| detailDto.directions | Directions for the unit. |
| detailDto.customFields | Custom fields related to the unit (empty in this example). |
| detailDto.landlordId | Unique identifier for the landlord (null if not assigned). |
| detailDto.landlordName | Name of the landlord (null if not assigned). |
| detailDto.landlordEmail | Email address of the landlord (null if not assigned). |
| detailDto.landlordTelephone | Telephone number of the landlord (null if not assigned). |
| detailDto.floor | Floor number where the unit is located (1). |
| detailDto.floorSpace | Floor space of the unit (null if not specified). |
| detailDto.cleanStatus | Clean status of the unit (CLEAN). |
| detailDto.lastCleaned | Date and time the unit was last cleaned (2024-11-12 09:38:00). |
| detailDto.lastInspected | Date and time the unit was last inspected (null if not inspected). |
| detailDto.standardOccupancy | Standard occupancy for the unit (null if not specified). |
| detailDto.primaryLockIdentifier | Identifier for the primary lock of the unit (null if not assigned). |


## Example

```
{
   "type":"webhookUnitOutboundDto",
   "id":"775e62a9-6d99-47e8-a8be-1c26f54af40a",
   "createdDate":[
      2024,
      11,
      28,
      7,
      55,
      6,
      892000000
   ],
   "detailDto":{
      "id":2,
      "name":"1.1",
      "bookable":true,
      "inactive":false,
      "sellableFrom":"2024-10-01",
      "sellableTo":"2025-12-31",
      "occupancyFrom":"2024-10-01",
      "occupancyTo":"2025-12-31",
      "unitTypeName":"Studio",
      "unitTypeType":"STUDIO",
      "buildingId":2,
      "buildingName":"Demo Property 1",
      "address":{
         "addressLine1":"Demo Street",
         "addressLine2":null,
         "addressLine3":null,
         "city":"London",
         "postcode":"EC4A 1ED",
         "country":"United Kingdom",
         "isoCountry2":"GB",
         "nickname":null
      },
      "costCentre":"001",
      "shortDescription":[
         {
            "":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean consequat porttitor lacus, sit amet elementum risus tristique vitae. Aenean libero diam"
         }
      ],
      "directions":[
         {
            "":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean consequat porttitor lacus, sit amet elementum risus tristique vitae. Aenean libero diam"
         }
      ],
      "customFields":[
         
      ],
      "landlordId":null,
      "landlordName":null,
      "landlordEmail":null,
      "landlordTelephone":null,
      "floor":1,
      "floorSpace":null,
      "cleanStatus":"CLEAN",
      "lastCleaned":"2024-11-12 09:38:00",
      "lastInspected":null,
      "standardOccupancy":null,
      "primaryLockIdentifier":null
   }
}
```