Skip to main content
POST
/
v2
/
subscriptions
/
{id}
/
refresh-seat-products
Refresh seat products
curl --request POST \
  --url https://api.hyperline.co/v2/subscriptions/{id}/refresh-seat-products \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.hyperline.co/v2/subscriptions/{id}/refresh-seat-products"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.text)
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.hyperline.co/v2/subscriptions/{id}/refresh-seat-products', 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.hyperline.co/v2/subscriptions/{id}/refresh-seat-products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.hyperline.co/v2/subscriptions/{id}/refresh-seat-products"

req, _ := http.NewRequest("POST", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

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.hyperline.co/v2/subscriptions/{id}/refresh-seat-products")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.hyperline.co/v2/subscriptions/{id}/refresh-seat-products")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
[
  {
    "id": "supd_MkTDgpM6ej6f8l",
    "apply_at": "2024-11-30T18:24:34.496Z",
    "adjustment_amount": 123,
    "subscription_id": "sub_7aWtG7Gb_fwGno",
    "product_id": "itm_G6nU9iSC7eoDsk",
    "previous_count": 2,
    "new_count": 7,
    "next_refresh_date": null
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Response

201 - application/json
id
string
required

Subscription update ID.

Example:

"supd_MkTDgpM6ej6f8l"

application_schedule
enum<string>
required

Indicates when the subscription should be updated.

  • immediately: The subscription will be updated immediately.
  • next_period: The subscription will be updated at the end of the current billing period.
  • custom: The subscription will be updated at a custom date.
Available options:
immediately,
next_period,
custom,
scheduled
apply_at
string<date>
required

Date when the subscription should be updated. UTC date time string in the ISO 8601 format.

Example:

"2024-11-30T18:24:34.496Z"

payment_schedule
enum<string>
required

Indicates when the subscription should be billed.

  • immediately: The subscription will be billed immediately.
  • next_invoice: The subscription will be billed at the next invoice.
  • custom: The subscription will be billed at a custom date.
Available options:
immediately,
next_invoice,
custom
calculation_method
enum<string>
required

Indicates how the products price should be calculated.

  • pro_rata: The price will be calculated proportionally to the time elapsed since the last billing period.
  • pay_in_full: The price will be calculated for the entire billing period.
  • do_not_charge: The price will not be calculated.
Available options:
pro_rata,
pay_in_full,
do_not_charge
adjustment_amount
number | null
required

Amount to adjust the subscription price.

subscription_id
string
required

Subscription ID.

Example:

"sub_7aWtG7Gb_fwGno"

product_id
string
required

Product ID.

Example:

"itm_G6nU9iSC7eoDsk"

previous_count
number
required

Previous count.

Example:

2

new_count
number
required

New count.

Example:

7

next_refresh_date

The next refresh date. Exists if your seat item is configured to be refreshed periodically.

Example:

null