{
"PackageName": "Package 10",
"Description": "Package 10 Description",
"SubscriberId": "TSUID-A2AD6FB7-2D53-40CE-96E4-EBB7F7C54509",
"Type": "sip",
"Price": 300.0,
"Monthly": true,
"PackageItems": [
{
"ProductId": "PRID-d869bdbf-895e-44fe-986b-1fabce90b994",
"Price": "1.12",
"Monthly": false,
"Type": "Type 3"
},
{
"ProductId": "PRID-d869bdbf-895e-44fe-986b-1fabce90b994",
"Price": "1.12",
"Monthly": false,
"Type": "Type 3"
},
{
"ProductId": "PRID-d869bdbf-895e-44fe-986b-1fabce90b994",
"Price": "1.12",
"Monthly": false,
"Type": "Type 3"
}
]
}curl -X POST https://api.telegent.com/v1.0/packages \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"PackageName": "Package 10",
"Description": "Package 10 Description",
"SubscriberId": "TSUID-A2AD6FB7-2D53-40CE-96E4-EBB7F7C54509",
"Type": "sip",
"Price": 300.0,
"Monthly": true,
"PackageItems": [{"ProductId": "PRID-d869bdbf-895e-44fe-986b-1fabce90b994", "Price": "1.12", "Monthly": false, "Type": "Type 3"}]
}'import requests
url = "https://api.telegent.com/v1.0/packages"
payload = {
"PackageName": "Package 10",
"Type": "sip",
"Price": 300,
"Monthly": True,
"Description": "Package 10 Description",
"SubscriberId": "TSUID-A2AD6FB7-2D53-40CE-96E4-EBB7F7C54509",
"PackageItems": [
{
"ProductId": "PID-d869bdbf-895e-44fe-986b-1fabce90b994",
"Price": "1.12",
"Monthly": False,
"Type": "Type 3"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
PackageName: 'Package 10',
Type: 'sip',
Price: 300,
Monthly: true,
Description: 'Package 10 Description',
SubscriberId: 'TSUID-A2AD6FB7-2D53-40CE-96E4-EBB7F7C54509',
PackageItems: [
{
ProductId: 'PID-d869bdbf-895e-44fe-986b-1fabce90b994',
Price: '1.12',
Monthly: false,
Type: 'Type 3'
}
]
})
};
fetch('https://api.telegent.com/v1.0/packages', 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.telegent.com/v1.0/packages",
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([
'PackageName' => 'Package 10',
'Type' => 'sip',
'Price' => 300,
'Monthly' => true,
'Description' => 'Package 10 Description',
'SubscriberId' => 'TSUID-A2AD6FB7-2D53-40CE-96E4-EBB7F7C54509',
'PackageItems' => [
[
'ProductId' => 'PID-d869bdbf-895e-44fe-986b-1fabce90b994',
'Price' => '1.12',
'Monthly' => false,
'Type' => 'Type 3'
]
]
]),
CURLOPT_HTTPHEADER => [
"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.telegent.com/v1.0/packages"
payload := strings.NewReader("{\n \"PackageName\": \"Package 10\",\n \"Type\": \"sip\",\n \"Price\": 300,\n \"Monthly\": true,\n \"Description\": \"Package 10 Description\",\n \"SubscriberId\": \"TSUID-A2AD6FB7-2D53-40CE-96E4-EBB7F7C54509\",\n \"PackageItems\": [\n {\n \"ProductId\": \"PID-d869bdbf-895e-44fe-986b-1fabce90b994\",\n \"Price\": \"1.12\",\n \"Monthly\": false,\n \"Type\": \"Type 3\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.telegent.com/v1.0/packages")
.header("Content-Type", "application/json")
.body("{\n \"PackageName\": \"Package 10\",\n \"Type\": \"sip\",\n \"Price\": 300,\n \"Monthly\": true,\n \"Description\": \"Package 10 Description\",\n \"SubscriberId\": \"TSUID-A2AD6FB7-2D53-40CE-96E4-EBB7F7C54509\",\n \"PackageItems\": [\n {\n \"ProductId\": \"PID-d869bdbf-895e-44fe-986b-1fabce90b994\",\n \"Price\": \"1.12\",\n \"Monthly\": false,\n \"Type\": \"Type 3\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telegent.com/v1.0/packages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"PackageName\": \"Package 10\",\n \"Type\": \"sip\",\n \"Price\": 300,\n \"Monthly\": true,\n \"Description\": \"Package 10 Description\",\n \"SubscriberId\": \"TSUID-A2AD6FB7-2D53-40CE-96E4-EBB7F7C54509\",\n \"PackageItems\": [\n {\n \"ProductId\": \"PID-d869bdbf-895e-44fe-986b-1fabce90b994\",\n \"Price\": \"1.12\",\n \"Monthly\": false,\n \"Type\": \"Type 3\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"PackageId": "PID-23bf4d8d-14bf-431b-88a4-9a214a87b58a",
"PackageName": "Package 4",
"DistributorId": "DID-1e24785ab-3f3c-7db1-89d7-956d80fdnn2",
"AggregatorId": "AGID-A49349FB-170E-44BF-B61E-DCC65A3FEA1A",
"SubscriberId": "TSUID-A2AD6FB7-2D53-40CE-96E4-EBB7F7C54509",
"Type": "sip",
"Price": 100,
"Monthly": true,
"Active": true
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}Create Package
Create a new package with name, description, type, price, and billing frequency. Packages bundle products together for subscriber offerings.
What this does: Returns the new package’s PackageId (PID-) and full record. Store the PID- — it is required when creating subscriptions. Add products to the package using the items endpoints.
Next steps:
- Add items to the package —
POST /v1.0/packages/items/add - Create a subscription —
POST /v1.0/subscriptions
{
"PackageName": "Package 10",
"Description": "Package 10 Description",
"SubscriberId": "TSUID-A2AD6FB7-2D53-40CE-96E4-EBB7F7C54509",
"Type": "sip",
"Price": 300.0,
"Monthly": true,
"PackageItems": [
{
"ProductId": "PRID-d869bdbf-895e-44fe-986b-1fabce90b994",
"Price": "1.12",
"Monthly": false,
"Type": "Type 3"
},
{
"ProductId": "PRID-d869bdbf-895e-44fe-986b-1fabce90b994",
"Price": "1.12",
"Monthly": false,
"Type": "Type 3"
},
{
"ProductId": "PRID-d869bdbf-895e-44fe-986b-1fabce90b994",
"Price": "1.12",
"Monthly": false,
"Type": "Type 3"
}
]
}curl -X POST https://api.telegent.com/v1.0/packages \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"PackageName": "Package 10",
"Description": "Package 10 Description",
"SubscriberId": "TSUID-A2AD6FB7-2D53-40CE-96E4-EBB7F7C54509",
"Type": "sip",
"Price": 300.0,
"Monthly": true,
"PackageItems": [{"ProductId": "PRID-d869bdbf-895e-44fe-986b-1fabce90b994", "Price": "1.12", "Monthly": false, "Type": "Type 3"}]
}'import requests
url = "https://api.telegent.com/v1.0/packages"
payload = {
"PackageName": "Package 10",
"Type": "sip",
"Price": 300,
"Monthly": True,
"Description": "Package 10 Description",
"SubscriberId": "TSUID-A2AD6FB7-2D53-40CE-96E4-EBB7F7C54509",
"PackageItems": [
{
"ProductId": "PID-d869bdbf-895e-44fe-986b-1fabce90b994",
"Price": "1.12",
"Monthly": False,
"Type": "Type 3"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
PackageName: 'Package 10',
Type: 'sip',
Price: 300,
Monthly: true,
Description: 'Package 10 Description',
SubscriberId: 'TSUID-A2AD6FB7-2D53-40CE-96E4-EBB7F7C54509',
PackageItems: [
{
ProductId: 'PID-d869bdbf-895e-44fe-986b-1fabce90b994',
Price: '1.12',
Monthly: false,
Type: 'Type 3'
}
]
})
};
fetch('https://api.telegent.com/v1.0/packages', 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.telegent.com/v1.0/packages",
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([
'PackageName' => 'Package 10',
'Type' => 'sip',
'Price' => 300,
'Monthly' => true,
'Description' => 'Package 10 Description',
'SubscriberId' => 'TSUID-A2AD6FB7-2D53-40CE-96E4-EBB7F7C54509',
'PackageItems' => [
[
'ProductId' => 'PID-d869bdbf-895e-44fe-986b-1fabce90b994',
'Price' => '1.12',
'Monthly' => false,
'Type' => 'Type 3'
]
]
]),
CURLOPT_HTTPHEADER => [
"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.telegent.com/v1.0/packages"
payload := strings.NewReader("{\n \"PackageName\": \"Package 10\",\n \"Type\": \"sip\",\n \"Price\": 300,\n \"Monthly\": true,\n \"Description\": \"Package 10 Description\",\n \"SubscriberId\": \"TSUID-A2AD6FB7-2D53-40CE-96E4-EBB7F7C54509\",\n \"PackageItems\": [\n {\n \"ProductId\": \"PID-d869bdbf-895e-44fe-986b-1fabce90b994\",\n \"Price\": \"1.12\",\n \"Monthly\": false,\n \"Type\": \"Type 3\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.telegent.com/v1.0/packages")
.header("Content-Type", "application/json")
.body("{\n \"PackageName\": \"Package 10\",\n \"Type\": \"sip\",\n \"Price\": 300,\n \"Monthly\": true,\n \"Description\": \"Package 10 Description\",\n \"SubscriberId\": \"TSUID-A2AD6FB7-2D53-40CE-96E4-EBB7F7C54509\",\n \"PackageItems\": [\n {\n \"ProductId\": \"PID-d869bdbf-895e-44fe-986b-1fabce90b994\",\n \"Price\": \"1.12\",\n \"Monthly\": false,\n \"Type\": \"Type 3\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telegent.com/v1.0/packages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"PackageName\": \"Package 10\",\n \"Type\": \"sip\",\n \"Price\": 300,\n \"Monthly\": true,\n \"Description\": \"Package 10 Description\",\n \"SubscriberId\": \"TSUID-A2AD6FB7-2D53-40CE-96E4-EBB7F7C54509\",\n \"PackageItems\": [\n {\n \"ProductId\": \"PID-d869bdbf-895e-44fe-986b-1fabce90b994\",\n \"Price\": \"1.12\",\n \"Monthly\": false,\n \"Type\": \"Type 3\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"PackageId": "PID-23bf4d8d-14bf-431b-88a4-9a214a87b58a",
"PackageName": "Package 4",
"DistributorId": "DID-1e24785ab-3f3c-7db1-89d7-956d80fdnn2",
"AggregatorId": "AGID-A49349FB-170E-44BF-B61E-DCC65A3FEA1A",
"SubscriberId": "TSUID-A2AD6FB7-2D53-40CE-96E4-EBB7F7C54509",
"Type": "sip",
"Price": 100,
"Monthly": true,
"Active": true
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}Body
Package name
"Package 10"
Package type (e.g., sip, esim)
"sip"
Package price
300
Monthly recurring charge
true
Package description
"Package 10 Description"
Telegent Subscriber ID. Format: TSUID- followed by a UUID. Create one via POST /v1.0/subscribers/create or look up existing IDs with GET /v1.0/subscribers/get.
"TSUID-A2AD6FB7-2D53-40CE-96E4-EBB7F7C54509"
List of products in package
Show child attributes
Show child attributes
Response
Create Package
The response is of type object.