Skip to main content

POST Ad Schedule

Overview


The following table contains important information about the POST method in regards to posting an Ad Schedule.

POST Ad Schedule
MethodPOST
URL or Endpoint/api/projects/projectId/ad-schedules
HeadersAuthorization
ParametersprojectId
BodyCheck the request body below.

The description of the URL parameter is as follows:

projectId URL Parameter
URL Parameter NameprojectId
MandatoryYes
Typestring
DescriptionUnique Id of the project.

Request Body

{
"name": "string",
"adManagerId": 0,
"vpaidModeOptionId": 0,
"adScheduleTypeId": 0,
"vmapAdTag": "string",
"timeBetweenAds": 0,
"startOnPlaylistItem": 0,
"repeatOnInterval": 0,
"adSeenOnSubsequentVisitOptionId": 0,
"enableBidding": true,
"enableProgrammability": true,
"skipAllAds": true,
"biddingTemplatePublicId": "string",
"playerTypeId": 0,
"adFrequencyTimingTypeId": 0,
"adFrequency": 0,
"initialDelayTimingTypeId": 0,
"initialDelay": 0,
"adCapping": 0,
"adCycleDelayMs": 0,
"adRetryLimit": 0,
"adCycleRestartMs": 0,
"adWorkflows": [
{
"id": 0,
"adScheduleId": "string",
"adFunctionId": 0,
"adFunctionName": "string",
"order": 0
}
]
}

Information about the fields that appear when you type in the request body are displayed in the table below.

Field NameTypeDescription
namestringThe name of the ad schedule.
adManagerIdintegerThe ID of the ad manager type.
vpaidModeOptionIdintegerThe ID of the VPAID mode option.
adScheduleTypeIdintegerThe ID of the ad schedule type.
vmapAdTagstringThe tag of the VMAP ad.
timeBetweenAdsintegerIndicates the time ads should have between each other.
startOnPlaylistItemintegerIndicates on which playlist item the ad schedule should start.
repeatOnIntervalintegerIndicates the interval at which the ad schedules should repeat.
adSeenOnSubsequentVisitOptionIdintegerIndicates that the video should play the preroll break.
enableBiddingboolIndicates whether bidding is enabled or disabled.
enableProgrammabilityboolIndicates whether programmability features are enabled.
skipAllAdsboolIndicates whether to skip all ads.
biddingTemplatePublicIdstringThe ID of the bidding template.
playerTypeIdintegerThe ID of the player type.
adFrequencyTimingTypeIdintegerThe ID of the ad frequency timing type.
adFrequencyintegerThe frequency at which ads should appear.
initialDelayTimingTypeIdintegerThe ID of the initial delay timing type.
initialDelayintegerThe initial delay before ads start.
adCappingintegerThe maximum number of ads shown per user/session.
adCycleDelayMsintegerThe delay between ad cycles in milliseconds.
adRetryLimitintegerThe limit on ad retry attempts.
adCycleRestartMsintegerThe delay before restarting the ad cycle in milliseconds.
adWorkflowsarray[]Array of ad workflow objects
idintegerThe ID of the ad workflow.
adScheduleIdintegerThe ID of the associated ad schedule.
adFunctionIdintegerThe ID of the ad function.
adFunctionNamestringThe name of the ad function.
orderintegerOrder number of the ad workflow.

Response

{
"success": true,
"errors": [],
"messages": [],
"result": {
{
"adManagerId": 0,
"vpaidModeOptionId": 0,
"publicId": "string",
"name": "string",
"adScheduleTypeId": 0,
"adSeenOnSubsequentVisitOptionId": 0,
"vmapAdTag": "string",
"timeBetweenAds": 0,
"startOnPlaylistItem": 0,
"repeatOnInterval": 0,
"enableBidding": true,
"enableProgrammability": true,
"skipAllAds": true,
"enableDemandManager": true,
"wrapperId": "string",
"biddingTemplatePublicId": "string",
"playerTypeId": 0,
"playerType": "string",
"adFrequencyTimingTypeId": 0,
"adFrequency": 0,
"initialDelayTimingTypeId": 0,
"initialDelay": 0,
"adCapping": 0,
"adCycleDelayMs": 0,
"adRetryLimit": 0,
"adCycleRestartMs": 0,
"vpaidModeOption": {
"id": 0,
"name": "string"
},
"adSeenOnSubsequentVisitOption": {
"id": 0,
"name": "string"
},
"adManager": {
"id": 0,
"Value": "string"
},
"adScheduleType": {
"id": 0,
"name": "string",
"value": "string",
"description": "string"
},
"adWorkflows": [
{
"id": 0,
"adScheduleId": "string",
"adFunctionId": 0,
"adFunctionName": "string",
"order": 0
}
]
}
},
"resultInfo": null,
"statusCode": 200
}

