Skip to main content
PUT
Update a Schedule

Authorizations

Authorization
string
header
required

API key en el header Authorization: Basic TU_API_KEY. La key va tal cual, sin codificar en base64. Las credenciales se entregan al comenzar la integración.

Path Parameters

id
integer
required

Identifier of the schedule you'd like to update.

Body

application/json
day_cap_limit
integer

The number of times an ad will be shown in a day. Accepts any integer except 0. Defaults to null.

Example:

1111

day_cap_type
string

Whether to impose daily limits on the amount of views ("views") or the amount of clicks ("clicks").

Example:

"clicks"

delivery_method
string

Whether to deliver the impressions as quickly as possible ("default") or deliver it evenly ("smooth") over the specified duration (start_date and end_date) and quota (quota_lifetime and quota_type). Default delivery delivers the impressions as quickly as possible. Smooth delivery will evenly serve over the lifetime dates and quotas. Defaults to "default".

NOTE:

  • Placements with serve_method set to "auction" will always be delivered using the "default" method regardless of this field's value.

  • Only subscribers on the Standard tier and above have access to smooth delivery. If you don't have that feature enabled, you must set this field's value to "default".

  • If you change your subscription from Standard tier and above to a lower tier, any placements that have already been set to smooth delivery will remain under that delivery method.

Example:

"default"

start_date
string<date-time>
deprecated

The time and date when an ad should begin serving. Delay serving of ads by setting the start_date to a date in the future. Defaults to midnight of the current date if no value or null given.

The date-time value received is assumed to be in the Haku account's time zone as defined on account creation. You can check your account's time zone in the Haku Settings page.

In the response body, start_date is returned in Haku’s server time zone (America/Los_Angeles). To see the end date in the Haku account's chosen timezone, see start_date_local.

Example:

"2018-09-15 00:00:00"

end_date
string<date-time>
deprecated

The time and date when an ad should stop serving. The end date can be as far in the future as desired. This allows you to set time-based expiration for your ads, and we guarantee accuracy to the hour. Set the field to null if you want ad serving to run indefinitely.

The date-time value received is assumed to be in the Haku account's time zone as defined on account creation. You can check your account's time zone in the Haku Settings page.

In the response body, end_date is returned in Haku’s server time zone (America/Los_Angeles). To see the end date in the Haku account's chosen timezone, see end_date_local.

Example:

"2019-10-15 00:00:00"

start_at
string<date-time>

The time and date when an ad should begin serving, in ISO-8601 format. Delay serving of ads by setting start_at to a date in the future. Defaults to midnight of the current date if no value or null given.

The timezone given in the ISO formatted date here does not have to match the start_at_timezone field. However, the start date will be converted to the timezone specificed in start_at_timezone when the value is returned.

Example:

"2024-11-01T09:00:00-04:00"

start_at_timezone
string

The timezone of the start_at field. This is primarily for usage in UI interfaces so that the user can set certain timezones for different schedules. This could be useful if a customer has ordered a schedule to run from the first of the month to the 15th, starting at 9am and ending at 5pm, but the timezone is very different from the one the account or user is in. The timezone is in the IANA timezone format, such as America/New_York. A complete list of acceptable timezones by country is given here.

If no timezone is given, the account's default timezone is used.

Example:

"America/New_York"

end_at
string<date-time>

The time and date when an ad should stop serving, in ISO-8601 format. The end date can be as far in the future as desired. This allows you to set time-based expiration for your ads, and we guarantee accuracy to the hour. Set the field to null if you want ad serving to never end.

The timezone given in the ISO formatted date here does not have to match the end_at_timezone field. However, the end date will be converted to the timezone specificed in end_at_timezone when the value is returned.

Example:

"2024-11-15T17:00:00-04:00"

end_at_timezone
string

The timezone of the end_at field. This is primarily for usage in UI interfaces so that the user can set certain timezones for different schedules. This could be useful if a customer has ordered a schedule to run from the first of the month to the 15th, starting at 9am and ending at 5pm, but the timezone is very different from the one the account or user is in. The timezone is in the IANA timezone format, such as America/New_York. A complete list of acceptable timezones by country is given here.

