leaseContrDiscount resource type

Represents a Lease Contract Discount in SOFT4Spaces.

Note

For information about enabling APIs for Business Central see Overview.

 

 

API endpoint

 

API Path
leaseContrDiscount businesscentralPrefix/soft4/soft4spaces/v3.0/companies({{companyId}})/leaseContrDiscounts

 

Methods

 

Method Return Type Description
GET leaseContrDiscount leaseContrDiscount Gets a lease contract discount object.
DELETE leaseContrDiscount none Deletes a lease contract discount object.
POST leaseContrDiscount leaseContrDiscount Creates a lease contract discount object.
PATCH leaseContrDiscount leaseContrDiscount Updates a lease contract discount object.

 

GET leaseContrDiscount

Description

Retrieves an existing lease contract discount record from Business Central.

HTTP Request

GET

https://{{businesscentralPrefix}}/{{APIGroup}}/{{version}}/companies({{companyId}})/leaseContrDiscounts

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 discount record.

Example Response

JSON

{
   "id": "5f0b8153-4412-f111-8408-6045bddef572",
   "leaseContractNo": "LC00024",
   "leaseUnitNo": "LU00031",
   "serviceNo": "RENT",
   "contractVersionNo": 5,
   "startingDate": "2025-04-01",
   "endingDate": "2025-04-30",
   "discountType": "Percentage",
   "amount": 100,
   "period": "Month",
   "description": "",
   "systemCreatedAt": "2026-02-25T12:20:13.227Z",
   "systemCreatedBy": "6ac927c2-1d2f-437f-89ed-3cb0cf930e68",
   "systemModifiedAt": "2026-02-25T12:20:22.107Z",
   "systemModifiedBy": "6ac927c2-1d2f-437f-89ed-3cb0cf930e68"
}

 

POST leaseContrDiscount

Description

Creates a new lease contract discount record in Business Central.

HTTP Request

POST

https://{{businesscentralPrefix}}/{{APIGroup}}/{{version}}/companies({{companyId}})/leaseContrDiscounts

Request Headers

Header Value
Authorization NTLM, OAuth2. Required.
Accept application/json

Request Body

Provide a JSON object with lease contract discount data.

JSON

{
      "leaseContractNo": "{{leaseContracts_no}}",
   "leaseUnitNo": "LU00031",
   "serviceNo": "RENT",
   "contractVersionNo": {{leaseContracts_versionNo}},
   "startingDate": "2025-05-01",
   "endingDate": "2025-05-31",
   "discountType": "Area",
   "amount": 4,
   "period": "Month",
   "description": "discount"
}

Response

Returns a 201 Created status code and the created lease contract discount object.

 

PATCH leaseContrDiscount

Description

Updates existing lease contract discount record in Business Central.

HTTP Request

PATCH

https://{{businesscentralPrefix}}/{{APIGroup}}/{{version}}/companies({{companyId}})/customerBrands({{customerBrands_id}})

Request Headers

Header Value
Authorization NTLM, OAuth2. Required.
Accept application/json

Request Body

Provide the fields to be updated of lease contract discount in Business Central.

JSON

{
   "amount": 5,
   "description": "discount5"
}

Response

Returns a 200 OK status code.

Properties

 

Property Type Description
id GUID The unique ID of the lease contract discount. Non-editable.
leaseContractNo string Specifies the number of the lease contract.
leaseUnitNo string Specifies the number of the lease unit.
serviceNo string Specifies the number of the service.
contractVersionNo integer Specifies the version number of lease contract.
startingDate date The discount starting date.
endingDate date The discount ending date.
discountType string Specifies the type of discount. It can be “Area”, “Fixed”, “Percentage”.
amount decimal The discount amount.
period string Specifies the period of discount. It can be “Day”, “Week”, “Month”, “Quarter”, “Year”.
description string Specifies the description of the discount.
systemCreatedAt datetime The datetime the discount was created. 
systemCreatedBy GUID The ID of the user who created the discount.
systemModifiedAt datetime The last datetime the discount was modified.
systemModifiedBy GUID The ID of the user who modified the discount.

 

JSON Representation

{
   "id": "GUID",
   "leaseContractNo": "string",
   "leaseUnitNo": "string",

   "serviceNo": "string",
   "contractVersionNo": "integer",

   "startingDate": "date",
   "endingDate": "date"
   "discountType": "string",

   "amount": "decimal",
   "period": "string"
   "description": "string",

   "systemCreatedAt": "datetime"
   "systemCreatedBy": "GUID",
   "systemModifiedAt": "datetime",
   "systemModifiedBy": "GUID"
}