cURL
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>"
],
"video_ids": [
"<string>"
],
"content_start_time": "2023-11-07T05:31:56Z",
"content_end_time": "2023-11-07T05:31:56Z"
},
"filter": {
"filter_events": "<string>",
"filter_creative_works": "<string>"
},
"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
},
"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>",
"video_protection_ruleset_id": "<string>"
},
"update_mask": "<string>"
}
'import requests
url = "https://api.mottostreaming.com/monetization/offers/v1/{offer_id}"
payload = {
"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>"],
"video_ids": ["<string>"],
"content_start_time": "2023-11-07T05:31:56Z",
"content_end_time": "2023-11-07T05:31:56Z"
},
"filter": {
"filter_events": "<string>",
"filter_creative_works": "<string>"
},
"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
},
"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>",
"video_protection_ruleset_id": "<string>"
},
"update_mask": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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>'],
video_ids: ['<string>'],
content_start_time: '2023-11-07T05:31:56Z',
content_end_time: '2023-11-07T05:31:56Z'
},
filter: {filter_events: '<string>', filter_creative_works: '<string>'},
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},
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>',
video_protection_ruleset_id: '<string>'
},
update_mask: '<string>'
})
};
fetch('https://api.mottostreaming.com/monetization/offers/v1/{offer_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mottostreaming.com/monetization/offers/v1/{offer_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'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>'
],
'video_ids' => [
'<string>'
],
'content_start_time' => '2023-11-07T05:31:56Z',
'content_end_time' => '2023-11-07T05:31:56Z'
],
'filter' => [
'filter_events' => '<string>',
'filter_creative_works' => '<string>'
],
'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
],
'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>',
'video_protection_ruleset_id' => '<string>'
],
'update_mask' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mottostreaming.com/monetization/offers/v1/{offer_id}"
payload := strings.NewReader("{\n \"offer_id\": \"<string>\",\n \"offer\": {\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"localized_title\": {},\n \"localized_description\": {},\n \"cleeng_offer_id\": \"<string>\",\n \"applies_to_all\": true,\n \"target\": {\n \"entity_ids\": [\n \"<string>\"\n ],\n \"event_ids\": [\n \"<string>\"\n ],\n \"creative_work_ids\": [\n \"<string>\"\n ],\n \"video_ids\": [\n \"<string>\"\n ],\n \"content_start_time\": \"2023-11-07T05:31:56Z\",\n \"content_end_time\": \"2023-11-07T05:31:56Z\"\n },\n \"filter\": {\n \"filter_events\": \"<string>\",\n \"filter_creative_works\": \"<string>\"\n },\n \"localized_logo_asset_id\": {},\n \"localized_image_asset_id\": {},\n \"offer_prices\": [\n {\n \"id\": \"<string>\",\n \"msrp_price\": {\n \"currency_code\": \"<string>\",\n \"units\": \"<string>\",\n \"nanos\": 123\n },\n \"price\": {\n \"currency_code\": \"<string>\",\n \"units\": \"<string>\",\n \"nanos\": 123\n },\n \"geo_restrictions_disallow\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"geo_restrictions_allow\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"priority\": \"<string>\",\n \"stripe_product_id\": \"<string>\",\n \"app_store_product_id\": \"<string>\",\n \"play_store_sku\": \"<string>\"\n }\n ],\n \"priority\": \"<string>\",\n \"concurrency_limit\": \"<string>\",\n \"video_protection_ruleset_id\": \"<string>\"\n },\n \"update_mask\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.mottostreaming.com/monetization/offers/v1/{offer_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"offer_id\": \"<string>\",\n \"offer\": {\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"localized_title\": {},\n \"localized_description\": {},\n \"cleeng_offer_id\": \"<string>\",\n \"applies_to_all\": true,\n \"target\": {\n \"entity_ids\": [\n \"<string>\"\n ],\n \"event_ids\": [\n \"<string>\"\n ],\n \"creative_work_ids\": [\n \"<string>\"\n ],\n \"video_ids\": [\n \"<string>\"\n ],\n \"content_start_time\": \"2023-11-07T05:31:56Z\",\n \"content_end_time\": \"2023-11-07T05:31:56Z\"\n },\n \"filter\": {\n \"filter_events\": \"<string>\",\n \"filter_creative_works\": \"<string>\"\n },\n \"localized_logo_asset_id\": {},\n \"localized_image_asset_id\": {},\n \"offer_prices\": [\n {\n \"id\": \"<string>\",\n \"msrp_price\": {\n \"currency_code\": \"<string>\",\n \"units\": \"<string>\",\n \"nanos\": 123\n },\n \"price\": {\n \"currency_code\": \"<string>\",\n \"units\": \"<string>\",\n \"nanos\": 123\n },\n \"geo_restrictions_disallow\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"geo_restrictions_allow\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"priority\": \"<string>\",\n \"stripe_product_id\": \"<string>\",\n \"app_store_product_id\": \"<string>\",\n \"play_store_sku\": \"<string>\"\n }\n ],\n \"priority\": \"<string>\",\n \"concurrency_limit\": \"<string>\",\n \"video_protection_ruleset_id\": \"<string>\"\n },\n \"update_mask\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mottostreaming.com/monetization/offers/v1/{offer_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"offer_id\": \"<string>\",\n \"offer\": {\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"localized_title\": {},\n \"localized_description\": {},\n \"cleeng_offer_id\": \"<string>\",\n \"applies_to_all\": true,\n \"target\": {\n \"entity_ids\": [\n \"<string>\"\n ],\n \"event_ids\": [\n \"<string>\"\n ],\n \"creative_work_ids\": [\n \"<string>\"\n ],\n \"video_ids\": [\n \"<string>\"\n ],\n \"content_start_time\": \"2023-11-07T05:31:56Z\",\n \"content_end_time\": \"2023-11-07T05:31:56Z\"\n },\n \"filter\": {\n \"filter_events\": \"<string>\",\n \"filter_creative_works\": \"<string>\"\n },\n \"localized_logo_asset_id\": {},\n \"localized_image_asset_id\": {},\n \"offer_prices\": [\n {\n \"id\": \"<string>\",\n \"msrp_price\": {\n \"currency_code\": \"<string>\",\n \"units\": \"<string>\",\n \"nanos\": 123\n },\n \"price\": {\n \"currency_code\": \"<string>\",\n \"units\": \"<string>\",\n \"nanos\": 123\n },\n \"geo_restrictions_disallow\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"geo_restrictions_allow\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"priority\": \"<string>\",\n \"stripe_product_id\": \"<string>\",\n \"app_store_product_id\": \"<string>\",\n \"play_store_sku\": \"<string>\"\n }\n ],\n \"priority\": \"<string>\",\n \"concurrency_limit\": \"<string>\",\n \"video_protection_ruleset_id\": \"<string>\"\n },\n \"update_mask\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"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>"
],
"video_ids": [
"<string>"
],
"content_start_time": "2023-11-07T05:31:56Z",
"content_end_time": "2023-11-07T05:31:56Z"
},
"filter": {
"filter_events": "<string>",
"filter_creative_works": "<string>"
},
"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
},
"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>",
"video_protection_ruleset_id": "<string>"
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Offers
Update offer
UpdateOffer
Updates existing offer.
PATCH
/
monetization
/
offers
/
v1
/
{offer_id}
cURL
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>"
],
"video_ids": [
"<string>"
],
"content_start_time": "2023-11-07T05:31:56Z",
"content_end_time": "2023-11-07T05:31:56Z"
},
"filter": {
"filter_events": "<string>",
"filter_creative_works": "<string>"
},
"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
},
"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>",
"video_protection_ruleset_id": "<string>"
},
"update_mask": "<string>"
}
'import requests
url = "https://api.mottostreaming.com/monetization/offers/v1/{offer_id}"
payload = {
"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>"],
"video_ids": ["<string>"],
"content_start_time": "2023-11-07T05:31:56Z",
"content_end_time": "2023-11-07T05:31:56Z"
},
"filter": {
"filter_events": "<string>",
"filter_creative_works": "<string>"
},
"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
},
"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>",
"video_protection_ruleset_id": "<string>"
},
"update_mask": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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>'],
video_ids: ['<string>'],
content_start_time: '2023-11-07T05:31:56Z',
content_end_time: '2023-11-07T05:31:56Z'
},
filter: {filter_events: '<string>', filter_creative_works: '<string>'},
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},
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>',
video_protection_ruleset_id: '<string>'
},
update_mask: '<string>'
})
};
fetch('https://api.mottostreaming.com/monetization/offers/v1/{offer_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mottostreaming.com/monetization/offers/v1/{offer_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'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>'
],
'video_ids' => [
'<string>'
],
'content_start_time' => '2023-11-07T05:31:56Z',
'content_end_time' => '2023-11-07T05:31:56Z'
],
'filter' => [
'filter_events' => '<string>',
'filter_creative_works' => '<string>'
],
'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
],
'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>',
'video_protection_ruleset_id' => '<string>'
],
'update_mask' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mottostreaming.com/monetization/offers/v1/{offer_id}"
payload := strings.NewReader("{\n \"offer_id\": \"<string>\",\n \"offer\": {\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"localized_title\": {},\n \"localized_description\": {},\n \"cleeng_offer_id\": \"<string>\",\n \"applies_to_all\": true,\n \"target\": {\n \"entity_ids\": [\n \"<string>\"\n ],\n \"event_ids\": [\n \"<string>\"\n ],\n \"creative_work_ids\": [\n \"<string>\"\n ],\n \"video_ids\": [\n \"<string>\"\n ],\n \"content_start_time\": \"2023-11-07T05:31:56Z\",\n \"content_end_time\": \"2023-11-07T05:31:56Z\"\n },\n \"filter\": {\n \"filter_events\": \"<string>\",\n \"filter_creative_works\": \"<string>\"\n },\n \"localized_logo_asset_id\": {},\n \"localized_image_asset_id\": {},\n \"offer_prices\": [\n {\n \"id\": \"<string>\",\n \"msrp_price\": {\n \"currency_code\": \"<string>\",\n \"units\": \"<string>\",\n \"nanos\": 123\n },\n \"price\": {\n \"currency_code\": \"<string>\",\n \"units\": \"<string>\",\n \"nanos\": 123\n },\n \"geo_restrictions_disallow\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"geo_restrictions_allow\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"priority\": \"<string>\",\n \"stripe_product_id\": \"<string>\",\n \"app_store_product_id\": \"<string>\",\n \"play_store_sku\": \"<string>\"\n }\n ],\n \"priority\": \"<string>\",\n \"concurrency_limit\": \"<string>\",\n \"video_protection_ruleset_id\": \"<string>\"\n },\n \"update_mask\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.mottostreaming.com/monetization/offers/v1/{offer_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"offer_id\": \"<string>\",\n \"offer\": {\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"localized_title\": {},\n \"localized_description\": {},\n \"cleeng_offer_id\": \"<string>\",\n \"applies_to_all\": true,\n \"target\": {\n \"entity_ids\": [\n \"<string>\"\n ],\n \"event_ids\": [\n \"<string>\"\n ],\n \"creative_work_ids\": [\n \"<string>\"\n ],\n \"video_ids\": [\n \"<string>\"\n ],\n \"content_start_time\": \"2023-11-07T05:31:56Z\",\n \"content_end_time\": \"2023-11-07T05:31:56Z\"\n },\n \"filter\": {\n \"filter_events\": \"<string>\",\n \"filter_creative_works\": \"<string>\"\n },\n \"localized_logo_asset_id\": {},\n \"localized_image_asset_id\": {},\n \"offer_prices\": [\n {\n \"id\": \"<string>\",\n \"msrp_price\": {\n \"currency_code\": \"<string>\",\n \"units\": \"<string>\",\n \"nanos\": 123\n },\n \"price\": {\n \"currency_code\": \"<string>\",\n \"units\": \"<string>\",\n \"nanos\": 123\n },\n \"geo_restrictions_disallow\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"geo_restrictions_allow\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"priority\": \"<string>\",\n \"stripe_product_id\": \"<string>\",\n \"app_store_product_id\": \"<string>\",\n \"play_store_sku\": \"<string>\"\n }\n ],\n \"priority\": \"<string>\",\n \"concurrency_limit\": \"<string>\",\n \"video_protection_ruleset_id\": \"<string>\"\n },\n \"update_mask\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mottostreaming.com/monetization/offers/v1/{offer_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"offer_id\": \"<string>\",\n \"offer\": {\n \"project_id\": \"<string>\",\n \"name\": \"<string>\",\n \"localized_title\": {},\n \"localized_description\": {},\n \"cleeng_offer_id\": \"<string>\",\n \"applies_to_all\": true,\n \"target\": {\n \"entity_ids\": [\n \"<string>\"\n ],\n \"event_ids\": [\n \"<string>\"\n ],\n \"creative_work_ids\": [\n \"<string>\"\n ],\n \"video_ids\": [\n \"<string>\"\n ],\n \"content_start_time\": \"2023-11-07T05:31:56Z\",\n \"content_end_time\": \"2023-11-07T05:31:56Z\"\n },\n \"filter\": {\n \"filter_events\": \"<string>\",\n \"filter_creative_works\": \"<string>\"\n },\n \"localized_logo_asset_id\": {},\n \"localized_image_asset_id\": {},\n \"offer_prices\": [\n {\n \"id\": \"<string>\",\n \"msrp_price\": {\n \"currency_code\": \"<string>\",\n \"units\": \"<string>\",\n \"nanos\": 123\n },\n \"price\": {\n \"currency_code\": \"<string>\",\n \"units\": \"<string>\",\n \"nanos\": 123\n },\n \"geo_restrictions_disallow\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"geo_restrictions_allow\": {\n \"country_codes\": [\n \"<string>\"\n ]\n },\n \"priority\": \"<string>\",\n \"stripe_product_id\": \"<string>\",\n \"app_store_product_id\": \"<string>\",\n \"play_store_sku\": \"<string>\"\n }\n ],\n \"priority\": \"<string>\",\n \"concurrency_limit\": \"<string>\",\n \"video_protection_ruleset_id\": \"<string>\"\n },\n \"update_mask\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"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>"
],
"video_ids": [
"<string>"
],
"content_start_time": "2023-11-07T05:31:56Z",
"content_end_time": "2023-11-07T05:31:56Z"
},
"filter": {
"filter_events": "<string>",
"filter_creative_works": "<string>"
},
"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
},
"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>",
"video_protection_ruleset_id": "<string>"
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Response
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
Show child attributes
⌘I

