Manage a calculated bill's version history All calculated bill versions to save on this account and meter relationship should be passed If versionId is passed, this version will be updated to the request body values If copyVersionId is passed, a new version will be created and all instructions and inputs on the copyVersionId will be copied If versionId and copyVersionId are null a new version will be created Versions cannot overlap If a calculated bill version currently exists in the database, but is not passed in it will be deleted Only versions that are not currently associated with any bills can be deleted If any part of the create, update, or delete process fails, the entire process is rolled back
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 |
|---|---|---|---|
| accountId | ID of the account to receive calculated bill details | integer (int32) | Required |
| meterId | ID of the meter to receive calculated bill details | integer (int32) | Required |
Request Body
Array of:
DistributionVersionManage
| Property | Description | Type |
|---|---|---|
| beginPeriod | Begin period for the version in the format YYYYMM Cannot overlap any existing versions on this account and meter for the chargeback type being managed Required Valid billing period between 190001 and 300001 | integer (int32) |
| copyVersionId | An existing version id on this account meter to copy A new version will be created and all instructions will be copied to the new version CopyVersionId chargeback type must match the chargeback type being managed (Either “Split” or “Calculation”). CopyVersionId must exist on the account and meter relationship being updated Required (defined) Only one of VersionId, CopyVersionId can be set | integer (int32) |
| endPeriod | End period for the version in the format YYYYMM null value means continuing indefinitely Cannot overlap any existing versions on this account and meter for the chargeback type being managed Valid billing period between 190001 and 300001 NULL Valid Must be greater than or equal to BeginPeriod Required (defined) | integer (int32) |
| name | Name given to the version Name must be unique for a particular account and meter Required Must be between 0 and 64 characters | string |
| versionId | Version id to update VersionId must exist on the account and meter relationship being updated Required (defined) Only one of VersionId, CopyVersionId can be set | integer (int32) |
| workflowStepId | Workflow step this version will belong to The workflow step type must match the chargeback type being managed (Either “Split” or “Calculation”) Required (defined) | integer (int32) |
Example Request Body
[
{ "beginPeriod": 1, "copyVersionId": 1, "endPeriod": 1, "name": "string", "versionId": 1, "workflowStepId": 1
}
]
Responses
200
OK
The request succeeded and the response body contains the requested data.
Response Body Parameters
Array of:
DistributionVersionResponse
| Property | Description | Type | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| account | AccountChildWithType | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
AccountChildWithType properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| beginPeriod | Begin period for the version | integer (int32) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| chargebackType | The chargeback type. Either “Split” or “Calculation” | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| endPeriod | End period for the version null value means continuing indefinitely | integer (int32) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| hasBills | Do any bills exist that were created by this version? A version cannot be deleted if there are any existing bills that were created using this version | boolean | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| meter | MeterChild | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MeterChild properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| versionId | Identifier for the version | integer (int32) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| versionInfo | Name given to a version | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| workflow | ChargebackWorkflowStepChild | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ChargebackWorkflowStepChild properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example Response
[
{ "account": { "accountCode": "string", "accountId": 1, "accountInfo": "string", "accountType": {}, "active": false, "hasCalculatedMeter": false, "hasSplitChildMeter": false, "hasSplitParentMeter": false, "hasSubAccount": false, "isSubAccount": false, "vendor": {}
}, "beginPeriod": 1, "chargebackType": "string", "endPeriod": 1, "hasBills": false, "meter": { "active": false, "commodity": {}, "isCalculatedMeter": false, "isEsaCalculatedMeter": false, "isSplitChildMeter": false, "isSplitParentMeter": false, "meterCode": "string", "meterId": 1, "meterInfo": "string", "meterType": {}, "serialNumber": "string"
}, "versionId": 1, "versionInfo": "string", "workflow": { "chargebackWorkflow": {}, "chargebackWorkflowStepDescription": "string", "chargebackWorkflowStepId": 1, "chargebackWorkflowStepInfo": "string", "chargebackWorkflowStepOrder": 1, "chargebackWorkflowStepType": "string"
}
}
]