Create Base Price for the Protection Level
curl --request POST \
--url https://public-api.stora.co/2025-09/protection_levels/{protection_level_id}/base_price \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"weekly": {
"amount": 999
},
"monthly": {
"amount": 3999
}
}
'import requests
url = "https://public-api.stora.co/2025-09/protection_levels/{protection_level_id}/base_price"
payload = {
"weekly": { "amount": 999 },
"monthly": { "amount": 3999 }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({weekly: {amount: 999}, monthly: {amount: 3999}})
};
fetch('https://public-api.stora.co/2025-09/protection_levels/{protection_level_id}/base_price', 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://public-api.stora.co/2025-09/protection_levels/{protection_level_id}/base_price",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'weekly' => [
'amount' => 999
],
'monthly' => [
'amount' => 3999
]
]),
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://public-api.stora.co/2025-09/protection_levels/{protection_level_id}/base_price"
payload := strings.NewReader("{\n \"weekly\": {\n \"amount\": 999\n },\n \"monthly\": {\n \"amount\": 3999\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://public-api.stora.co/2025-09/protection_levels/{protection_level_id}/base_price")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"weekly\": {\n \"amount\": 999\n },\n \"monthly\": {\n \"amount\": 3999\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.stora.co/2025-09/protection_levels/{protection_level_id}/base_price")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"weekly\": {\n \"amount\": 999\n },\n \"monthly\": {\n \"amount\": 3999\n }\n}"
response = http.request(request)
puts response.read_body{
"protection_level": {
"id": "plvl_e8f3ad0a07e47566",
"account_code": null,
"cover_level": {
"amount": 2000000,
"currency": "GBP",
"formatted": "£20,000.00"
},
"created_at": "2025-02-22T14:41:00Z",
"prices": [
{
"billing_period": "weekly",
"price": {
"amount": 999,
"currency": "GBP",
"formatted": "£9.99"
},
"stripe_price_id": "price_OUZT099ynVSlgPkNEzRI55sK"
},
{
"billing_period": "monthly",
"price": {
"amount": 3999,
"currency": "GBP",
"formatted": "£39.99"
},
"stripe_price_id": "price_MwJrt3uovKQOBpbjwpGRdTz3"
}
],
"public": true,
"stripe_product_id": "test_Sj6us30iGDiaXO",
"updated_at": "2025-02-22T14:41:00Z"
},
"meta": {
"request_id": "01563646-58c1-4607-8fe0-cae3e92c4477",
"curies": [
{
"name": "bo",
"href": "https://app.stora.test{rel}",
"templated": true,
"title": "Backoffice"
},
{
"name": "sf",
"href": "https://acme.stora.test{rel}",
"templated": true,
"title": "Storefront"
}
]
}
}Protection Levels
Create Base Price for the Protection Level
Set base prices for the selected protection level.
Required authorization scope: public.protection_level:write
POST
/
2025-09
/
protection_levels
/
{protection_level_id}
/
base_price
Create Base Price for the Protection Level
curl --request POST \
--url https://public-api.stora.co/2025-09/protection_levels/{protection_level_id}/base_price \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"weekly": {
"amount": 999
},
"monthly": {
"amount": 3999
}
}
'import requests
url = "https://public-api.stora.co/2025-09/protection_levels/{protection_level_id}/base_price"
payload = {
"weekly": { "amount": 999 },
"monthly": { "amount": 3999 }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({weekly: {amount: 999}, monthly: {amount: 3999}})
};
fetch('https://public-api.stora.co/2025-09/protection_levels/{protection_level_id}/base_price', 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://public-api.stora.co/2025-09/protection_levels/{protection_level_id}/base_price",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'weekly' => [
'amount' => 999
],
'monthly' => [
'amount' => 3999
]
]),
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://public-api.stora.co/2025-09/protection_levels/{protection_level_id}/base_price"
payload := strings.NewReader("{\n \"weekly\": {\n \"amount\": 999\n },\n \"monthly\": {\n \"amount\": 3999\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://public-api.stora.co/2025-09/protection_levels/{protection_level_id}/base_price")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"weekly\": {\n \"amount\": 999\n },\n \"monthly\": {\n \"amount\": 3999\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.stora.co/2025-09/protection_levels/{protection_level_id}/base_price")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"weekly\": {\n \"amount\": 999\n },\n \"monthly\": {\n \"amount\": 3999\n }\n}"
response = http.request(request)
puts response.read_body{
"protection_level": {
"id": "plvl_e8f3ad0a07e47566",
"account_code": null,
"cover_level": {
"amount": 2000000,
"currency": "GBP",
"formatted": "£20,000.00"
},
"created_at": "2025-02-22T14:41:00Z",
"prices": [
{
"billing_period": "weekly",
"price": {
"amount": 999,
"currency": "GBP",
"formatted": "£9.99"
},
"stripe_price_id": "price_OUZT099ynVSlgPkNEzRI55sK"
},
{
"billing_period": "monthly",
"price": {
"amount": 3999,
"currency": "GBP",
"formatted": "£39.99"
},
"stripe_price_id": "price_MwJrt3uovKQOBpbjwpGRdTz3"
}
],
"public": true,
"stripe_product_id": "test_Sj6us30iGDiaXO",
"updated_at": "2025-02-22T14:41:00Z"
},
"meta": {
"request_id": "01563646-58c1-4607-8fe0-cae3e92c4477",
"curies": [
{
"name": "bo",
"href": "https://app.stora.test{rel}",
"templated": true,
"title": "Backoffice"
},
{
"name": "sf",
"href": "https://acme.stora.test{rel}",
"templated": true,
"title": "Storefront"
}
]
}
}Authorizations
BearerOAuth2
Bearer Token necessary to use API
Path Parameters
The ID of the protection level to set the base prices
Query Parameters
This endpoint supports expandable responses. For more, see the documentation page.
Body
application/json
Base prices available for recurring billing periods (Protection Levels, Unit Types, and Products).
Was this page helpful?
⌘I