Carousel Notification

A carousel notification allows you to send a group of images that the user can scroll through and click to redirect to the assigned url.

Lets approach this with an example:

POST /v1/notification/push
{
  "type": "CAROUSEL",
  "title": "New Summer Line!",
  "message": "View new summer collection while stocks last!",
  "contents": [
    {
      "sortOrder": 0,
      "options": {
        "buttons": [
          {
            "url": "https://example.com/hoodie"
          }
        ]
      },
      "contentItem": {
        "id": "b3c8844d-c3d7-4c23-906b-5c3b99b8d335"
      },
      "presentation": "CAROUSEL"
    },
    {
      "sortOrder": 1,
      "options": {
        "buttons": [
          {
            "url": "https://example.com/jeans"
          }
        ]
      },
      "contentItem": {
        "id": "201593ef-6e77-495e-bfc3-53156e9ab753"
      },
      "presentation": "CAROUSEL"
    },
    {
      "sortOrder": 2,
      "options": {
        "buttons": [
          {
            "url": "https://example.com/socks"
          }
        ]
      },
      "contentItem": {
        "id": "25afed30-4163-4bdd-8c60-b7fc49baed12"
      },
      "presentation": "CAROUSEL"
    }
  ],
  "segment": {
    "id": "4beafba6-b851-4bf0-8ca4-695b38b7efff"
  },
}

type needs to be "CAROUSEL", then you must include carousel content items in the contents array. e.g.

{
  "sortOrder": 0,
  "options": {
    "buttons": [
      {
        "url": "https://example.com/hoodie"
      }
    ]
  },
  "contentItem": {
    "id": "b3c8844d-c3d7-4c23-906b-5c3b99b8d335"
  },
  "presentation": "CAROUSEL"
}

Each content object must contain a sortOrder field, which distinguishes at what order the image should appear in the carousel (starting from 0). contentItem field must refer to the id of the associated content item image (which must have presentation type of "BANNER" in its presentation array. See here for more info). presentation field must always be "CAROUSEL". The buttons field is similar to that of when notification type is "VIDEO", except for that it can only have the url field, which is where user will be redirected to when they click the image.