Set the quantity of a one-time item on the next renewal of a subscription (0 takes it off)
curl --request POST \
--url https://api.tagada.io/api/v1/portal/next-order \
--header 'Content-Type: application/json' \
--header 'x-cms-token: <api-key>' \
--data '
{
"subscriptionId": "<string>",
"productId": "<string>",
"variantId": "<string>",
"quantity": 50
}
'import requests
url = "https://api.tagada.io/api/v1/portal/next-order"
payload = {
"subscriptionId": "<string>",
"productId": "<string>",
"variantId": "<string>",
"quantity": 50
}
headers = {
"x-cms-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-cms-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subscriptionId: '<string>',
productId: '<string>',
variantId: '<string>',
quantity: 50
})
};
fetch('https://api.tagada.io/api/v1/portal/next-order', 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.tagada.io/api/v1/portal/next-order",
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([
'subscriptionId' => '<string>',
'productId' => '<string>',
'variantId' => '<string>',
'quantity' => 50
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-cms-token: <api-key>"
],
]);
$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.tagada.io/api/v1/portal/next-order"
payload := strings.NewReader("{\n \"subscriptionId\": \"<string>\",\n \"productId\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 50\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-cms-token", "<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://api.tagada.io/api/v1/portal/next-order")
.header("x-cms-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"subscriptionId\": \"<string>\",\n \"productId\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tagada.io/api/v1/portal/next-order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-cms-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subscriptionId\": \"<string>\",\n \"productId\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 50\n}"
response = http.request(request)
puts response.read_body{
"subscription": {
"id": "<string>",
"customerId": "<string>",
"status": "active",
"productId": "<string>",
"variantId": "<string>",
"optionId": "<string>",
"currency": "<string>",
"quantity": 2,
"price": 123,
"startedAt": "2023-12-25",
"nextBillingAt": "2023-12-25",
"trialEndsAt": "2023-12-25",
"pausedUntil": "2023-12-25",
"canceledAt": "2023-12-25",
"cancelReasonId": "<string>",
"skippedDates": [
"2023-12-25"
],
"lastPaymentFailedAt": "2023-12-25",
"paymentMethodId": "<string>",
"shippingAddressId": "<string>",
"paidOrdersCount": 1,
"nextOrderAddOns": [
{
"productId": "<string>",
"variantId": "<string>",
"quantity": 2,
"unitPrice": 123
}
]
},
"membership": {
"id": "<string>",
"customerId": "<string>",
"programId": "<string>",
"status": "active",
"billing": "monthly",
"startedAt": "2023-12-25",
"renewsAt": "2023-12-25",
"trialEndsAt": "2023-12-25",
"graceEndsAt": "2023-12-25",
"canceledAt": "2023-12-25",
"creditsBalance": 1,
"savedToDate": 123,
"paymentMethodId": "<string>"
}
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}portal
Set the quantity of a one-time item on the next renewal of a subscription (0 takes it off)
Set the quantity of a one-time item on the next renewal of a subscription (0 takes it off)
POST
/
api
/
v1
/
portal
/
next-order
Set the quantity of a one-time item on the next renewal of a subscription (0 takes it off)
curl --request POST \
--url https://api.tagada.io/api/v1/portal/next-order \
--header 'Content-Type: application/json' \
--header 'x-cms-token: <api-key>' \
--data '
{
"subscriptionId": "<string>",
"productId": "<string>",
"variantId": "<string>",
"quantity": 50
}
'import requests
url = "https://api.tagada.io/api/v1/portal/next-order"
payload = {
"subscriptionId": "<string>",
"productId": "<string>",
"variantId": "<string>",
"quantity": 50
}
headers = {
"x-cms-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-cms-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subscriptionId: '<string>',
productId: '<string>',
variantId: '<string>',
quantity: 50
})
};
fetch('https://api.tagada.io/api/v1/portal/next-order', 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.tagada.io/api/v1/portal/next-order",
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([
'subscriptionId' => '<string>',
'productId' => '<string>',
'variantId' => '<string>',
'quantity' => 50
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-cms-token: <api-key>"
],
]);
$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.tagada.io/api/v1/portal/next-order"
payload := strings.NewReader("{\n \"subscriptionId\": \"<string>\",\n \"productId\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 50\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-cms-token", "<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://api.tagada.io/api/v1/portal/next-order")
.header("x-cms-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"subscriptionId\": \"<string>\",\n \"productId\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tagada.io/api/v1/portal/next-order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-cms-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subscriptionId\": \"<string>\",\n \"productId\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 50\n}"
response = http.request(request)
puts response.read_body{
"subscription": {
"id": "<string>",
"customerId": "<string>",
"status": "active",
"productId": "<string>",
"variantId": "<string>",
"optionId": "<string>",
"currency": "<string>",
"quantity": 2,
"price": 123,
"startedAt": "2023-12-25",
"nextBillingAt": "2023-12-25",
"trialEndsAt": "2023-12-25",
"pausedUntil": "2023-12-25",
"canceledAt": "2023-12-25",
"cancelReasonId": "<string>",
"skippedDates": [
"2023-12-25"
],
"lastPaymentFailedAt": "2023-12-25",
"paymentMethodId": "<string>",
"shippingAddressId": "<string>",
"paidOrdersCount": 1,
"nextOrderAddOns": [
{
"productId": "<string>",
"variantId": "<string>",
"quantity": 2,
"unitPrice": 123
}
]
},
"membership": {
"id": "<string>",
"customerId": "<string>",
"programId": "<string>",
"status": "active",
"billing": "monthly",
"startedAt": "2023-12-25",
"renewsAt": "2023-12-25",
"trialEndsAt": "2023-12-25",
"graceEndsAt": "2023-12-25",
"canceledAt": "2023-12-25",
"creditsBalance": 1,
"savedToDate": 123,
"paymentMethodId": "<string>"
}
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}Authorizations
CMS session JWT from /api/v1/cms/session/login. Customer account operations require an email-verified session; signed offer links accept an anonymous store session.
Body
application/json
