Purchase Capacity
curl --request POST \
--url https://public-api.cloudidr.com/external/api/v1/flexcompute/purchase \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cidrId": "sc_1235674554"
}
'import requests
url = "https://public-api.cloudidr.com/external/api/v1/flexcompute/purchase"
payload = { "cidrId": "sc_1235674554" }
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({cidrId: 'sc_1235674554'})
};
fetch('https://public-api.cloudidr.com/external/api/v1/flexcompute/purchase', 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://public-api.cloudidr.com/external/api/v1/flexcompute/purchase",
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([
'cidrId' => 'sc_1235674554'
]),
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://public-api.cloudidr.com/external/api/v1/flexcompute/purchase"
payload := strings.NewReader("{\n \"cidrId\": \"sc_1235674554\"\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://public-api.cloudidr.com/external/api/v1/flexcompute/purchase")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cidrId\": \"sc_1235674554\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.cloudidr.com/external/api/v1/flexcompute/purchase")
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 \"cidrId\": \"sc_1235674554\"\n}"
response = http.request(request)
puts response.read_body{
"cidrId": "sc_830349911839",
"policyName": "Volod test policy",
"cspAccountName": "personal AWS",
"policyStatus": "ACTIVE",
"policyOperatingState": "QUEUED_FOR_START",
"policyInstance": {
"id": 1688,
"instanceType": "c5.large",
"platformCode": "Linux/UNIX",
"tenancyCode": "DEDICATED",
"vcpu": 2,
"memory": 4,
"gpu": 0,
"gpuMemory": 0,
"qty": 2
},
"cspRegion": {
"regionCode": "us-west-2",
"regionType": "PRIMARY",
"availabilityZoneId": "usw2-az1"
},
"createdDate": "2026-01-08T15:20:15.64868Z",
"capacityConfiguration": {
"launchDateTime": "2026-01-10T00:00:00-08:00",
"endDateTime": "2026-01-12T23:15:00-08:00",
"autoRenewalEnabled": false,
"frequency": null,
"vpc": "default",
"securityGroups": "none",
"amiImage": "default",
"sshPairKey": "none",
"ebsVolumeSize": 10
},
"pricing": {
"ourPrice": 8.48,
"cspProviderPrice": 12.11,
"savings": 3.63,
"savingsPercentage": 0.3,
"creditCardProcessingFee": null,
"bankAccountProcessingFee": null
}
}{
"error": {
"code": "401",
"message": "Unauthorized",
"details": {
"timestamp": "2025-03-04T17:01:01",
"description": "Unable to process access token"
}
}
}{
"error": {
"code": "404",
"message": "Not Found",
"details": {
"timestamp": "2025-03-04T17:15:55",
"description": "Cidr rFVrfliRmYgD1 not found"
}
}
}{
"error": {
"code": "500",
"message": "Internal Server Error",
"details": {
"timestamp": "2025-03-04T17:17:08",
"description": "Unexpected error. Our team is working on it"
}
}
}Flex compute
Purchase Capacity
Purchase a reserved capacity policy.
POST
/
external
/
api
/
v1
/
flexcompute
/
purchase
Purchase Capacity
curl --request POST \
--url https://public-api.cloudidr.com/external/api/v1/flexcompute/purchase \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cidrId": "sc_1235674554"
}
'import requests
url = "https://public-api.cloudidr.com/external/api/v1/flexcompute/purchase"
payload = { "cidrId": "sc_1235674554" }
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({cidrId: 'sc_1235674554'})
};
fetch('https://public-api.cloudidr.com/external/api/v1/flexcompute/purchase', 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://public-api.cloudidr.com/external/api/v1/flexcompute/purchase",
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([
'cidrId' => 'sc_1235674554'
]),
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://public-api.cloudidr.com/external/api/v1/flexcompute/purchase"
payload := strings.NewReader("{\n \"cidrId\": \"sc_1235674554\"\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://public-api.cloudidr.com/external/api/v1/flexcompute/purchase")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cidrId\": \"sc_1235674554\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.cloudidr.com/external/api/v1/flexcompute/purchase")
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 \"cidrId\": \"sc_1235674554\"\n}"
response = http.request(request)
puts response.read_body{
"cidrId": "sc_830349911839",
"policyName": "Volod test policy",
"cspAccountName": "personal AWS",
"policyStatus": "ACTIVE",
"policyOperatingState": "QUEUED_FOR_START",
"policyInstance": {
"id": 1688,
"instanceType": "c5.large",
"platformCode": "Linux/UNIX",
"tenancyCode": "DEDICATED",
"vcpu": 2,
"memory": 4,
"gpu": 0,
"gpuMemory": 0,
"qty": 2
},
"cspRegion": {
"regionCode": "us-west-2",
"regionType": "PRIMARY",
"availabilityZoneId": "usw2-az1"
},
"createdDate": "2026-01-08T15:20:15.64868Z",
"capacityConfiguration": {
"launchDateTime": "2026-01-10T00:00:00-08:00",
"endDateTime": "2026-01-12T23:15:00-08:00",
"autoRenewalEnabled": false,
"frequency": null,
"vpc": "default",
"securityGroups": "none",
"amiImage": "default",
"sshPairKey": "none",
"ebsVolumeSize": 10
},
"pricing": {
"ourPrice": 8.48,
"cspProviderPrice": 12.11,
"savings": 3.63,
"savingsPercentage": 0.3,
"creditCardProcessingFee": null,
"bankAccountProcessingFee": null
}
}{
"error": {
"code": "401",
"message": "Unauthorized",
"details": {
"timestamp": "2025-03-04T17:01:01",
"description": "Unable to process access token"
}
}
}{
"error": {
"code": "404",
"message": "Not Found",
"details": {
"timestamp": "2025-03-04T17:15:55",
"description": "Cidr rFVrfliRmYgD1 not found"
}
}
}{
"error": {
"code": "500",
"message": "Internal Server Error",
"details": {
"timestamp": "2025-03-04T17:17:08",
"description": "Unexpected error. Our team is working on it"
}
}
}⌘I

