Skip to content

Bulk Update Deal

Request

Bulk Update Deal

Query
<<any other attributes>>string

<>

namestring

name

descriptionstring

description

Headers
Authorizationstring

Authorization

Default:"Bearer $TOKEN"
Bodyapplication/json

See below

dealsArray of objects
curl -i -X PUT \
  'https://api.mediamath.com/deals/v1.0/bulk_update/deals?%3C%3Cany%20other%20attributes%3E%3E=string&name=string&description=string' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "deals": [
      {
        "id": 0,
        "name": "string",
        "channels": [
          0
        ]
      }
    ]
  }'

Responses

{
    "data": {
        "updated_deals": [
            {
                "updated_on": "2021-07-08T14:02:24+00:00",
                "created_on": "2021-07-08T13:57:26+00:00",
                "id": 429599,
                "name": "some new name",
                "description": "something",
                "supply_source_id": 246,
                "sub_supply_source_id": null,
                "deal_identifier": "hello",
                "start_datetime": "2020-12-31T05:00:00+00:00",
                "end_datetime": "2999-12-31T05:00:00+00:00",
                "price_type": "FLOOR",
                "price_method": "CPM",
                "status": false,
                "bill_type": "EXCHANGE",
                "deal_type": "STANDARD",
                "impressions": 22,
                "channels": [
                    {
                        "id": 1,
                        "name": "Display",
                        "pos": 1,
                        "created_on": "2020-07-20T11:13:55.015407+00:00",
                        "updated_on": "2020-07-20T11:13:55.015407+00:00"
                    },
                    {
                        "id": 2,
                        "name": "Mobile Web",
                        "pos": 2,
                        "created_on": "2020-07-20T11:13:55.015407+00:00",
                        "updated_on": "2020-07-20T11:13:55.015407+00:00"
                    }
                ],
                "publisher_id": null,
                "organization_id": 100315,
                "permissions": {
                    "all_organizations": false,
                    "organization_ids": [
                        100315
                    ],
                    "agency_ids": [],
                    "advertiser_ids": []
                },
                "owner": {
                    "type": "ORGANIZATION",
                    "id": 100315
                },
                "price": {
                    "value": "1.3000",
                    "currency_code": "EUR"
                },
                "entity_type": "deal",
                "deal_groups": [],
                "strategies_count": 0
            }
        ],
        "invalid_deals": []
    },
    "meta": {
        "status": "ok"
    }
}
Bodyapplication/json
dataobject
metaobject
Response
{ "data": { "updated_deals": [ … ], "invalid_deals": [ … ] }, "meta": { "status": "string" } }