Cancel remaining batch requests
curl --request POST \
--url https://api.companyenrich.com/v2/batches/{id}/cancel \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.companyenrich.com/v2/batches/{id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.companyenrich.com/v2/batches/{id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "<string>",
"status": "pending",
"progress": {
"total": 123,
"pending": 123,
"running": 123,
"succeeded": 123,
"failed": 123,
"unknown": 123,
"cancelled": 123
},
"creditsCharged": 123,
"createdAt": "2023-11-07T05:31:56Z",
"statusUrl": "<string>",
"resultsUrl": "<string>",
"rawResultsUrl": "<string>",
"recordCount": 123,
"recordLimit": 123,
"completedAt": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Batches
Cancel remaining batch requests
Stops remaining work. Already charged results remain downloadable. Cancelling an owned batch that is already terminal is harmless.
POST
/
v2
/
batches
/
{id}
/
cancel
Cancel remaining batch requests
curl --request POST \
--url https://api.companyenrich.com/v2/batches/{id}/cancel \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.companyenrich.com/v2/batches/{id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.companyenrich.com/v2/batches/{id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "<string>",
"status": "pending",
"progress": {
"total": 123,
"pending": 123,
"running": 123,
"succeeded": 123,
"failed": 123,
"unknown": 123,
"cancelled": 123
},
"creditsCharged": 123,
"createdAt": "2023-11-07T05:31:56Z",
"statusUrl": "<string>",
"resultsUrl": "<string>",
"rawResultsUrl": "<string>",
"recordCount": 123,
"recordLimit": 123,
"completedAt": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Authorizations
Response
OK