Resize a block
curl --request PATCH \
--url https://apiv2.vodex.ai/v1/batches/{id}/blocks/{blockNo} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"contacts": 30
}'import requests
url = "https://apiv2.vodex.ai/v1/batches/{id}/blocks/{blockNo}"
payload = { "contacts": 30 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({contacts: 30})
};
fetch('https://apiv2.vodex.ai/v1/batches/{id}/blocks/{blockNo}', 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://apiv2.vodex.ai/v1/batches/{id}/blocks/{blockNo}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'contacts' => 30
]),
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://apiv2.vodex.ai/v1/batches/{id}/blocks/{blockNo}"
payload := strings.NewReader("{\n \"contacts\": 30\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://apiv2.vodex.ai/v1/batches/{id}/blocks/{blockNo}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contacts\": 30\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/batches/{id}/blocks/{blockNo}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contacts\": 30\n}"
response = http.request(request)
puts response.read_body{
"blockSize": 123,
"activeBlock": 123,
"blocks": [
{
"blockNo": 123,
"rangeStart": 123,
"rangeEnd": 123,
"contacts": 123,
"status": "pending",
"counts": {}
}
]
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}Batches
Resize a block
Change how many contacts a block covers, for a block that has not been triggered. Blocks after it keep their own sizes and shift to start where this one now ends, so the row sequence stays continuous; the last block absorbs the difference, and a block pushed past the final row is removed.
Only blocks above activeBlock can be resized. At or below it the rows
have been dialled or are dialling, and moving a boundary underneath them
would leave the plan and the call log disagreeing about who was in which
block.
The whole plan is returned, because every block after the edited one moved.
PATCH
/
batches
/
{id}
/
blocks
/
{blockNo}
Resize a block
curl --request PATCH \
--url https://apiv2.vodex.ai/v1/batches/{id}/blocks/{blockNo} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"contacts": 30
}'import requests
url = "https://apiv2.vodex.ai/v1/batches/{id}/blocks/{blockNo}"
payload = { "contacts": 30 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({contacts: 30})
};
fetch('https://apiv2.vodex.ai/v1/batches/{id}/blocks/{blockNo}', 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://apiv2.vodex.ai/v1/batches/{id}/blocks/{blockNo}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'contacts' => 30
]),
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://apiv2.vodex.ai/v1/batches/{id}/blocks/{blockNo}"
payload := strings.NewReader("{\n \"contacts\": 30\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://apiv2.vodex.ai/v1/batches/{id}/blocks/{blockNo}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contacts\": 30\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/batches/{id}/blocks/{blockNo}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contacts\": 30\n}"
response = http.request(request)
puts response.read_body{
"blockSize": 123,
"activeBlock": 123,
"blocks": [
{
"blockNo": 123,
"rangeStart": 123,
"rangeEnd": 123,
"contacts": 123,
"status": "pending",
"counts": {}
}
]
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}Authorizations
Tenant API key (vdx_live_…) as Authorization: Bearer.
Body
application/json
Rows this block should cover, counted from its existing start.
Required range:
x >= 1