Data Insertion API response types
The response type is the numeric segment of the endpoint path (the /1/ in /b/ss/examplersid/1/s234234238479). It selects the format of the server's response: a GIF, 204 No Content, JavaScript, JSON, XML, and so on. The response format is independent of how you send the request, with one exception: an XML request body is parsed only at the /6/ response type (see XML).
Every response type technically accepts both GET and POST; however, several response types would not make sense in practice. The type you choose does not change whether a valid hit is recorded; it changes only the response you receive and, for some types, how a validation failure is surfaced.
Response types
data-slots=heading, text
/0/: HTML
text/html content type, and 200 OK. On a failed hit it sets a Status: FAILURE header (with a Reason header when a reason is available), and it flags failure even when no hit is recorded, so it surfaces a dropped GET.data-slots=heading, text
/1/: GIF (default)
image/gif), and 200 OK. Use this response type for <img> tag requests. AppMeasurement primarily uses this response type for both GET and POST requests. On POST validation failures it sets Status and Reason headers; GET validation surfaces Nothing, even when the hit is dropped.data-slots=heading, text
/2/: No content
204 No Content with no body. It sets a Status header (SUCCESS or FAILURE) on any method, plus a Reason header when a reason is available (the most reliable lightweight signal).data-slots=heading, text, code
/3/: JavaScript
s_vid variable, so a browser can read the ID back after the beacon fires. This ID is the visitor's s_vi cookie value (the aid variable). On a POST validation failure it sets Status and Reason headers.var s_vid='355231C82E332200-4000195842CEFA67'
data-slots=heading, text
/4/: Partner redirect
GET. Do not set it manually.data-slots=heading, text
/5/: WBMP
image/wbmp image, equivalent to /1/ (GIF) for legacy wbmp-only clients. It does not surface a status or reason.data-slots=heading, text, code
/6/: XML
Status/Reason headers, except for a NO account failure, which appears only in the body.<?xml version="1.0" encoding="UTF-8"?>
<status>SUCCESS</status>
data-slots=heading, text, code, text
/10/: Visitor JSON
mid) is available for the visitor, the response includes additional visitor information as well. AppMeasurement uses this response type when Audience Manager is included in your implementation.{"status":"SUCCESS","id":"355231C82E332200-4000195842CEFA67"}
id is the visitor's s_vi cookie value (the aid variable). Status appears in the JSON body, not in headers; a hit that fails validation returns without an id.data-slots=heading, text, code, text
/11/: Visitor XML
/10/, returned as XML.<?xml version="1.0" encoding="UTF-8"?>
<visitor>
<status>SUCCESS</status>
<id>355231C82E332200-4000195842CEFA67</id>
</visitor>
id is the visitor's s_vi cookie value (the aid variable). Status appears in the <visitor> body, not in headers; a hit that fails validation returns an empty <visitor> element. Reading it back is the basis of the server-side identity pattern in Visitor identification using the Data Insertion API.Validation and failures
Whatever the response type, a 2xx status confirms only that the request was received, not that the hit passed validation or appeared in reporting. How a failure is surfaced depends on the HTTP method and the response type: a failure reason is computed only for POST requests, so GET responses never return one. The surest confirmation is to inspect the request with a packet monitor as you send it, or to check for the data in Adobe Analytics reporting.
A failed hit reports one of the following reasons. The same reason string appears wherever the response type surfaces it; a Reason header, the <reason> XML element, or the JSON body.
NO accountNO pagename OR pageurlNO visitorid OR ipaddressSyntax errorStatuses and reasons by response type
The reason value is the same everywhere; only the container differs by response type and HTTP method. A reason is computed only for POST requests, so every GET cell below is either Nothing or a bare Status.
GETPOST/0/ HTMLStatus headerStatus + Reason headers/1/ GIFStatus + Reason headers/2/ No contentStatus headerStatus + Reason headersSUCCESS or FAILURE; also flags a dropped hit./3/ JavaScriptStatus + Reason headers/4/ Partner redirect/5/ WBMP/6/ XML<status>/<reason> body + headersNO account (still in the body)./10/ Visitor JSONstatus in bodystatus in bodyid on failure./11/ Visitor XML<status> in body<status> in body<visitor> on failure.Resolving failures
If hits return FAILURE, check the following:
- Encoding. When using XML encoding, make sure that the content is UTF-8 and that you're using a response type of
/6/. When using query-string encoding, make sure that all values are properly URL-encoded. - Reserved characters. In XML, replace ampersands (
&), greater-than (>), and less-than (<) with their entities when they appear inside a value. For example, submitNews & Sports <local>asNews & Sports <local>. In query strings, these characters are handled by URL encoding. - Required components. Confirm that the hit includes a report suite ID, page context, and a visitor identifier. See Required components.
POST request rejected
Some HTTP clients add an Expect: 100-Continue header to POST requests, which Adobe data collection servers reject. The request fails before the body is processed, so no FAILURE body is returned. Disable the header in your client. For example, in .NET, set ServicePointManager.Expect100Continue = false.