curl --request PATCH \
--url https://api.mottostreaming.com/monetization/offers/v1/{offer_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"offer_id": "<string>",
"offer": {
"project_id": "<string>",
"name": "<string>",
"localized_title": {},
"localized_description": {},
"cleeng_offer_id": "<string>",
"applies_to_all": true,
"target": {
"entity_ids": [
"<string>"
],
"event_ids": [
"<string>"
],
"creative_work_ids": [
"<string>"
],
"content_start_time": "2023-11-07T05:31:56Z",
"content_end_time": "2023-11-07T05:31:56Z"
},
"localized_logo_asset_id": {},
"localized_image_asset_id": {},
"offer_prices": [
{
"id": "<string>",
"msrp_price": {
"currency_code": "<string>",
"units": "<string>",
"nanos": 123
},
"price": {
"currency_code": "<string>",
"units": "<string>",
"nanos": 123
},
"billing_period": "BILLING_PERIOD_UNSPECIFIED",
"access_period": "ACCESS_PERIOD_UNSPECIFIED",
"geo_restrictions_disallow": {
"country_codes": [
"<string>"
]
},
"geo_restrictions_allow": {
"country_codes": [
"<string>"
]
},
"priority": "<string>",
"stripe_product_id": "<string>",
"app_store_product_id": "<string>",
"play_store_sku": "<string>"
}
],
"priority": "<string>",
"concurrency_limit": "<string>",
"visibility": "VISIBILITY_UNSPECIFIED"
},
"update_mask": "<string>"
}
'{
"offer": {
"project_id": "<string>",
"name": "<string>",
"localized_title": {},
"localized_description": {},
"id": "<string>",
"cleeng_offer_id": "<string>",
"applies_to_all": true,
"target": {
"entity_ids": [
"<string>"
],
"event_ids": [
"<string>"
],
"creative_work_ids": [
"<string>"
],
"content_start_time": "2023-11-07T05:31:56Z",
"content_end_time": "2023-11-07T05:31:56Z"
},
"localized_logo_asset_id": {},
"localized_image_asset_id": {},
"offer_prices": [
{
"id": "<string>",
"msrp_price": {
"currency_code": "<string>",
"units": "<string>",
"nanos": 123
},
"price": {
"currency_code": "<string>",
"units": "<string>",
"nanos": 123
},
"billing_period": "BILLING_PERIOD_UNSPECIFIED",
"access_period": "ACCESS_PERIOD_UNSPECIFIED",
"geo_restrictions_disallow": {
"country_codes": [
"<string>"
]
},
"geo_restrictions_allow": {
"country_codes": [
"<string>"
]
},
"priority": "<string>",
"stripe_product_id": "<string>",
"app_store_product_id": "<string>",
"play_store_sku": "<string>"
}
],
"priority": "<string>",
"concurrency_limit": "<string>",
"visibility": "VISIBILITY_UNSPECIFIED"
}
}UpdateOffer
Updates existing offer.
curl --request PATCH \
--url https://api.mottostreaming.com/monetization/offers/v1/{offer_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"offer_id": "<string>",
"offer": {
"project_id": "<string>",
"name": "<string>",
"localized_title": {},
"localized_description": {},
"cleeng_offer_id": "<string>",
"applies_to_all": true,
"target": {
"entity_ids": [
"<string>"
],
"event_ids": [
"<string>"
],
"creative_work_ids": [
"<string>"
],
"content_start_time": "2023-11-07T05:31:56Z",
"content_end_time": "2023-11-07T05:31:56Z"
},
"localized_logo_asset_id": {},
"localized_image_asset_id": {},
"offer_prices": [
{
"id": "<string>",
"msrp_price": {
"currency_code": "<string>",
"units": "<string>",
"nanos": 123
},
"price": {
"currency_code": "<string>",
"units": "<string>",
"nanos": 123
},
"billing_period": "BILLING_PERIOD_UNSPECIFIED",
"access_period": "ACCESS_PERIOD_UNSPECIFIED",
"geo_restrictions_disallow": {
"country_codes": [
"<string>"
]
},
"geo_restrictions_allow": {
"country_codes": [
"<string>"
]
},
"priority": "<string>",
"stripe_product_id": "<string>",
"app_store_product_id": "<string>",
"play_store_sku": "<string>"
}
],
"priority": "<string>",
"concurrency_limit": "<string>",
"visibility": "VISIBILITY_UNSPECIFIED"
},
"update_mask": "<string>"
}
'{
"offer": {
"project_id": "<string>",
"name": "<string>",
"localized_title": {},
"localized_description": {},
"id": "<string>",
"cleeng_offer_id": "<string>",
"applies_to_all": true,
"target": {
"entity_ids": [
"<string>"
],
"event_ids": [
"<string>"
],
"creative_work_ids": [
"<string>"
],
"content_start_time": "2023-11-07T05:31:56Z",
"content_end_time": "2023-11-07T05:31:56Z"
},
"localized_logo_asset_id": {},
"localized_image_asset_id": {},
"offer_prices": [
{
"id": "<string>",
"msrp_price": {
"currency_code": "<string>",
"units": "<string>",
"nanos": 123
},
"price": {
"currency_code": "<string>",
"units": "<string>",
"nanos": 123
},
"billing_period": "BILLING_PERIOD_UNSPECIFIED",
"access_period": "ACCESS_PERIOD_UNSPECIFIED",
"geo_restrictions_disallow": {
"country_codes": [
"<string>"
]
},
"geo_restrictions_allow": {
"country_codes": [
"<string>"
]
},
"priority": "<string>",
"stripe_product_id": "<string>",
"app_store_product_id": "<string>",
"play_store_sku": "<string>"
}
],
"priority": "<string>",
"concurrency_limit": "<string>",
"visibility": "VISIBILITY_UNSPECIFIED"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Offer represents a collection of video content that end users can purchase. This can be used e.g. to define Entitlements against.
Show child attributes
Name of the offer. This is an internal identifier and is not exposed to end users.
A map of localized titles for this offer. The key is the language code (ISO 639 - set 1), e.g. "en", "de", "fr", etc. If you want to localize the text for different regions of the same language, you can add the country code (ISO 3166-1 alpha-2), e.g. "en-US", "en-GB", etc.
Show child attributes
A map of localized descriptions for this offer. The key is the language code (ISO 639 - set 1), e.g. "en", "de", "fr", etc. If you want to localize the text for different regions of the same language, you can add the country code (ISO 3166-1 alpha-2), e.g. "en-US", "en-GB", etc.
Show child attributes
This offer applies to all videos in the project.
This offer applies to a specific set of videos, as defined by the target.
Show child attributes
The entities with which this offer is associated. If provided, all videos that are associated with these entities will be included in the offer.
The events with which this offer is associated. If provided, all videos that are associated with these events will be included in the offer.
The creative works with which this offer is associated. If provided, all videos that are associated with these creative works will be included in the offer.
Any content defined by entity_ids, event_ids and creative_work_ids after content_start_time will be considered as part of the offer (as long as it is before content_end_time).
If not provided, there is no lower time bound on the content.
Any content defined by entity_ids, event_ids and creative_work_ids before content_end_time will be considered as part of the offer (as long as it is after content_start_time).
If not provided, there is no upper time bound on the content.
A map of localized logos for this offer. These should be small images with a transparent background. The key is the language code (ISO 639 - set 1), e.g. "en", "de", "fr", etc. If you want to localize the text for different regions of the same language, you can add the country code (ISO 3166-1 alpha-2), e.g. "en-US", "en-GB", etc. If not all languages are provided, the default language will be used.
Show child attributes
A map of localized images for this offer. These should be large, visually attractive images. The key is the language code (ISO 639 - set 1), e.g. "en", "de", "fr", etc. If you want to localize the text for different regions of the same language, you can add the country code (ISO 3166-1 alpha-2), e.g. "en-US", "en-GB", etc. If not all languages are provided, the default language will be used.
Show child attributes
An array of PriceOffers. When external_id is provided, pricing details are managed through a third-party system and this field should be empty.
Show child attributes
System generated identifier for the offer.
The MSRP price of the offer
Show child attributes
The three-letter currency code defined in ISO 4217.
The whole units of the amount.
For example if currencyCode is "USD", then 1 unit is one US dollar.
Number of nano (10^-9) units of the amount.
The value must be between -999,999,999 and +999,999,999 inclusive.
If units is positive, nanos must be positive or zero.
If units is zero, nanos can be positive, zero, or negative.
If units is negative, nanos must be negative or zero.
For example $-1.75 is represented as units=-1 and nanos=-750,000,000.
The price of the offer. If the user is purchasing the Offer with this OfferPrice through a managed subscription, the final price is determined by the managed product price. However, you must still set the price here for display purposes, and because the currency may be used to resolve the correct managed product.
Show child attributes
The three-letter currency code defined in ISO 4217.
The whole units of the amount.
For example if currencyCode is "USD", then 1 unit is one US dollar.
Number of nano (10^-9) units of the amount.
The value must be between -999,999,999 and +999,999,999 inclusive.
If units is positive, nanos must be positive or zero.
If units is zero, nanos can be positive, zero, or negative.
If units is negative, nanos must be negative or zero.
For example $-1.75 is represented as units=-1 and nanos=-750,000,000.
Billing period If the user is purchasing the Offer with this OfferPrice through a managed subscription, this field may be overwritten by the managed product price. It is still important to be accurate, as it will be used to determine which API calls to make to the managed product. It will also be used for display purposes to the end user.
BILLING_PERIOD_UNSPECIFIED, BILLING_PERIOD_ONE_TIME, BILLING_PERIOD_WEEKLY, BILLING_PERIOD_MONTHLY, BILLING_PERIOD_QUARTERLY, BILLING_PERIOD_YEARLY Access period. If the user is purchasing the Offer with this OfferPrice through a managed subscription, this field may be overwritten by the managed product price. However, you must still set the access period here for display purposes to the end user.
ACCESS_PERIOD_UNSPECIFIED, ACCESS_PERIOD_FOREVER, ACCESS_PERIOD_24_HOURS, ACCESS_PERIOD_48_HOURS, ACCESS_PERIOD_7_DAYS, ACCESS_PERIOD_30_DAYS, ACCESS_PERIOD_90_DAYS, ACCESS_PERIOD_365_DAYS Users are disallowed to purchase the video from these countries (and allowed from all others)
Show child attributes
A country code (ISO 3316-1 alpha-2: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)
Users are allowed to purchase the video from these countries (and disallowed from all others)
Show child attributes
A country code (ISO 3316-1 alpha-2: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)
Priority of the offer. This determines the order in which prices are shown to the user (when more than one price is available). A higher number means the price is shown earlier.
A Stripe product ID. This is used to identify the product in Stripe, if one exists. This is only required if you want to use Stripe for recurring billing (i.e. using the Stripe subscriptions API).
An Apple App Store product ID. This is used to identify the product in the App Store, if one exists. This is typically a "consumable" product for pay-per-view content (single purchases of which there can be many), and "non-consumable" for season passes or subscriptions (purchases of which there can be only one of that type). Not needed if you do not want to offer in-app purchases on iOS/tvOS.
A Google Play Store product ID. This is used to identify the product in the Play Store, if one exists. Not needed if you do not want to offer in-app purchases on Android or Android TV.
The priority of the offer. Offers with higher priority will be shown first to the end user.
The amount of devices that can concurrently view the content associated with this offer from a single account. If not provided, there is no limit.
The visibility of the offer to end-users.
VISIBILITY_UNSPECIFIED, VISIBILITY_PUBLISHED, VISIBILITY_UNLISTED, VISIBILITY_HIDDEN OK
Offer represents a collection of video content that end users can purchase. This can be used e.g. to define Entitlements against.
Show child attributes
Name of the offer. This is an internal identifier and is not exposed to end users.
A map of localized titles for this offer. The key is the language code (ISO 639 - set 1), e.g. "en", "de", "fr", etc. If you want to localize the text for different regions of the same language, you can add the country code (ISO 3166-1 alpha-2), e.g. "en-US", "en-GB", etc.
Show child attributes
A map of localized descriptions for this offer. The key is the language code (ISO 639 - set 1), e.g. "en", "de", "fr", etc. If you want to localize the text for different regions of the same language, you can add the country code (ISO 3166-1 alpha-2), e.g. "en-US", "en-GB", etc.
Show child attributes
System generated identifier for the offer.
This offer applies to all videos in the project.
This offer applies to a specific set of videos, as defined by the target.
Show child attributes
The entities with which this offer is associated. If provided, all videos that are associated with these entities will be included in the offer.
The events with which this offer is associated. If provided, all videos that are associated with these events will be included in the offer.
The creative works with which this offer is associated. If provided, all videos that are associated with these creative works will be included in the offer.
Any content defined by entity_ids, event_ids and creative_work_ids after content_start_time will be considered as part of the offer (as long as it is before content_end_time).
If not provided, there is no lower time bound on the content.
Any content defined by entity_ids, event_ids and creative_work_ids before content_end_time will be considered as part of the offer (as long as it is after content_start_time).
If not provided, there is no upper time bound on the content.
A map of localized logos for this offer. These should be small images with a transparent background. The key is the language code (ISO 639 - set 1), e.g. "en", "de", "fr", etc. If you want to localize the text for different regions of the same language, you can add the country code (ISO 3166-1 alpha-2), e.g. "en-US", "en-GB", etc. If not all languages are provided, the default language will be used.
Show child attributes
A map of localized images for this offer. These should be large, visually attractive images. The key is the language code (ISO 639 - set 1), e.g. "en", "de", "fr", etc. If you want to localize the text for different regions of the same language, you can add the country code (ISO 3166-1 alpha-2), e.g. "en-US", "en-GB", etc. If not all languages are provided, the default language will be used.
Show child attributes
An array of PriceOffers. When external_id is provided, pricing details are managed through a third-party system and this field should be empty.
Show child attributes
System generated identifier for the offer.
The MSRP price of the offer
Show child attributes
The three-letter currency code defined in ISO 4217.
The whole units of the amount.
For example if currencyCode is "USD", then 1 unit is one US dollar.
Number of nano (10^-9) units of the amount.
The value must be between -999,999,999 and +999,999,999 inclusive.
If units is positive, nanos must be positive or zero.
If units is zero, nanos can be positive, zero, or negative.
If units is negative, nanos must be negative or zero.
For example $-1.75 is represented as units=-1 and nanos=-750,000,000.
The price of the offer. If the user is purchasing the Offer with this OfferPrice through a managed subscription, the final price is determined by the managed product price. However, you must still set the price here for display purposes, and because the currency may be used to resolve the correct managed product.
Show child attributes
The three-letter currency code defined in ISO 4217.
The whole units of the amount.
For example if currencyCode is "USD", then 1 unit is one US dollar.
Number of nano (10^-9) units of the amount.
The value must be between -999,999,999 and +999,999,999 inclusive.
If units is positive, nanos must be positive or zero.
If units is zero, nanos can be positive, zero, or negative.
If units is negative, nanos must be negative or zero.
For example $-1.75 is represented as units=-1 and nanos=-750,000,000.
Billing period If the user is purchasing the Offer with this OfferPrice through a managed subscription, this field may be overwritten by the managed product price. It is still important to be accurate, as it will be used to determine which API calls to make to the managed product. It will also be used for display purposes to the end user.
BILLING_PERIOD_UNSPECIFIED, BILLING_PERIOD_ONE_TIME, BILLING_PERIOD_WEEKLY, BILLING_PERIOD_MONTHLY, BILLING_PERIOD_QUARTERLY, BILLING_PERIOD_YEARLY Access period. If the user is purchasing the Offer with this OfferPrice through a managed subscription, this field may be overwritten by the managed product price. However, you must still set the access period here for display purposes to the end user.
ACCESS_PERIOD_UNSPECIFIED, ACCESS_PERIOD_FOREVER, ACCESS_PERIOD_24_HOURS, ACCESS_PERIOD_48_HOURS, ACCESS_PERIOD_7_DAYS, ACCESS_PERIOD_30_DAYS, ACCESS_PERIOD_90_DAYS, ACCESS_PERIOD_365_DAYS Users are disallowed to purchase the video from these countries (and allowed from all others)
Show child attributes
A country code (ISO 3316-1 alpha-2: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)
Users are allowed to purchase the video from these countries (and disallowed from all others)
Show child attributes
A country code (ISO 3316-1 alpha-2: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)
Priority of the offer. This determines the order in which prices are shown to the user (when more than one price is available). A higher number means the price is shown earlier.
A Stripe product ID. This is used to identify the product in Stripe, if one exists. This is only required if you want to use Stripe for recurring billing (i.e. using the Stripe subscriptions API).
An Apple App Store product ID. This is used to identify the product in the App Store, if one exists. This is typically a "consumable" product for pay-per-view content (single purchases of which there can be many), and "non-consumable" for season passes or subscriptions (purchases of which there can be only one of that type). Not needed if you do not want to offer in-app purchases on iOS/tvOS.
A Google Play Store product ID. This is used to identify the product in the Play Store, if one exists. Not needed if you do not want to offer in-app purchases on Android or Android TV.
The priority of the offer. Offers with higher priority will be shown first to the end user.
The amount of devices that can concurrently view the content associated with this offer from a single account. If not provided, there is no limit.
The visibility of the offer to end-users.
VISIBILITY_UNSPECIFIED, VISIBILITY_PUBLISHED, VISIBILITY_UNLISTED, VISIBILITY_HIDDEN