The bulk write-off procedure leverages the bulk job API to write-off invoices in bulk based on the invoice ID.
Prerequisites
Before the bulk invoice write-off can be initiated, you must have bulk jobs activated. Contact Fusebill support for information related to activating bulk jobs.
Create Bulk Job
To initiate a bulk job, complete the following API call:
Post https://secure.fusebill.com/v1/bulkwriteoff {
"accountUploadType": "BulkWriteOff",
"data": [{invoiceID1},{invoiceID2},{invoiceID3},{invoiceID4},{...}]
}
where {invoiceID} is the invoice ID integer that is to be written off.
Note: The bulk write-off API only supports the full write off of an invoice.
The return JSON will look similar to the following:


Note: Make note of the id value to reference the correct bulk job ID. In this example, the bulk job ID is 373315.
Poll Bulk Job
Once the bulk job has been created, you can view the details of the job. To view the job, complete the following API call:
GET https://secure.fusebill.com/v1/BulkApi/{BulkJobID}?view=full
where {bulkJobID} is the bulk job ID returned from the previous step.
The returned JSON provides specific details about the job.
Process Bulk Job
To process the bulk write off, complete the following API call:
POST https://secure.fusebill.com/v1/BulkApi/Process/
{
"id":{bulkJobID}
}
Optional: Job Cancellation
If you need to cancel a bulk write-off, use the following API call:
Post https://secure.fusebill.com/v1//BulkApi/Cancel/{bulkJobID}
Updated about a month ago