messages resource type

Represents a Work Order Messages in SOFT4Spaces.

Note

For information about enabling APIs for Business Central see Overview.

 

 

API endpoint

 

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

 

Methods

 

Method Return Type Description
GET messages messages Gets a message object.
DELETE messages none Deletes a message object.
POST messages messages Creates a message object.
PATCH messages messages Updates a message object.

 

GET messages

Description

Retrieves an existing messages records from Business Central.

HTTP Request

GET

https://{{businesscentralPrefix}}/api/soft4/soft4spaces/v3.0/companies({{companyId}})/messages

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 messages records.

Example Response

JSON

 {
           "id": "840a6b12-a238-f111-889f-e5dbb3e633b4",
           "messageNo": 1,
           "messageType": "External",
           "senderType": "Property_x0020_Manager",
           "customerNo": "",
           "senderPersonCode": "",
           "messageCreated": "2026-04-15T08:07:06.463Z",
           "subject": "WO00001 (New)",
           "body": "Hi, which appointment date suits you?",
           "status": "Unread",
           "messageRead": "0001-01-01T00:00:00Z",
           "workOrderNo": "WO00001",
           "recipientType": "Tenant",
           "recipOriginatorNo": "",
           "recipientPersonCode": "",
           "originatorSalesPersonCode": "",
           "originatorSalesPersonName": "",
           "displayFrom": "",
           "displayTo": "Tenant",
           "syncToTenantPortal": false,
           "tenantPortalUserNo": 0,
           "emailSent": false,
           "bodyBlob@odata.mediaEditLink": "http://businesscentralPrefix/api/soft4/soft4spaces/v3.0/companies(1234af56-1eed-f011-9de5-6045bdfd5df5)/messages(840a6b12-a238-f111-889f-e5dbb3e633b4)/bodyBlob",
           "bodyBlob@odata.mediaReadLink": "http://businesscentralPrefix/api/soft4/soft4spaces/v3.0/companies(1234af56-1eed-f011-9de5-6045bdfd5df5)/messages(840a6b12-a238-f111-889f-e5dbb3e633b4)/bodyBlob"
 }

 

GET messages

Description

Retrieves an existing message record from Business Central.

HTTP Request

GET

https://{{businesscentralPrefix}}/api/soft4/soft4spaces/v3.0/companies({{companyId}})/messages({{message_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 message record.

Example Response

JSON

{
           "id": "840a6b12-a238-f121-889f-e5dbb3e633b4",
           "messageNo": 1,
           "messageType": "External",
           "senderType": "Property_x0020_Manager",
           "customerNo": "",
           "senderPersonCode": "",
           "messageCreated": "2026-04-15T08:07:06.463Z",
           "subject": "WO00001 (New)",
           "body": "Hi, which appointment date suits you?",
           "status": "Unread",
           "messageRead": "0001-01-01T00:00:00Z",
           "workOrderNo": "WO00001",
           "recipientType": "Tenant",
           "recipientPersonCode": "",
           "displayFrom": "",
           "displayTo": "Tenant",
           "syncToTenantPortal": false,
           "tenantPortalUserNo": 0,
           "emailSent": false,
           "bodyBlob@odata.mediaEditLink": "http://businesscentralPrefix/api/soft4/soft4spaces/v3.0/companies(1234af56-1eed-f011-9de5-6045bdfd5df5)/messages(840a6b12-a238-f111-889f-e5dbb3e633b4)/bodyBlob",
           "bodyBlob@odata.mediaReadLink": "http://businesscentralPrefix/api/soft4/soft4spaces/v3.0/companies(1234af56-1eed-f011-9de5-6045bdfd5df5)/messages(840a6b12-a238-f111-889f-e5dbb3e633b4)/bodyBlob"
 }

 

POST messages

Description

Creates a new message in Business Central.

HTTP Request

POST

https://{{businesscentralPrefix}}/api/soft4/soft4spaces/v3.0/companies({{companyId}})/messages

Request Headers

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

Request Body

Provide a JSON object with message data.

JSON

{
  "senderType": "Tenant",
  "customerNo": "10000",
  "senderPersonCode": "",
  "subject": "WO00001 (New)",
  "body": "Hi, July 20th",
  "workOrderNo": "WO00001"
}

Response

Returns a 201 Created status code and the created message object.

 

PATCH message

Description

Updates existing message in Business Central.

HTTP Request

PATCH

https://{{businesscentralPrefix}}/api/soft4/soft4spaces/v3.0/companies({{companyId}})/messages({{message_id}})

Request Headers

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

Request Body

Provide the fields to be updated of message in Business Central.

JSON

{
   "body": "Hi, July 15th",
   "workOrderNo": “WO00001”
}

Response

Returns a 200 OK status code.

 

Properties

 

Property Type Description
id GUID The unique ID of message. Non-editable.
messageNo integer Specifies message number.
messageType string Specifies the message type. It can be: external, internal, or system.
senderType string Specifies the sender type. It can be: “”, Tenant, Property Manager
customerNo string Specifies the customer number.
senderPersonCode string Specifies the salesperson code if the sender type is “Property Manager”.
messageCreated datetime Specifies message creation date.
subject string Specifies message's subject.
body string Specifies message's body.
status string Specifies the message's status. It can be: Unread, Read
messageRead datetime Specifies the datetime when the message was read.
workOrderNo string Specifies the work order number to which the message is related.
recipientType string Specifies the recipient's type. It can be: “”, Tenant, Property Manager.
recipientPersonCode string Specifies the salesperson code if the recipient is a Property Manager.
displayFrom string Specifies who sent the message.
displayTo string Specifies to whom the message was sent.
syncToTenantPortal boolean Specifies whether the message should be synchronized with the tenant portal.
tenantPortalUserNo integer Specifies the tenant portal user no.
emailSent boolean Specifies if an additional email was sent after message creation.
bodyBlob@odata.mediaEditLink link Link for editing media.
bodyBlob@odata.mediaReadLink link Link for reading media.

 

JSON Representation

{
    "id": GUID,
    "messageNo": integer,
    "messageType": string,
    "senderType": string,
    "customerNo": string,
    "senderPersonCode": string,
    "messageCreated": datetime,
    "subject": string,
    "body": string,
    "status": string,
    "messageRead": datetime,
    "workOrderNo": string,
    "recipientType": string,
    "recipientPersonCode": string,
    "displayFrom": string,
    "displayTo": string,
    "syncToTenantPortal": boolean,
    "tenantPortalUserNo": integer,
    "emailSent": boolean,
    "bodyBlob@odata.mediaEditLink": link,
    "bodyBlob@odata.mediaReadLink": link
}

 

 

Name Type Description
bodyBlob Blob Gets the file blob of the message.