Set license states in bulk
curl --request POST \
--url https://api.withorb.com/v1/licenses/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subscription_id": "<string>",
"operations": [
{
"license_type_id": "<string>",
"external_license_id": "<string>",
"active": true,
"date": "2026-01-27"
}
]
}
'import requests
url = "https://api.withorb.com/v1/licenses/bulk"
payload = {
"subscription_id": "<string>",
"operations": [
{
"license_type_id": "<string>",
"external_license_id": "<string>",
"active": True,
"date": "2026-01-27"
}
]
}
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_id: '<string>',
operations: [
{
license_type_id: '<string>',
external_license_id: '<string>',
active: true,
date: '2026-01-27'
}
]
})
};
fetch('https://api.withorb.com/v1/licenses/bulk', 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.withorb.com/v1/licenses/bulk",
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_id' => '<string>',
'operations' => [
[
'license_type_id' => '<string>',
'external_license_id' => '<string>',
'active' => true,
'date' => '2026-01-27'
]
]
]),
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.withorb.com/v1/licenses/bulk"
payload := strings.NewReader("{\n \"subscription_id\": \"<string>\",\n \"operations\": [\n {\n \"license_type_id\": \"<string>\",\n \"external_license_id\": \"<string>\",\n \"active\": true,\n \"date\": \"2026-01-27\"\n }\n ]\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.withorb.com/v1/licenses/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subscription_id\": \"<string>\",\n \"operations\": [\n {\n \"license_type_id\": \"<string>\",\n \"external_license_id\": \"<string>\",\n \"active\": true,\n \"date\": \"2026-01-27\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withorb.com/v1/licenses/bulk")
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_id\": \"<string>\",\n \"operations\": [\n {\n \"license_type_id\": \"<string>\",\n \"external_license_id\": \"<string>\",\n \"active\": true,\n \"date\": \"2026-01-27\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"license_type_id": "<string>",
"external_license_id": "<string>",
"result": "created",
"license": {
"id": "<string>",
"subscription_id": "<string>",
"license_type_id": "<string>",
"external_license_id": "<string>",
"status": "active",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z"
}
}
]
}{
"type": "https://docs.withorb.com/reference/error-responses#400-constraint-violation",
"status": 400,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#401-authentication-error",
"status": 401,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#404-feature-not-available",
"status": 400,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#409-resource-conflict",
"status": 409,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#413-request-too-large",
"status": 413,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#429-too-many-requests",
"status": 429,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#500-internal-server-error",
"status": 123,
"detail": "<string>",
"title": "<string>"
}License
Set license states in bulk
This endpoint sets many licenses on a subscription active or inactive in one request, 100 at most by default.
Each operation names a license and the state it should end up in. A license already in that state is left
unchanged, so a request can be repeated safely. The request is all or nothing: if any operation is invalid,
nothing is written and the error lists every invalid operation.
Setting a license’s state replaces what was scheduled for it. Activating cancels later licenses scheduled for the same external id, and deactivating cancels the ones that would start on or after the deactivation date.
POST
/
licenses
/
bulk
Set license states in bulk
curl --request POST \
--url https://api.withorb.com/v1/licenses/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subscription_id": "<string>",
"operations": [
{
"license_type_id": "<string>",
"external_license_id": "<string>",
"active": true,
"date": "2026-01-27"
}
]
}
'import requests
url = "https://api.withorb.com/v1/licenses/bulk"
payload = {
"subscription_id": "<string>",
"operations": [
{
"license_type_id": "<string>",
"external_license_id": "<string>",
"active": True,
"date": "2026-01-27"
}
]
}
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_id: '<string>',
operations: [
{
license_type_id: '<string>',
external_license_id: '<string>',
active: true,
date: '2026-01-27'
}
]
})
};
fetch('https://api.withorb.com/v1/licenses/bulk', 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.withorb.com/v1/licenses/bulk",
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_id' => '<string>',
'operations' => [
[
'license_type_id' => '<string>',
'external_license_id' => '<string>',
'active' => true,
'date' => '2026-01-27'
]
]
]),
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.withorb.com/v1/licenses/bulk"
payload := strings.NewReader("{\n \"subscription_id\": \"<string>\",\n \"operations\": [\n {\n \"license_type_id\": \"<string>\",\n \"external_license_id\": \"<string>\",\n \"active\": true,\n \"date\": \"2026-01-27\"\n }\n ]\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.withorb.com/v1/licenses/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subscription_id\": \"<string>\",\n \"operations\": [\n {\n \"license_type_id\": \"<string>\",\n \"external_license_id\": \"<string>\",\n \"active\": true,\n \"date\": \"2026-01-27\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withorb.com/v1/licenses/bulk")
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_id\": \"<string>\",\n \"operations\": [\n {\n \"license_type_id\": \"<string>\",\n \"external_license_id\": \"<string>\",\n \"active\": true,\n \"date\": \"2026-01-27\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"license_type_id": "<string>",
"external_license_id": "<string>",
"result": "created",
"license": {
"id": "<string>",
"subscription_id": "<string>",
"license_type_id": "<string>",
"external_license_id": "<string>",
"status": "active",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z"
}
}
]
}{
"type": "https://docs.withorb.com/reference/error-responses#400-constraint-violation",
"status": 400,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#401-authentication-error",
"status": 401,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#404-feature-not-available",
"status": 400,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#409-resource-conflict",
"status": 409,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#413-request-too-large",
"status": 413,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#429-too-many-requests",
"status": 429,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#500-internal-server-error",
"status": 123,
"detail": "<string>",
"title": "<string>"
}Body
application/json
Was this page helpful?