maintenance asset resource

Represents a Maintenance Asset in SOFT4Spaces.

Note

For information about enabling APIs for Business Central see Overview.

 

 

API endpoint

 

API Path
maintenanceAssets https://{{businesscentralPrefix}}/{{APIGroup}}/{{version}}/companies({{companyId}})/maintenanceAssets

 

Methods

 

Method Return Type Description
GET maintenanceAssets maintenance asset Gets a maintenance asset object.
DELETE maintenanceAssets none Deletes a maintenance asset object.
POST maintenanceAssets maintenance asset Creates a maintenance asset object.
PATCH maintenanceAssets maintenance asset Updates a maintenance asset object.

 

GET documents

Description

Retrieves existing maintenance asset records from Business Central.

HTTP Request

GET

https://{{businesscentralPrefix}}/api/{{publisher}}/{{group}}/{{version}}/companies({{companyId}})/maintenanceAssets

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 maintenance asset records.

Example Response

JSON

{
           "id": "9d50663f-4024-ed11-97e8-000d3ad8733f",
           "no": "A/C",
           "propertyCode": "ARKA OFFICE",
           "propertyDescription": "Office ARKA",
           "defaultReminderType": "",
           "description": "",
           "assetvalue": 0,
           "assetType": "",
           "uniqueCode": "",
           "location": "",
           "assetStatus": "Maintainable",
           "warrantyExpirationDate": "0001-01-01"
       },
       {
           "id": "17e2f02a-f741-f111-a820-7ced8d4a3899",
           "no": "LIFT",
           "propertyCode": "ARKA OFFICE",
           "propertyDescription": "Office ARKA",
           "defaultReminderType": "",
           "description": "Lift (broken)",
           "assetvalue": 0,
           "assetType": "LIFT",
           "uniqueCode": "",
           "location": "",
           "assetStatus": "Maintainable",
           "warrantyExpirationDate": "0001-01-01"
       },

 

POST documents

Description

Creates a new maintenance asset in Business Central.

HTTP Request

POST

https://{{businesscentralPrefix}}/api/{{publisher}}/{{group}}/{{version}}/companies({{companyId}})/maintenanceAssets

Request Headers

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

Request Body

Provide a JSON object with maintenance asset data.

JSON

{
   "no": "ELEVATOR",
   "propertyCode": "ARKA OFFICE",
   "defaultReminderType": "",
   "description": "Main elevator",
   "assetvalue": 0,
   "assetType": "Equipment",
   "uniqueCode": "",
   "location": "",
   "assetStatus": "Maintainable",
   "warrantyExpirationDate": "0001-01-01"
}

Response

Returns a 201 Created status code and the created maintenance asset object.

 

PATCH documents

Description

Updates existing maintenance asset in Business Central.

HTTP Request

PATCH

https://{{businesscentralPrefix}}/api/{{publisher}}/{{group}}/{{version}}/companies({{companyId}})/maintenanceAssets({{maintenanceasset_id}})

Request Headers

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

Request Body

Provide the fields to be updated for maintenance assets in Business Central.

JSON

{
   "description" : "Lift (broken)"
}

Response

Returns a 200 OK status code.

 

Properties

 

Property Type Description
id GUID The unique ID of the lease contract. Non-editable.
no string Specifies the number of the maintenance asset. This value should be unique within the property.
propertyCode string Specifies the property code to which the maintenance asset is related.
propertyDescription string Specifies property description.
defaultReminderType string Specifies the date reminder type.
description string Specifies maintenance asset description.
assetvalue decimal Specifies the maintenance asset value.
assetType string Specifies the maintenance asset type.
uniqueCode string Specifies the unique code of the maintenance asset.
location string Specifies the maintenance asset location.
assetStatus string Specifies the maintenance asset status. It can be: Maintainable, Non-maintainable, Disposed.
warrantyExpirationDate date Specifies the maintenance asset warranty expiration date.

 

JSON Representation 

{

            "id": GUID,
           "no": string,
           "propertyCode": string,
           "propertyDescription": string,
           "defaultReminderType": string,
           "description": string",
           "assetvalue": decimal,
           "assetType": string,
           "uniqueCode": string,
           "location": string,
           "assetStatus": string,
           "warrantyExpirationDate": date

}