---
title: "Edit a deal request"
method: PATCH
path: "/deal-requests/{id}"
tags: ["Deal Requests"]
---

# Edit a deal request

`PATCH /deal-requests/{id}`

## Request

- Base URL: `https://api.sovrn.com/sovrnos/v1`
- URL: `https://api.sovrn.com/sovrnos/v1/deal-requests/{id}`
- Auth: API key in header `x-api-key`

Follows RFC 7396 JSON Merge Patch rules, but send the body as `application/json`: a body sent as `application/merge-patch+json` returns `415`. The update propagates in real time. `status` accepts `active`, `paused`, `archived` or `scheduled`; the other statuses are produced by the buyers and are read-only. The status is written to each buyer on the deal in turn, after the other fields in the request are applied, so a failure partway can leave the buyers in different states: re-send the same request until it returns `200`. An archived deal refuses every edit with a `502`, so re-sending will not help; if the request was archiving the deal, read the deal to see whether the archive landed. The `200` reports the status the deal resolved to rather than the one sent; see the Deal lifecycle guide. A deal whose buyers are all on a DSP that manages deal status through its own integration (`dv360`) rejects `status` with `400`. Read `statusSettable` on the deal before offering a status change at all: it is `false` whenever any buyer is on such a DSP, which is broader than the `400`, because a deal that mixes one with other buyers accepts `status` and need not resolve to the value you sent. On a deal with a `dv360` buyer the DV360 field requirements apply to the merged result, `adFormat` cannot be changed, `environments` cannot include `dooh`, and `environments` can change only within the deal's DV360 medium type (DV360 fixes the format and the medium type at creation). An edit that adds a `dv360` buyer is held to the DV360 field requirements too, so the deal it leaves cannot include `dooh` in `environments`.

## Path parameters

- `id` string, required

## Request body

- DealRequestPatch
  - `name` string
  - `description` string, nullable
  - `adFormat` 'audio' | 'banner' | 'native' | 'video'
  - `environments` EnvironmentInput[]
  - `pricing` object
    - `model` 'auction' | 'fixed'
    - `floor` number
    - `currency` 'USD' | 'JPY'
  - `commercial` object
    - `takeRate` number
  - `schedule` object
    - `startDate` string
    - `endDate` string
  - `status` 'active' | 'paused' | 'archived' | 'scheduled'
  - `buyers` object[]
    - `partner` 'simpli.fi' | 'basis' | 'dv360' | 'thetradedesk' | 'quantcast' | 'pulsepoint' | 'pubmatic' | 'illumin' | 'pubmatic-uk' | 'openx' | 'magnite' | 'magnite-uk' | 'clickagy' | 'beeswax' | 'rtbhouse' | 'mediaforce' | 'xandr' | 'nexxen' | 'epom' | 'madhive' | 'krush' | 'opera' | 'motorik' | 'equativ' | 'emodo' | 'smaato' | 'edge226' | 'decenterads' | 'consumable' | 'epsilon' | 'boldwin' | 'taurusx' | 'stirista' | '140proof' | 'altavara' | 'adipolo' | 'madopi' | 'bsw-ninedotsmedia' | 'bsw-adelement' | 'bsw-adform' | 'bsw-adingenious' | 'bsw-admatic' | 'bsw-admixer' | 'bsw-amazon' | 'bsw-appier' | 'bsw-aroscop' | 'bsw-azberry' | 'bsw-bedrockplatform' | 'bsw-betweenexchange' | 'bsw-boldwin' | 'bsw-criteo' | 'bsw-edge226' | 'bsw-igaworks' | 'bsw-instal' | 'bsw-iponwebbidcore' | 'bsw-knorex' | 'bsw-lift' | 'bsw-madopi' | 'bsw-madopimedia' | 'bsw-marketperf' | 'bsw-my6sense' | 'bsw-nrich' | 'bsw-nextroll' | 'bsw-samsung' | 'bsw-sportradar' | 'bsw-taptap' | 'bsw-webeye' | 'bsw-yahoo' | 'bsw-zetaglobal', required
    - `seatIds` string[], required
  - `runOfNetwork` true
  - `targeting` TargetingGroupInput[]
    - `name` string, required
    - `rules` TargetingRuleInput[], required
      - `attribute` 'device.geo.country' | 'geo.zip' | 'site.domain' | 'app.bundleId' | 'device.deviceType' | 'adUnit.size' | 'audience.segmentids' | 'device.language' | 'device.geo.region' | 'content.categorization.v3' | 'content.genre' | 'publisher.id' | 'content.categorization.v1' | 'imp.tagid', required
      - `values` union[], required
        - union
          - string
          - number
      - `match` 'include' | 'exclude'

## Response `200`

The updated deal request.

