Watchlist
This is for the addition and removal of content from the customer’s watchlist. Fire TV may use watchlist information to update the customer’s universal watchlist.
What to send
If the trigger is an app install and sign-in, or Fire TV’s on-device service asks for a refresh, provide all watch list items with action=add
. Otherwise only send added and removed items. When triggered, send all the data. Amazon takes care of duplicates, so no need to filter these out yourself.
Field Name | Required (Y/N) | Description |
---|---|---|
Content ID | Y | Corresponds to the content ID provided to Fire TV through the catalog integration. |
Activity Date | Y | Timestamp of when the customer added or removed the entitlement. |
List Action | Y | ADDED or REMOVED . |
Internal Profile ID | Y | Provide an obfuscated Profile ID so that Fire TV can associate the activity with the correct app customer. |
When to send
- On initial app install and sign-in.
- On adding or removing an item from the customer’s watch list. This action can occur off-device.
- When asked to refresh by Fire TV’s on-device service.
- When switching to a new profile.
How to send
To share the latest title the customer added to the watchlist, use the following code:
AmazonCustomerListReceiver listReceiver = AmazonCustomerListReceiver.getInstance(getContext());
AmazonCustomerListEntry listEntry = AmazonCustomerListEntry.builder()
.contentId(AmazonContentId.builder()
.id("contentId")
.namespace(AmazonContentId.NAMESPACE_CDF_ID).build())
.addedTimestampMs(System.currentTimeMillis())
.profileId(AmazonProfileId.builder()
.id("myProfileId1")
.namespace(AmazonProfileId.NAMESPACE_APP_INTERNAL)
.build())
.build();
listReceiver.addCustomerListEntry(AmazonCustomerListType.WATCHLIST, listEntry);
val listReceiver: AmazonCustomerListReceiver = AmazonCustomerListReceiver.getInstance(context)
val listEntries: List<AmazonCustomerListEntry> = ArrayList()
val listEntry: AmazonCustomerListEntry = AmazonCustomerListEntry.builder()
.contentId(
AmazonContentId.builder()
.id("contentId")
.namespace(AmazonContentId.NAMESPACE_CDF_ID).build()
)
.addedTimestampMs(System.currentTimeMillis())
.profileId(
AmazonProfileId.builder()
.id("myProfileId1")
.namespace(AmazonProfileId.NAMESPACE_APP_INTERNAL)
.build()
)
.build()
listEntries.add(listEntry)
val listEntry2: AmazonCustomerListEntry = AmazonCustomerListEntry.builder()
.contentId(
AmazonContentId.builder()
.id("contentId2")
.namespace(AmazonContentId.NAMESPACE_CDF_ID).build()
)
.addedTimestampMs(System.currentTimeMillis())
.profileId(
AmazonProfileId.builder()
.id("myProfileId1")
.namespace(AmazonProfileId.NAMESPACE_APP_INTERNAL)
.build()
)
.build()
listEntries.add(listEntry2)
listReceiver.setCustomerList(AmazonCustomerListType.WATCHLIST, listEntries)
Send the customer’s full watchlist
The following example code shows how to send the customer’s full watchlist.
AmazonCustomerListReceiver listReceiver = AmazonCustomerListReceiver.getInstance(getContext()); List<AmazonCustomerListEntry> listEntries = new ArrayList<>();
AmazonCustomerListEntry listEntry = AmazonCustomerListEntry.builder()
.contentId(AmazonContentId.builder()
.id("contentId")
.namespace(AmazonContentId.NAMESPACE_CDF_ID).build())
.addedTimestampMs(System.currentTimeMillis())
.profileId(AmazonProfileId.builder()
.id("myProfileId1")
.namespace(AmazonProfileId.NAMESPACE_APP_INTERNAL)
.build())
.build();
listEntries.add(listEntry);
AmazonCustomerListEntry listEntry2 = AmazonCustomerListEntry.builder()
.contentId(AmazonContentId.builder()
.id("contentId2")
.namespace(AmazonContentId.NAMESPACE_CDF_ID).build())
.addedTimestampMs(System.currentTimeMillis())
.profileId(AmazonProfileId.builder()
.id("myProfileId1")
.namespace(AmazonProfileId.NAMESPACE_APP_INTERNAL)
.build())
.build();
listEntries.add(listEntry2);
listReceiver.setCustomerList(AmazonCustomerListType.WATCHLIST, listEntries);
val listReceiver: AmazonCustomerListReceiver = AmazonCustomerListReceiver.getInstance(context)
val listEntries: List<AmazonCustomerListEntry> = ArrayList()
val listEntry: AmazonCustomerListEntry = AmazonCustomerListEntry.builder()
.contentId(
AmazonContentId.builder()
.id("contentId")
.namespace(AmazonContentId.NAMESPACE_CDF_ID).build()
)
.addedTimestampMs(System.currentTimeMillis())
.profileId(
AmazonProfileId.builder()
.id("myProfileId1")
.namespace(AmazonProfileId.NAMESPACE_APP_INTERNAL)
.build()
)
.build()
listEntries.add(listEntry)
val listEntry2: AmazonCustomerListEntry = AmazonCustomerListEntry.builder()
.contentId(
AmazonContentId.builder()
.id("contentId2")
.namespace(AmazonContentId.NAMESPACE_CDF_ID).build()
)
.addedTimestampMs(System.currentTimeMillis())
.profileId(
AmazonProfileId.builder()
.id("myProfileId1")
.namespace(AmazonProfileId.NAMESPACE_APP_INTERNAL)
.build()
)
.build()
listEntries.add(listEntry2)
listReceiver.setCustomerList(AmazonCustomerListType.WATCHLIST, listEntries)
Next Steps
You can view a handy reference of data types on our Data Type Reference.
Last updated: Mar 05, 2024