Get Customer Billing Cycle Definition
The Get Customer Billing Cycle Definition (BCD) API is used to retrieve information of the BCD which were assigned to a sub-customer.
|
HTTP URL |
|
|---|---|
|
GET |
api/v2/customer/{id}/bcd |
Customer {id} can be one of the requestor’s direct sub customers.
Eligibility
The Requestor is eligible to request information on BCD which was assigned to his sub-accounts.
API Request
Not applicable
API Response
Response Structure
| Parameter | Type | M/O/CM | Description |
|---|---|---|---|
| errorCode | String | O | Failure code. See list below, under ‘Error Codes’ section |
| errorMessage | String | O | Failure detailed description. See list below, under ‘Error Codes’ section |
| content | Object | O | Array of main response body object. Displayed when an API call was successful. For a failure it will be empty. |
| pageable | Object | O | Paging information object. Displayed when an API call was successful. For a failure it will be empty. |
Content
| Parameter | Type | M/O/CM | Description |
|---|---|---|---|
| id | UUID | M | Billing Cycle Definition Id |
| name | String | M | Billing Cycle Definition name |
| description | String | O | General information on the Billing Cycle |
| periodType | String | M | The Billing Cycle period type. ENUM valid values:
|
| startDay | Numeric | M |
The starting day of the billing cycle period type ‘periodType’.
|
| duration | Numeric | M | The periodType number of iterations concluding a single cycle of the Billing Cycle. For example: Period Type set to WEEKLY Start Day set to 1; Duration set to ‘3’; Resolution: A single billing cycle starts on Monday and lasts 3 weeks. |
| invoiceFormat | String | M | The invoice format, either PDF or XML formats, or both formats simultaneously. ENUM valid values: XML, PDF, ALL |
| isAutomatic | Boolean | M | Future Feature. Indicates if the Billing Cycle steps will be processed manually or automatically without any human intervention. True – Automatic False - Manual Currently only ‘Automatic’ processing is valid, therefore the API always returns ‘true’ |
| isExport | Boolean | M | Indicates if the invoice files shall be exported to an external customer directory. External directory location is defined per integration process. |
| nextBillingCycleDate | datetime | O | The date and time of the upcoming billing cycle. Calculated field. |
Error Codes
In addition to the general success and failure codes, the following error codes are possible.
| Code | Message |
|---|---|
| GLOBAL_1001 | Service unavailable. Please try again |
| CUSTOMER_1002 | Customer does not exist |
| CUSTOMER_1006 | Failed to retrieve customer details. |
Examples
Request Body
Copy
{
}
Response Body: Success (ACK)
Copy
{
"errorCode": "",
"errorMessage": "",
"content": [
{
"id": "e291c23a-2b2b-41dd-895e-b5c145c767de",
"name": "BCD11-Monthly-1-XML",
"description": "Monthly XML invoicing",
"periodType": "MONTHLY",
"startDay": 1,
"duration": 1,
"invoiceFormat": "XML",
"isAutomatic": true,
"isExport": true,
"nextBillingCycleDate": "2023-10-01 00:00:00"
}
],
"pageable": null
}
Response Body: Failure(s) (NAK)
Copy
{
"errorCode": "GLOBAL_1001",
"errorMessage": "Service unavailable. Please try again",
"content": "",
"pageable": ""
}