Create or edit an Advertiser - DEPRECATED

Creates or modifies an Advertiser.

Request

POST /advertiser/save

Request Body

Name Type Description Required
id Number Advertiser ID. Required for update.
name String Advertiser name. Yes
agencyId String Agency ID to which the advertiser belongs. Yes during Insert
No / ignored during Update
currency String Currency displayed for pricing Yes during Insert
No / ignored during Update
category String Business category for advertiser
See reference table in Advertiser summary
Yes during Insert
No / ignored during Update
timezoneName String Name of timezone from the following list: AKT, CT, ET, GMT, HST, MT, N, PT No. If not passed during resource creation, then account timezone is used.
This field is ignored for resource update.
externalAdvertiserId String External ID for the Advertiser No

Response

Name 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 An advertiser object.
entity.id Number Advertiser ID.
entity.name String Advertiser name.
entity.agencyId Number Agency ID to which the advertiser belongs.
entity.currency String Currency displayed for pricing
entity.category String Business category for advertiser
See reference table in Advertiser summary
entity.timezoneName String Name of timezone for advertiser
entity.externalAdvertiserId String External ID for Advertiser

Examples

Request

Request to create an advertiser
curl -u <user>:<password> -X POST -H "Content-Type: application/json" -d '{"id": null, "name" : "My brand new advertiser", "agencyId" : 123, "currency": "USD", "category": "IAB1", "timezoneName": "ET", "externalAdvertiserId": "Foo$123"}' https://sandbox-api.viant.com/v1/advertiser/save

Since the ID field is null, this example creates a new advertiser.

Response

{
  "messages": [],
  "entity": {
    "id": 999,
    "name": "My brand new advertiser",
    "agencyId": 123,
    "currency": "USD",
    "category": "IAB1",
    "timezoneName": "ET",
    "externalAdvertiserId": "Foo$123"
  }
}

Request

Request to edit an advertiser. This example uses the advertiser ID to change the name of the advertiser.

curl -u <user>:<password> -X POST -H "Content-Type: application/json" -d '{"id": 999, "name" : "My best advertiser","category": "IAB2", "externalAdvertiserId": "Bar$123"}' https://sandbox-api.viant.com/v1/advertiser/save

Response

{
  "messages": [],
  "entity": {
    "id": 999,
    "name": "My best advertiser",
    "agencyId": 123,
    "currency": "USD",
    "category": "IAB2",
    "timezoneName": "GMT",
    "externalAdvertiserId": "Bar$123"
  }
}
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!