Get Bundle By Id
Returns the details of a single billing bundle by its ID, so you can inspect its contents before purchasing a user bundle.
GET
/
bundle_pricing
/
billing_bundles
/
{bundle_id}
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const billingBundle = await client.bundlePricing.billingBundles.retrieve(
'8661948c-a386-4385-837f-af00f40f111a',
);
console.log(billingBundle.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
billing_bundle = client.bundle_pricing.billing_bundles.retrieve(
bundle_id="8661948c-a386-4385-837f-af00f40f111a",
)
print(billing_bundle.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
billingBundle, err := client.BundlePricing.BillingBundles.Get(
context.TODO(),
"8661948c-a386-4385-837f-af00f40f111a",
telnyx.BundlePricingBillingBundleGetParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", billingBundle.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.bundlepricing.billingbundles.BillingBundleRetrieveParams;
import com.telnyx.sdk.models.bundlepricing.billingbundles.BillingBundleRetrieveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
BillingBundleRetrieveResponse billingBundle = client.bundlePricing().billingBundles().retrieve("8661948c-a386-4385-837f-af00f40f111a");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
billing_bundle = telnyx.bundle_pricing.billing_bundles.retrieve("8661948c-a386-4385-837f-af00f40f111a")
puts(billing_bundle)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$billingBundle = $client->bundlePricing->billingBundles->retrieve(
'8661948c-a386-4385-837f-af00f40f111a',
authorizationBearer: 'authorization_bearer',
);
var_dump($billingBundle);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx bundle-pricing:billing-bundles retrieve \
--api-key 'My API Key' \
--bundle-id 8661948c-a386-4385-837f-af00f40f111acurl --request GET \
--url https://api.telnyx.com/v2/bundle_pricing/billing_bundles/{bundle_id} \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "7ecd040e-6bac-4139-9160-3c0427d98fea",
"name": "Australia Basic",
"cost_code": "BUNDLE-PRICING-BASIC-MRC",
"active": true,
"is_public": true,
"created_at": "2023-12-25",
"bundle_limits": [
{
"id": "e6a32ea9-953b-4622-bbba-9f7bcf7e6717",
"service": "E911",
"metric": "number",
"created_at": "2023-12-25",
"updated_at": "2023-12-25",
"limit": 1,
"rate": "5",
"country_iso": "AU",
"country_code": 61,
"country": "<string>",
"direction": "inbound",
"types": [
"local"
],
"billing_service": "emergency"
}
],
"slug": "basic-au-e4f8"
}
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "The required authentication headers were either invalid or not included in the request."
}
]
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "The requested resource or URL could not be found."
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured."
}
]
}Authorizations
Headers
Path Parameters
Was this page helpful?
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const billingBundle = await client.bundlePricing.billingBundles.retrieve(
'8661948c-a386-4385-837f-af00f40f111a',
);
console.log(billingBundle.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
billing_bundle = client.bundle_pricing.billing_bundles.retrieve(
bundle_id="8661948c-a386-4385-837f-af00f40f111a",
)
print(billing_bundle.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
billingBundle, err := client.BundlePricing.BillingBundles.Get(
context.TODO(),
"8661948c-a386-4385-837f-af00f40f111a",
telnyx.BundlePricingBillingBundleGetParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", billingBundle.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.bundlepricing.billingbundles.BillingBundleRetrieveParams;
import com.telnyx.sdk.models.bundlepricing.billingbundles.BillingBundleRetrieveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
BillingBundleRetrieveResponse billingBundle = client.bundlePricing().billingBundles().retrieve("8661948c-a386-4385-837f-af00f40f111a");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
billing_bundle = telnyx.bundle_pricing.billing_bundles.retrieve("8661948c-a386-4385-837f-af00f40f111a")
puts(billing_bundle)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$billingBundle = $client->bundlePricing->billingBundles->retrieve(
'8661948c-a386-4385-837f-af00f40f111a',
authorizationBearer: 'authorization_bearer',
);
var_dump($billingBundle);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx bundle-pricing:billing-bundles retrieve \
--api-key 'My API Key' \
--bundle-id 8661948c-a386-4385-837f-af00f40f111acurl --request GET \
--url https://api.telnyx.com/v2/bundle_pricing/billing_bundles/{bundle_id} \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "7ecd040e-6bac-4139-9160-3c0427d98fea",
"name": "Australia Basic",
"cost_code": "BUNDLE-PRICING-BASIC-MRC",
"active": true,
"is_public": true,
"created_at": "2023-12-25",
"bundle_limits": [
{
"id": "e6a32ea9-953b-4622-bbba-9f7bcf7e6717",
"service": "E911",
"metric": "number",
"created_at": "2023-12-25",
"updated_at": "2023-12-25",
"limit": 1,
"rate": "5",
"country_iso": "AU",
"country_code": 61,
"country": "<string>",
"direction": "inbound",
"types": [
"local"
],
"billing_service": "emergency"
}
],
"slug": "basic-au-e4f8"
}
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "The required authentication headers were either invalid or not included in the request."
}
]
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "The requested resource or URL could not be found."
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured."
}
]
}