Update the status of a batch. Requesting user must have BillAndBatches Create to update their own batch or to open another user's pending batch. User must have BillsAndBatches Manage to update another user's batch to closed or pending. If opening another user's batch, the requesting user's open batches (if any) will be set to Pending status if LeaveOpenBatchesAsIs is not set or is false. the requesting user's open batches (if any) will be left open if LeaveOpenBatchesAsIs is true. See 'Batch Statuses' section below for more information.
Batch Statuses:
| Batch Status | Description |
|---|---|
| Open | Batch must currently be pending. Un-voids all bills in the batch. |
| Pending | Batch must currently be open. Voids all bills in the batch. |
| Closed | Batch must currently be open or pending. If the batch was pending, un-voids all bills in the batch. |
Request Headers
| Header | Value | Required | Description |
|---|---|---|---|
| ECI-ApiKey | string | Yes | Your API key. See Authentication. |
| Content-Type | application/json | Yes | All requests must specify JSON content type, including the request body. |
Path Parameters
| Name | Description | Type | Required |
|---|---|---|---|
| batchId | ID for the batch to set status | integer (int32) | Required |
Request Body
UpdateBatchStatusRequestV202206
| Property | Description | Type |
|---|---|---|
| batchStatus | The status to set on the batch Required One of ‘Open’, ‘Pending’, ‘Closed’ Case sensitive | string |
| leaveOpenBatchesAsIs | If not provided or false, any open batches for the requesting user will be set to pending, when another pending batch is switched to open If true, any open batches for the requesting user will be left open, when another pending batch is switched to open. Required (defined) | boolean |
| note | The batch note, referred to as a comment in the application when setting state to pending. If opening another user’s batch, the note will only be applied to the requesting user’s open batch that is being set to pending (if any). If null, the note will not be updated. Set to an empty string to remove the current note. Must be between 0 and 255 characters Required (defined) | string |
Example Request Body
{ "batchStatus": "string", "leaveOpenBatchesAsIs": false, "note": "string"
}
Responses
204
No Content
The request succeeded. No content is returned in the response body.