Send Correspondence (v1)

Send Correspondence (v1)


Description

Use this endpoint to send an email or SMS to a customer or lead, using a notice template already configured in Storman.

Unlike Create Correspondence, this API will actually send the email or sms using the facility SMS account or SMTP settings

HTTP Request

POST YOUR_STORMAN_CLOUD_URi/api/v1/facility/YOUR_FACILITY_CODE/correspondence/send

Request parameters

Parameter

Type

Description

Required

Parameter

Type

Description

Required

source_system

text

The source system/your integration that triggered the send, of this correspondence: website or online store

Yes

record_type

text

The entity you want to send something to: lead or reservation or AGREEMENT or recurring_sale

Yes

reference_no

text

The reference nuumber of the entity you would like to send this to:

  • for a lead this is the lead number

  • for a reservation this is the reservation number

  • for an AGREEMENT this is the agreement number

  • for a recurring_saleis the recurring sale number

Yes

type

text

The type of correspondence to send: email or sms

Yes

notice_name

text

The name of the notice to send to the Storman customer:

  • For record_type of AGREEMENT and recurring_sale, Storman will search for the notice name, that is on the same correspondence plan as the reference_no that is passed.

  • For the record_type lead and reservation the 0 - Default plan will be searched.

For a list of valid notices, please see List Correspondence (v1)

Yes

Request example

// sending an email notice to an agreement { "source_system": "MOBILE APP", "record_type": "AGREEMENT", "reference_no": "000002392", "notice_name": "Late 45 - Notice to vacate", "type": "EMAIL" } // sending an sms notice to a reservation { "source_system": "MOBILE APP", "record_type": "RESERVATION", "reference_no": "00003699", "notice_name": "Thank you for your enquiry", "type": "SMS" }

Response parameters

Parameter

Type

Description

Parameter

Type

Description

success

boolean

Whether the request was processed successfully or not

message

text

A custom message for this action

data

object

correspondence_id of the newly created Correspondence record.

Response example

{ "success": true, "message": "Correspondence successfully sent", "data": { "correspondence_id": -827 } }