question

Ashish Jha avatar image
Ashish Jha asked

Can anyone help me with the structure of array of localized attributes in the proactive events API when there are more than one localized attributes?

I was playing around with the proactive events but got stuck at the localizedattribute thing. So I was using media content available schema and it has two localizedattribute, and I can't find an example on how to use two of them at once. Any idea? So basically, this works :

{
    "timestamp": "2019-01-25T08:41:01.00Z",
    "referenceId": "orangfdetango2221800f44-436a-4c47-8d9f-e14356bb010c",
    "expiryTime": "2019-01-26T08:20:01.00Z",
    "event": {
    "name": "AMAZON.MediaContent.Available",
    "payload": {
        "availability": {
            "startTime": "2019-01-23T21:00:00Z",
            "method":"DROP"
        },
        "content": {
            "name": "localizedattribute:contentName",
            "contentType":"EPISODE"
        }
    }
},

        "localizedAttributes": [
            {
                "locale": "en-US",
                "contentName": "Who Wrote the Bible? - 01/13/2019"
            }
        ],
      "relevantAudience": {
        "type": "Multicast",
        "payload": {}
    }
}

But not this because it has two localizedattributes:

{
    "timestamp": "2019-01-25T08:41:01.00Z",
    "referenceId": "orangfdetango2221800f44-436a-4c47-8d9f-e14356bb010c",
    "expiryTime": "2019-01-26T08:20:01.00Z",
    "event": {
    "name": "AMAZON.MediaContent.Available",
    "payload": {
        "availability": {
            "startTime": "2019-01-25T21:00:00Z",
            "provider": {
                "name": "localizedattribute:providerName"
            },
            "method":"STREAM"
        },
        "content": {
            "name": "localizedattribute:contentName",
            "contentType":"EPISODE"
        }
    }
},

        "localizedAttributes": [
            {
                "locale": "en-US",
                "providerName": "Lindsborg Covenant Church"
            },
            {
                "locale": "en-US",
                "contentName": "Who Wrote the Bible? - 01/13/2019"
            }
        ],
      "relevantAudience": {
        "type": "Multicast",
        "payload": {}
    }
}
ask clinotificationsproactive events
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Ashish Jha avatar image
Ashish Jha answered

Apparently, it was a simple fix, though I couldn't find it in any documentation.

What needed to be done was changing localized attributes to:

    "localizedAttributes": [
        {
            "locale": "en-US",
            "providerName": "Lindsborg Covenant Church",
            "contentName": "Who Wrote the Bible? - 01/13/2019"
        }
    ],
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.