This page covers v2 REST endpoints. MCP tool errors follow the ADCP error
spec and
are returned in
structuredContent rather than HTTP status codes.Error envelope
Every non-success response hasdata: null and a populated error object:
Successful responses have the inverse shape:
{ "data": <result>, "error": null }. List endpoints add a meta block (see Pagination).
Throughout the Buyer and Storefront task references, the
## Response examples
show the data payload only — the inner result. On the wire it is always
wrapped in the envelope above: { "data": <payload>, "error": null }, plus a
meta block on list endpoints. Read the result from response.data.HTTP status codes
Common error codes
Domain-specific codes you may encounter on campaign endpoints:
Validation errors
When request validation fails,code is VALIDATION_ERROR and details.issues enumerates every problem Zod found, with dotted field paths:
field is set instead:
Handling errors in client code
Retrying safely
RATE_LIMITED, INTERNAL_ERROR, and SERVICE_UNAVAILABLE are transient — retry GETs with exponential backoff. For creation/mutation requests after a 5xx, prefer to surface the error rather than auto-retry, since duplicate-create protection isn’t enforced server-side.
VALIDATION_ERROR, NOT_FOUND, FORBIDDEN, ACCESS_DENIED, and CONFLICT are terminal — don’t retry until the input or state changes.