Programs
Reordena os tiers ativos do programa
Reescreve as posições dos tiers ativos na ordem informada, numa única operação. Requer um usuário com função owner ou admin.
PUT
/
programs
/
{programId}
/
tiers
/
order
Reordena os tiers ativos do programa
curl --request PUT \
--url https://api.userepass.com/programs/{programId}/tiers/order \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tierIds": [
"<string>"
]
}
'import requests
url = "https://api.userepass.com/programs/{programId}/tiers/order"
payload = { "tierIds": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tierIds: ['<string>']})
};
fetch('https://api.userepass.com/programs/{programId}/tiers/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.userepass.com/programs/{programId}/tiers/order",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'tierIds' => [
'<string>'
]
]),
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.userepass.com/programs/{programId}/tiers/order"
payload := strings.NewReader("{\n \"tierIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.userepass.com/programs/{programId}/tiers/order")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tierIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.userepass.com/programs/{programId}/tiers/order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tierIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "tier_01J9ZK8QF3N2P5R7T9V1W3X5Y7",
"organizationId": "org_01J9ZK8QF3N2P5R7T9V1W3X5Y7",
"programId": "prog_01J9ZK8QF3N2P5R7T9V1W3X5Y7",
"name": "Ouro",
"position": 0,
"archivedAt": null,
"createdAt": "2026-06-13T12:00:00.000Z"
}
]
}Authorizations
bearerAuthapiKeyAuth
Chave de API (prefixo rstr_) enviada como Authorization: Bearer rstr_....
Path Parameters
Pattern:
^prog_[0-9A-HJKMNP-TV-Z]{26}$Body
application/json
IDs dos tiers ativos na nova ordem.
Minimum array length:
1Pattern:
^tier_[0-9A-HJKMNP-TV-Z]{26}$Response
200 - application/json
Default Response
Show child attributes
Show child attributes
⌘I
Reordena os tiers ativos do programa
curl --request PUT \
--url https://api.userepass.com/programs/{programId}/tiers/order \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tierIds": [
"<string>"
]
}
'import requests
url = "https://api.userepass.com/programs/{programId}/tiers/order"
payload = { "tierIds": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tierIds: ['<string>']})
};
fetch('https://api.userepass.com/programs/{programId}/tiers/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.userepass.com/programs/{programId}/tiers/order",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'tierIds' => [
'<string>'
]
]),
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.userepass.com/programs/{programId}/tiers/order"
payload := strings.NewReader("{\n \"tierIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.userepass.com/programs/{programId}/tiers/order")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tierIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.userepass.com/programs/{programId}/tiers/order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tierIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "tier_01J9ZK8QF3N2P5R7T9V1W3X5Y7",
"organizationId": "org_01J9ZK8QF3N2P5R7T9V1W3X5Y7",
"programId": "prog_01J9ZK8QF3N2P5R7T9V1W3X5Y7",
"name": "Ouro",
"position": 0,
"archivedAt": null,
"createdAt": "2026-06-13T12:00:00.000Z"
}
]
}