Represents a Lease Unit in SOFT4Spaces.
Note
For information about enabling APIs for Business Central see Overview.
API endpoint
| API | Path |
| leaseUnit | businesscentralPrefix/soft4/soft4spaces/v3.0/companies({{companyId}})/leaseUnits |
Methods
| Method | Return Type | Description |
| GET leaseUnit | leaseUnit | Gets a lease unit object. |
| DELETE leaseUnit | none | Deletes a lease unit object. |
| POST leaseUnit | leaseUnit | Creates a lease unit object. |
| PATCH leaseUnit | leaseUnit | Updates a lease unit object. |
GET leaseUnits
Description
Retrieves an existing lease units records from Business Central.
HTTP Request
GET
https://{{businesscentralPrefix}}/{{APIGroup}}/{{version}}/companies({{companyId}})/leaseUnits
Request Headers
| Header | Value |
| Authorization | NTLM, OAuth2. Required. |
| Accept | application/json |
Request Body
None.
Response
Returns a 200 OK status code and JSON object representing the lease units records.
Example Response
JSON
|
{ "id": "c21f5850-1ba1-f011-b41a-7c1e52fbc428", "number": "BUILDING1", "description": "Building1", "leaseUnitGroup": true, "leaseUnitGroupNo": "", "leaseUnitCategory": "", "leaseUnitClass": "", "blocked": true, "building": true, "buildingType": "", "objectArea": 0, "address": "", "address2": "", "city": "", "countryCode": "", "globalDimension1Code": "BUILDING1", "globalDimension2Code": "", "floor": "", "manager": "", "salespersonCode": "", "salespersonName": "", "roomNo": "", "owner": "", "ownerCode": "", "ownerName": "", "parkingUnit": false, "searchName": "BUILDING1", "totalArea": 2000, "uniqueNo": "", "tenantName": "Vacant", "rentedTill": "0001-01-01", "currentRentPrice": 0, "currentRentPriceType": "Fixed", "currentRentPricePeriod": " ", "systemCreatedAt": "2025-10-04T12:11:55.597Z", "systemCreatedBy": "6ac927c2-1d2f-437f-89ed-3cb0cf930e68", "systemModifiedAt": "2026-03-03T17:30:01.483Z", "systemModifiedBy": "5a477047-93d3-4130-a8c2-b05fb7425ffa" }, { "id": "6298fda7-2faf-f011-bbd0-7c1e52fbc428", "number": "BUILDING2", "description": "Building2", "leaseUnitGroup": true, "leaseUnitGroupNo": "", "leaseUnitCategory": "", "leaseUnitClass": "", "blocked": true, "building": true, "buildingType": "", "objectArea": 0, "address": "Drummond Rd.", "address2": "", "city": "London", "countryCode": "", "globalDimension1Code": "BUILDING2", "globalDimension2Code": "", "floor": "", "manager": "", "salespersonCode": "", "salespersonName": "", "roomNo": "", "owner": "", "ownerCode": "", "ownerName": "", "parkingUnit": false, "searchName": "BUILDING2", "totalArea": 0, "uniqueNo": "", "tenantName": "Vacant", "rentedTill": "0001-01-01", "currentRentPrice": 0, "currentRentPriceType": "Fixed", "currentRentPricePeriod": " ", "systemCreatedAt": "2025-10-22T10:12:50.28Z", "systemCreatedBy": "6ac927c2-1d2f-437f-89ed-3cb0cf930e68", "systemModifiedAt": "2026-03-03T17:30:01.517Z", "systemModifiedBy": "5a477047-93d3-4130-a8c2-b05fb7425ffa" } |
GET leaseUnit
Description
Retrieves an existing lease unit record from Business Central.
HTTP Request
GET
https://{{businesscentralPrefix}}/{{APIGroup}}/{{version}}/companies({{companyId}})/leaseUnits({{leaseUnits_id}})
Request Headers
| Header | Value |
| Authorization | NTLM, OAuth2. Required. |
| Accept | application/json |
Request Body
None.
Response
Returns a 200 OK status code and JSON object representing the lease unit record.
Example Response
JSON
|
{ "id": "c21f5850-1ba1-f011-b41a-7c1e52fbc428", "number": "BUILDING1", "description": "Building1", "leaseUnitGroup": true, "leaseUnitGroupNo": "", "leaseUnitCategory": "", "leaseUnitClass": "", "blocked": true, "building": true, "buildingType": "", "objectArea": 0, "address": "", "address2": "", "city": "", "countryCode": "", "globalDimension1Code": "BUILDING1", "globalDimension2Code": "", "floor": "", "manager": "", "salespersonCode": "", "salespersonName": "", "roomNo": "", "owner": "", "ownerCode": "", "ownerName": "", "parkingUnit": false, "searchName": "BUILDING1", "totalArea": 2000, "uniqueNo": "", "tenantName": "Vacant", "rentedTill": "0001-01-01", "currentRentPrice": 0, "currentRentPriceType": "Fixed", "currentRentPricePeriod": " ", "systemCreatedAt": "2025-10-04T12:11:55.597Z", "systemCreatedBy": "6ac927c2-1d2f-437f-89ed-3cb0cf930e68", "systemModifiedAt": "2026-03-03T17:30:01.483Z", "systemModifiedBy": "5a477047-93d3-4130-a8c2-b05fb7425ffa" } |
POST leaseUnit
Description
Creates a new lease unit record in Business Central.
HTTP Request
POST
https://{{businesscentralPrefix}}/{{APIGroup}}/{{version}}/companies({{companyId}})/leaseUnits
Request Headers
| Header | Value |
| Authorization | NTLM, OAuth2. Required. |
| Accept | application/json |
Request Body
Provide a JSON object with lease unit data.
JSON
|
{ "number": "LU00044", "description": "Office 101", "leaseUnitGroup": false, "blocked": false, "building": false } |
Response
Returns a 201 Created status code and the created lease unit object.
PATCH leaseUnit
Description
Updates existing lease unit record in Business Central.
HTTP Request
PATCH
https://{{businesscentralPrefix}}/{{APIGroup}}/{{version}}/companies({{companyId}})/leaseUnits({{leaseUnits_id}})
Request Headers
| Header | Value |
| Authorization | NTLM, OAuth2. Required. |
| Accept | application/json |
Request Body
Provide the fields to be updated of lease unit in Business Central.
JSON
|
{ "RoomNo": "101" } |
Response
Returns a 200 OK status code.
Properties
| Property | Type | Description |
| id | GUID | The unique ID of the lease unit. Non-editable. |
| number | string | Specifies the number of the lease unit. |
| description | string | Specifies the description of the lease unit. |
| leaseUnitGroup | boolean | Specifies whether the lease unit group is being used. |
| leaseUnitGroupNo | string | Specifies the lease unit's group number. |
| leaseUnitCategory | string | Specifies the lease unit's category. |
| leaseUnitClass | string | Specifies the lease unit's class. |
| blocked | boolean | “True” indicates whether lease unit card is blocked. |
| building | boolean | Specifies whether the lease unit card represents the highest level in the hierarchy, e.g. Building. |
| buildingType | string | Specifies the lease unit's building type. |
| objectArea | decimal | Specifies the area of lease unit. |
| address | string | Specifies the lease unit's address. |
| address2 | string | Specifies the lease unit's address. |
| city | string | Specifies the lease unit's city. |
| countryCode | string | Specifies the lease unit's country code. |
| globalDimension1Code | string | Specifies the Global Dimension 1 value code. |
| globalDimension2Code | string | Specifies the Global Dimension 2 value code. |
| floor | string | Specifies the lease unit's floor. |
| manager | string | Specifies the lease unit's manager. |
| salespersonCode | string | The salesperson code for the lease unit. |
| salespersonName | string | The salesperson name for the lease unit. |
| roomNo | string | Specifies the lease unit's room number. |
| owner | string | Specifies the lease unit's owner. |
| ownerCode | string | Specifies the lease unit's owner code. |
| ownerName | string | Specifies the lease unit's owner name. |
| parkingUnit | boolean | Specifies whether the lease unit should be marked as parking. |
| searchName | string | Specifies the lease unit's search name. |
| totalArea | decimal | Specifies total area of the lease unit. Only possible in highest level of lease unit card. |
| uniqueNo | string | Specifies the lease unit's unique number. |
| tenantName | string | |
| rentedTill | date | |
| currentRentPrice | decimal | |
| currentRentPriceType | string | |
| currentRentPricePeriod | string | |
| systemCreatedAt | datetime | The datetime the lease unit was created. |
| systemCreatedBy | GUID | The ID of the user who created the lease unit. |
| systemModifiedAt | datetime | The last datetime the lease unit was modified. |
| systemModifiedBy | GUID | The ID of the user who modified the lease unit. |
JSON Representation
|
{ "id": "GUID", |