Email

WIP: A summary needs to be written for Email


POST/v3/statement/:id/message

Send Statement

Send an existing Statement via email/sms

URL parameters

  • Name
    id
    Type
    string Required
    Description
    the id for the object

Body parameters

  • Name
    customerId
    Type
    string Required
    Description
  • Name
    emailSubject
    Type
    string Required
    Description
  • Name
    includeInvoices
    Type
    boolean Required
    Description
  • Name
    includeNote
    Type
    boolean Required
    Description
  • Name
    orderBy
    Type
    object
    Description
  • Name
    sendEmail
    Type
    boolean Required
    Description
  • Name
    sendSms
    Type
    boolean Required
    Description
  • Name
    statementColumns
    Type
    array
    Description
  • Name
    text
    Type
    string Required
    Description

200 Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message
  • Name
    data
    Type
    object Required
    Description
    Message schema

Properties for data object

  • Name
    id
    Type
    string Required
    Description
  • Name
    createdDate
    Type
    string Required
    Description
  • Name
    updatedDate
    Type
    string Required
    Description
  • Name
    locationId
    Type
    string Required
    Description
  • Name
    companyId
    Type
    string Required
    Description
  • Name
    text
    Type
    string Required
    Description
    appears in message center/thread (content of message if SMS, plaintext/preview if email)
  • Name
    sendEmail
    Type
    boolean Required
    Description
    if an email should be sent, is null if author is a Customer
  • Name
    emailSubject
    Type
    string Required
    Description
    overrides default email subject
  • Name
    emailStatus
    Type
    string Required
    Description
  • Name
    emailError
    Type
    string Required
    Description
    error sending email, if any
  • Name
    sendSms
    Type
    boolean Required
    Description
    if an sms should be sent, is null if author is a Customer
  • Name
    smsStatus
    Type
    string Required
    Description
  • Name
    smsError
    Type
    string Required
    Description
    error sending sms, if any
  • Name
    authorType
    Type
    string Required
    Description
  • Name
    origin
    Type
    string Required
    Description
  • Name
    isOrderShare
    Type
    boolean Required
    Description
    true if this message created via Order Share modal
  • Name
    orderShareType
    Type
    string Required
    Description
  • Name
    customerId
    Type
    string Required
    Description
    the id of the customer that authored or was sent the message
  • Name
    userId
    Type
    string Required
    Description
    the user who authored the message
  • Name
    orderId
    Type
    string Required
    Description
    an order associated with this message
  • Name
    appointmentId
    Type
    string Required
    Description
    appointment associated with this message
  • Name
    vehicleId
    Type
    string Required
    Description
    a vehicle associated with this message
  • Name
    vendorId
    Type
    string Required
    Description
    a vendor associated with this message
  • Name
    shopRead
    Type
    boolean Required
    Description
    true if someone at the shop has read a Customer message, is null if author is a User
  • Name
    internal
    Type
    boolean Required
    Description
    true if internal note, is null if author is a Customer
  • Name
    detached
    Type
    boolean Required
    Description
    true if message is public but has no reference to a customer (only for migration purposes)
  • Name
    conversationId
    Type
    string Required
    Description
  • Name
    deleted
    Type
    boolean Required
    Description
    if the record has been deleted
  • Name
    deletedUserId
    Type
    string Required
    Description
    the user that deleted the record or null if not deleted
  • Name
    deletedDate
    Type
    string Required
    Description
    the date that the record was deleted or null if not deleted
  • Name
    deletedReason
    Type
    string Required
    Description
    the reason that the record was deleted
  • Name
    locationReviewRequestId
    Type
    string Required
    Description
    the id of the review request
  • Name
    suggestedReply
    Type
    string Required
    Description
    if we can suggest a reply, this will have a value to suggest to the user in the app
  • Name
    suggestedReplyState
    Type
    string Required
    Description
  • Name
    requestAppointmentConfirmation
    Type
    boolean Required
    Description
    if true, the email/sms will contain actions to confirm/decline an appointment
  • Name
    appointmentEvent
    Type
    string Required
    Description
  • Name
    avoidSMSQuietHours
    Type
    boolean Required
    Description
  • Name
    files
    Type
    array Required
    Description
  • Name
    orderNumber
    Type
    string
    Description
    the order number
  • Name
    userColor
    Type
    string
    Description
    the color for the user

4xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if not successful
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message

5xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if not successful
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message

Example Request
application/json

POST
/v3/statement/:id/message
curl https://api.shopmonkey.cloud/v3/statement/ID/message \ 
  -H "Authorization: Bearer ${SM_TOKEN}" \ 
  -X POST -H 'Content-Type: application/json' \ 
  --data '{ "customerId" : "value", "emailSubject" : "value", "includeInvoices" : false, "includeNote" : false, "sendEmail" : false, "sendSms" : false, "text" : "value" }'

Example Response
application/json

{
  "success": true,
  "data": {
    "id": "id",
    "createdDate": "createdDate",
    "updatedDate": null,
    "locationId": "locationId",
    "companyId": "companyId",
    "text": "text",
    "sendEmail": true,
    "emailSubject": null,
    "emailStatus": null,
    "emailError": null,
    "sendSms": true,
    "smsStatus": null,
    "smsError": null,
    "authorType": "authorType",
    "origin": "origin",
    "isOrderShare": true,
    "orderShareType": null,
    "customerId": null,
    "userId": null,
    "orderId": null,
    "appointmentId": null,
    "vehicleId": null,
    "vendorId": null,
    "shopRead": true,
    "internal": true,
    "detached": true,
    "conversationId": null,
    "deleted": true,
    "deletedUserId": null,
    "deletedDate": null,
    "deletedReason": null,
    "locationReviewRequestId": null,
    "suggestedReply": null,
    "suggestedReplyState": "suggestedReplyState",
    "requestAppointmentConfirmation": true,
    "appointmentEvent": null,
    "files": [
      {
        "fileName": "fileName",
        "fileSize": 1,
        "fileType": "fileType",
        "id": "id",
        "thumbnailUrl": "thumbnailUrl",
        "url": "url"
      }
    ],
    "orderNumber": null,
    "userColor": null
  }
}