Cancel Bulk Job

This call is used to cancel a bulk job. It does this by marking all incomplete records as FailedProcessing with the message "Manually marked as Failed."

This allows for a new job to be created

Path Parameters

PropertyTypeDescription
bulkJobIDNumberThe Fusebill generated ID which uniquely identifies the bulk job
Examples
curl –X POST https://secure.fusebill.com/v1/BulkApi/Cancel/{bulkJobID}
-H "Content-Type: application/json" \ 
-H "Authorization: Basic {APIKey}" \
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/BulkApi/Cancel/{bulkJobID}");
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic " + apiKey);
//Set request method
request.Method = "POST";
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
}
#Import library JSON
import json
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in your URI, Payload and Headers
r = requests.post('https://secure.fusebill.com/v1/BulkApi/Cancel/{bulkJobID}', headers=headers)
print(r.content)
This call takes no JSON payload
Response
{
    "records": [
        {
            "accountUploadId": 373335,
            "status": "FailedProcessing",
            "data": "13789624",
            "details": "Manually marked as Failed.",
            "createdEntityId": null,
            "id": 3456502,
            "uri": null
        },
        {
            "accountUploadId": 373335,
            "status": "FailedProcessing",
            "data": "13789632",
            "details": "Manually marked as Failed.",
            "createdEntityId": null,
            "id": 3456503,
            "uri": null
        }
    ],
    "accountId": 9923946,
    "type": "BulkWriteOff",
    "status": "ProcessedWithErrors",
    "createdTimestamp": "2020-12-07T14:56:59",
    "completedTimestamp": "2020-12-07T14:56:59.947",
    "totalRecords": 2,
    "successfulRecords": 2,
    "failedRecords": 0,
    "totalProcessedRecords": 2,
    "processedRecords": 0,
    "failedProcessedRecords": 2,
    "importingTimestamp": null,
    "processedTimestamp": null,
    "fileName": "BulkWriteOff-20201207.csv",
    "reference": "Bulk write off",
    "relatedId": null,
    "internalAutomatedFlag": false,
    "modifiedTimestamp": "0001-01-01T00:00:00",
    "id": 373335,
    "uri": null
}
{
    "ErrorId": 0,
    "HttpStatusCode": 400,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Account upload status ProcessedWithErrors, is not a valid status for cancellation."
        }
    ]
}
Language
Authorization