Testing

Validate your integration end to end with dry runs before creating real deals.

Dry runs

POST /deal-requests accepts a dryRun query parameter. With ?dryRun=true,
Sovrn runs the request through the full production validation pipeline
authentication, schema validation, business rules, and resolution of every
referenced value (demand partner slugs, targeting attributes, audience segment
IDs) — and then stops. Nothing is created and nothing is persisted.

curl -X POST "https://api.sovrn.com/sovrnos/v1/deal-requests?dryRun=true" \
  -H "x-api-key: $SOVRN_API_KEY" \
  -H "Content-Type: application/json" \
  -d @deal-request.json

A request that passes returns 200:

{
  "dryRun": true,
  "valid": true,
  "message": "Deal request passed validation. No deal was created."
}

A request that fails returns exactly the error a real submission would —
the same 400 shapes described on the Errors page — so you can
fix and retry until the payload is clean.

📘

Same body, same key

The request body is byte-identical between a dry run and a real submission:
once a dry run returns 200, resend the same body without the query parameter
(or with dryRun=false, the default) to create the deal. Dry runs require the
same API key and write permission as real submissions.

Recommended integration flow

  1. Dry-run until clean. Iterate on your payload with ?dryRun=true until
    you get a 200.
  2. Submit for real. Send the same body without dryRun. A 201 returns
    the deal's SVN_… ID immediately.
  3. Confirm state. GET /deal-requests/{dealRequestId} and check status
    (see Deal lifecycle for what each status means).
  4. Coordinate delivery testing. A dry run proves the request is valid and
    creatable — it does not prove delivery. Before validating bid activity or
    spend end to end, contact your Sovrn representative.

Did this page help you?