Save PMP deal - DEPRECATED

Creates or modifies a PMP deal. If the ID is null, a new deal will be created. If the advertiserId is null, the deal will be available across the account.

Request

POST /deal/save

Request Body

Name Type Description Required
id Number Internal Viant deal ID. Required for update.
name String The deal name. Yes
advertiserId Number The advertiser ID. Is null for an account wide deal.
exchangeId Number The Viant exchange ID. Yes
dealId String The exchange provided deal ID. Yes
description String The deal description. No

Response

JSON Fields Type Description
messages Object Array An array of any error messages.
messages[].level String Error level.
messages[].code String Error code.
messages[].message String Error message.
entity Object Array A deal object.
entity.id Number The internal Viant deal ID.
entity.advertiserId Number The advertiser ID. If null, the deal is accessible to the entire account.
entity.exchangeId Number The Viant exchange ID.
entity.dealId String The exchange provided deal ID.
entity.name String The deal name.
entity.description String The deal description.

Examples

Request to create a new account wide PMP deal

curl -u \<user>:\<password> -X POST -H "Content-Type: application/json" -d '\{"name" : "NYC News", "exchangeId" : 3, "dealId" : "D123", "description" : "Premium NYC publication inventory."}' https\://sandbox-api.viant.com/v1/deal/save

Since the ID field is null, this creates a new deal. Since the advertiser field is null, this deal is available account wide.

Response

{  
  "messages": [],
  "entity": {
    "id": 8711,
    "advertiserId": null,
    "exchangeId": 3,
    "dealId": "D123",
    "name": "NYC News",
    "description": "Premium NYC publication inventory."
  }
}

Request to create new PMP deal for advertiser

curl -u \<user>:\<password> -X POST -H "Content-Type: application/json" -d '\{"name" : "Parenting Mag", "advertiserId": 999, "exchangeId" : 3, "dealId" : "D456", "description" : "Inventory on big parenting site."}' https\://sandbox-api.viant.com/v1/deal/save

As before, since the ID field is null, this example creates a new deal. But since an advertiser ID is provided, this deal is only available to that advertiser.

Response

{  
  "messages": [],
  "entity": {
    "id": 8722,
    "advertiserId": 999,
    "exchangeId": 3,
    "dealId": "D456",
    "name": "Parenting Mag",
    "description": "Inventory on big parenting site."
  }
}

Request to edit a PMP deal

curl -u \<user>:\<password> -X POST -H "Content-Type: application/json" -d '\{"id":8722, "name" : "Parenting Site", "advertiserId": 999, "exchangeId":3, "dealId":"D456", "description":"Inventory on big parenting site."}' https\://sandbox-api.viant.com/v1/deal/save

In this example we have updated the name of the previously created deal.

Response

{  
  "messages": [],
  "entity": {
    "id": 5656,
    "advertiserId": 999,
    "exchangeId": 3,
    "dealId": "D456",
    "name": "Parenting Site",
    "description": "Inventory on big parenting site."
  }
}
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!