Statement
WIP: A summary needs to be written for Statement
Find Statement
Find one Statement 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
- Statement 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
companyId- Type
- string Required
- Description
- Name
createdDate- Type
- string Required
- Description
- Name
customerId- Type
- string Required
- Description
- Name
duration- Type
- integer Required
- Description
- ::bigint
- Name
fromDate- Type
- string Required
- Description
- Name
id- Type
- string Required
- Description
- Name
invoicesCount- Type
- integer Required
- Description
- Name
locationId- 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
name- Type
- string Required
- Description
- Name
note- Type
- string Required
- Description
- Name
paid- Type
- boolean Required
- Description
- Name
paidCostCents- Type
- integer Required
- Description
- Name
remainingCostCents- Type
- integer Required
- Description
- Name
sent- Type
- boolean Required
- Description
- Name
sentDate- Type
- string Required
- Description
- Name
toDate- Type
- string Required
- Description
- Name
totalCostCents- Type
- integer Required
- Description
- Name
updatedDate- Type
- string Required
- Description
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
curl https://api.shopmonkey.cloud/v3/statement/:id \
-H "Authorization: Bearer ${SM_TOKEN}"
Example Responseapplication/json
{
"success": true,
"data": {
"id": "id",
"meta": {
"userId": "userId",
"sessionId": "sessionId",
"version": 1
},
"createdDate": "createdDate",
"updatedDate": null,
"companyId": "companyId",
"name": null,
"fromDate": "fromDate",
"toDate": "toDate",
"sent": true,
"sentDate": null,
"customerId": "customerId",
"locationId": "locationId",
"paid": true,
"invoicesCount": 1,
"totalCostCents": 1,
"remainingCostCents": 1,
"paidCostCents": 1
}
}
List Statements
Find all Statements
Query String parameters
- Name
collate- Type
- boolean
- Description
- if set to true, use natural sort collation when used with orderBy
- 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
data- Type
- array Required
- Description
- an array of items
- 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 Required
- Description
- if there are more records available
- Name
total- Type
- number Required
- 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
curl https://api.shopmonkey.cloud/v3/statement \
-H "Authorization: Bearer ${SM_TOKEN}"
Example Responseapplication/json
{
"success": true,
"data": [
{
"id": "id",
"createdDate": "createdDate",
"updatedDate": null,
"companyId": "companyId",
"name": null,
"fromDate": "fromDate",
"toDate": "toDate",
"sent": true,
"sentDate": null,
"customerId": "customerId",
"locationId": "locationId",
"paid": true,
"invoicesCount": 1,
"totalCostCents": 1,
"remainingCostCents": 1,
"paidCostCents": 1
}
]
}
Search Statement entities
Search for Statement Entries
Body parameters
Consumes
The following content type is required: application/json
- Name
collate- Type
- boolean
- Description
- if set to true, use natural sort collation when used with orderBy
- Name
limit- Type
- number
- Description
- the limit on the number of records to return
- Name
orderBy- Type
- one of: any, any
- Description
- the order instructions for the result
- Name
params- Type
- object
- Description
- additonal request specific params
- Name
skip- Type
- number
- Description
- the number of records to skip for a paginated result
- Name
where- Type
- one of: any, any
- Description
- an object to use for filtering the results
Produces
The response content type: application/json
200 Response
- Name
data- Type
- array Required
- Description
- an array of items
- 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
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 Requestapplication/json
curl https://api.shopmonkey.cloud/v3/statement/search \
-H "Authorization: Bearer ${SM_TOKEN}" \
-H 'Content-Type: application/json' \
--data '{}'
Example Responseapplication/json
{
"data": [
{
"id": "id",
"createdDate": "createdDate",
"updatedDate": null,
"companyId": "companyId",
"name": null,
"note": null,
"fromDate": "fromDate",
"toDate": "toDate",
"sent": true,
"sentDate": null,
"customerId": "customerId",
"locationId": "locationId",
"paid": true,
"invoicesCount": 1,
"totalCostCents": 1,
"remainingCostCents": 1,
"paidCostCents": 1
}
],
"success": true
}
Create Statement
Create a new Statement entry
Body parameters
Consumes
The following content type is required: application/json
- Name
customerId- Type
- string Required
- Description
- Name
fromDate- Type
- string Required
- Description
- Name
name- Type
- string
- Description
- Name
note- Type
- string
- Description
- Name
toDate- Type
- string Required
- Description
- Name
orderIds- Type
- array
- Description
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
- Statement schema
Properties for data object
- Name
companyId- Type
- string Required
- Description
- Name
createdDate- Type
- string Required
- Description
- Name
customerId- Type
- string Required
- Description
- Name
duration- Type
- integer Required
- Description
- ::bigint
- Name
fromDate- Type
- string Required
- Description
- Name
id- Type
- string Required
- Description
- Name
invoicesCount- Type
- integer Required
- Description
- Name
locationId- Type
- string Required
- Description
- Name
name- Type
- string Required
- Description
- Name
note- Type
- string Required
- Description
- Name
paid- Type
- boolean Required
- Description
- Name
paidCostCents- Type
- integer Required
- Description
- Name
remainingCostCents- Type
- integer Required
- Description
- Name
sent- Type
- boolean Required
- Description
- Name
sentDate- Type
- string Required
- Description
- Name
toDate- Type
- string Required
- Description
- Name
totalCostCents- Type
- integer Required
- Description
- Name
updatedDate- Type
- string 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 Requestapplication/json
curl https://api.shopmonkey.cloud/v3/statement \
-H "Authorization: Bearer ${SM_TOKEN}" \
-H 'Content-Type: application/json' \
--data '{ "customerId" : "value", "fromDate" : "value", "toDate" : "value" }'
Example Responseapplication/json
{
"success": true,
"data": {
"id": "id",
"createdDate": "createdDate",
"updatedDate": null,
"companyId": "companyId",
"name": null,
"fromDate": "fromDate",
"toDate": "toDate",
"sent": true,
"sentDate": null,
"customerId": "customerId",
"locationId": "locationId",
"paid": true,
"invoicesCount": 1,
"totalCostCents": 1,
"remainingCostCents": 1,
"paidCostCents": 1
}
}
Update Statement
Update an existing Statement by id
URL parameters
- Name
id- Type
- string Required
- Description
Body parameters
Consumes
The following content type is required: application/json
- Name
customerId- Type
- string
- Description
- Name
fromDate- Type
- string
- Description
- Name
name- Type
- string
- Description
- Name
note- Type
- string
- Description
- Name
toDate- Type
- string
- Description
- Name
orderIds- Type
- array
- Description
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
- Statement schema
Properties for data object
- Name
companyId- Type
- string Required
- Description
- Name
createdDate- Type
- string Required
- Description
- Name
customerId- Type
- string Required
- Description
- Name
duration- Type
- integer Required
- Description
- ::bigint
- Name
fromDate- Type
- string Required
- Description
- Name
id- Type
- string Required
- Description
- Name
invoicesCount- Type
- integer Required
- Description
- Name
locationId- Type
- string Required
- Description
- Name
name- Type
- string Required
- Description
- Name
note- Type
- string Required
- Description
- Name
paid- Type
- boolean Required
- Description
- Name
paidCostCents- Type
- integer Required
- Description
- Name
remainingCostCents- Type
- integer Required
- Description
- Name
sent- Type
- boolean Required
- Description
- Name
sentDate- Type
- string Required
- Description
- Name
toDate- Type
- string Required
- Description
- Name
totalCostCents- Type
- integer Required
- Description
- Name
updatedDate- Type
- string 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 Requestapplication/json
curl https://api.shopmonkey.cloud/v3/statement/:id \
-H "Authorization: Bearer ${SM_TOKEN}" \
-X PUT -H 'Content-Type: application/json' \
--data '{}'
Example Responseapplication/json
{
"success": true,
"data": {
"id": "id",
"createdDate": "createdDate",
"updatedDate": null,
"companyId": "companyId",
"name": null,
"fromDate": "fromDate",
"toDate": "toDate",
"sent": true,
"sentDate": null,
"customerId": "customerId",
"locationId": "locationId",
"paid": true,
"invoicesCount": 1,
"totalCostCents": 1,
"remainingCostCents": 1,
"paidCostCents": 1
}
}
Download Statement PDF
Download a Statement as PDF document
URL parameters
- Name
id- Type
- string Required
- Description
Query String parameters
- Name
includeInvoices- Type
- boolean Required
- Description
- Name
includeNote- Type
- boolean Required
- Description
- Name
statementColumns- Type
- array
- Description
- Name
download- Type
- boolean
- Description
- The flag to include Content-Disposition forcing the browser to download the file instead of opening it for viewing
- Name
orderBy- Type
- string
- Description
Example Request
curl https://api.shopmonkey.cloud/v3/statement/:id/pdf \
-H "Authorization: Bearer ${SM_TOKEN}"
Send Statement
Send an existing Statement via email/sms
URL parameters
- Name
id- Type
- string Required
- Description
- the id for the object
Body parameters
Consumes
The following content type is required: application/json
- Name
customerId- Type
- string Required
- Description
- Name
emailId- Type
- string
- 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
phoneNumberId- Type
- string
- Description
- Name
sendEmail- Type
- boolean Required
- Description
- Name
sendSms- Type
- boolean Required
- Description
- Name
statementColumns- Type
- array
- Description
- Name
text- Type
- string Required
- Description
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
appointmentEvent- Type
- one of: Rescheduled, Scheduled, Reminder, Confirm, Canceled, Acknowledgement Required
- Description
- Name
appointmentId- Type
- string Required
- Description
- appointment associated with this message
- Name
authorType- Type
- one of: Customer, User, System Required
- Description
- Name
automatedCampaignId- Type
- string Required
- Description
- the id of the automated campaign that generated this message
- Name
avoidSMSQuietHours- Type
- boolean Required
- Description
- Name
companyId- Type
- string Required
- Description
- Name
conversationId- Type
- string Required
- Description
- Name
createdDate- Type
- string Required
- Description
- Name
customerId- Type
- string Required
- Description
- the id of the customer that authored or was sent the message
- Name
deleted- Type
- boolean Required
- Description
- if the record has been 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
deletedUserId- Type
- string Required
- Description
- the user that deleted the record or null if not deleted
- Name
detached- Type
- boolean Required
- Description
- true if message is public but has no reference to a customer (only for migration purposes
- Name
emailError- Type
- string Required
- Description
- error sending email, if any
- Name
emailId- Type
- string Required
- Description
- the id of the customer email that authored or was sent the message
- Name
emailStatus- Type
- one of: Pending, Sent, Read, Error, Delivered, Unknown Required
- Description
- Name
emailSubject- Type
- string Required
- Description
- overrides default email subject
- Name
id- Type
- string Required
- Description
- Name
imported- Type
- boolean Required
- Description
- Name
internal- Type
- boolean Required
- Description
- Name
isOrderShare- Type
- boolean Required
- Description
- true if this message created via Order Share modal
- Name
locationId- Type
- string Required
- Description
- Name
locationReviewRequestId- Type
- string Required
- Description
- the id of the review request
- Name
oneTimeCampaignBatchId- Type
- string Required
- Description
- the id of the one time campaign batch that generated this message
- Name
oneTimeCampaignId- Type
- string Required
- Description
- the id of the one time campaign that generated this message
- Name
orderId- Type
- string Required
- Description
- an order associated with this message
- Name
orderShareType- Type
- one of: Inspection, Order Required
- Description
- Name
origin- Type
- one of: ChatBot, Scheduler, Campaign, Web, Mobile, CustomerOrderPage, SMS, Email Required
- Description
- Name
phoneNumberId- Type
- string Required
- Description
- the id of the customer phone number that authored or was sent the message
- Name
requestAppointmentConfirmation- Type
- boolean Required
- Description
- if true, the email/sms will contain actions to confirm/decline an appointment
- Name
sendEmail- Type
- boolean Required
- Description
- if an email should be sent, is null if author is a Customer
- Name
sendSms- Type
- boolean Required
- Description
- if an sms should be sent, is null if author is a Customer
- 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
smsError- Type
- string Required
- Description
- error sending sms, if any
- Name
smsStatus- Type
- one of: Pending, Sent, Read, Error, Delivered, Unknown Required
- Description
- 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
text- Type
- string Required
- Description
- appears in message center/thread (content of message if SMS, plaintext/preview if email
- Name
type- Type
- one of: Transactional, Marketing Required
- Description
- Name
updatedDate- Type
- string Required
- Description
- Name
userId- Type
- string Required
- Description
- the user who authored the 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
emailDeliveries- Type
- array
- Description
- Name
files- Type
- array Required
- Description
- Name
orderDeleted- Type
- boolean
- Description
- true if the order is deleted
- 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 Requestapplication/json
curl https://api.shopmonkey.cloud/v3/statement/:id/message \
-H "Authorization: Bearer ${SM_TOKEN}" \
-H 'Content-Type: application/json' \
--data '{ "customerId" : "value", "emailSubject" : "value", "includeInvoices" : false, "includeNote" : false, "sendEmail" : false, "sendSms" : false, "text" : "value" }'
Example Responseapplication/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
}
}
Delete Statement
Permanently delete a Statement by id
URL parameters
- Name
id- Type
- string Required
- Description
- the id of the record to delete
Produces
The response content type: application/json
200 Response
- Name
data- Type
- object
- Description
- Name
success- Type
- boolean Required
- Description
Properties for data object
- Name
id- Type
- string Required
- Description
- the id for the object
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 Requestapplication/json
curl https://api.shopmonkey.cloud/v3/statement/:id \
-H "Authorization: Bearer ${SM_TOKEN}" \
-X DELETE -H 'Content-Type: application/json' \
--data '{}'
Example Responseapplication/json
{
"success": true
}