Occasionally it may be necessary for a payroll system to modify or delete a previously processed payroll document. WFH integrators can modify a batch by deleting a previously posted document and then posting a new document to the batch, if desired. The fileId is needed to delete the previously posted document and the batchId is needed to upload the new document.
If you don’t know the batchId, call the Get Document Batches endpoint to get the existing batches, loop through those batches and find the one in question. Once you have the batchId, a call to the Get Document Batch endpoint with that batchId will return an array of currently uploaded documents (as well as details about that batch such as pay period date, check date, etc.). The array of documents will include the fileId for each document, which is needed if you want to delete a document and replace it with another one. Each document will also have an associated employeeId which can be used for additional verification that you are working with the correct file.