SmsFragments

Create an SMS Message Fragment

This endpoint creates an SMS Message Fragment for the given site.

post/shop/sms-fragments

Request body

namestring required

Internal label for the SMS fragment, shown in the admin UI when authoring SMS templates. Not visible to customers. 1-120 characters.

message_type'basket_confirmed' | 'basket_cancelled_with_charge' | 'basket_cancelled_without_charge' | 'basket_reminder' | 'basket_follow_up' | 'pay_by_link_request' required

The type of message the SMS Fragment applies to.

messagestring

The contents of the SMS Fragment.

priorityinteger

The priority of the SMS Fragment. Fragments will be added to messages in ascending order.

site_idstring uuid required

Identifier of the site this SMS fragment is sent on behalf of. Fragments are scoped per site so each location can compose its own SMS copy and sender name.

organisation_idstring uuid required

Identifier of the organisation that owns the site. Used for cross-site reporting and to enforce that the supplied site_id belongs to this organisation.

Example request

{
  "name": "Order Confirmation",
  "message": "Hi! Your order has been confirmed. We look forward to seeing you on Saturday 20th January at 12pm.\n",
  "priority": 10,
  "offerings": [
    {
      "offering_name": "Twilight massage",
      "offering_type": "appointment"
    }
  ]
}

Response

The SMS Message Fragment was successfully retrieved

Example response

{
  "data": {
    "name": "Order Confirmation",
    "message": "Hi! Your order has been confirmed. We look forward to seeing you on Saturday 20th January at 12pm.\n",
    "priority": 10,
    "offerings": [
      {
        "offering_name": "Twilight massage",
        "offering_type": "appointment"
      }
    ]
  }
}

Changes