Cancel People Import
curl --request POST \
--url https://api-ai.zixflow.com/api/data/people/v1/import/{import_id}/cancel \
--header 'x-api-key: <x-api-key>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://api-ai.zixflow.com/api/data/people/v1/import/{import_id}/cancel"
headers = {
"x-api-key": "<x-api-key>",
"x-workspace-id": "<x-workspace-id>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'x-workspace-id': '<x-workspace-id>'}
};
fetch('https://api-ai.zixflow.com/api/data/people/v1/import/{import_id}/cancel', 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-ai.zixflow.com/api/data/people/v1/import/{import_id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$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-ai.zixflow.com/api/data/people/v1/import/{import_id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-ai.zixflow.com/api/data/people/v1/import/{import_id}/cancel")
.header("x-api-key", "<x-api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-ai.zixflow.com/api/data/people/v1/import/{import_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Import cancelled successfully",
"data": {
"import_id": "68f0c1a2b3c4d5e6f7a8b9c0",
"status": "cancelled"
}
}
{
"error": true,
"message": "Unauthorized"
}
{
"success": false,
"message": "import not found"
}
{
"success": false,
"message": "import cannot be cancelled from status in-progress"
}
People
Cancel People Import
Cancel a queued people CSV import and refund one daily import slot
POST
/
api
/
data
/
people
/
v1
/
import
/
{import_id}
/
cancel
Cancel People Import
curl --request POST \
--url https://api-ai.zixflow.com/api/data/people/v1/import/{import_id}/cancel \
--header 'x-api-key: <x-api-key>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://api-ai.zixflow.com/api/data/people/v1/import/{import_id}/cancel"
headers = {
"x-api-key": "<x-api-key>",
"x-workspace-id": "<x-workspace-id>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'x-workspace-id': '<x-workspace-id>'}
};
fetch('https://api-ai.zixflow.com/api/data/people/v1/import/{import_id}/cancel', 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-ai.zixflow.com/api/data/people/v1/import/{import_id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$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-ai.zixflow.com/api/data/people/v1/import/{import_id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-ai.zixflow.com/api/data/people/v1/import/{import_id}/cancel")
.header("x-api-key", "<x-api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-ai.zixflow.com/api/data/people/v1/import/{import_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Import cancelled successfully",
"data": {
"import_id": "68f0c1a2b3c4d5e6f7a8b9c0",
"status": "cancelled"
}
}
{
"error": true,
"message": "Unauthorized"
}
{
"success": false,
"message": "import not found"
}
{
"success": false,
"message": "import cannot be cancelled from status in-progress"
}
Description
Cancels a people import only if status isin-queue. Refunds one daily import slot.
Once the job is in-progress, completed, failed, or already cancelled, cancel returns 409.
Headers
Path Parameters
Response
{
"success": true,
"message": "Import cancelled successfully",
"data": {
"import_id": "68f0c1a2b3c4d5e6f7a8b9c0",
"status": "cancelled"
}
}
{
"error": true,
"message": "Unauthorized"
}
{
"success": false,
"message": "import not found"
}
{
"success": false,
"message": "import cannot be cancelled from status in-progress"
}