# Update Deal Groups

Update a Deal Group's Details

Deal Groups are a feature that will allow you and your team to package individual deals into groups.  This should streamline targeting, improve marketability (ex. creating a viewability deal group), and simplify bulk updating of strategies targeting deals. 

Deal Groups Ownership and Targeting Permissions:
Like deals, ownership of a Deal Group cannot change once it is created.
There are no targeting permissions set within a deal group. Deal Groups instead honor the targeting permissions of the deals within them.

Endpoint: POST /deal_groups/{id}
Version: 2.0

## Path parameters:

  - `id` (integer, required)
    _

## Header parameters:

  - `Content-Type` (string, required)
    _

  - `Cookie` (string, required)
    _

## Request body:

  - `application/json` (unknown)
    _

## Request fields (application/json):

  - `name` (string)

  - `status` (boolean)

  - `deal_ids` (array)

  - `description` (string)

  - `owner` (object)

  - `owner.type` (string)

  - `owner.id` (integer)

## Response 200 fields (application/json):

  - `data` (object)

  - `data.created_on` (string)

  - `data.deal_ids` (array)

  - `data.description` (string)

  - `data.entity_type` (string)
    Enum: "deal_group"

  - `data.id` (integer)

  - `data.name` (string)

  - `data.owner` (object)

  - `data.owner.id` (integer)

  - `data.owner.type` (string)
    Enum: "ADVERTISER", "AGENCY", "ORGANIZATION"

  - `data.status` (boolean)
    Whether the deal group is active (TRUE) or inactive (FALSE)

  - `data.updated_on` (string)

  - `data.has_strategies` (boolean)
    Indicates if the deal has strategies assigned

  - `meta` (object)

  - `meta.status` (string)
    Enum: "ok"

## Response 400:

  - `400` (unknown)
    Reasons may include:
* deal_ids is a required field
* 'deal_ids' must be valid and must have the same owner fields as the deal group
* duplicate id's in 'deal_ids'
* Each deal group can have upto 300 deal_ids
* Invalid deal id ___
* Invalid owner.organization_id
* Invalid strategy_id
* 'page_limit' parameter cannot be greater than 100
* 'page_limit' parameter cannot be less than 0
* 'page_offset' parameter cannot be less than 0
* Request must be in JSON format
* 'sort_by' parameter must be one of id, name, updated_on, or created_on
* 'status' parameter is invalid
* The queried field '{}' is not a ___ field this resource can match
* The request is invalid!
* There are more than 1000 ids to be updated!
* There is no data to be updated!
* Unauthorized!               --             (Note: Yes, this is a roles/permissions thing)
* You cannot combine owner.organization_id with deal_id parameter
* You cannot combine strategy_id with deal_id parameter
* You cannot combine strategy_id with owner.organization_id and deal_id parameter
* You cannot combine strategy_id with owner.organization_id parameter
* You need to provide 'owner.organization_id', 'strategy_id', 'deal_id' or 'ids' parameter

