Update Account’s Bill Cycle

The UpdateAccountBillCycle API in OCS.io allows for the seamless modification of an account’s billing cycle, providing flexibility to align with evolving business needs.

API Overview

Fields Required for Updating Account’s Billing Cycle

The following table lists and describes the fields required to update an account’s billing cycle through the UpdateaccountBillCycle API:

Field Description

account

ID (Ref ID / External ID) of the Account.

billCycle

New Bill Cycle. Bill Cycle must be configured.

billingDay

Day of the Billing in case Billing Cycle per Account is individual.

billingMonth

Month of the Billing in case Billing Cycle per Account is individual.

billingYear

Year of the Billing in case Billing Cycle per Account is individual.

validFrom

Timestamp from when the new Bill Cycle is valid. If null, change is immediate.

Detailed API documentation and endpoint specifics are available here.

Request Validations

The following validations are performed when updating an account’s bill cycle:

  • Account must be provided in the request, it must be already created in the system and must not be in Deactivated State.

Update Account’s Bill Cycle Examples

1. Update Account’s Bill Cycle to Monthly Cycle

Use the following request’s body to update an account’s bill cycle:

{
  "requestId": "{{$guid}}",
  "account": {
    "externalId": "account_external_id"
  },
  "billCycle": "new_bill_cycle_code",
  "billingDay": null,
  "billingMonth": null,
  "billingYear": null,
  "validFrom": "2024-05-01T00:00:00+02:00"
}

The outcome of the API call is as follows:

  • The bill cycle of the account with external ID account_external_id is updated to new_bill_cycle_code.

  • The billing day, month, and year are not updated and remain as they were.

  • The new bill cycle is valid from 2024-05-01T00:00:00+02:00.

2. Update Account’s Bill Cycle to Yearly Cycle

Use the following request’s body to update an account’s bill cycle to a yearly cycle:

{
  "requestId": "{{$guid}}",
  "account": {
    "externalId": "account_external_id"
  },
  "billCycle": "new_yearly_bill_cycle_code",
  "billingDay": null,
  "billingMonth": 5,
  "billingYear": null,
  "validFrom": "2024-05-01T00:00:00+02:00"
}

The outcome of the API call is as follows:

  • The bill cycle of the account with external ID account_external_id is updated to new_yearly_bill_cycle_code.

  • The billing day and year are not updated and remain as they were.

  • The billing month is updated to 5, meaning the bill cycle will start in May.

  • The new bill cycle is valid from 2024-05-01T00:00:00+02:00.