- DealRequestDetail
  - `dealRequestId` string, required
  - `status` 'active' | 'archived' | 'paused' | 'scheduled' | 'review' | 'dsp review', required
  - `statusAsOf` string, date-time, required
  - `statusSettable` boolean, required
  - `buyerIssues` BuyerIssue[]: On a read of a `review` deal that a buyer did not accept: what that buyer's DSP reported, one entry per issue, in this API's words. Absent when there is nothing to report or it could not be read, and never on the `PATCH` response. See the Deal lifecycle guide.
    - `partner` 'simpli.fi' | 'basis' | 'dv360' | 'thetradedesk' | 'quantcast' | 'pulsepoint' | 'pubmatic' | 'illumin' | 'pubmatic-uk' | 'openx' | 'magnite' | 'magnite-uk' | 'clickagy' | 'beeswax' | 'rtbhouse' | 'mediaforce' | 'xandr' | 'nexxen' | 'epom' | 'madhive' | 'krush' | 'opera' | 'motorik' | 'equativ' | 'emodo' | 'smaato' | 'edge226' | 'decenterads' | 'consumable' | 'epsilon' | 'boldwin' | 'taurusx' | 'stirista' | '140proof' | 'altavara' | 'adipolo' | 'madopi' | 'bsw-ninedotsmedia' | 'bsw-adelement' | 'bsw-adform' | 'bsw-adingenious' | 'bsw-admatic' | 'bsw-admixer' | 'bsw-amazon' | 'bsw-appier' | 'bsw-aroscop' | 'bsw-azberry' | 'bsw-bedrockplatform' | 'bsw-betweenexchange' | 'bsw-boldwin' | 'bsw-criteo' | 'bsw-edge226' | 'bsw-igaworks' | 'bsw-instal' | 'bsw-iponwebbidcore' | 'bsw-knorex' | 'bsw-lift' | 'bsw-madopi' | 'bsw-madopimedia' | 'bsw-marketperf' | 'bsw-my6sense' | 'bsw-nrich' | 'bsw-nextroll' | 'bsw-samsung' | 'bsw-sportradar' | 'bsw-taptap' | 'bsw-webeye' | 'bsw-yahoo' | 'bsw-zetaglobal', required
    - `message` string, required
    - `field` string: The field to correct, as a path into the deal request such as `pricing.floor`, or `buyers.0.seatIds` for the seats of the first entry in `buyers`. Absent when the issue maps to no field.
  - `name` string, required
  - `description` string, nullable, required
  - `type` 'pmp' | 'open', required
  - `adFormat` 'audio' | 'banner' | 'native' | 'video', required
  - `environments` Environment[], required
  - `pricing` Pricing, required
    - `model` 'auction' | 'fixed', required
    - `floor` number
    - `currency` 'USD' | 'JPY', required
  - `commercial` Commercial, required
    - `takeRate` number, required
  - `schedule` Schedule, required
    - `startDate` string, required
    - `endDate` string
  - `buyers` Buyer[], required
    - `partner` 'simpli.fi' | 'basis' | 'dv360' | 'thetradedesk' | 'quantcast' | 'pulsepoint' | 'pubmatic' | 'illumin' | 'pubmatic-uk' | 'openx' | 'magnite' | 'magnite-uk' | 'clickagy' | 'beeswax' | 'rtbhouse' | 'mediaforce' | 'xandr' | 'nexxen' | 'epom' | 'madhive' | 'krush' | 'opera' | 'motorik' | 'equativ' | 'emodo' | 'smaato' | 'edge226' | 'decenterads' | 'consumable' | 'epsilon' | 'boldwin' | 'taurusx' | 'stirista' | '140proof' | 'altavara' | 'adipolo' | 'madopi' | 'bsw-ninedotsmedia' | 'bsw-adelement' | 'bsw-adform' | 'bsw-adingenious' | 'bsw-admatic' | 'bsw-admixer' | 'bsw-amazon' | 'bsw-appier' | 'bsw-aroscop' | 'bsw-azberry' | 'bsw-bedrockplatform' | 'bsw-betweenexchange' | 'bsw-boldwin' | 'bsw-criteo' | 'bsw-edge226' | 'bsw-igaworks' | 'bsw-instal' | 'bsw-iponwebbidcore' | 'bsw-knorex' | 'bsw-lift' | 'bsw-madopi' | 'bsw-madopimedia' | 'bsw-marketperf' | 'bsw-my6sense' | 'bsw-nrich' | 'bsw-nextroll' | 'bsw-samsung' | 'bsw-sportradar' | 'bsw-taptap' | 'bsw-webeye' | 'bsw-yahoo' | 'bsw-zetaglobal', required
    - `seatIds` string[]
  - `runOfNetwork` boolean, required
  - `targeting` TargetingGroup[], nullable, required
    - `name` string, required
    - `rules` TargetingRule[], required
      - `attribute` 'device.geo.country' | 'geo.zip' | 'site.domain' | 'app.bundleId' | 'device.deviceType' | 'adUnit.size' | 'audience.segmentids' | 'device.language' | 'device.geo.region' | 'content.categorization.v3' | 'content.genre' | 'publisher.id' | 'content.categorization.v1' | 'imp.tagid', required
      - `values` union[], required
        - union
          - string
          - number
      - `match` 'include' | 'exclude', required
  - `deal` DealLinkage, required
    - `externalDealId` string, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Other responses

- `400`: The request failed validation; `message` names the problem, for example `takeRate is a decimal fraction; expected 0 ≤ x ≤ 0.85`. See the Errors guide.
- `401`: The API key was missing or not accepted. **Not JSON**: a bare `text/plain` string: `api key not provided`, `invalid api key`, or `invalid api key syntax`.
- `403`: The key is valid but not permitted. `{"message": "Insufficient scope"}`: a read-only key sent a write (`POST` or `PATCH`). It is checked before the body is validated, even with `?dryRun=true`. `{"message": "Partner not authorized for this API"}`: the account is not enabled for this API. It is checked after the request is validated, so an invalid request gets its `400` first.
- `404`: No deal request with that id exists for your account: `{"message": "Deal request not found"}`.
- `502`: The downstream deal system rejected the request, or returned a result the API could not use. On a create the deal may already exist, so check with your Sovrn representative before retrying; on a `PATCH` that set `status`, re-send the same request until it returns `200`. An archived deal refuses every edit with a `502`, so re-sending will not help. Carries a required `upstream` field. See the Errors guide.

---

[API](https://skmtc.dev/sovrn/apis/curation-api.md) - [All operations](https://skmtc.dev/sovrn/apis/curation-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sovrn/apis/curation-api/revisions/0ef84c7a4a94?raw)
