Delivery API - which payload is up to date ? | Community
Skip to main content
Michael_Soprano
Level 10
July 2, 2024
Solved

Delivery API - which payload is up to date ?

  • July 2, 2024
  • 1 reply
  • 888 views

I would like to implement recommendations in email. 

There are two different payloads presented in documentation. I am not sure which one to use. 

1. Delivery API docs: https://developer.adobe.com/target/implement/delivery-api/

2. Email personalization docs: https://experienceleague.adobe.com/en/docs/target/using/recommendations/recommendations-faq/integrating-recs-email

The response for the second one I got is:

Client code is 100% valid. In another requests it works. 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ryanr7

Here's a sample Delivery API that could work: 

 

curl -X POST \ 'https://clientcode.tt.omtrdc.net/rest/v1/delivery?client=clientcode&sessionId=9979fc32c26d49df8e04a6d734' \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -d '{ "context": { "channel": "web" }, "id": { "tntId": "4920148a9a9f4061a3aff5cfe5be1cb3.35_0", "marketingCloudVisitorId": "54485242253040699773642612187575264854" }, "property": { "token": "b468a242-64a4-32a0-ca0c-890bddd78789" }, "execute": { "mboxes": [ { "parameters": { "entity.id": "article-123", "entity.event.detailsOnly" : "true" }, "index": 0, "name": "email-mbox" } ] } }'

Remove the marketingCloudVisitorId property if you don't have a known ECID for the person receiving the email.

 

1 reply

Adobe Employee
July 2, 2024

@michael_soprano

Good catch! That second one is referring to the older API and should be updated. I'll submit a ticket to the documentation team to have it corrected. In the meantime, use the delivery API example from your #1 for Recommendations via email with delivery API method.

ryanr7Adobe EmployeeAccepted solution
Adobe Employee
July 2, 2024

Here's a sample Delivery API that could work: 

 

curl -X POST \ 'https://clientcode.tt.omtrdc.net/rest/v1/delivery?client=clientcode&sessionId=9979fc32c26d49df8e04a6d734' \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -d '{ "context": { "channel": "web" }, "id": { "tntId": "4920148a9a9f4061a3aff5cfe5be1cb3.35_0", "marketingCloudVisitorId": "54485242253040699773642612187575264854" }, "property": { "token": "b468a242-64a4-32a0-ca0c-890bddd78789" }, "execute": { "mboxes": [ { "parameters": { "entity.id": "article-123", "entity.event.detailsOnly" : "true" }, "index": 0, "name": "email-mbox" } ] } }'

Remove the marketingCloudVisitorId property if you don't have a known ECID for the person receiving the email.