Get usage for one tenant
curl --request GET \
--url https://api.embedreach.com/partner/tenant-usage/{tenantId}import requests
url = "https://api.embedreach.com/partner/tenant-usage/{tenantId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.embedreach.com/partner/tenant-usage/{tenantId}', 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.embedreach.com/partner/tenant-usage/{tenantId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.embedreach.com/partner/tenant-usage/{tenantId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.embedreach.com/partner/tenant-usage/{tenantId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.embedreach.com/partner/tenant-usage/{tenantId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": {
"tenantId": "<string>",
"externalId": "<string>",
"name": "<string>",
"deletedAt": "2023-11-07T05:31:56Z",
"resources": {
"phoneNumbers": {
"total": 1,
"tollFree": 1,
"local": 1
},
"locations": 123
},
"features": [
{
"feature": "assist",
"active": true,
"usage": {
"callCount": 1,
"callDurationSeconds": 1
}
}
]
}
}{
"message": "<string>",
"success": false,
"errors": [
"<string>"
]
}{
"success": true,
"message": "<string>",
"data": null
}Tenant Usage
Get usage for one tenant
Returns the same tenant-usage record as the list endpoint for a single tenant on the calling partner. startDate and endDate are both required, with the same window boundaries as the list endpoint.
GET
/
partner
/
tenant-usage
/
{tenantId}
Get usage for one tenant
curl --request GET \
--url https://api.embedreach.com/partner/tenant-usage/{tenantId}import requests
url = "https://api.embedreach.com/partner/tenant-usage/{tenantId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.embedreach.com/partner/tenant-usage/{tenantId}', 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.embedreach.com/partner/tenant-usage/{tenantId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.embedreach.com/partner/tenant-usage/{tenantId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.embedreach.com/partner/tenant-usage/{tenantId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.embedreach.com/partner/tenant-usage/{tenantId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": {
"tenantId": "<string>",
"externalId": "<string>",
"name": "<string>",
"deletedAt": "2023-11-07T05:31:56Z",
"resources": {
"phoneNumbers": {
"total": 1,
"tollFree": 1,
"local": 1
},
"locations": 123
},
"features": [
{
"feature": "assist",
"active": true,
"usage": {
"callCount": 1,
"callDurationSeconds": 1
}
}
]
}
}{
"message": "<string>",
"success": false,
"errors": [
"<string>"
]
}{
"success": true,
"message": "<string>",
"data": null
}