PUT Ad Schedule
Overview
The following table contains important information about the PUT method in regards to updating an ad schedule.
| PUT Ad Schedule | |
|---|---|
| Method | PUT | 
| URL or Endpoint | /api/projects/ projectId/ad-schedules | 
| Headers | Authorization | 
| Parameters | projectId | 
| Body | Check the request body below. | 
The description of the URL parameter is as follows:
| projectId URL Parameter | |
|---|---|
| URL Parameter Name | projectId | 
| Mandatory | Yes | 
| Type | string | 
| Description | Unique Id of the project. | 
Request Body
{
  "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
    }
  ]
}
Information about the fields that appear when you type in the request body are displayed in the table below.
| Field Name | Type | Description | 
|---|---|---|
| adManagerId | integer | The ID of the ad manager type. | 
| vpaidModeOptionId | integer | The ID of the VPAID mode option. | 
| publicId | string | The ID of the ad schedule. | 
| name | string | Name of the ad schedule. | 
| adScheduleTypeId | integer | The ID of the ad schedule type. | 
| adSeenOnSubsequentVisitOptionId | integer | Indicates that the video should play the preroll break. | 
| vmapAdTag | string | The tag of the VMAP ad. | 
| timeBetweenAds | integer | Indicates the time ads should have between each other. | 
| startOnPlaylistItem | integer | Indicates on which playlist item the ad schedule should start. | 
| repeatOnInterval | integer | Indicates the interval at which the ad schedules should repeat. | 
| enableBidding | boolean | Indicates whether bidding is enabled or disabled. | 
| enableProgrammability | boolean | Indicates whether programmability features are enabled for the schedule. | 
| skipAllAds | boolean | Indicates whether all ads should be skipped for this schedule. | 
| enableDemandManager | boolean | Indicates whether the demand manager is enabled for this ad schedule. | 
| wrapperId | string | The public ID of the wrapper to be used in this ad schedule. | 
| biddingTemplatePublicId | string | The ID of the bidding template. | 
| playerTypeId | integer | The ID of the player type assigned to the schedule. | 
| playerType | string | The name or type of the player assigned to the schedule. | 
| adFrequencyTimingTypeId | integer | The ID of the timing type used to define ad frequency. | 
| adFrequency | integer | Number of times an ad should be shown within the frequency timing type. | 
| initialDelayTimingTypeId | integer | The ID representing the timing method for the initial delay. | 
| initialDelay | integer | Indicates the initial delay before the first ad plays. | 
| adCapping | integer | Limits the number of ads shown to a user in a given session or period. | 
| adCycleDelayMs | integer | Delay in milliseconds between cycles of ads. | 
| adRetryLimit | integer | Maximum number of times an ad is retried upon failure. | 
| adCycleRestartMs | integer | Time in milliseconds to wait before restarting the ad cycle. | 
| vpaidModeOption | object | Returns the VPAID mode option. | 
| id | integer | ID of the VPAID mode option. | 
| name | string | Name of the VPAID mode option. | 
| adSeenOnSubsequentVisitOption | object | Settings for displaying ads on return visits. | 
| id | integer | ID of the option. | 
| name | string | Name of the option. | 
| adManager | object | Ad manager configuration object. | 
| id | integer | ID of the ad manager. | 
| Value | string | Value of the ad manager. | 
| adScheduleType | object | Type definition for the ad schedule. | 
| id | integer | ID of the ad schedule type. | 
| name | string | Name of the ad schedule type. | 
| value | string | Internal value identifier. | 
| description | string | Description of the ad schedule type. | 
| adWorkflows | array[] | Array of ad workflow objects | 
| id | integer | The ID of the ad workflow. | 
| adScheduleId | integer | The ID of the associated ad schedule. | 
| adFunctionId | integer | The ID of the ad function. | 
| adFunctionName | string | The name of the ad function. | 
| order | integer | Order number of the ad workflow. | 
Response
{
  "success": true,
  "errors": [
    "string"
  ],
  "messages": [
    "string"
  ],
  "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": "string",
  "statusCode": 0
}
Information about the fields that appear when you receive the response are displayed in the table below.
| Field Name | Type | Description | 
|---|---|---|
| success | boolean | Returns true if the request was successful, otherwise false. | 
| errors | array[string] | List of error messages if any occurred. | 
| messages | array[string] | List of general messages from the server. | 
| result | object | The updated ad schedule object. | 
| adManagerId | integer | The ID of the ad manager type. | 
| vpaidModeOptionId | integer | The ID of the VPAID mode option. | 
| publicId | string | The ID of the ad schedule. | 
| name | string | The name of the ad schedule. | 
| adScheduleTypeId | integer | The ID of the ad schedule type. | 
| adSeenOnSubsequentVisitOptionId | integer | Indicates that the video should play the preroll break. | 
| vmapAdTag | string | The tag of the VMAP ad. | 
| timeBetweenAds | integer | Indicates the time ads should have between each other. | 
| startOnPlaylistItem | integer | Indicates on which playlist item the ad schedule should start. | 
| repeatOnInterval | integer | Indicates the interval at which the ad schedules should repeat. | 
| enableBidding | boolean | Indicates whether bidding is enabled or disabled. | 
| enableProgrammability | boolean | Indicates whether programmability features are enabled for the schedule. | 
| skipAllAds | boolean | Indicates whether all ads should be skipped for this schedule. | 
| enableDemandManager | boolean | Indicates whether the demand manager is enabled for this ad schedule. | 
| wrapperId | string | The public ID of the wrapper to be used in this ad schedule. | 
| biddingTemplatePublicId | string | The ID of the bidding template. | 
| playerTypeId | integer | The ID of the player type assigned to the schedule. | 
| playerType | string | The name or type of the player assigned to the schedule. | 
| adFrequencyTimingTypeId | integer | The ID of the timing type used to define ad frequency. | 
| adFrequency | integer | Number of times an ad should be shown within the frequency timing type. | 
| initialDelayTimingTypeId | integer | The ID representing the timing method for the initial delay. | 
| initialDelay | integer | Indicates the initial delay before the first ad plays. | 
| adCapping | integer | Limits the number of ads shown to a user in a given session or period. | 
| adCycleDelayMs | integer | Delay in milliseconds between cycles of ads. | 
| adRetryLimit | integer | Maximum number of times an ad is retried upon failure. | 
| adCycleRestartMs | integer | Time in milliseconds to wait before restarting the ad cycle. | 
| vpaidModeOption | object | Returns the VPAID mode option. | 
| id | integer | The ID of the VPAID mode option. | 
| name | string | The name of the VPAID mode option. | 
| adSeenOnSubsequentVisitOption | object | Returns the subsequent visit option of the ad schedule. | 
| id | integer | The ID of of the subsequent visit option. | 
| name | string | The name of of the subsequent visit option. | 
| adManager | object | Ad manager configuration object. | 
| id | integer | The ID of the ad manager. | 
| Value | string | The Value of the ad manager. | 
| adScheduleType | object | Returns the ad schedule type object. | 
| id | integer | Id of the ad schedule type. | 
| name | string | Name of the ad schedule type. | 
| value | string | Value of the ad schedule type. | 
| description | string | Description of the ad schedule type. | 
| adWorkflows | array[] | Array of ad workflow objects | 
| id | integer | The ID of the ad workflow. | 
| adScheduleId | integer | The ID of the associated ad schedule. | 
| adFunctionId | integer | The ID of the ad function. | 
| adFunctionName | string | The name of the ad function. | 
| order | integer | Order number of the ad workflow. | 
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