Finalize a Staged Snapshot
curl --request POST \
--url https://getbill.io/external-api/v1/campaigns/{apiReference}/snapshots/{snapshotReference}/finalize \
--header 'Authorization: Bearer <token>'import requests
url = "https://getbill.io/external-api/v1/campaigns/{apiReference}/snapshots/{snapshotReference}/finalize"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://getbill.io/external-api/v1/campaigns/{apiReference}/snapshots/{snapshotReference}/finalize', 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://getbill.io/external-api/v1/campaigns/{apiReference}/snapshots/{snapshotReference}/finalize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://getbill.io/external-api/v1/campaigns/{apiReference}/snapshots/{snapshotReference}/finalize"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://getbill.io/external-api/v1/campaigns/{apiReference}/snapshots/{snapshotReference}/finalize")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://getbill.io/external-api/v1/campaigns/{apiReference}/snapshots/{snapshotReference}/finalize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyCampaigns API
Finalize a Staged Snapshot
Queue a complete staged snapshot for asynchronous processing
POST
/
external-api
/
v1
/
campaigns
/
{apiReference}
/
snapshots
/
{snapshotReference}
/
finalize
Finalize a Staged Snapshot
curl --request POST \
--url https://getbill.io/external-api/v1/campaigns/{apiReference}/snapshots/{snapshotReference}/finalize \
--header 'Authorization: Bearer <token>'import requests
url = "https://getbill.io/external-api/v1/campaigns/{apiReference}/snapshots/{snapshotReference}/finalize"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://getbill.io/external-api/v1/campaigns/{apiReference}/snapshots/{snapshotReference}/finalize', 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://getbill.io/external-api/v1/campaigns/{apiReference}/snapshots/{snapshotReference}/finalize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://getbill.io/external-api/v1/campaigns/{apiReference}/snapshots/{snapshotReference}/finalize"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://getbill.io/external-api/v1/campaigns/{apiReference}/snapshots/{snapshotReference}/finalize")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://getbill.io/external-api/v1/campaigns/{apiReference}/snapshots/{snapshotReference}/finalize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyFinalization is accepted only when
For every staged snapshot, send an empty body or
Poll
received_row_count equals expected_row_count.
Authentication
Requiresdebts:write. Uses the write limiter: 500 requests/hour per company.
string
required
Your campaign reference.
string
required
The staged snapshot reference to queue.
{}:
curl -X POST "https://getbill.io/external-api/v1/campaigns/client-a-2026/snapshots/export-2026-07-17-550e8400/finalize" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
HTTP/1.1 202 Accepted
Location: /external-api/v1/campaigns/client-a-2026/snapshots/export-2026-07-17-550e8400
{
"error": false,
"message": "Snapshot finalization accepted",
"data": {
"api_reference": "client-a-2026",
"snapshot_reference": "export-2026-07-17-550e8400",
"delivery_mode": "staged",
"status": "pending",
"core_applied": false,
"expected_row_count": 2500,
"received_row_count": 2500,
"received_chunk_count": 3,
"next_chunk_index": 3,
"counts": null,
"failure": null,
"created_at": "2026-07-17T09:00:00Z",
"updated_at": "2026-07-17T09:03:00Z",
"status_url": "/external-api/v1/campaigns/client-a-2026/snapshots/export-2026-07-17-550e8400"
}
}
status_url. Repeating finalize while pending or processing returns 202; repeating it after completed or failed returns 200. A pending retry may enqueue another transport message, but the atomic worker claim prevents duplicate processing.
An incomplete upload returns 409 snapshot_incomplete. processing_error returns 409 because GetBill operator recovery is required.