Messages List
Pending
GET
https://api.mpc.dev.placewise.com/v1/messages_history
API Permit:BL:Api:MessagesHistory:List
API Context:Loyalty Club
Authorizations:UserToken
Query Parameters
Parameter | Type | Required? | Default | Description |
---|---|---|---|---|
per_page | integer | no | 100 | Number of results to be returned per request (100 is the maximum) |
page_no | integer | no | 1 | Number of results page |
type | String[] | no | null | Message types that should be returned - available values: ["sms", "email", "push"] |
member_id | integer | no | null | When present, ony messages sent to this member will be returned |
Message model
Key | Message type | Description | Required? | Type |
---|---|---|---|---|
id | all | Message ID | yes | String |
type | all | yes | Enum: ["sms", "email", "push"] | |
created_at | all | Time when the message has been sent | yes | ISO 8601 DateTime |
content | all | Message content. Note: HTML is stripped from Email messages. | yes | String |
subject | email, push | Email & push subject/title | no | String |
sender | sms | SMS sender (may be string or MSISDN) | no | String |
msisdn | sms | MSISDN the message has been sent to | no | String |
from_name | Email sender name | no | String | |
from_address | Email sender address | no | String | |
Address the message has been sent to | no | String | ||
url | push | A link contained by the Push message | no | String |
image | push | An image contained by the Push message | no | String |
data | push | Additional data contained by the Push message | no | Object |
app_token | push | App token the message has been sent to | no | String |
message_id | all | ID of Message in MPC Gateways | yes | Integer |
sending_id | all | ID of MPC Sending | no | String |
campaign_id | all | ID of MPC Sending Campaign | no | String |
loyalty_club_id | all | yes | Integer | |
customer_id | all | yes | Integer | |
member_id | all | no | Integer | |
transmitted_at | all | Time when the message has been sent to 3rd party gateway | no | ISO 8601 DateTime |
service_type | all | Service | no | String |
transmission_status | all | yes | String | |
delivery_status | all | yes | String | |
tags | all | List of merge-tags supplied for the Message | no | Object[] |
external_id | all | ID of Message in 3rd party system | no | String |
external_error | all | no | Object | |
gateway | all | 3rd party name (e.g. ses , firebase ) | no | Object |
Example
{
"messages": [
{
"id": "ZW1haWw6NjY5MzM=",
"created_at": "2022-03-04T09:15:52.062Z",
"type": "email",
"content": "[Logo]\n\nHi Piotr!\n\n[Placewise](https://shortener.dev.boostcom.no/y8n/ZQGeE2)",
"subject": "Hello Piotr",
"from_name": "MPC",
"from_address": "dev@mpc.placewise.com",
"email": "member@placewise.com",
"message_id": 7038,
"sending_id": "5350",
"campaign_id": 421,
"loyalty_club_id": 1174,
"member_id": 48076883,
"transmitted_at": "2022-03-04T09:15:53.474Z",
"service_type": "campaigns",
"transmission_status": "transmitted",
"delivery_status": "sent",
"tags": [
{ "tag": "link", "link": "https://www.placewise.com", "value": "https://shortener.dev.boostcom.no/y8n/ZQGeE2" },
{ "tag": "first_name", "value": "Piotr" }
],
"external_error": { "code": 52 },
"external_id": "e36ca3fe9778c25ea70b078978bd6087",
"gateway": "ses"
}
],
"pagination_info": {} // Pagination info - see 'Pagination info"
}
Request
Query Params
member_id
stringÂ
optional
type
stringÂ
optional
Header Params
X-Loyalty-Club-Slug
stringÂ
required
Default:
{{LOYALTY_CLUB_SLUG}}
X-Client-Authorization
stringÂ
optional
Default:
{{API_TOKEN}}
Request samples
Responses
Modified at 2024-08-19 13:18:20