Get available DVM minute bundles for workspace
curl --request GET \
--url https://api-gw.sendspark.com/v1/workspaces/{workspaceId}/dvm-bundles \
--header 'x-api-key: <api-key>' \
--header 'x-api-secret: <api-key>'import requests
url = "https://api-gw.sendspark.com/v1/workspaces/{workspaceId}/dvm-bundles"
headers = {
"x-api-key": "<api-key>",
"x-api-secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-api-secret': '<api-key>'}
};
fetch('https://api-gw.sendspark.com/v1/workspaces/{workspaceId}/dvm-bundles', 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-gw.sendspark.com/v1/workspaces/{workspaceId}/dvm-bundles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-api-secret: <api-key>"
],
]);
$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-gw.sendspark.com/v1/workspaces/{workspaceId}/dvm-bundles"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-api-secret", "<api-key>")
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-gw.sendspark.com/v1/workspaces/{workspaceId}/dvm-bundles")
.header("x-api-key", "<api-key>")
.header("x-api-secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-gw.sendspark.com/v1/workspaces/{workspaceId}/dvm-bundles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-api-secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"bundles": [
{
"id": "prod_UB6XkMTrkKEdxB",
"priceId": "price_1RBg7yADxQe4sXwj5E3Bt8qM",
"minutes": 30,
"label": "30-Minute Bundle",
"unitPriceCents": 100,
"totalPriceCents": 3000,
"sortOrder": 1,
"badge": "Best Value"
}
],
"balance": {},
"customBundleConfig": {
"id": "<string>",
"priceId": "<string>",
"tiers": [
{
"upTo": 123,
"unitAmountCents": 123
}
],
"minMinutes": 123,
"maxMinutes": 123,
"stepMinutes": 123,
"quickPicks": [
123
],
"mostPopular": 123,
"label": "<string>",
"recurring": true
},
"activeBundles": [
{
"bundleId": "<string>",
"module": "<string>",
"minutesPerBundle": 123,
"bundleCount": 123,
"unit": "<string>",
"priceId": "<string>",
"subscriptionItemId": "<string>",
"label": "<string>",
"productName": "Custom DVM Minutes - Growth",
"unitAmountCents": 120.75,
"totalPriceCents": 4500,
"endsAt": "2023-12-25",
"purchasedAt": "2023-12-25",
"purchasedBy": "<string>",
"cancelingCount": 123,
"isCustom": true,
"isCanceling": true,
"quantity": 123
}
]
}{
"statusCode": 400,
"code": "S400-AHVE",
"error": "Bad Request",
"message": "Invalid request payload input"
}{
"statusCode": 403,
"code": "S403-UPLD",
"error": "Forbidden",
"message": "Invalid request payload input / Any error from provider"
}{
"statusCode": 404,
"error": "Not Found",
"message": "Resource not found or invalid access"
}DVM Bundles
Get available DVM minute bundles for workspace
Returns available DVM minute bundle packages for the workspace plan with current balance.
GET
/
v1
/
workspaces
/
{workspaceId}
/
dvm-bundles
Get available DVM minute bundles for workspace
curl --request GET \
--url https://api-gw.sendspark.com/v1/workspaces/{workspaceId}/dvm-bundles \
--header 'x-api-key: <api-key>' \
--header 'x-api-secret: <api-key>'import requests
url = "https://api-gw.sendspark.com/v1/workspaces/{workspaceId}/dvm-bundles"
headers = {
"x-api-key": "<api-key>",
"x-api-secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-api-secret': '<api-key>'}
};
fetch('https://api-gw.sendspark.com/v1/workspaces/{workspaceId}/dvm-bundles', 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-gw.sendspark.com/v1/workspaces/{workspaceId}/dvm-bundles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-api-secret: <api-key>"
],
]);
$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-gw.sendspark.com/v1/workspaces/{workspaceId}/dvm-bundles"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-api-secret", "<api-key>")
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-gw.sendspark.com/v1/workspaces/{workspaceId}/dvm-bundles")
.header("x-api-key", "<api-key>")
.header("x-api-secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-gw.sendspark.com/v1/workspaces/{workspaceId}/dvm-bundles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-api-secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"bundles": [
{
"id": "prod_UB6XkMTrkKEdxB",
"priceId": "price_1RBg7yADxQe4sXwj5E3Bt8qM",
"minutes": 30,
"label": "30-Minute Bundle",
"unitPriceCents": 100,
"totalPriceCents": 3000,
"sortOrder": 1,
"badge": "Best Value"
}
],
"balance": {},
"customBundleConfig": {
"id": "<string>",
"priceId": "<string>",
"tiers": [
{
"upTo": 123,
"unitAmountCents": 123
}
],
"minMinutes": 123,
"maxMinutes": 123,
"stepMinutes": 123,
"quickPicks": [
123
],
"mostPopular": 123,
"label": "<string>",
"recurring": true
},
"activeBundles": [
{
"bundleId": "<string>",
"module": "<string>",
"minutesPerBundle": 123,
"bundleCount": 123,
"unit": "<string>",
"priceId": "<string>",
"subscriptionItemId": "<string>",
"label": "<string>",
"productName": "Custom DVM Minutes - Growth",
"unitAmountCents": 120.75,
"totalPriceCents": 4500,
"endsAt": "2023-12-25",
"purchasedAt": "2023-12-25",
"purchasedBy": "<string>",
"cancelingCount": 123,
"isCustom": true,
"isCanceling": true,
"quantity": 123
}
]
}{
"statusCode": 400,
"code": "S400-AHVE",
"error": "Bad Request",
"message": "Invalid request payload input"
}{
"statusCode": 403,
"code": "S403-UPLD",
"error": "Forbidden",
"message": "Invalid request payload input / Any error from provider"
}{
"statusCode": 404,
"error": "Not Found",
"message": "Resource not found or invalid access"
}Was this page helpful?
⌘I