Preview an item for an autoship profile
Prices a recurring item for an autoship profile and says what joining it
changes, without adding it. The item takes the profile’s plan, address,
card and next bill date. quote.outcome is ok when the item would have
the same facts on its own, and align_required when joining changes at
least one of them; quote.alignments lists those facts. Nothing is
written.
Send quote.confirmation to the add as confirmation. It binds every
term in the quote, so the add refuses with quote_changed when any of
them changed in between.
Requires the subscriptions update permission and an admin, and the
autoship_profiles feature to work for the company. The profile is the
one whose members are exactly subscription_tokens, among the
subscriptions of the customer who owns {token}. An address or card
must be that customer’s. The lifecycle notes credit the admin. Returns
403 naming the failed check in errors.error when the feature is off,
404 when the subscription is not the company’s or a token is not the
customer’s, 409 with meta.code profile_changed when the profile’s
members changed since the client read them, 422 when the change is
refused (the reason is in meta.code), and 401 when unauthenticated.
Responses are not cached.
curl --request POST \
--url https://api.fluid.app/api/subscriptions/{token}/profile/items/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subscription_tokens": [
"sb_7Qm2VxK9pRtL4wNc8HzJdF",
"sb_4Mw9Tc2Kd7Rx5Hb8Lq3Pn"
],
"variant_id": 4821,
"quantity": 2
}
'import requests
url = "https://api.fluid.app/api/subscriptions/{token}/profile/items/preview"
payload = {
"subscription_tokens": ["sb_7Qm2VxK9pRtL4wNc8HzJdF", "sb_4Mw9Tc2Kd7Rx5Hb8Lq3Pn"],
"variant_id": 4821,
"quantity": 2
}
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({
subscription_tokens: ['sb_7Qm2VxK9pRtL4wNc8HzJdF', 'sb_4Mw9Tc2Kd7Rx5Hb8Lq3Pn'],
variant_id: 4821,
quantity: 2
})
};
fetch('https://api.fluid.app/api/subscriptions/{token}/profile/items/preview', 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/subscriptions/{token}/profile/items/preview",
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([
'subscription_tokens' => [
'sb_7Qm2VxK9pRtL4wNc8HzJdF',
'sb_4Mw9Tc2Kd7Rx5Hb8Lq3Pn'
],
'variant_id' => 4821,
'quantity' => 2
]),
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/subscriptions/{token}/profile/items/preview"
payload := strings.NewReader("{\n \"subscription_tokens\": [\n \"sb_7Qm2VxK9pRtL4wNc8HzJdF\",\n \"sb_4Mw9Tc2Kd7Rx5Hb8Lq3Pn\"\n ],\n \"variant_id\": 4821,\n \"quantity\": 2\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/subscriptions/{token}/profile/items/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subscription_tokens\": [\n \"sb_7Qm2VxK9pRtL4wNc8HzJdF\",\n \"sb_4Mw9Tc2Kd7Rx5Hb8Lq3Pn\"\n ],\n \"variant_id\": 4821,\n \"quantity\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/subscriptions/{token}/profile/items/preview")
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 \"subscription_tokens\": [\n \"sb_7Qm2VxK9pRtL4wNc8HzJdF\",\n \"sb_4Mw9Tc2Kd7Rx5Hb8Lq3Pn\"\n ],\n \"variant_id\": 4821,\n \"quantity\": 2\n}"
response = http.request(request)
puts response.read_body{
"quote": {
"outcome": "align_required",
"alignments": [
{
"field": "date",
"alignable": true
}
],
"next_bill_date": "2026-10-14",
"billing_interval": 1,
"billing_interval_unit": "month",
"address": {
"id": 3310,
"name": "Michael Scott",
"address1": "1725 Slough Avenue",
"address2": null,
"address3": null,
"city": "Scranton",
"state": "PA",
"subdivision_code": "US-PA",
"postal_code": "18505",
"country_code": "US",
"phone": null,
"country_num_code": 840,
"default": true
},
"payment_method": {
"id": 7702,
"payment_type": "Credit Card",
"details": {
"card_brand": "Visa",
"last_four": "4242"
}
},
"item": {
"variant_id": 4821,
"label": "Dunder Mifflin Toner Cartridge",
"quantity": 2,
"price": "90.0",
"total": "180.0",
"currency_code": "USD"
},
"confirmation": "eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDVG9KYzNWaWFtVmpkQ0lMY0hKbGRtbGxkdz09In19"
},
"meta": {
"request_id": "0d6c3f92-8b1e-4a75-9d2c-4f7e1a5b8c30",
"timestamp": "2026-09-30T14:05:22Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>"
}
}Authorizations
Bearer token authentication
Path Parameters
A subscription of the customer whose profile changes.
Body
Response
What joining the profile would change, and the confirmation the add takes back.
What joining an autoship profile would change for an item.
curl --request POST \
--url https://api.fluid.app/api/subscriptions/{token}/profile/items/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subscription_tokens": [
"sb_7Qm2VxK9pRtL4wNc8HzJdF",
"sb_4Mw9Tc2Kd7Rx5Hb8Lq3Pn"
],
"variant_id": 4821,
"quantity": 2
}
'import requests
url = "https://api.fluid.app/api/subscriptions/{token}/profile/items/preview"
payload = {
"subscription_tokens": ["sb_7Qm2VxK9pRtL4wNc8HzJdF", "sb_4Mw9Tc2Kd7Rx5Hb8Lq3Pn"],
"variant_id": 4821,
"quantity": 2
}
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({
subscription_tokens: ['sb_7Qm2VxK9pRtL4wNc8HzJdF', 'sb_4Mw9Tc2Kd7Rx5Hb8Lq3Pn'],
variant_id: 4821,
quantity: 2
})
};
fetch('https://api.fluid.app/api/subscriptions/{token}/profile/items/preview', 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/subscriptions/{token}/profile/items/preview",
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([
'subscription_tokens' => [
'sb_7Qm2VxK9pRtL4wNc8HzJdF',
'sb_4Mw9Tc2Kd7Rx5Hb8Lq3Pn'
],
'variant_id' => 4821,
'quantity' => 2
]),
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/subscriptions/{token}/profile/items/preview"
payload := strings.NewReader("{\n \"subscription_tokens\": [\n \"sb_7Qm2VxK9pRtL4wNc8HzJdF\",\n \"sb_4Mw9Tc2Kd7Rx5Hb8Lq3Pn\"\n ],\n \"variant_id\": 4821,\n \"quantity\": 2\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/subscriptions/{token}/profile/items/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subscription_tokens\": [\n \"sb_7Qm2VxK9pRtL4wNc8HzJdF\",\n \"sb_4Mw9Tc2Kd7Rx5Hb8Lq3Pn\"\n ],\n \"variant_id\": 4821,\n \"quantity\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/subscriptions/{token}/profile/items/preview")
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 \"subscription_tokens\": [\n \"sb_7Qm2VxK9pRtL4wNc8HzJdF\",\n \"sb_4Mw9Tc2Kd7Rx5Hb8Lq3Pn\"\n ],\n \"variant_id\": 4821,\n \"quantity\": 2\n}"
response = http.request(request)
puts response.read_body{
"quote": {
"outcome": "align_required",
"alignments": [
{
"field": "date",
"alignable": true
}
],
"next_bill_date": "2026-10-14",
"billing_interval": 1,
"billing_interval_unit": "month",
"address": {
"id": 3310,
"name": "Michael Scott",
"address1": "1725 Slough Avenue",
"address2": null,
"address3": null,
"city": "Scranton",
"state": "PA",
"subdivision_code": "US-PA",
"postal_code": "18505",
"country_code": "US",
"phone": null,
"country_num_code": 840,
"default": true
},
"payment_method": {
"id": 7702,
"payment_type": "Credit Card",
"details": {
"card_brand": "Visa",
"last_four": "4242"
}
},
"item": {
"variant_id": 4821,
"label": "Dunder Mifflin Toner Cartridge",
"quantity": 2,
"price": "90.0",
"total": "180.0",
"currency_code": "USD"
},
"confirmation": "eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDVG9KYzNWaWFtVmpkQ0lMY0hKbGRtbGxkdz09In19"
},
"meta": {
"request_id": "0d6c3f92-8b1e-4a75-9d2c-4f7e1a5b8c30",
"timestamp": "2026-09-30T14:05:22Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>"
}
}