Message

The Message object represents a message in the system sent either internal or externally.


GET/v3/message/:id

Find Message

Find one Message by id

URL parameters

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

Produces

The response content type: application/json

200 Response

  • Name
    data
    Type
    object Required
    Description
    Message schema
  • 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

Properties for data object

  • Name
    id
    Type
    string Required
    Description
  • Name
    meta
    Type
    object Required
    Description
    the metadata about the most recent change to the row
  • Name
    metadata
    Type
    object
    Description
    metadata reserved for customers to control
  • 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
    type
    Type
    one of: Transactional, Marketing 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
    one of: Pending, Sent, Read, Error, Delivered, Unknown 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
    one of: Pending, Sent, Read, Error, Delivered, Unknown Required
    Description
  • Name
    smsError
    Type
    string Required
    Description
    error sending sms, if any
  • Name
    authorType
    Type
    one of: Customer, User, System Required
    Description
  • Name
    origin
    Type
    one of: ChatBot, Scheduler, Campaign, Web, Mobile, CustomerOrderPage, SMS, Email Required
    Description
  • Name
    isOrderShare
    Type
    boolean Required
    Description
    true if this message created via Order Share modal
  • Name
    orderShareType
    Type
    one of: Inspection, Order 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
    oneTimeCampaignId
    Type
    string Required
    Description
    the id of the one time campaign that generated this message
  • Name
    automatedCampaignId
    Type
    string Required
    Description
    the id of the automated campaign that generated this message
  • 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
    one of: None, Partial, Full Required
    Description
  • Name
    requestAppointmentConfirmation
    Type
    boolean Required
    Description
    if true, the email/sms will contain actions to confirm/decline an appointment
  • Name
    appointmentEvent
    Type
    one of: Rescheduled, Scheduled, Reminder, Confirm, Canceled, Acknowledgement Required
    Description
  • Name
    avoidSMSQuietHours
    Type
    boolean Required
    Description
  • Name
    imported
    Type
    boolean Required
    Description
  • Name
    emailId
    Type
    string Required
    Description
    the id of the customer email that authored or was sent the message
  • Name
    phoneNumberId
    Type
    string Required
    Description
    the id of the customer phone number that authored or was sent the message
  • Name
    emailDeliveries
    Type
    array
    Description
  • Name
    files
    Type
    array Required
    Description
  • Name
    orderNumber
    Type
    string
    Description
    the order number
  • Name
    smsDeliveries
    Type
    array
    Description
  • Name
    userColor
    Type
    string
    Description
    the color for the user

Properties for meta object

  • Name
    userId
    Type
    string
    Description
    the user id that made the most recent change
  • Name
    sessionId
    Type
    string
    Description
    the session id for the most recent change
  • Name
    version
    Type
    number
    Description
    a monotonically increasing number for the most recent change

4xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    data
    Type
    object
    Description
    An optional object containing relevant error data
  • 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
    data
    Type
    object
    Description
    An optional object containing relevant error data
  • 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

GET
/v3/message/:id
curl https://api.shopmonkey.cloud/v3/message/:id \
  -H "Authorization: Bearer ${SM_TOKEN}"

Example Response
application/json

{
  "success": true,
  "data": {
    "id": "id",
    "meta": {
      "userId": "userId",
      "sessionId": "sessionId",
      "version": 1
    },
    "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,
    "customerId": null,
    "userId": null,
    "orderId": null,
    "vehicleId": null,
    "vendorId": null,
    "shopRead": true,
    "internal": true,
    "detached": true,
    "conversationId": null,
    "deleted": true,
    "deletedUserId": null,
    "deletedDate": null,
    "deletedReason": null,
    "files": [
      {
        "id": "id",
        "url": "url",
        "thumbnailUrl": "thumbnailUrl",
        "fileSize": 1,
        "fileType": "fileType",
        "fileName": "fileName"
      }
    ]
  }
}

GET/v3/message

List Messages

Find all messages

Query String parameters

  • Name
    ids
    Type
    array
    Description
  • Name
    limit
    Type
    number
    Description
    the limit on the number of records to return
  • Name
    orderby
    Type
    string
    Description
    the order instructions for the result
  • Name
    params
    Type
    string
    Description
    additional request specific params
  • Name
    skip
    Type
    number
    Description
    the number of records to skip for a paginated result
  • Name
    where
    Type
    string
    Description
    an object to use for filtering the results

