Cancel Company Export
curl --request DELETE \
--url https://api.revenuebase.ai/v2/contact/company/exports/{export_id} \
--header 'X-Key: <api-key>'import requests
url = "https://api.revenuebase.ai/v2/contact/company/exports/{export_id}"
headers = {"X-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-Key': '<api-key>'}};
fetch('https://api.revenuebase.ai/v2/contact/company/exports/{export_id}', 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.revenuebase.ai/v2/contact/company/exports/{export_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-Key: <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.revenuebase.ai/v2/contact/company/exports/{export_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.revenuebase.ai/v2/contact/company/exports/{export_id}")
.header("X-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.revenuebase.ai/v2/contact/company/exports/{export_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Company Endpoints
Cancel Company Export
Ask an unfinished company export to stop.
DELETE
/
company
/
exports
/
{export_id}
Cancel Company Export
curl --request DELETE \
--url https://api.revenuebase.ai/v2/contact/company/exports/{export_id} \
--header 'X-Key: <api-key>'import requests
url = "https://api.revenuebase.ai/v2/contact/company/exports/{export_id}"
headers = {"X-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-Key': '<api-key>'}};
fetch('https://api.revenuebase.ai/v2/contact/company/exports/{export_id}', 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.revenuebase.ai/v2/contact/company/exports/{export_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-Key: <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.revenuebase.ai/v2/contact/company/exports/{export_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.revenuebase.ai/v2/contact/company/exports/{export_id}")
.header("X-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.revenuebase.ai/v2/contact/company/exports/{export_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Credits and plans
PAYG is Pay-as-you-go. AYCE is All-you-can-eat.| Usage | PAYG | AYCE |
|---|---|---|
| Cancellation request | Free 0 credits | Free 0 credits |
When to use this endpoint
Stop a company export that is queued or writing rows. Cancellation adds no charge, and unfinished work releases its reservation when it ends.Example
SetREVENUEBASE_EXPORT_ID to the exportId returned by Start Export. Use a job created by this API key’s account.
Set REVENUEBASE_API_KEY to your API key.
curl --request DELETE "https://api.revenuebase.ai/v2/contact/company/exports/$REVENUEBASE_EXPORT_ID" \
--header "X-Key: $REVENUEBASE_API_KEY"
Read the status
| Status | Meaning |
|---|---|
QUEUED | Waiting to run; keep polling. |
PROCESSING | Writing records; keep polling. |
FINALIZING | Finishing the retrieval; keep polling. |
CANCELLING | A stop was requested; keep polling. |
COMPLETED | Download the file using downloadUrl. |
ERROR | Read error and code; stop polling. |
CANCELLED | The export stopped; stop polling. |
Errors and next steps
A missing export or one you do not own returns 404. Use the identifier from the start response. Read status until the job ends.Was this page helpful?
