Adobe Target · updated

Adobe Target Delivery API basics: the request and the response

The Target Delivery API is one REST endpoint: a POST to /rest/v1/delivery on your client code's tt.omtrdc.net host, with the client code and a session ID in the query string and a JSON body. The body says where the request comes from (context) and what you want: content now (execute) or content to cache (prefetch). Adobe says it is meant for at.js and direct server-side implementations, not for the Web SDK.

In plain words

This is the web address a server or an app calls to ask Target, 'what should this visitor see in this spot?'. Target answers with the content and an ID for the visitor. There is no password on the call, so nothing secret goes in it.

The parts of a request

PartWhat it isRule Adobe gives
Host<clientCode>.tt.omtrdc.netThe client code is in the Target UI under Administration > Implementation
Path/rest/v1/deliveryPOST only
clientQuery parameter with your client codeUsed in every example on Adobe's pages
sessionIdQuery parameter you generate and keep for the sessionAny printable string except a space, ? or /; 1 to 128 characters; the session is active for 30 minutes on the server
contextWhere the request comes fromRequired; channel is required and is web or mobile
idThe visitor: tntId, thirdPartyId, marketingCloudVisitorId, customerIdsIf you send no ID, Target generates a tntId and returns it
executeContent evaluated now; impressions are countedpageLoad and a list of mboxes
prefetchContent to cache without counting a visitviews, pageLoad and mboxes; Target returns an eventToken for each
notificationsTells Target that prefetched content was shown or clickedEach needs id, type (display or click) and timestamp, with the eventToken in tokens

Mboxes, parameters and limits

  • Each mbox in the list has a name and an index. Adobe's specification says the index should be unique in the list; it ties each answer to its request.
  • Parameters and profile parameters are maps of text values: at most 50, a name of at most 128 characters that does not start with profile., and a value of at most 5000 characters.
  • The names orderId, orderTotal and productPurchasedIds are not allowed as mbox parameters; orders go in their own order object.
  • The User-Agent should be sent in context.userAgent; the specification says the HTTP User-Agent header is ignored.
  • A property token goes in property.token and limits which activities are considered.

The response

A successful answer carries status, requestId, client, the id block with the tntId, an edgeHost such as mboxedge28.tt.omtrdc.net, and an execute or prefetch block. Each mbox comes back with its index, name and options; an option has the content and a type such as html. Prefetched options also carry an eventToken.

Things Adobe warns about

  • There is no authentication for Target Delivery APIs, and the API does not process cookies or redirect calls.
  • Keep the same sessionId for a visitor's session and do not pair one sessionId with different tntId or thirdPartyId values; Adobe says profile changes can become inconsistent.
  • The tntId that Target returns includes a profile location hint after a dot; send it back unchanged on later calls.
  • A single call per mbox is costly; Adobe's description recommends one batched call for all the mboxes you know you need.
  • Because the API is public, Adobe advises against using it to add clickable items to a Recommendations catalogue.
  • Adobe recommends an SDK over raw calls so that sessions and cookies are handled correctly.

The call on Adobe's 'Getting started' page

curl -X POST \
'https://`clientCode`.tt.omtrdc.net/rest/v1/delivery?client=`clientCode`&sessionId=d359234570e04f14e1faeeba02d6ab9914e' \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache' \
-d '{
  "context": {
    "channel": "web",
    "browser" : {
      "host" : "demo"
    },
    "address" : {
      "url" : "http://demo.dev.tt-demo.com/demo/store/index.html"
    },
    "screen" : {
      "width" : 1200,
      "height": 1400
    }
  },
  "execute": {
    "mboxes" : [
      {
        "name" : "homepage",
        "index" : 1
      }
    ]
  }
}'

Page-load content instead of a named mbox

"execute": {
  "pageLoad": {}
}

How to make a first call

  1. Create an activity in Target with the Form-Based Composer or the Visual Experience Composer.
  2. Find your client code under Administration > Implementation.
  3. Generate a session ID and keep it for the visitor's session.
  4. POST the JSON body with a context and an execute block naming the mbox the activity uses.
  5. Store the tntId from the response and send it in the id block on the next call.
  6. If you prefetch, send a notification with the eventToken when the content is shown.

Related tools and pages on this site

Questions

Does the Delivery API need an API key or token?

No. Adobe's API description lists as a known limitation that there is no authentication for Target Delivery APIs.

What is the difference between execute and prefetch?

execute is evaluated at once and counts an impression. prefetch returns content to cache without marking a visit; you send a notification later when the content is actually shown.

Should a Web SDK site call this API?

Adobe says no: Web SDK implementations use the Interact API through the sendEvent command over the Experience Platform Edge Network.

Are the older mbox APIs still documented?

Adobe says the legacy /v1/mbox and /v2/batchmbox documentation is still available, but new features go into the Delivery API and are not backported.

Sources

Facts about Adobe's products on this page are from the linked Adobe pages, read on the date shown beside each. Explanations, steps and examples are ours unless marked as Adobe's. If Adobe's page and this one differ, Adobe's page is right.

Surge Migrate is not affiliated with Adobe and claims no Adobe partner status. Adobe product names are trademarks of Adobe.

Surge Migrate

Moving the website itself

This page answers one Adobe Target question. Surge Migrate moves a website from any CMS to any CMS. Converted automatically. Checked before you install.

  1. 1

    Scan

    Names the system behind your site, counts pages and templates, lists the blocks to build and the work no tool does, and gives an effort range with its working.

    Scan a site →
  2. 2

    Convert

    Each page becomes an Edge Delivery document, an AEM Core Component page and import files for 7 other systems. 10 pages free; 500 or 2,000 pages in one paid run.

    Convert your pages →
  3. 3

    Verify

    A download is offered only when its own format check passes. The report lists every field not found and every component kept as plain content. Compare old and new pages side by side.

    Parity check →
  4. 4

    Install

    You import with the target system's own tool, on your own environment. Each download's README gives the command. Your system changes only when you run it.

    How each import was tested →