Get Correspondence (v1)

Get Correspondence (v1)


Description

Use this endpoint to retrieve all information about a specific piece of correspondence along with the body/content encoded in base64.

HTTP Request

GET YOUR_STORMAN_CLOUD_URi/api/v1/facility/YOUR_FACILITY_CODE/correspondence/id

Request parameters

n/a

Request example

n/a

Response parameters

Parameter

Type

Description

Parameter

Type

Description

id

number

The unique identifier for the Correspondence. Use this value for subsequent actions.

facility_code

text

The facility the Correspondence was created for.

source_system

text

Which source system created the Correspondence. Eg. WEBSITE, ONLINESTORE, STORMAN_CLOUD.

record_type

text

To which entity the Correspondence belongs to. Valid values: LEAD, RESERVATION, AGREEMENT, RECURRING_SALE

reference_no

text

The Lead, Reservation, Agreement or Recurring Sale unique reference number the Correspondence was sent for.

type

text

Defines what kind of Correspondence was stored. Valid values: EMAIL, SMS, LETTER.

subject

text

The email or letter subject. Blank if type is SMS.

sent_from

text

The email address or phone number the Correspondence was sent from. Blank if type is LETTER.

sent_to

text

The email address or phone number the Correspondence was sent to. Blank if type is LETTER.

sent_cc

text

The email cc address for the Correspondence. Blank if type is LETTER or SMS.

body

text

The body / content of the email html, sms text or pdf letter encoded in base64.

sent_at

text

Timestamp of when the Correspondence was sent in format YYYY-MM-DD HH:mm:ss.

created_by

text

The username of who sent the Correspondence.

created_at

text

Timestamp of when the Correspondence was created in format YYYY-MM-DD HH:mm:ss.

Response example

{ "id": -5, "facility_code": "SSCTY", "source_system": "STORMAN_CLOUD", "record_type": "AGREEMENT", "reference_no": "000002392", "type": "EMAIL", "subject": "Successful storage payment received.", "sent_from": null, "sent_to": "john.smith@storman.com", "sent_cc": "michael@storman.com", "body": "PHRhYmxlIGNsYXNzPSJvdXRlciIgc3R5bGU9ImJhY2tncm91bmQ6ICNmZmViM2I7IGhlaWdodDogNzg4cHg7IHdpZHRoOiA5OS4.........", "sent_at": "2020-01-06 15:59:22", "created_by": "Tom", "created_at": "2020-01-06 15:59:22" }