If no timezone is given, the account's default timezone is used.

Example:

"America/New_York"

per_user_view_limit
integer

The number of times the ad will be shown to a particular user in a time period given by per_user_view_period. An integer value enables frequency capping and must be specified along with per_user_view_period. Both fields default to null, which means frequency capping is disabled.

Example:

null

per_user_view_period
integer

The number of days after which the per_user_view_limit counter will start over. This field must be specified along with per_user_view_limit. Both fields default to null, which means frequency capping is disabled.

Example:

null

quota_lifetime
integer

The targeted number of impressions or clicks to deliver for a placement with a quota-based expiration method, where the ad or campaign will stop being served once the quota for "views" or "clicks" is met. Haku will calculate the remaining inventory based on this value.

Example:

10000

quota_type
string

The type of quota when setting up quota-based expiration for a placement. It can be the number of clicks ("clicks") or the number of views ("views"). When a placement has a quota-based expiration, it will stop being served once it reaches the given clicks or views.

Example:

"views"

under_delivery_behaviour
string

Whether to keep serving ads until the quota is met ("endOnQuota") or stop serving them right away ("endOnDate") once the end date has been reached. Defaults to endOnDate if delivery_method is "smooth". Defaults to null if delivery_method is "default".

Example:

"endOnDate"

day_parting_id
integer

The day_parting identifier if dayparting is enabled for this schedule.

NOTE: Subscribers must have the Targeting add-on to enable dayparting. If you don't have this add-on, you must set this field's value to null.

Example:

1234

status
string

The status of the schedule, determined using the start and end dates and quotas. All possible statuses are: "active", "queued", "expired", and "quota_reached".

Example:

"active"

Response

default - application/json

successful operation

day_cap_limit
integer

The number of times an ad will be shown in a day. Accepts any integer except 0. Defaults to null.

Example:

1111

day_cap_type
string

Whether to impose daily limits on the amount of views ("views") or the amount of clicks ("clicks").

Example:

"clicks"

delivery_method
string

Whether to deliver the impressions as quickly as possible ("default") or deliver it evenly ("smooth") over the specified duration (start_date and end_date) and quota (quota_lifetime and quota_type). Default delivery delivers the impressions as quickly as possible. Smooth delivery will evenly serve over the lifetime dates and quotas. Defaults to "default".

NOTE:

  • Placements with serve_method set to "auction" will always be delivered using the "default" method regardless of this field's value.

  • Only subscribers on the Standard tier and above have access to smooth delivery. If you don't have that feature enabled, you must set this field's value to "default".

  • If you change your subscription from Standard tier and above to a lower tier, any placements that have already been set to smooth delivery will remain under that delivery method.

Example:

"default"

start_date
string<date-time>
deprecated

The time and date when an ad should begin serving. Delay serving of ads by setting the start_date to a date in the future. Defaults to midnight of the current date if no value or null given.

The date-time value received is assumed to be in the Haku account's time zone as defined on account creation. You can check your account's time zone in the Haku Settings page.

In the response body, start_date is returned in Haku’s server time zone (America/Los_Angeles). To see the end date in the Haku account's chosen timezone, see start_date_local.

Example:

"2018-09-15 00:00:00"

end_date
string<date-time>
deprecated

The time and date when an ad should stop serving. The end date can be as far in the future as desired. This allows you to set time-based expiration for your ads, and we guarantee accuracy to the hour. Set the field to null if you want ad serving to run indefinitely.

The date-time value received is assumed to be in the Haku account's time zone as defined on account creation. You can check your account's time zone in the Haku Settings page.

In the response body, end_date is returned in Haku’s server time zone (America/Los_Angeles). To see the end date in the Haku account's chosen timezone, see end_date_local.

Example:

"2019-10-15 00:00:00"

start_at
string<date-time>

The time and date when an ad should begin serving, in ISO-8601 format. Delay serving of ads by setting start_at to a date in the future. Defaults to midnight of the current date if no value or null given.

