Calculates the recommended billing period (YYYYMM) for a bill based on the account's billing cycle and the bill's date range
Use this endpoint when creating or editing a bill to auto-populate the billing period field. Given an account and a bill’s
start/end date range, this returns the appropriate billing period in YYYYMM format (e.g., 202401 for January 2024).
The recommendation is based on the account’s configured billing cycle and the midpoint or end of the date range.
Both startDate and endDate query parameters are required.
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. |
Path Parameters
| Name | Description | Type | Required |
|---|---|---|---|
| accountId | The unique numeric identifier of the account for which the bill is being created or edited | integer (int32) | Required |
Query Parameters
| Name | Description | Type | Required |
|---|---|---|---|
| startDate | The bill’s service start date (required). Format: date-only (e.g., 2024-01-01) | string (date-time) | Optional |
| endDate | The bill’s service end date (required). Format: date-only (e.g., 2024-01-31) | string (date-time) | Optional |
Responses
200
OK
The request succeeded and the response body contains the requested data.
Response Body Parameters
SingleValue
| Property | Description | Type |
|---|---|---|
| value | The computed value. The type and format depend on the endpoint returning it (e.g., an integer billing period in YYYYMM format). | object |
Example Response
{ "value": {}
}
404
Not Found
The requested resource was not found. Verify the ID or path is correct.