Archive a tenure program
Ends the program. Subscriptions are no longer moved onto its tiers. Needs only Subscription Pro to be active, so a merchant whose gate closed since can still archive (422 subscription_pro_inactive otherwise). With discounts keep, the default, subscriptions keep the tier discount they hold. With remove_at_next_renewal each subscription keeps its tier discount until its next renewal, which still prices it, and then loses it (removed_reason tenure_program_archived). An archived program is 409 archived.
curl --request POST \
--url https://api.fluid.app/api/subscription_pro/tenure_programs/{id}/archive \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"discounts": "remove_at_next_renewal"
}
'import requests
url = "https://api.fluid.app/api/subscription_pro/tenure_programs/{id}/archive"
payload = { "discounts": "remove_at_next_renewal" }
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({discounts: 'remove_at_next_renewal'})
};
fetch('https://api.fluid.app/api/subscription_pro/tenure_programs/{id}/archive', 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}/archive",
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([
'discounts' => 'remove_at_next_renewal'
]),
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}/archive"
payload := strings.NewReader("{\n \"discounts\": \"remove_at_next_renewal\"\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}/archive")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"discounts\": \"remove_at_next_renewal\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/subscription_pro/tenure_programs/{id}/archive")
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 \"discounts\": \"remove_at_next_renewal\"\n}"
response = http.request(request)
puts response.read_body{
"tenure_program": {
"id": 41,
"name": "Loyalty",
"status": "archived",
"axis": "paid_orders",
"scope": "all",
"scope_ids": [],
"apply_to_volume": true,
"archived_at": "2026-10-10T15:00:00Z",
"archive_discounts": "remove_at_next_renewal",
"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": 200,
"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
keep leaves the tier discounts subscriptions hold, so each keeps its tier while the tier's range fits. remove_at_next_renewal keeps each until the subscription's next renewal, which still prices it, and then removes it (removed_reason tenure_program_archived).
keep, remove_at_next_renewal curl --request POST \
--url https://api.fluid.app/api/subscription_pro/tenure_programs/{id}/archive \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"discounts": "remove_at_next_renewal"
}
'import requests
url = "https://api.fluid.app/api/subscription_pro/tenure_programs/{id}/archive"
payload = { "discounts": "remove_at_next_renewal" }
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({discounts: 'remove_at_next_renewal'})
};
fetch('https://api.fluid.app/api/subscription_pro/tenure_programs/{id}/archive', 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}/archive",
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([
'discounts' => 'remove_at_next_renewal'
]),
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}/archive"
payload := strings.NewReader("{\n \"discounts\": \"remove_at_next_renewal\"\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}/archive")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"discounts\": \"remove_at_next_renewal\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/subscription_pro/tenure_programs/{id}/archive")
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 \"discounts\": \"remove_at_next_renewal\"\n}"
response = http.request(request)
puts response.read_body{
"tenure_program": {
"id": 41,
"name": "Loyalty",
"status": "archived",
"axis": "paid_orders",
"scope": "all",
"scope_ids": [],
"apply_to_volume": true,
"archived_at": "2026-10-10T15:00:00Z",
"archive_discounts": "remove_at_next_renewal",
"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": 200,
"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"
}
}