Skip to main content
POST
/
monetization
/
offers
/
v1
cURL
curl --request POST \
  --url https://api.mottostreaming.com/monetization/offers/v1 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "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",
  "video_protection_ruleset_id": "<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",
    "video_protection_ruleset_id": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.mottostreaming.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Offer represents a collection of video content that end users can purchase. This can be used e.g. to define Entitlements against.

project_id
string
required
name
string
required

Name of the offer. This is an internal identifier and is not exposed to end users.

localized_title
object
required

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.

localized_description
object
required

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.

cleeng_offer_id
string
applies_to_all
boolean

This offer applies to all videos in the project.

target
object

This offer applies to a specific set of videos, as defined by the target.

localized_logo_asset_id
object

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.

localized_image_asset_id
object

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.

offer_prices
object[]

An array of PriceOffers. When external_id is provided, pricing details are managed through a third-party system and this field should be empty.

priority
string

The priority of the offer. Offers with higher priority will be shown first to the end user.

concurrency_limit
string

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.

visibility
enum<string>

The visibility of the offer to end-users.

Available options:
VISIBILITY_UNSPECIFIED,
VISIBILITY_PUBLISHED,
VISIBILITY_UNLISTED,
VISIBILITY_HIDDEN
video_protection_ruleset_id
string

Optional. If there is a video protection ruleset that should be kept in sync with this offer, the ID of that ruleset can be provided here. This can be used to update the applicability of the ruleset when the applies_to field of the offer is updated. This is primarily useful to ensure that authentication and entitlement rules are enforced for content that sits in this offer.

Note: the backend will NOT automatically apply these changes to the video protection ruleset. It is up to the client to apply the appropriate changes, using this field as a reference.

Response

OK

offer
object

Offer represents a collection of video content that end users can purchase. This can be used e.g. to define Entitlements against.