Information about the fields that appear when you receive the response are displayed in the table below.

Field NameTypeDescription
successboolIf the response is successful it will return true. Otherwise will return false.
errorsarray[]Indicates if there was an error.
messagesarray[]Returns the response message from back-end.
resultobjectReturns the response object.
adManagerIdintegerThe ID of the ad manager type.
vpaidModeOptionIdintegerThe ID of the VPAID mode option.
publicIdstringThe ID of the ad schedule.
namestringThe name of the ad schedule.
adScheduleTypeIdintegerThe ID of the ad schedule type.
adSeenOnSubsequentVisitOptionIdintegerIndicates that the video should play the preroll break.
vmapAdTagstringThe tag of the VMAP ad.
timeBetweenAdsintegerIndicates the time ads should have between each other.
startOnPlaylistItemintegerIndicates on which playlist item the ad schedule should start.
repeatOnIntervalintegerIndicates the interval at which the ad schedules should repeat.
enableBiddingboolIndicates whether bidding is enabled or disabled.
enableProgrammabilityboolIndicates whether programmability features are enabled for the schedule.
skipAllAdsboolIndicates whether all ads should be skipped for this schedule.
enableDemandManagerboolIndicates whether the demand manager is enabled for this ad schedule.
wrapperIdstringThe public ID of the wrapper to be used in this ad schedule.
biddingTemplatePublicIdstringThe ID of the bidding template.
playerTypeIdintegerThe ID of the player type assigned to the schedule.
playerTypestringThe name or type of the player assigned to the schedule.
adFrequencyTimingTypeIdintegerThe ID of the timing type used to define ad frequency.
adFrequencyintegerNumber of times an ad should be shown within the frequency timing type.
initialDelayTimingTypeIdintegerThe ID representing the timing method for the initial delay.
initialDelayintegerIndicates the initial delay before the first ad plays.
adCappingintegerLimits the number of ads shown to a user in a given session or period.
adCycleDelayMsintegerDelay in milliseconds between cycles of ads.
adRetryLimitintegerMaximum number of times an ad is retried upon failure.
adCycleRestartMsintegerTime in milliseconds to wait before restarting the ad cycle.
vpaidModeOptionobjectReturns the VPAID mode option.
idintegerThe ID of the VPAID mode option.
namestringThe name of the VPAID mode option.
adSeenOnSubsequentVisitOptionobjectReturns the subsequent visit option of the ad schedule.
idintegerThe ID of of the subsequent visit option.
namestringThe name of of the subsequent visit option.
adManagerobjectReturns the ad manager of the ad schedule.
idintegerThe ID of the ad manager.
ValuestringThe value of the ad manager.
adScheduleTypeobjectReturns the ad schedule type object.
idintegerId of the ad schedule type.
namestringName of the ad schedule type.
valuestringValue of the ad schedule type.
descriptionstringDescription of the ad schedule type.
adWorkflowsarray[object]Returns the workflows associated with the ad schedule.
idintegerID of the ad workflow.
adScheduleIdstringThe public ID of the associated ad schedule.
adFunctionIdintegerID of the ad function used in the workflow.
adFunctionNamestringName of the ad function.
orderintegerThe execution order of the ad function in the workflow.
resultInfostringReturns extra information about the result.
statusCodeintegerReturns the HTTP Status Code.

If the action is successful, the service sends back an HTTP 200 or 201 response.

Errors

For information about the errors that are common to all actions, see Common Errors:

  • HTTP Status Code 400: Bad Request

  • HTTP Status Code 401: Unauthorized

  • HTTP Status Code 403: Forbidden

  • HTTP Status Code 404: Result Not Found

  • HTTP Status Code 500: Internal Server Error

  • HTTP Status Code 503: Backend Fetch Failed