List message fragments
Retrieves the message fragments configured for the given site. Without offering_id, results are sorted alphabetically by name. When offering_id is supplied, results are filtered to fragments that apply to that offering and sorted by message_type then ascending priority - the order they will be rendered into the customer email.
Query parameters
Identifier of the site whose message fragments should be returned. Message fragments are scoped per site so each location can author its own transactional email copy. The caller's API key must have access to this site.
When provided, restricts the returned message fragments to those that apply to the given offering (appointment type, session type, package etc.). The response is additionally sorted by message_type then priority to mirror the order fragments are rendered in the email. Omit to list every fragment at the site, sorted by name.
The page to retrieve results from
The number of results to return per page
Response
The message fragments were successfully retrieved.
Example response
{
"data": [
{
"id": "65d4a6f7f4c1b22a3c5d4e8a",
"name": "Spa - arrival instructions",
"message_type": "basket_confirmed",
"message": "<p>Hi {{ customer.first_name }} - we're looking forward to\nseeing you on {{ booking.starts_at|date }}. Please arrive\n15 minutes early to check in at reception.</p>\n",
"priority": 10,
"offerings": [
{
"offering_name": "Twilight massage",
"offering_type": "appointment"
}
],
"permitted_membership_type_ids": [
"65a1c4f7f4c1b22a3c5d1234"
]
}
],
"meta": {
"from": 1,
"to": 2,
"total": 2,
"current_page": 1,
"last_page": 2,
"per_page": 15,
"path": "http://example.com/api"
},
"links": {
"first": "http://example.com?page=1",
"next": "https://example.com?page=3",
"prev": "https://example.com?page=1",
"last": "https://example.com?page=4"
}
}Changes
No recorded changes to this endpoint across all 1 revision of this API.