Contents
On this page
Update Series Prices - Plugixa Stream
PUT /plugixa-stream/v1/admin/monetization/series/{id}
Set a title’s own episode price and bundle price, or clear them to follow the site’s prices.
Needs a user with the plugixa_stream_edit capability (signed in with an Application Password or the login cookie). Administrators hold it; other roles only when you grant it.
Request
PUT https://your-site.example/wp-json/plugixa-stream/v1/admin/monetization/series/2814
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The title’s id |
Request body
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
episode_price |
integer|null |
No | Coins, 0 or more. null or empty clears it. Left out: unchanged. |
bundle_price |
integer|null |
No | Coins, 0 or more. null or empty clears it. Left out: unchanged. |
{
"episode_price": 40,
"bundle_price": 300
}
Responses
200 OK. The prices as stored.
{
"success": true,
"data": {
"episode_price": 40,
"bundle_price": 300
}
}
Errors
| Status | Code | When |
|---|---|---|
401 / 403 |
plugixa_stream_forbidden |
The caller lacks the capability. |
Plus the errors every endpoint can return.
Examples
curl -s -X PUT "https://your-site.example/wp-json/plugixa-stream/v1/admin/monetization/series/2814" \
-u "$WP_USER:$WP_APP_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"episode_price":40,"bundle_price":300}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-stream/v1/admin/monetization/series/2814');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => getenv('WP_USER') . ':' . getenv('WP_APP_PASSWORD'),
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'episode_price' => 40,
'bundle_price' => 300,
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-stream/v1/admin/monetization/series/2814', {
method: 'PUT',
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ episode_price: 40, bundle_price: 300 }),
});
const { data } = await response.json();
Quick Links
Share