Get Pricing Modules
curl --request POST \
--url https://{workspace}.spreesuite.com/billspree/tariffs/get-tariffs \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"method": "Retrieve",
"action": "Retrieve Plans",
"apiVersion": "v2",
"serviceCode": null,
"tariffID": null,
"exceptSubtree": null
}
'import requests
url = "https://{workspace}.spreesuite.com/billspree/tariffs/get-tariffs"
payload = {
"method": "Retrieve",
"action": "Retrieve Plans",
"apiVersion": "v2",
"serviceCode": None,
"tariffID": None,
"exceptSubtree": None
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
method: 'Retrieve',
action: 'Retrieve Plans',
apiVersion: 'v2',
serviceCode: null,
tariffID: null,
exceptSubtree: null
})
};
fetch('https://{workspace}.spreesuite.com/billspree/tariffs/get-tariffs', 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://{workspace}.spreesuite.com/billspree/tariffs/get-tariffs",
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([
'method' => 'Retrieve',
'action' => 'Retrieve Plans',
'apiVersion' => 'v2',
'serviceCode' => null,
'tariffID' => null,
'exceptSubtree' => null
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://{workspace}.spreesuite.com/billspree/tariffs/get-tariffs"
payload := strings.NewReader("{\n \"method\": \"Retrieve\",\n \"action\": \"Retrieve Plans\",\n \"apiVersion\": \"v2\",\n \"serviceCode\": null,\n \"tariffID\": null,\n \"exceptSubtree\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://{workspace}.spreesuite.com/billspree/tariffs/get-tariffs")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"Retrieve\",\n \"action\": \"Retrieve Plans\",\n \"apiVersion\": \"v2\",\n \"serviceCode\": null,\n \"tariffID\": null,\n \"exceptSubtree\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{workspace}.spreesuite.com/billspree/tariffs/get-tariffs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"method\": \"Retrieve\",\n \"action\": \"Retrieve Plans\",\n \"apiVersion\": \"v2\",\n \"serviceCode\": null,\n \"tariffID\": null,\n \"exceptSubtree\": null\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"statusCode": 200,
"message": "Request Succeeded.",
"error": null,
"data": {
"tariffs": [
{
"tariffID": 1,
"tariffCode": "DemoPlan",
"uniqueLabel": "DemoPlan",
"label": "Demo Plan",
"description": null,
"serviceCode": "DEMO-001",
"parentTariffCode": null,
"securityAttributes": [],
"connCount": 1
}
]
}
}Pricing Modules
Get Pricing Modules
Retrieve all pricing modules, or filter by pricing context code or specific pricing module ID. Use exceptSubtree to exclude a pricing module and its descendants when picking a parent to avoid circular references.
POST
/
billspree
/
tariffs
/
get-tariffs
Get Pricing Modules
curl --request POST \
--url https://{workspace}.spreesuite.com/billspree/tariffs/get-tariffs \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"method": "Retrieve",
"action": "Retrieve Plans",
"apiVersion": "v2",
"serviceCode": null,
"tariffID": null,
"exceptSubtree": null
}
'import requests
url = "https://{workspace}.spreesuite.com/billspree/tariffs/get-tariffs"
payload = {
"method": "Retrieve",
"action": "Retrieve Plans",
"apiVersion": "v2",
"serviceCode": None,
"tariffID": None,
"exceptSubtree": None
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
method: 'Retrieve',
action: 'Retrieve Plans',
apiVersion: 'v2',
serviceCode: null,
tariffID: null,
exceptSubtree: null
})
};
fetch('https://{workspace}.spreesuite.com/billspree/tariffs/get-tariffs', 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://{workspace}.spreesuite.com/billspree/tariffs/get-tariffs",
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([
'method' => 'Retrieve',
'action' => 'Retrieve Plans',
'apiVersion' => 'v2',
'serviceCode' => null,
'tariffID' => null,
'exceptSubtree' => null
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://{workspace}.spreesuite.com/billspree/tariffs/get-tariffs"
payload := strings.NewReader("{\n \"method\": \"Retrieve\",\n \"action\": \"Retrieve Plans\",\n \"apiVersion\": \"v2\",\n \"serviceCode\": null,\n \"tariffID\": null,\n \"exceptSubtree\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://{workspace}.spreesuite.com/billspree/tariffs/get-tariffs")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"Retrieve\",\n \"action\": \"Retrieve Plans\",\n \"apiVersion\": \"v2\",\n \"serviceCode\": null,\n \"tariffID\": null,\n \"exceptSubtree\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{workspace}.spreesuite.com/billspree/tariffs/get-tariffs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"method\": \"Retrieve\",\n \"action\": \"Retrieve Plans\",\n \"apiVersion\": \"v2\",\n \"serviceCode\": null,\n \"tariffID\": null,\n \"exceptSubtree\": null\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"statusCode": 200,
"message": "Request Succeeded.",
"error": null,
"data": {
"tariffs": [
{
"tariffID": 1,
"tariffCode": "DemoPlan",
"uniqueLabel": "DemoPlan",
"label": "Demo Plan",
"description": null,
"serviceCode": "DEMO-001",
"parentTariffCode": null,
"securityAttributes": [],
"connCount": 1
}
]
}
}Authorizations
Auth token returned from the login endpoint. Send as: Authorization: <token> (no Bearer prefix)
Body
application/json
Always "Retrieve"
Example:
"Retrieve"
Always "Retrieve Plans"
Example:
"Retrieve Plans"
Always "v2"
Example:
"v2"
Filter by pricing context code — null returns all plans across all templates
Fetch a specific plan by its ID
Exclude a plan and all its descendants — used when selecting a parent plan to avoid circular references
Was this page helpful?
⌘I
