PATCH api/servicecharge/{id}

The purpose of this method is to update selected details of a Service Charge.

Error Messages
  • 400/Bad Request - Invalid FrequencyTypeId - The specified Frequency Type ID is correct. Specify a number between 1-4
  • 400/Bad Request - servicecharge.ChargeId, Invalid ChargeId - Charge ID specified is not valid with Frequency Type ID specified
  • 400/Bad Request - The Last Payment can't be set before the First Payment - Ensure that the Last Payment Date is after the date of the first payment
  • 400/Bad Request - You cannot assign a Service Charge to a hidden Bill Run - The Service Charge is assigned to a hidden bill Run (BillNow, Reporting Office)
  • 400/Bad Request - Only customers can have a Bill Run assigned to them
  • 400/Bad Request - Attempted to set a one-off charge as a rental, or vice-versa - Frequency ID is set to 3 (one-off) whilst Rental is true
  • 400/Bad Request - You cannot set a quantity of 0 - Quantity must be more than 0
  • 401/Unauthorized - You do not have permission to change BillRunId - User does not have permissions to perform this action
  • 404/Not Found - Service Charge with id x not found - Specified Charge ID not assigned to a Service Charge
  • 404/Not Found - The CLI not found for the Service Charge ID provided - The CLI was not found on the Service Charge assigned to the specified ID
  • 404/Not Found - No frequency types found in aBILLity
  • 404/Not Found - No ChargeIds found in aBILLity
  • 404/Not Found - Contract with id x not found - Specified ID is not assigned to a contract. Use the GET-api-contract_search_text metod
  • 404/Not Found - Contract with id x does not belong to the company this Service Charge allocated to - This contract will need to be assigned to the company this service charges is allocated to before assinging the contract to this service charge. Use the PATCH-api-contract-id method
  • 404/Not Found - Bill Run not found - Bill Runs are requried. Use the POST-api-common-billrun method

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id ID number of the Service Charge to be updated integer

Required

Body Parameters

ServiceChargeModify
NameDescriptionTypeAdditional information
Description A unique description for the Service Charge string

String length: inclusive between 0 and 100

ContractId The ID of the contract the Service Charge is on integer

None.

CLI The CLI on this Service Charge string

String length: inclusive between 0 and 17

ChargeId The ID of the Service Charge Type integer

None.

FrequencyTypeId The ID that corresponds to the desired frequency to which the Service Charge will be billed. ID 1 = Annual ID 2 = Monthly ID 3 = One off ID 4 = Quarterly integer

None.

SalesPrice The sales price of the Service Charge decimal number

None.

CostPrice The cost of the Service Charge decimal number

None.

BaselineCost The baseline cost of the Service Charge decimal number

None.

Quantity The number of times this charge valid i.e a Service charge could be valid for 8 quarterly periods integer

None.

FirstPayment The date the Service Charge is first billed date

None.

LastPayment The date that the Service Charge is last billed date

None.

SerialNo The serial number of the Service Charge string

String length: inclusive between 0 and 40

Rental Indicates whether the Service Charge Type is a rental boolean

None.

Import Indiates whether the Service Charge is imported into the system boolean

None.

Suppress Indicates whether the customer bill will display the Service Charge if the value is 0 boolean

None.

BillNow Indicates whether the charge is billed in the current month boolean

None.

Notes Displays any notes for the Service Charge string

None.

BackDatable Allows a charge for calls or service in a previous Billing Period (restricted to 90 days) boolean

None.

RefundRental Allows for a refund of any remaining days for that Service Charge boolean

None.

BillRunId The ID of the Bill Run. integer

None.

Request Formats

application/json, text/json

Sample:
{
  "SkipCLIValidation": true,
  "Description": "sample string 2",
  "ContractId": 1,
  "CLI": "sample string 3",
  "ChargeId": 1,
  "FrequencyTypeId": 1,
  "SalesPrice": 1.0,
  "CostPrice": 1.0,
  "BaselineCost": 1.0,
  "Quantity": 1,
  "FirstPayment": "2025-04-25T14:02:39.933",
  "LastPayment": "2025-04-25T14:02:39.933",
  "SerialNo": "sample string 4",
  "Rental": true,
  "Import": true,
  "Suppress": true,
  "BillNow": true,
  "Notes": "sample string 8",
  "BackDatable": true,
  "RefundRental": true,
  "BillRunId": 1
}

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

None.