Produces

The response content type: application/json

200 Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    data
    Type
    array Required
    Description
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if success = false
  • Name
    meta
    Type
    object
    Description
  • 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

Properties for meta object

  • Name
    hasMore
    Type
    boolean
    Description
    if there are more records available
  • Name
    sums
    Type
    object
    Description
  • Name
    total
    Type
    number
    Description
    the total number of records

4xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    data
    Type
    object
    Description
    An optional object containing relevant error data
  • 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
    data
    Type
    object
    Description
    An optional object containing relevant error data
  • 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

GET
/v3/message
curl https://api.shopmonkey.cloud/v3/message \
  -H "Authorization: Bearer ${SM_TOKEN}"

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,
      "customerId": null,
      "userId": null,
      "orderId": null,
      "vehicleId": null,
      "vendorId": null,
      "shopRead": true,
      "internal": true,
      "detached": true,
      "conversationId": null,
      "deleted": true,
      "deletedUserId": null,
      "deletedDate": null,
      "deletedReason": null,
      "files": [
        {
          "id": "id",
          "url": "url",
          "thumbnailUrl": "thumbnailUrl",
          "fileSize": 1,
          "fileType": "fileType",
          "fileName": "fileName"
        }
      ]
    }
  ]
}

POST/v3/message

Create Message

Create a new customer message

Body parameters

Consumes

The following content type is required: application/json

  • Name
    sendEmail
    Type
    boolean
    Description
    if an email should be sent, is null if author is a Customer
  • Name
    emailSubject
    Type
    string
    Description
    overrides default email subject
  • Name
    sendSms
    Type
    boolean
    Description
    if an sms should be sent, is null if author is a Customer
  • Name
    isOrderShare
    Type
    boolean
    Description
    true if this message created via Order Share modal
  • Name
    orderShareType
    Type
    one of: Inspection, Order
    Description
  • Name
    orderId
    Type
    string
    Description
    an order associated with this message
  • Name
    vehicleId
    Type
    string
    Description
    a vehicle associated with this message
  • Name
    suggestedReplyState
    Type
    one of: None, Partial, Full
    Description
  • Name
    emailId
    Type
    string
    Description
    the id of the customer email that authored or was sent the message
  • Name
    phoneNumberId
    Type
    string
    Description
    the id of the customer phone number that authored or was sent the message
  • Name
    text
    Type
    string Required
    Description
    appears in message center/thread (content of message if SMS, plaintext/preview if email)
  • Name
    customerId
    Type
    string Required
    Description
    the id of the customer that authored or was sent the message
  • Name
    files
    Type
    array
    Description
    an ordered array of file ids

Produces

The response content type: application/json

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
    message
    Type
    string
    Description
    the error message if success = false
  • 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
    type
    Type
    one of: Transactional, Marketing 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
    one of: Pending, Sent, Read, Error, Delivered, Unknown 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
    one of: Pending, Sent, Read, Error, Delivered, Unknown Required
    Description
  • Name
    smsError
    Type
    string Required
    Description
    error sending sms, if any
  • Name
    authorType
    Type
    one of: Customer, User, System Required
    Description
  • Name
    origin
    Type
    one of: ChatBot, Scheduler, Campaign, Web, Mobile, CustomerOrderPage, SMS, Email Required
    Description
  • Name
    isOrderShare
    Type
    boolean Required
    Description
    true if this message created via Order Share modal
  • Name
    orderShareType
    Type
    one of: Inspection, Order 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
    oneTimeCampaignId
    Type
    string Required
    Description
    the id of the one time campaign that generated this message
  • Name
    automatedCampaignId
    Type
    string Required
    Description
    the id of the automated campaign that generated this message
  • 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
    one of: None, Partial, Full Required
    Description
  • Name
    requestAppointmentConfirmation
    Type
    boolean Required
    Description
    if true, the email/sms will contain actions to confirm/decline an appointment
  • Name
    appointmentEvent
    Type
    one of: Rescheduled, Scheduled, Reminder, Confirm, Canceled, Acknowledgement Required
    Description
  • Name
    avoidSMSQuietHours
    Type
    boolean Required
    Description
  • Name
    imported
    Type
    boolean Required
    Description
  • Name
    emailId
    Type
    string Required
    Description
    the id of the customer email that authored or was sent the message
  • Name
    phoneNumberId
    Type
    string Required
    Description
    the id of the customer phone number that authored or was sent the message
  • Name
    emailDeliveries
    Type
    array
    Description
  • Name
    files
    Type
    array Required
    Description
  • Name
    orderNumber
    Type
    string
    Description
    the order number
  • Name
    smsDeliveries
    Type
    array
    Description
  • Name
    userColor
    Type
    string
    Description
    the color for the user

4xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    data
    Type
    object
    Description
    An optional object containing relevant error data
  • 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
    data
    Type
    object
    Description
    An optional object containing relevant error data
  • 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/message
curl https://api.shopmonkey.cloud/v3/message \
  -H "Authorization: Bearer ${SM_TOKEN}" \
  -H 'Content-Type: application/json' \
  --data '{ "text" : "value", "customerId" : "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,
    "customerId": null,
    "userId": null,
    "orderId": null,
    "vehicleId": null,
    "vendorId": null,
    "shopRead": true,
    "internal": true,
    "detached": true,
    "conversationId": null,
    "deleted": true,
    "deletedUserId": null,
    "deletedDate": null,
    "deletedReason": null,
    "files": [
      {
        "id": "id",
        "url": "url",
        "thumbnailUrl": "thumbnailUrl",
        "fileSize": 1,
        "fileType": "fileType",
        "fileName": "fileName"
      }
    ]
  }
}

PUT/v3/message_thread_metadata/:id/read

Set a message thread to read.

Dedicated endpoint for marking a message thread as "read" for the user making the call. Users can only mark their own threads as read. Sets the unreadMessagesCount to 0.

URL parameters

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

Produces

The response content type: application/json

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
    message
    Type
    string
    Description
    the error message if success = false
  • 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
    MessageThreadMetadata schema

Properties for data object

  • Name
    id
    Type
    string Required
    Description
    autogenerated id
  • 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
    unreadTimestamp
    Type
    string Required
    Description
    the timestamp when the first unread message was set
  • Name
    unreadMessagesCount
    Type
    integer Required
    Description
    a number of unread messages
  • Name
    important
    Type
    boolean Required
    Description
    a boolean to control if conversation is marked important
  • Name
    archived
    Type
    boolean Required
    Description
    a boolean to control if conversation is marked archived
  • Name
    userId
    Type
    string Required
    Description
    a reference to a user
  • Name
    customerId
    Type
    string Required
    Description
    a reference to a customer

4xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    data
    Type
    object
    Description
    An optional object containing relevant error data
  • 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
    data
    Type
    object
    Description
    An optional object containing relevant error data
  • 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

PUT
/v3/message_thread_metadata/:id/read
curl https://api.shopmonkey.cloud/v3/message_thread_metadata/:id/read \
  -H "Authorization: Bearer ${SM_TOKEN}" \
  -X PUT -H 'Content-Type: application/json' \
  --data '{}'

Example Response
application/json

{
  "success": true,
  "data": {
    "id": "id",
    "createdDate": "createdDate",
    "updatedDate": null,
    "locationId": "locationId",
    "companyId": "companyId",
    "unreadMessagesCount": null,
    "important": true,
    "archived": true,
    "userId": "userId",
    "customerId": "customerId"
  }
}

GET/v3/user/:id/inbox

Get Inbox

Get user inbox messages

URL parameters

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

Query String parameters

  • Name
    ids
    Type
    array
    Description
  • Name
    limit
    Type
    number
    Description
    the limit on the number of records to return
  • Name
    orderby
    Type
    string
    Description
    the order instructions for the result
  • Name
    params
    Type
    string
    Description
    additional request specific params
  • Name
    skip
    Type
    number
    Description
    the number of records to skip for a paginated result
  • Name
    where
    Type
    string
    Description
    an object to use for filtering the results

Produces

The response content type: application/json

200 Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    data
    Type
    array Required
    Description
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if success = false
  • Name
    meta
    Type
    object
    Description
  • 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

