APISendEmailToCustomers
This API Call is used to send an email and optionally an SMS to a customer.
SMSMessage are not required field. You need to have credits to use send SMS messages.
Message Name
To find out the name of the message we want to send, go to Admin -> Settings -> Notifications
Click on 'Custom Message' or 'SMS Messages' tab
You will see a list of custom message and the first column is the the name you need to use.
/api/plain/?type=APISendEmailToCustomers&[payload]&HashString=[hashstring]
URL Parameters
Field | Type | Description |
---|---|---|
Type | String | API that will be called |
Payload | URL_ENCODED | An URL encoded JSON array |
HashString | Varchar | sha256 encoded string. Read how to create payload and hashstring |
Payload Parameters
Field | Type | Description |
---|---|---|
Reference | Varchar | Order reference |
Message | Varchar | ('Default Confirmation', 'Default Cancellation', 'Reminder Message') |
SMSMessage | Varchar | ('Default SMS Confirmation', 'Default SMS Cancellation', 'Reminder SMS Message') |
Success 200
Field | Type | Description |
---|---|---|
Orders | Array() | |
Errors | Array() |
- Success-Response:
HTTP/1.1 200 OK { "Errors": [] }
Error 4xx
Field | Type | Description |
---|---|---|
Errors | array() | |
- Code | Int | Number of error |
- Error | String | Error message |
- Error-Response:
HTTP/1.1 200 OK { "Errors": [ {"Code":"12", Message not found"} {"Code":"12", "Order not found"} ] }