This page provides information on the Validations and Error Handling for the methods of the Programmatic Deal Open API.
Create Deal Method
Message | Reason | Request Example |
---|---|---|
Deal type not supported {input deal type} | Deal type is not one of the following:
| { "deal_type": "deal", "name": "test_deal" } { "deal_type": "DEALS", "name": "test_deal" } |
Deal name is too long (maximum is 255 characters) | ||
Deal description is too long (maximum is 4096 characters) | ||
Deal salesperson is too long (maximum is 255 characters) | ||
Field [field name] is not supported in this method, please check the API documentation for supported fields | The Create Deal method only supports four attributes: deal_type, name, description, and salesperson. Any attribute outside of the aforementioned four attributes cannot be used to create a deal. | { "deal_type":"DEAL", "name":"FW DEAL NAME1", "description":"FW DEAL DESCRIPTION1", } { "salesperson":"FW DEAL SALESPERSON1" } |
Activate Deal Method
Message | Reason |
---|---|
Status can't be changed for an archived deal | |
Deal Name can't be blank | |
Public ID can't be blank | |
At least one activated ad unit must be selected | |
At least one buyer must be selected | |
Inventory Assignment must include at least one item | |
Volume Impression Goal can't be zero. | For PG/BG deal, the impression goal can't be 0 when activating the deal. |
Impression goals must either have a numerical value or "No Limit" value. | If deals except for PG/BG, they must be no limit or have a greater than 0 fixed impression goal. |
Schedule end date can't be ongoing. | For PG/BG deal, end time should be set when activating the deal. |
MRM only supports maximum 25 deals for separate_bid functionality. | There are already 25 non-PG deals with:
|
Deactivate Deal Method
Message | Validation |
---|---|
Status can't be changed for an archived deal |
Deal List Method
Parameter | Validation | Message |
---|---|---|
status | Valid values:
| Do not support value by: ${param} in filter: status |
updated_at | If present, then use this required format:
Else, ignore this parameter. | updated_at format is invalid. |
per_page/page | If present:
| The pagination is invalid. |
Update Deal Method
The two messages below are common validations for updating all fields.
Message | Request Sample |
---|---|
Unable to update the archived deal | |
only one field can be updated at once | "name": "test deal", "schedule": { "start_time": "2021-01-01T00:00", "time_zone": "(GMT-05:00) America - New York" } |
Validation messages for updatable fields
Name
Message | Request Sample |
---|---|
Deal name can't be blank when Status is Active | |
Deal name is too long (maximum is 255 characters) |
Description
Message | Request Sample |
---|---|
Deal description is too long (maximum is 4096 characters) | |
Invalid request |
Salesperson
Message | Request Sample |
---|---|
Deal salesperson is too long (maximum is 255 characters) | |
Invalid request |
Buyers
Message | Validation | Request Sample |
---|---|---|
The selected buyers should not include the ones from default seat(blank External Seat ID) | For the Programmatic Deal deal, the default seat could not be selected. | |
All the selected buyers must belong to one buyer platform. | For the Programmatic Deal deal, selected buyers should belong to one buyer platform. | |
It is not possible to remove buyers from an active Programmatic Guaranteed deal. | ||
At least one Buyer must be selected for active Deal. | Clear buyers for active deals are not supported. | |
Invalid request |
Note
If there is a non-existent id in the buyer list, it is ignored and other valid buyers are saved in the database.
Ad Units
Message | Validation | Request Sample |
---|---|---|
At least one active Ad Unit must be selected for active Deal | ||
Invalid ad unit id | Potential Reasons:
| |
invalid request |
Volume
Message | Validation | Request Sample |
---|---|---|
no_limit field is required | "volume": { "control_pace": "AS_FAST_AS_POSSIBLE", "control_period": "DAY", "impression_goal": 10 } | |
Volume control period is invalid. | control_period is not one of the following:
| "volume": { "no_limit": false, "control_pace": "AS_FAST_AS_POSSIBLE", "control_period": "WEEKLY", "impression_goal": 10 } |
Volume control fixed value must be greater than 0 if not no limit. | Potential Reasons:
| "volume": { "no_limit": false, "control_pace": "AS_FAST_AS_POSSIBLE", "control_period": "WEEKLY", "impression_goal": -1 } |
Invalid excess delivery curve | excess_delivery_curve is not one of the following:
| "volume": { "no_limit": false, "control_pace": "AS_FAST_AS_POSSIBLE", "control_period": "DAY", "impression_goal": 10, "excess_delivery_curve": "network_default" } |
Invalid control pace | control_pace is not:
| "volume": { "no_limit": false, "control_pace": "AS_FAST", "control_period": "DAY", "impression_goal": 10 } |
You can't use "Smooth As" or "Custom" pacing option until you have schedule (Start Date and End Date) specified for this deal | Set control_pace to EVEN and control_period to LIFECYCLE for a deal that does not have an end_time | |
Invalid request | Potential Reason: Impression_goal is not int . | "volume": { "no_limit": false, "control_pace": "EVEN", "control_period": "DAY", "impression_goal": 10.9 } |
Note
If excess_delivery_curve is set for non-PG/BG deal, the response is 200 but the value will not be saved in DB.
For DEAL and BACKFILL_DEAL, the control_pace is set to AS_FAST_AS_POSSIBLE whatever the input is.
Pricing
Message | Validation | Request Sample |
---|---|---|
Invalid price model | Model is not one of the following:
| |
Price should have (at most) two decimal spaces. | Price should not have more than two decimal spaces. | "pricing": { "price": 10.011, "model": "FIXED" } |
price [ - 1 ] must be in the range of 0 and 1000000 | Potential Reasons:
| "pricing": { "price": -1, "model": "FIXED" } |
PG deal [1] only supports fixed price model. | Potential Reason: Set model to SECOND_FLOOR or FIRST_FLOOR for PG deal. | |
This currency is not supported. | The currency is not saved in the FreeWheel system. | "pricing": { "price": 10, "model": "SECOND_FLOOR", "currency_override": "test" } |
Schedule
Message | Validation | Request Sample |
---|---|---|
Cannot change the start date because the deal is active. | ||
Start date must be later than 2007-01-01 00:00:00 +0000 UTC. | ||
Guaranteed deals require an End Time. | For PG and BG deal, the end_time should be set. | "schedule": { "start_time": "2020-12-23T00:00", "time_zone": "(GMT-05:00) America - New York" } |
End date must be later than current time. | "schedule": { "start_time": "2018-12-23T00:00", "end_time": "2019-12-31T23:59", "time_zone": "(GMT-05:00) America - New York" } | |
First Look deals require an End Time if using Smooth As or Custom pacing. | For the First Look deal which has 'Smooth As' volume pace and 'Lifecycle' volume period, the end time could not be cleared. | |
This time zone is not supported. | The timezone is not in the FW system: MRM Timezones | |
MRM only supports maximum 25 deals for this functionality. | There are already 25 non-PG deals with:
| |
Schedule date format is invalid. | Date should be in 2016-01-01T00:00 format. |
Max Ad Duration
Message | Validation | Request Sample |
---|---|---|
Max Ad Duration is not a valid number. | max_ad_duration is smaller than -1 | |
Max Ad Duration cannot be applied on Programmatic Guaranteed deal. | ||
Invalid request | Potential Reasons:
|
Buyer Priority Override
Message | Validation | Request Sample |
---|---|---|
Deal type [type] does not support buyer priority override. | Buyer priority override can only. beset for DEAL type deals | |
Buyer priority override value must be in the range of -1 and 10 | buyer_priority_override is smaller than -1 or greater than 10 | |
Invalid request | buyer_priority_override is not int type value |
Override
Message | Validation | Request Sample |
---|---|---|
Deal type [type] does not support ad priority override | Do not support update override for DEAL and BACKFILL type deals | |
Ad priority value must be in the range of 11 and 20 | >For PG and BG deal, when the mode is ABOVE_PAYING_ADS, the value should in [11, 20] | "override": { "mode": "ABOVE_PAYING_ADS", "value": 8 } |
Ad priority value must be in the range of 0 and 100 | For PG and BG deal, when the mode is AMONGST_PAYING_ADS, the value should in [0, 100] | "override": { "mode": "AMONGST_PAYING_ADS", "value": 101 } |
Ad priority type must be in ABOVE_PAYING_ADS, AMONGST_PAYING_ADS | For PG and BG deal, the mode should be ABOVE_PAYING_ADS or AMONGST_PAYING_ADS | "override": { "value": 15 } |
Ad priority value must be in the range of 21 and 30 | For the First Look deal, the value should in [21, 30] | "override": { "value": 32 } |
Note
The input mode for First Look deal is not ignored.
Separate Bid
Message | Validation | Request Sample |
---|---|---|
MRM only supports maximum 25 deals for this functionality. | There are already 25 non-PG deals with:
| |
PG deals cannot be configured to send separate bid requests (as they do so by default). | ||
Invalid request | Separate_bid is not bool type. |
Creative Approval
Message | Reason | Request Sample |
---|---|---|
approval_type: must be in the list [NETWORK_DEFAULT, NO_APPROVAL, GLOBAL, CLIENT] | "creative_approval": { "type":"test" } | |
clearance_level: cannot be blank | clearance_level is required when type is GLOBAL or CLIENT | "creative_approval": { "type":"GLOBAL" } |
clearance_level: must be in the list [PERMISSIBLE, RESTRICTED] | "creative_approval": { "type":"GLOBAL", "clearance_level":"test" } |
Frequency Cap
Message | Validation | Request Sample |
---|---|---|
A Deal is allowed to set at most three frequency caps. | "frequency_caps": { "items": [ { "value": 1, "period": 0, "type": "TIME" }, { "value": 3, "type": "STREAM" },s { "value": 4, "type": "ASSET" }, { "value": 4, "type": "LIFETIME" } ] } | |
Frequency Period must be greater than or equal to one. | "frequency_caps": { "item": [ { "value": 1, "period": 0, "type": "TIME" } ] } | |
Frequency Type is not supported. | Type is not one of the following:
| |
Frequency Value must be greater than or equal to 0. | "frequency_caps": { "items": [ { "value": -1, "period": 10, "type": "TIME" } ] } | |
Frequency caps is inconsistent. Please guarantee the following two conditions: 1) A longer frequency period must have a higher frequency cap. 2) Two frequency caps cannot have the same frequency period. | "frequency_caps": { "items": [ { "value": 100, "period": 30, "type": "TIME" }, { "value": 5, "period": 60, "type": "TIME" } ] } "frequency_caps": { "items": [ { "value": 5, "type": "STREAM" }, { "value": 5, "type": "STREAM" } ] } | |
invalid request | Potential Reasons:
|
Content Targeting
Message | Validation | Request Sample |
---|---|---|
Inventory Assignment must include at least one item | Potential Reasons:
| "content_targeting": { "exclude": { "video": [2141954818] } } |
Content item [214195481811] doesn't exist. | Item does not exist in the FreeWheel system | "content_targeting": { "include": { "video": [11111111] } } |
item(2141954838) cannot be in both remaining items and sets. | The same items cannot be included in sets and in remaining items at the same time. | "content_targeting": { "include": { "sets": [ { "video": [2141954838], "relation_in_set": "OR" } ], "remaining_items": { "video": [2141954838] } } } |
item(2141954818) cannot be in both include and exclude | "content_targeting": { "include": { "video": [2141954818] }, "exclude": { "video": [2141954818] } } | |
In advanced targeting, the number of sets should be one greater than the number of relations between sets. | "content_targeting": { "include": { "relation_between_sets": [ "OR" ], "sets": [ { "video": [2141954849], "relation_in_set": "OR" } ], "remaining_items": { "video": [2141954838] } } } | |
Invalid advanced include: the number of sets should not be greater than three. | "content_targeting": { "include": { "relation_between_sets": [ "OR","OR","OR" ], "sets": [ { "video": [1], "relation_in_set": "OR" }, { "video": [2], "relation_in_set": "OR" }, { "video": [3], "relation_in_set": "OR" }, { "video": [4], "relation_in_set": "OR" } ], "remaining_items": { "video": [5] } } } | |
HyLDA Inventory Assignment can only be updated if ENABLE_HYLDA network function is enabled. | Hylda related items could not be selected when ENABLE_HYLDA is not enabled. | "content_targeting": { "include": { "remaining_items": { "airing": [2141954714], "relation_in_set": "OR" } } } |
Audience Targeting
Message | Request Sample |
---|---|
item(8) cannot both in remaining items and sets. | "audience_targeting": { "include": { "sets": [ { "audience_item": [8], "relation_in_set": "OR" } ], "remaining_items": { "audience_item": [8] } } } |
The same item should not be included and excluded. | "audience_targeting": { "include": { "audience_item": [8] }, "exclude": { "audience_item": [8] } } |
In advanced targeting, the number of sets should be one greater than the number of relations between sets | "audience_targeting": { "include": { "relation_between_sets": [ "OR" ], "sets": [ { "audience_item": [4], "relation_in_set": "OR" } ], "remaining_items": { "audience_item": [8] } } } |
Invalid advanced include: the number of sets should not be greater than three. | "audience_targeting": { "include": { "relation_between_sets": [ "OR","OR","OR" ], "sets": [ { "audience_item": [ 1 ], "relation_in_set": "OR" }, { "audience_item": [ 2 ], "relation_in_set": "OR" }, { "audience_item": [ 3 ], "relation_in_set": "OR" }, { "audience_item": [ 4 ], "relation_in_set": "OR" } ], "remaining_items": { "audience_item": [ 8 ] } } } |
Audience item [1111] doesn't exist. | "audience_targeting": { "include": { "audience_item": [1111] } } |
Geography Targeting
Message | Validation | Request Sample |
---|---|---|
item(8) both in include and exclude. | The same item should not be included and excluded. | "geo_targeting": { "include": { "country": [ 8 ] }, "exclude": { "country": [ 8 ] } } |
item 11111 doesn't exist. | "geo_targeting": { "include": { "country": [ 111111 ] } } }]] |
Platform Targeting
Message | Validation | Request Sample |
---|---|---|
Platform 111111 doesn't exist. | "platform_targeting": { "os": [ 111111 ] } |
Custom Targeting
Message | Validation | Request Sample |
---|---|---|
Set number is not matched with relation number. | "custom_targeting": { "set": [ { "key_value": [ "plc=temp", "zding=test1" ], "relation_in_set": "OR" }, { "key_value": [ "key_3=value_3" ], "relation_in_set": "OR" } ], "relation_between_sets": [ "AND","AND" ] } |
- No matter the relation_between_sets elements is AND or OR, always saved it as 'AND' in db.
- When there are multi sets for custom targeting, the InSetRelation should always be 'OR'.
Daypart Targeting
Message | Validation | Request Sample |
---|---|---|
this time zone is not supported | The timezone is not in the FW system, MRM Timezones |
ISP Targeting
Message | Validation | Request Sample |
---|---|---|
Invalid isp Id 111111 | "isp_targeting": [ 111111 ] | |
Invalid request | isp_targeting should be an int array | "isp_targeting": [ "165" ] |