post https://secure.fusebill.com/v1/BulkApi/Process
This call is used to process a job which has been validated. The outcome of that processing is specific to the job type.
Request Parameters
Property | Type | Description | Required |
---|---|---|---|
id | Number | The Fusebill generated ID which uniquely identifies the bulk job. | Yes |
Examples
curl –X POST https://secure.fusebill.com/v1/BulkApi/Process
-H "Content-Type: application/json" \
-H "Authorization: Basic {APIKey}" \
-d "{id:123456}"
//Json Payload
string jsonData =
"{id:123456}";
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/BulkApi/Process");
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic " + apiKey);
//Set request method
request.Method = "POST";
//Add the json data to request
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(jsonData);
streamWriter.Flush();
streamWriter.Close();
}
//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 a dictionary to the Payload parameter
payload = {'id':123456}
#Pass in your URI, Payload and Headers
r = requests.post('https://secure.fusebill.com/v1/BulkApi/Process', data=json.dumps(payload), headers=headers)
print(r.content)
{
"id": 373321
}
Response
{
"accountId": 9923946,
"type": "BulkWriteOff",
"status": "ProcessedWithErrors",
"createdTimestamp": "2020-12-07T14:26:21",
"completedTimestamp": "2020-12-07T14:26:21.323",
"totalRecords": 3,
"successfulRecords": 3,
"failedRecords": 0,
"totalProcessedRecords": 3,
"processedRecords": 0,
"failedProcessedRecords": 3,
"importingTimestamp": "2020-12-07T14:51:04.02",
"processedTimestamp": "2020-12-07T14:51:05.097",
"fileName": "BulkWriteOff-20201207.csv",
"reference": "Bulk write off",
"relatedId": null,
"internalAutomatedFlag": false,
"modifiedTimestamp": "0001-01-01T00:00:00",
"id": 373334,
"uri": null
}
{
"ErrorId": 0,
"HttpStatusCode": 400,
"Errors": [
{
"Key": "Api Error",
"Value": "Cannot process Upload 373321 that is not in status Validated or ValidatedWIthErrors"
}
]
}