Properties for meta object

  • Name
    hasMore
    Type
    boolean
    Description
    if there are more records available
  • Name
    lastRefreshedAt
    Type
    string
    Description
    the last refreshed at timestamp
  • Name
    sums
    Type
    object
    Description
  • Name
    total
    Type
    number
    Description
    the total number of records

4xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    data
    Type
    object
    Description
    An optional object containing relevant error data
  • 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
    data
    Type
    object
    Description
    An optional object containing relevant error data
  • 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

GET
/v3/user/:id/inbox
curl https://api.shopmonkey.cloud/v3/user/:id/inbox \
  -H "Authorization: Bearer ${SM_TOKEN}"

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,
      "customerId": null,
      "userId": null,
      "orderId": null,
      "vehicleId": null,
      "vendorId": null,
      "shopRead": true,
      "internal": true,
      "detached": true,
      "conversationId": null,
      "deleted": true,
      "deletedUserId": null,
      "deletedDate": null,
      "deletedReason": null,
      "customer": {
        "id": "id",
        "customerType": "customerType",
        "firstName": null,
        "lastName": null,
        "companyName": null
      },
      "messageThreadMetadata": {
        "id": "id",
        "createdDate": "createdDate",
        "updatedDate": null,
        "locationId": "locationId",
        "companyId": "companyId",
        "unreadMessagesCount": null,
        "important": true,
        "archived": true,
        "userId": "userId",
        "customerId": "customerId"
      },
      "order": {
        "id": "id",
        "number": 1
      }
    }
  ]
}

GET/v3/user/:id/notification_config

Get notification config

Get user notification config

URL parameters

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

Query String parameters

  • Name
    ids
    Type
    array
    Description
  • Name
    limit
    Type
    number
    Description
    the limit on the number of records to return
  • Name
    orderby
    Type
    string
    Description
    the order instructions for the result
  • Name
    params
    Type
    string
    Description
    additional request specific params
  • Name
    skip
    Type
    number
    Description
    the number of records to skip for a paginated result
  • Name
    where
    Type
    string
    Description
    an object to use for filtering the results

Produces

The response content type: application/json

200 Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    data
    Type
    array Required
    Description
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if success = false
  • Name
    meta
    Type
    object
    Description
  • 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

Properties for meta object

  • Name
    hasMore
    Type
    boolean
    Description
    if there are more records available
  • Name
    sums
    Type
    object
    Description
  • Name
    total
    Type
    number
    Description
    the total number of records

4xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    data
    Type
    object
    Description
    An optional object containing relevant error data
  • 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
    data
    Type
    object
    Description
    An optional object containing relevant error data
  • 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

GET
/v3/user/:id/notification_config
curl https://api.shopmonkey.cloud/v3/user/:id/notification_config \
  -H "Authorization: Bearer ${SM_TOKEN}"

Example Response
application/json

{
  "success": true,
  "data": [
    {
      "sendEmail": true,
      "sendInApp": true,
      "sendSms": true
    }
  ]
}

PUT/v3/user/:id/notification_config

Set notification config

Set user notification config

URL parameters

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

Query String parameters

  • Name
    ids
    Type
    array
    Description
  • Name
    limit
    Type
    number
    Description
    the limit on the number of records to return
  • Name
    orderby
    Type
    string
    Description
    the order instructions for the result
  • Name
    params
    Type
    string
    Description
    additional request specific params
  • Name
    skip
    Type
    number
    Description
    the number of records to skip for a paginated result
  • Name
    where
    Type
    string
    Description
    an object to use for filtering the results

Body parameters

Consumes

The following content type is required: application/json

Array of objects with the following properties:

















Produces

The response content type: application/json

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
    message
    Type
    string
    Description
    the error message if success = false
  • 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
    null Required
    Description

4xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    data
    Type
    object
    Description
    An optional object containing relevant error data
  • 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
    data
    Type
    object
    Description
    An optional object containing relevant error data
  • 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

PUT
/v3/user/:id/notification_config
curl https://api.shopmonkey.cloud/v3/user/:id/notification_config \
  -H "Authorization: Bearer ${SM_TOKEN}" \
  -X PUT -H 'Content-Type: application/json' \
  --data '{}'

Example Response
application/json

{
  "success": true,
  "data": null
}