Download OpenAPI specification:Download
Returns the available purchase options for an item. For example, an item could be rented directly, or accessed via a pass, subscription, or bundle.
This API is specific to the user making the request.
If no auth token is provided, only public purchase options will be returned.
With an auth token it will take into account a user's plans for Plan Based Pricing, whether they already own the item, etc.
The purchase options returned are payment-provider specific too. By default
the API will use the default payment provider, but an API consumer can list
the payment methods it specifically supports or is interested in (e.g.
?providers=vista_loyalty,apple).
This filters out incompatible options (e.g. subscriptions are not supported with loyalty points or IAPs)
This API can also provide a pricing preview when a promo code is being used (e.g. ?promo=RENT25).
Prices will reflect any applicable discounts and will include the original price, amount off, and metadata describing whether the promo code applies to each option.
A UI may want to disable or hide those options once the user enters the promo code, or show an error if the promocode doesn't apply to any options.
options array will only include purchasable options. If an
offering is unavailable it will not be returned. In future, the API might
return an unavailable_options array as well, if this information is
useful.slug on each purchase option to determine the item being purchased.| slug required | string Example: /film/123 The slug to get the purchase options for. |
| providers | string Example: providers=stripe_elements,vista_loyalty a comma-separated list of payment providers to find purchase options for. If not provided, the default provider for the site will be used. Payment providers that the backend doesn't support or are not configured will be ignored. |
Array of objects (PurchaseOption) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{- "options": [
- {
- "type": "purchase",
- "slug": "/film/2858",
- "provider": "stripe_elements",
- "price": {
- "value": "9.99",
- "currency": "NZD",
- "tax_inclusive": true,
- "formatted": "$9.99"
}, - "quality": "hd",
- "ownership": "rent",
- "id": "/film/2858|hd-rent-stripe-elements-purchase"
}
]
}