PUT api/servicechargetype/hardware/{id}

This method updates hardware on a Service Charge Type

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 The Hardware Product ID integer

Required

Body Parameters

HardwareServiceChargeTypePatch
NameDescriptionTypeAdditional information
ProductCode The code for the hardware product string

Required

String length: inclusive between 0 and 50

Description Unique description used to identify the Hardware product string

Required

String length: inclusive between 0 and 100

DefaultSalePrice The default sale price of the hardware product decimal number

None.

DefaultCost The default cost of the hardware product. This can only be set if the View Default Cost permission is enabled decimal number

None.

DefaultBaseLineCost The default baseline cost of the hardware product. This can only be set when the View Default Baseline Cost permission is enabled decimal number

None.

Nominal The associated nominal code string

String length: inclusive between 0 and 50

DefaultSupplier The default supplier of the hardware integer

None.

Request Formats

application/json, text/json

Sample:
{
  "ProductCode": "sample string 1",
  "Description": "sample string 2",
  "DefaultSalePrice": 1.0,
  "DefaultCost": 1.0,
  "DefaultBaseLineCost": 1.0,
  "Nominal": "sample string 3",
  "DefaultSupplier": 1
}

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

None.