Represents a Lease Contract in SOFT4Spaces.
Note
For information about enabling APIs for Business Central see Overview.
API endpoint
| API | Path |
| leaseContract | businesscentralPrefix/soft4/soft4spaces/v3.0/companies({{companyId}})/leaseContracts |
Methods
| Method | Return Type | Description |
| GET leaseContract | leaseContract | Gets a lease contract object. |
| DELETE leaseContract | none | Deletes a lease contract object. |
| POST leaseContract | leaseContract | Creates a lease contract object. |
| PATCH leaseContract | leaseContract | Updates a lease contract object. |
GET leaseContracts
Description
Retrieves an existing lease contracts records from Business Central.
HTTP Request
GET
https://{{businesscentralPrefix}}/{{APIGroup}}/{{version}}/companies({{companyId}})/leaseContracts
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 contracts records.
Example Response
JSON
|
{ "id": "5baff826-91c4-ec11-8aa5-000d3adf2905", "number": "LC00001", "versionNo": 1, "versionStatus": "Old", "status": "Released", "contractDate": "2022-03-01", "contractValidUntil": "2023-02-28", "handoverDate": "2022-03-01", "customerNo": "C00010", "customerName": "School of Fine Art", "customerAddress": "10 High Tower Green", "customerAddress2": "", "customerCity": "Miami", "customerPostCode": "US-FL 37125", "customerCountryRegionCode": "", "customerCounty": "", "customerBrand": "", "contractType": "", "buildingNo": "OFFICE CENTER", "requiredDepositAmount": 0, "depositTerm": "0001-01-01", "eMailInvoice": "", "invoicingCurrencyCode": "", "invoicingFrequency": "Monthly", "minimumTerm": "", "noticePeriod": "", "salespersonCode": "", "shortcutDimension1Code": "OFFICE CENTER", "shortcutDimension2Code": "", "warrantyType": "", "warrantyAmount": 0, "warrantyValidTo": "0001-01-01", "automaticallyExtend": false, "extensionPeriod": "", "automExtendPrice": false, "sendForewarningEmail": false, "forewarningPeriod": "", "emailRecipient": "", "notifyOnExtensionDate": false, "extendPriceIndexation": false, "systemCreatedAt": "2022-04-25T12:13:45.713Z", "systemCreatedBy": "b0146dc8-5ba3-4926-9c86-44cd3f7df8d2", "systemModifiedAt": "2026-02-09T11:48:20.967Z", "systemModifiedBy": "6ac927c2-1d2f-437f-89ed-3cb0cf930e68" }, { "id": "4b30dc2e-5fa0-ed11-9a88-002248a3b4c0", "number": "LC00001", "versionNo": 2, "versionStatus": "Old", "status": "Released", "contractDate": "2022-03-01", "contractValidUntil": "2027-02-28", "handoverDate": "2022-03-01", "customerNo": "C00010", "customerName": "School of Fine Art", "customerAddress": "10 High Tower Green", "customerAddress2": "", "customerCity": "Miami", "customerPostCode": "US-FL 37125", "customerCountryRegionCode": "", "customerCounty": "", "customerBrand": "", "contractType": "", "buildingNo": "OFFICE CENTER", "requiredDepositAmount": 0, "depositTerm": "0001-01-01", "eMailInvoice": "", "invoicingCurrencyCode": "", "invoicingFrequency": "Monthly", "minimumTerm": "", "noticePeriod": "", "salespersonCode": "", "shortcutDimension1Code": "OFFICE CENTER", "shortcutDimension2Code": "", "warrantyType": "", "warrantyAmount": 0, "warrantyValidTo": "0001-01-01", "automaticallyExtend": false, "extensionPeriod": "", "automExtendPrice": false, "sendForewarningEmail": false, "forewarningPeriod": "", "emailRecipient": "", "notifyOnExtensionDate": false, "extendPriceIndexation": false, "systemCreatedAt": "2023-01-30T05:30:19.873Z", "systemCreatedBy": "5a477047-93d3-4130-a8c2-b05fb7425ffa", "systemModifiedAt": "2026-02-09T11:48:20.973Z", "systemModifiedBy": "6ac927c2-1d2f-437f-89ed-3cb0cf930e68" } |
GET leaseContract
Description
Retrieves an existing lease contract record from Business Central.
HTTP Request
GET
https://{{businesscentralPrefix}}/{{APIGroup}}/{{version}}/companies({{companyId}})/leaseContracts({{leaseContracts_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 contract record.
Example Response
JSON
|
{ "id": "19374b00-af05-f111-8405-7c1e5277ff48", "number": "LC00002", "versionNo": 4, "versionStatus": "Old", "status": "Released", "contractDate": "2025-01-01", "contractValidUntil": "2025-12-31", "handoverDate": "0001-01-01", "customerNo": "C00010", "customerName": "School of Fine Art", "customerAddress": "10 High Tower Green", "customerAddress2": "", "customerCity": "Miami", "customerPostCode": "US-FL 37125", "customerCountryRegionCode": "", "customerCounty": "", "customerBrand": "", "contractType": "", "buildingNo": "OFFICE CENTER", "requiredDepositAmount": 0, "depositTerm": "0001-01-01", "eMailInvoice": "", "invoicingCurrencyCode": "", "invoicingFrequency": "Monthly", "minimumTerm": "", "noticePeriod": "", "salespersonCode": "", "shortcutDimension1Code": "OFFICE CENTER", "shortcutDimension2Code": "", "warrantyType": "", "warrantyAmount": 0, "warrantyValidTo": "0001-01-01", "automaticallyExtend": false, "extensionPeriod": "", "automExtendPrice": false, "sendForewarningEmail": false, "forewarningPeriod": "", "emailRecipient": "", "notifyOnExtensionDate": false, "extendPriceIndexation": false, "systemCreatedAt": "2026-02-09T12:01:02.113Z", "systemCreatedBy": "6ac927c2-1d2f-437f-89ed-3cb0cf930e68", "systemModifiedAt": "2026-02-11T06:52:06.327Z", "systemModifiedBy": "6ac927c2-1d2f-437f-89ed-3cb0cf930e68" } |
GET [expand] Lease Contracts
Description
Retrieves and existing lease contract and lease contract lines records from Business Central.
HTTP Request
GET
https://{{businesscentralPrefix}}/{{APIGroup}}/{{version}}/companies({{companyId}})/leaseContracts({{leaseContracts_id}})?$expand=leaseContractLines
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 contract and lease contract lines records.
Example Response
JSON
|
{ "id": "19374b00-af05-f111-8405-7c1e5277ff48", "number": "LC00002", "versionNo": 4, "versionStatus": "Old", "status": "Released", "contractDate": "2025-01-01", "contractValidUntil": "2025-12-31", "handoverDate": "0001-01-01", "customerNo": "C00010", "customerName": "School of Fine Art", "customerAddress": "10 High Tower Green", "customerAddress2": "", "customerCity": "Miami", "customerPostCode": "US-FL 37125", "customerCountryRegionCode": "", "customerCounty": "", "customerBrand": "", "contractType": "", "buildingNo": "OFFICE CENTER", "requiredDepositAmount": 0, "depositTerm": "0001-01-01", "eMailInvoice": "", "invoicingCurrencyCode": "", "invoicingFrequency": "Monthly", "minimumTerm": "", "noticePeriod": "", "salespersonCode": "", "shortcutDimension1Code": "OFFICE CENTER", "shortcutDimension2Code": "", "warrantyType": "", "warrantyAmount": 0, "warrantyValidTo": "0001-01-01", "automaticallyExtend": false, "extensionPeriod": "", "automExtendPrice": false, "sendForewarningEmail": false, "forewarningPeriod": "", "emailRecipient": "", "notifyOnExtensionDate": false, "extendPriceIndexation": false, "systemCreatedAt": "2026-02-09T12:01:02.113Z", "systemCreatedBy": "6ac927c2-1d2f-437f-89ed-3cb0cf930e68", "systemModifiedAt": "2026-02-11T06:52:06.327Z", "systemModifiedBy": "6ac927c2-1d2f-437f-89ed-3cb0cf930e68", "leaseContractLines": [ { "id": "1e374b00-af05-f111-8405-7c1e5277ff48", "leaseContractNo": "LC00002", "versionNo": 4, "versionStatus": "Old", "status": "Released", "lineNo": 10000, "serviceNo": "HEATING", "description": "Heating Buildings", "description2": "", "leaseUnitNo": "LU00010", "startingDate": "2025-01-01", "endingDate": "2025-12-31", "quantity": 0, "priceType": "_x0020_", "pricePeriod": "Day", "unitPrice": 0, "systemCreatedAt": "2026-02-09T12:01:02.13Z", "systemCreatedBy": "6ac927c2-1d2f-437f-89ed-3cb0cf930e68", "systemModifiedAt": "2026-02-11T06:52:06.337Z", "systemModifiedBy": "6ac927c2-1d2f-437f-89ed-3cb0cf930e68" }, { "id": "22374b00-af05-f111-8405-7c1e5277ff48", "leaseContractNo": "LC00002", "versionNo": 4, "versionStatus": "Old", "status": "Released", "lineNo": 20000, "serviceNo": "CLEANING", "description": "Additional cleaning services", "description2": "", "leaseUnitNo": "LU00011", "startingDate": "2025-01-01", "endingDate": "2025-12-31", "quantity": 1, "priceType": "_x0020_", "pricePeriod": "Day", "unitPrice": 0, "systemCreatedAt": "2026-02-09T12:01:02.14Z", "systemCreatedBy": "6ac927c2-1d2f-437f-89ed-3cb0cf930e68", "systemModifiedAt": "2026-02-11T06:52:06.347Z", "systemModifiedBy": "6ac927c2-1d2f-437f-89ed-3cb0cf930e68" }, { "id": "24374b00-af05-f111-8405-7c1e5277ff48", "leaseContractNo": "LC00002", "versionNo": 4, "versionStatus": "Old", "status": "Released", "lineNo": 30000, "serviceNo": "CLEANING", "description": "Additional cleaning services", "description2": "", "leaseUnitNo": "LU00012", "startingDate": "2025-01-01", "endingDate": "2025-12-31", "quantity": 3, "priceType": "_x0020_", "pricePeriod": "Day", "unitPrice": 0, "systemCreatedAt": "2026-02-09T12:01:02.143Z", "systemCreatedBy": "6ac927c2-1d2f-437f-89ed-3cb0cf930e68", "systemModifiedAt": "2026-02-11T06:52:06.35Z", "systemModifiedBy": "6ac927c2-1d2f-437f-89ed-3cb0cf930e68" } |
POST leaseContract
Description
Creates a new lease contract in Business Central.
HTTP Request
POST
https://{{businesscentralPrefix}}/{{APIGroup}}/{{version}}/companies({{companyId}})/leaseContracts
Request Headers
| Header | Value |
| Authorization | NTLM, OAuth2. Required. |
| Accept | application/json |
Request Body
Provide a JSON object with lease contract data.
JSON
|
{ "contractDate": "2023-06-01", "contractValidUntil": "2029-06-30"" } |
Response
Returns a 201 Created status code and the created lease contract object.
PATCH leaseContract
Description
Updates existing lease contract in Business Central.
HTTP Request
PATCH
https://{{businesscentralPrefix}}/{{APIGroup}}/{{version}}/companies({{companyId}})/leaseContracts({{leaseContracts_id}})
Request Headers
| Header | Value |
| Authorization | NTLM, OAuth2. Required. |
| Accept | application/json |
Request Body
Provide the fields to be updated of lease contract in Business Central.
JSON
|
{ "contractValidUntil": "2029-06-30" } |
Response
Returns a 200 OK status code.
Properties
| Property | Type | Description |
| id | GUID | The unique ID of the lease contract. Non-editable. |
| number | string | Specifies the number of the lease contract. |
| versionNo | integer | Specifies the version number of lease contract. |
| versionStatus | string | Specifies the version status of lease contract. It can be “New”, “Valid”, “Old”. |
| status | string | Specifies the status of lease contract. It can be “New”, “Ready”, “Reserved”, “Released”, “Terminated” |
| contractDate | date | The lease contract starting date. |
| contractValidUntil | date | The lease contract ending date. |
| handoverDate | date | The lease contract handover date. |
| customerNo | string | The customer's number. |
| customerName | string | The customer's name. |
| customerAddress | string | Specifies the customer's address. |
| customerAddress2 | string | Specifies the customer's address. |
| customerCity | string | Specifies the customer's city. |
| customerPostCode | string | Specifies the customer's postal code. |
| customerCountryRegionCode | string | Specifies the customer's country/region code. |
| customerCounty | string | Specifies the state, province or county as a part of the address. |
| customerBrand | string | Specifies the customer's brand code. |
| contractType | string | Specifies the lease contract type code. |
| buildingNo | string | Specifies the building to which the lease unit or units in the contract belong. |
| requiredDepositAmount | decimal | The deposit amount. |
| depositTerm | date | Specifies the date when the deposit must be paid. |
| eMailInvoice | string | Specifies the lease contract's email address. |
| invoicingCurrencyCode | string | The default currency code for the lease contract. |
| invoicingFrequency | string | Monthly, Quarterly, Yearly, Weekly, Fortnightly, Semi-Annual. |
| minimumTerm | string | Specifies a minimum term of the lease contract, e.g., “3M”, “1Y”. |
| noticePeriod | string | Specifies the shortest notice period for the lease contract termination. |
| salespersonCode | string | The salesperson code for the lease contract. |
| shortcutDimension1Code | string | Specifies the Global Dimension 1 value code. |
| shortcutDimension2Code | string | Specifies the Global Dimension 2 value code. |
| warrantyType | string | Specifies the type warranty for the lease contract. |
| warrantyAmount | decimal | The warranty amount. |
| warrantyValidTo | date | The warranty expiration date. |
| automaticallyExtend | boolean | Specifies whether the lease contract is extended automatically or not. |
| extensionPeriod | string | Specifies the lease contract extension period. |
| automExtendPrice | boolean | Specifies whether the price is extended. |
| sendForewarningEmail | boolean | Specifies whether email notifications need to be sent before extension. |
| forewarningPeriod | string | The forewarning period. |
| emailRecipient | string | Specifies the email address used for sending notifications related to the auto-extension functionality. |
| notifyOnExtensionDate | boolean | Specifies whether an email notification is sent on the extension date. |
| extendPriceIndexation | boolean | Specifies whether the price indexation is extended. |
| systemCreatedAt | datetime | The datetime the lease contract was created. |
| systemCreatedBy | GUID | The ID of the user who created the lease contract. |
| systemModifiedAt | datetime | The last datetime the lease contract was modified. |
| systemModifiedBy | GUID | The ID of the user who modified the lease contract. |
JSON Representation
|
{ "id": "GUID", "number": "string", "versionNo": "integer", "versionStatus": "string", "status": "string", "contractDate": "date", "contractValidUntil": "date", "handoverDate": "date", "customerNo": "string", "customerName": "string", "customerAddress": "string", "customerAddress2": "string", "customerCity": "string", "customerPostCode": "string", "customerCountryRegionCode": "string", "customerCounty": "string", "customerBrand": "string", "contractType": "string", "buildingNo": "string", "requiredDepositAmount": "decimal", "depositTerm": "date", "eMailInvoice": "string", "invoicingCurrencyCode": "string", "invoicingFrequency": "string", "minimumTerm": "string", "noticePeriod": "string", "salespersonCode": "string", "shortcutDimension1Code": "string", "shortcutDimension2Code": "string", "warrantyType": "string", "warrantyAmount": "decimal", "warrantyValidTo": "date", "automaticallyExtend": "boolean", "extensionPeriod": "string", "automExtendPrice": "boolean", "sendForewarningEmail": "boolean", "forewarningPeriod": "string", "emailRecipient": "string", "notifyOnExtensionDate": "boolean", "extendPriceIndexation": "boolean", "systemCreatedAt": "datetime", "systemCreatedBy": "GUID", "systemModifiedAt": "datetime", "systemModifiedBy": "GUID" } |
Related API's (expand)
| Name | Type | Description |
| leaseContractLines | Collection(Microsoft.NAV.leaseContractLines) | Gets the leasecontractlines of the leaseContract. |
| customer | Microsoft.NAV.customer | Gets the customer of the leaseContract. |
| leaseUnit | Collection(Microsoft.NAV.leaseUnit) | Gets the leaseunit of the leaseContract. |