The timezone given in the ISO formatted date here does not have to match the start_at_timezone field. However, the start date will be converted to the timezone specificed in start_at_timezone when the value is returned.

Example:

"2024-11-01T09:00:00-04:00"

start_at_timezone
string

The timezone of the start_at field. This is primarily for usage in UI interfaces so that the user can set certain timezones for different schedules. This could be useful if a customer has ordered a schedule to run from the first of the month to the 15th, starting at 9am and ending at 5pm, but the timezone is very different from the one the account or user is in. The timezone is in the IANA timezone format, such as America/New_York. A complete list of acceptable timezones by country is given here.

If no timezone is given, the account's default timezone is used.

Example:

"America/New_York"

end_at
string<date-time>

The time and date when an ad should stop serving, in ISO-8601 format. The end date can be as far in the future as desired. This allows you to set time-based expiration for your ads, and we guarantee accuracy to the hour. Set the field to null if you want ad serving to never end.

The timezone given in the ISO formatted date here does not have to match the end_at_timezone field. However, the end date will be converted to the timezone specificed in end_at_timezone when the value is returned.

Example:

"2024-11-15T17:00:00-04:00"

end_at_timezone
string

The timezone of the end_at field. This is primarily for usage in UI interfaces so that the user can set certain timezones for different schedules. This could be useful if a customer has ordered a schedule to run from the first of the month to the 15th, starting at 9am and ending at 5pm, but the timezone is very different from the one the account or user is in. The timezone is in the IANA timezone format, such as America/New_York. A complete list of acceptable timezones by country is given here.

If no timezone is given, the account's default timezone is used.

Example:

"America/New_York"

per_user_view_limit
integer

The number of times the ad will be shown to a particular user in a time period given by per_user_view_period. An integer value enables frequency capping and must be specified along with per_user_view_period. Both fields default to null, which means frequency capping is disabled.

Example:

null

per_user_view_period
integer

The number of days after which the per_user_view_limit counter will start over. This field must be specified along with per_user_view_limit. Both fields default to null, which means frequency capping is disabled.

Example:

null

quota_lifetime
integer

The targeted number of impressions or clicks to deliver for a placement with a quota-based expiration method, where the ad or campaign will stop being served once the quota for "views" or "clicks" is met. Haku will calculate the remaining inventory based on this value.

Example:

10000

quota_type
string

The type of quota when setting up quota-based expiration for a placement. It can be the number of clicks ("clicks") or the number of views ("views"). When a placement has a quota-based expiration, it will stop being served once it reaches the given clicks or views.

Example:

"views"

under_delivery_behaviour
string

Whether to keep serving ads until the quota is met ("endOnQuota") or stop serving them right away ("endOnDate") once the end date has been reached. Defaults to endOnDate if delivery_method is "smooth". Defaults to null if delivery_method is "default".

Example:

"endOnDate"

day_parting_id
integer

The day_parting identifier if dayparting is enabled for this schedule.

NOTE: Subscribers must have the Targeting add-on to enable dayparting. If you don't have this add-on, you must set this field's value to null.

Example:

1234

status
string

The status of the schedule, determined using the start and end dates and quotas. All possible statuses are: "active", "queued", "expired", and "quota_reached".

Example:

"active"

created_date
string<date-time>
deprecated

The date and time when the schedule was created.

Example:

"2019-01-22 00:00:00"

clicks
integer

The number of clicks recorded so far.

Example:

0

views
integer

The number of views recorded so far.

Example:

0

quote_remaining
integer

The number of impressions remaining to be served.

Example:

null

object
string

A string denoting the current resource being requested or affected.

Example:

"schedule"

self
string

The relative URL of the current resource being requested or affected.

Example:

"/v2/schedules/1234"

id
integer

The current resource identifier (ID).

Example:

1234

end_date_local
string<date-time>
deprecated

The end_date value in the Haku account's timezone.

Example:

"2019-05-26 15:32:06"

start_date_local
string<date-time>
deprecated

The start_date value in the Haku account's timezone.

Example:

"2019-05-26 15:32:06"