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": "monthly",
"price": {
"amount": 3999,
"currency": "GBP",
"formatted": "£39.99"
},
"stripe_price_id": "price_MwJrt3uovKQOBpbjwpGRdTz3"
},
{
"billing_period": "weekly",
"price": {
"amount": 999,
"currency": "GBP",
"formatted": "£9.99"
},
"stripe_price_id": "price_OUZT099ynVSlgPkNEzRI55sK"
}
],
"public": true,
"site": {
"id": "site_14b419f1096013f1"
},
"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"
}
]
}
}{
"error": {
"code": "conflict",
"details": [],
"links": [
{
"kind": "api_reference",
"name": "Create Base Price for the Protection Level",
"url": "https://docs.stora.test/2025-09/api-reference/protection-levels/create-base-price-for-the-protection-level"
},
{
"kind": "documentation",
"name": "Site-scoped protection levels",
"url": "https://docs.stora.test/2025-09/guides/site-scoped-protection-levels"
},
{
"kind": "open_api",
"name": "OpenAPI specification",
"url": "https://docs.stora.test/2025-09/openapi.json"
},
{
"kind": "documentation",
"name": "Errors",
"url": "https://docs.stora.test/2025-09/guides/errors#conflict"
}
],
"message": "Global protection-level base prices cannot be updated. Use a site-scoped protection-level ID.",
"request_id": "01563646-58c1-4607-8fe0-cae3e92c4477",
"type": "invalid_request_error"
}
}{
"error": {
"code": "invalid_url_param",
"details": [
{
"message": "value `invalid` at `/protection_level_id` does not match pattern: ^plvl_",
"pointer": "/protection_level_id"
}
],
"links": [
{
"kind": "api_reference",
"name": "Create Base Price for the Protection Level",
"url": "https://docs.stora.test/2025-09/api-reference/protection-levels/create-base-price-for-the-protection-level"
},
{
"kind": "documentation",
"name": "Site-scoped protection levels",
"url": "https://docs.stora.test/2025-09/guides/site-scoped-protection-levels"
},
{
"kind": "open_api",
"name": "OpenAPI specification",
"url": "https://docs.stora.test/2025-09/openapi.json"
},
{
"kind": "documentation",
"name": "Errors",
"url": "https://docs.stora.test/2025-09/guides/errors#invalid_url_param"
}
],
"message": "The request URL param is invalid.",
"request_id": "01563646-58c1-4607-8fe0-cae3e92c4477",
"type": "invalid_request_error"
}
}Create Base Price for the Protection Level
Set a site-scoped protection level’s base price for one or more billing periods, such as monthly or weekly. Only that site’s level changes, so update each site’s level separately. A global level returns 409. The new prices apply right away to new orders. Billing periods you leave out keep their prices, and existing subscriptions don’t change. A protection_level.updated webhook fires.
See Migrating to site-scoped protection levels.
Required authorization scope: public.protection_level:write
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": "monthly",
"price": {
"amount": 3999,
"currency": "GBP",
"formatted": "£39.99"
},
"stripe_price_id": "price_MwJrt3uovKQOBpbjwpGRdTz3"
},
{
"billing_period": "weekly",
"price": {
"amount": 999,
"currency": "GBP",
"formatted": "£9.99"
},
"stripe_price_id": "price_OUZT099ynVSlgPkNEzRI55sK"
}
],
"public": true,
"site": {
"id": "site_14b419f1096013f1"
},
"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"
}
]
}
}{
"error": {
"code": "conflict",
"details": [],
"links": [
{
"kind": "api_reference",
"name": "Create Base Price for the Protection Level",
"url": "https://docs.stora.test/2025-09/api-reference/protection-levels/create-base-price-for-the-protection-level"
},
{
"kind": "documentation",
"name": "Site-scoped protection levels",
"url": "https://docs.stora.test/2025-09/guides/site-scoped-protection-levels"
},
{
"kind": "open_api",
"name": "OpenAPI specification",
"url": "https://docs.stora.test/2025-09/openapi.json"
},
{
"kind": "documentation",
"name": "Errors",
"url": "https://docs.stora.test/2025-09/guides/errors#conflict"
}
],
"message": "Global protection-level base prices cannot be updated. Use a site-scoped protection-level ID.",
"request_id": "01563646-58c1-4607-8fe0-cae3e92c4477",
"type": "invalid_request_error"
}
}{
"error": {
"code": "invalid_url_param",
"details": [
{
"message": "value `invalid` at `/protection_level_id` does not match pattern: ^plvl_",
"pointer": "/protection_level_id"
}
],
"links": [
{
"kind": "api_reference",
"name": "Create Base Price for the Protection Level",
"url": "https://docs.stora.test/2025-09/api-reference/protection-levels/create-base-price-for-the-protection-level"
},
{
"kind": "documentation",
"name": "Site-scoped protection levels",
"url": "https://docs.stora.test/2025-09/guides/site-scoped-protection-levels"
},
{
"kind": "open_api",
"name": "OpenAPI specification",
"url": "https://docs.stora.test/2025-09/openapi.json"
},
{
"kind": "documentation",
"name": "Errors",
"url": "https://docs.stora.test/2025-09/guides/errors#invalid_url_param"
}
],
"message": "The request URL param is invalid.",
"request_id": "01563646-58c1-4607-8fe0-cae3e92c4477",
"type": "invalid_request_error"
}
}Scopes
Headers
A unique key, such as a UUID, that makes it safe to retry this request. The first successful (2xx) response for a key is stored for 24 hours and returned unchanged, including its request_id, for later requests with the same key, without running the request again. Keys are unique per operator, case-insensitive and trimmed of surrounding whitespace. Failed requests are not stored, so they can be retried with the same key. While a request with the same key is still in progress, another one returns 409 Conflict with code idempotency_conflict. The request body and path are not compared, so use a new key for each request. For more, see the documentation page.
Query Parameters
This endpoint supports expandable responses. For more, see the documentation page.
Returns only the listed fields, such as id,status,site.name. Identifiers and constant fields such as object are always returned. A field inside an expandable association also needs it in expand, unless the collapsed association returns it, such as site.id. For more, see the documentation page.
Body
Base prices available for recurring billing periods (Protection Levels, Unit Types, and Products).
Was this page helpful?