Publish a tenure program version
Publishes the proposed tiers and scope as the program’s next version and puts it in force. The request carries the counts the preview returned. The server counts again under the program lock and refuses with 409 preview_stale when anything differs, with the current current_version_id, moves_up, moves_down and stays in error.details. Nothing is written then. An archived program is 409 archived. Every 422 the preview gives applies here too, and a request without previewed is 422. After the publish commits, subscriptions move onto the new tiers in the background.
curl --request POST \
--url https://api.fluid.app/api/subscription_pro/tenure_programs/{id}/versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tiers": [
{
"from": 3,
"label": "Silver",
"percentage_value": "10"
},
{
"from": 6,
"label": "Gold",
"flat_value": "5.50"
}
],
"scope": "all",
"scope_ids": [],
"apply_to_volume": true,
"previewed": {
"current_version_id": null,
"moves_up": 12,
"moves_down": 0,
"stays": 40
}
}
'import requests
url = "https://api.fluid.app/api/subscription_pro/tenure_programs/{id}/versions"
payload = {
"tiers": [
{
"from": 3,
"label": "Silver",
"percentage_value": "10"
},
{
"from": 6,
"label": "Gold",
"flat_value": "5.50"
}
],
"scope": "all",
"scope_ids": [],
"apply_to_volume": True,
"previewed": {
"current_version_id": None,
"moves_up": 12,
"moves_down": 0,
"stays": 40
}
}
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({
tiers: [
{from: 3, label: 'Silver', percentage_value: '10'},
{from: 6, label: 'Gold', flat_value: '5.50'}
],
scope: 'all',
scope_ids: [],
apply_to_volume: true,
previewed: {current_version_id: null, moves_up: 12, moves_down: 0, stays: 40}
})
};
fetch('https://api.fluid.app/api/subscription_pro/tenure_programs/{id}/versions', 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://api.fluid.app/api/subscription_pro/tenure_programs/{id}/versions",
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([
'tiers' => [
[
'from' => 3,
'label' => 'Silver',
'percentage_value' => '10'
],
[
'from' => 6,
'label' => 'Gold',
'flat_value' => '5.50'
]
],
'scope' => 'all',
'scope_ids' => [
],
'apply_to_volume' => true,
'previewed' => [
'current_version_id' => null,
'moves_up' => 12,
'moves_down' => 0,
'stays' => 40
]
]),
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://api.fluid.app/api/subscription_pro/tenure_programs/{id}/versions"
payload := strings.NewReader("{\n \"tiers\": [\n {\n \"from\": 3,\n \"label\": \"Silver\",\n \"percentage_value\": \"10\"\n },\n {\n \"from\": 6,\n \"label\": \"Gold\",\n \"flat_value\": \"5.50\"\n }\n ],\n \"scope\": \"all\",\n \"scope_ids\": [],\n \"apply_to_volume\": true,\n \"previewed\": {\n \"current_version_id\": null,\n \"moves_up\": 12,\n \"moves_down\": 0,\n \"stays\": 40\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://api.fluid.app/api/subscription_pro/tenure_programs/{id}/versions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tiers\": [\n {\n \"from\": 3,\n \"label\": \"Silver\",\n \"percentage_value\": \"10\"\n },\n {\n \"from\": 6,\n \"label\": \"Gold\",\n \"flat_value\": \"5.50\"\n }\n ],\n \"scope\": \"all\",\n \"scope_ids\": [],\n \"apply_to_volume\": true,\n \"previewed\": {\n \"current_version_id\": null,\n \"moves_up\": 12,\n \"moves_down\": 0,\n \"stays\": 40\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/subscription_pro/tenure_programs/{id}/versions")
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 \"tiers\": [\n {\n \"from\": 3,\n \"label\": \"Silver\",\n \"percentage_value\": \"10\"\n },\n {\n \"from\": 6,\n \"label\": \"Gold\",\n \"flat_value\": \"5.50\"\n }\n ],\n \"scope\": \"all\",\n \"scope_ids\": [],\n \"apply_to_volume\": true,\n \"previewed\": {\n \"current_version_id\": null,\n \"moves_up\": 12,\n \"moves_down\": 0,\n \"stays\": 40\n }\n}"
response = http.request(request)
puts response.read_body{
"tenure_program": {
"id": 41,
"name": "Loyalty",
"status": "active",
"axis": "paid_orders",
"scope": "all",
"scope_ids": [],
"apply_to_volume": true,
"archived_at": null,
"archive_discounts": null,
"current_version": {
"id": 77,
"version": 1,
"created_at": "2026-10-10T14:05:31Z",
"tiers": [
{
"from": 3,
"to": 6,
"label": "Silver",
"discount_type": "percentage",
"percentage_value": "10.0",
"flat_value": null
},
{
"from": 6,
"to": null,
"label": "Gold",
"discount_type": "flat",
"percentage_value": null,
"flat_value": "5.5"
}
]
},
"created_at": "2026-10-10T14:00:00Z",
"updated_at": "2026-10-10T14:05:31Z"
},
"status": 201,
"meta": {
"request_id": "7d2f4c1a-9b3e-4f6d-8a21-3c5e0b9f1d42",
"timestamp": "2026-10-10T14:05:31Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}Authorizations
Bearer token authentication
Path Parameters
The tenure program's id.
Body
The ladder, ascending by from.
1 - 10 elementsShow child attributes
Show child attributes
Which subscriptions the program covers once published.
all, plans, products Empty for all, otherwise the company's plan or product ids.
500Whether the tier discounts reduce volume as well as price.
The counts the preview returned for this same ladder and scope. The publish counts again and is refused with 409 (preview_stale) when they differ.
Show child attributes
Show child attributes
curl --request POST \
--url https://api.fluid.app/api/subscription_pro/tenure_programs/{id}/versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tiers": [
{
"from": 3,
"label": "Silver",
"percentage_value": "10"
},
{
"from": 6,
"label": "Gold",
"flat_value": "5.50"
}
],
"scope": "all",
"scope_ids": [],
"apply_to_volume": true,
"previewed": {
"current_version_id": null,
"moves_up": 12,
"moves_down": 0,
"stays": 40
}
}
'import requests
url = "https://api.fluid.app/api/subscription_pro/tenure_programs/{id}/versions"
payload = {
"tiers": [
{
"from": 3,
"label": "Silver",
"percentage_value": "10"
},
{
"from": 6,
"label": "Gold",
"flat_value": "5.50"
}
],
"scope": "all",
"scope_ids": [],
"apply_to_volume": True,
"previewed": {
"current_version_id": None,
"moves_up": 12,
"moves_down": 0,
"stays": 40
}
}
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({
tiers: [
{from: 3, label: 'Silver', percentage_value: '10'},
{from: 6, label: 'Gold', flat_value: '5.50'}
],
scope: 'all',
scope_ids: [],
apply_to_volume: true,
previewed: {current_version_id: null, moves_up: 12, moves_down: 0, stays: 40}
})
};
fetch('https://api.fluid.app/api/subscription_pro/tenure_programs/{id}/versions', 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://api.fluid.app/api/subscription_pro/tenure_programs/{id}/versions",
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([
'tiers' => [
[
'from' => 3,
'label' => 'Silver',
'percentage_value' => '10'
],
[
'from' => 6,
'label' => 'Gold',
'flat_value' => '5.50'
]
],
'scope' => 'all',
'scope_ids' => [
],
'apply_to_volume' => true,
'previewed' => [
'current_version_id' => null,
'moves_up' => 12,
'moves_down' => 0,
'stays' => 40
]
]),
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://api.fluid.app/api/subscription_pro/tenure_programs/{id}/versions"
payload := strings.NewReader("{\n \"tiers\": [\n {\n \"from\": 3,\n \"label\": \"Silver\",\n \"percentage_value\": \"10\"\n },\n {\n \"from\": 6,\n \"label\": \"Gold\",\n \"flat_value\": \"5.50\"\n }\n ],\n \"scope\": \"all\",\n \"scope_ids\": [],\n \"apply_to_volume\": true,\n \"previewed\": {\n \"current_version_id\": null,\n \"moves_up\": 12,\n \"moves_down\": 0,\n \"stays\": 40\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://api.fluid.app/api/subscription_pro/tenure_programs/{id}/versions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tiers\": [\n {\n \"from\": 3,\n \"label\": \"Silver\",\n \"percentage_value\": \"10\"\n },\n {\n \"from\": 6,\n \"label\": \"Gold\",\n \"flat_value\": \"5.50\"\n }\n ],\n \"scope\": \"all\",\n \"scope_ids\": [],\n \"apply_to_volume\": true,\n \"previewed\": {\n \"current_version_id\": null,\n \"moves_up\": 12,\n \"moves_down\": 0,\n \"stays\": 40\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/subscription_pro/tenure_programs/{id}/versions")
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 \"tiers\": [\n {\n \"from\": 3,\n \"label\": \"Silver\",\n \"percentage_value\": \"10\"\n },\n {\n \"from\": 6,\n \"label\": \"Gold\",\n \"flat_value\": \"5.50\"\n }\n ],\n \"scope\": \"all\",\n \"scope_ids\": [],\n \"apply_to_volume\": true,\n \"previewed\": {\n \"current_version_id\": null,\n \"moves_up\": 12,\n \"moves_down\": 0,\n \"stays\": 40\n }\n}"
response = http.request(request)
puts response.read_body{
"tenure_program": {
"id": 41,
"name": "Loyalty",
"status": "active",
"axis": "paid_orders",
"scope": "all",
"scope_ids": [],
"apply_to_volume": true,
"archived_at": null,
"archive_discounts": null,
"current_version": {
"id": 77,
"version": 1,
"created_at": "2026-10-10T14:05:31Z",
"tiers": [
{
"from": 3,
"to": 6,
"label": "Silver",
"discount_type": "percentage",
"percentage_value": "10.0",
"flat_value": null
},
{
"from": 6,
"to": null,
"label": "Gold",
"discount_type": "flat",
"percentage_value": null,
"flat_value": "5.5"
}
]
},
"created_at": "2026-10-10T14:00:00Z",
"updated_at": "2026-10-10T14:05:31Z"
},
"status": 201,
"meta": {
"request_id": "7d2f4c1a-9b3e-4f6d-8a21-3c5e0b9f1d42",
"timestamp": "2026-10-10T14:05:31Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}