Additional Charge Type

  • 15.5
This article is may not be up to date with the latest stable release of M4.

Description

The Additional Charge Type endpoint provides the API consumer with access to methods pertaining to additional charge types and related data objects. The endpoint allows consumers to load additional charge type data, add new additional charge types, update additional charge types, and delete additional charge types.

Methods

URL base/Workforce/AdditionalChargeType/Specification
Action GET
Description Returns a data dictionary that details the available web service methods related to the Additional Charge Type.
Parameters None
 Returns  A JSON object with method descriptions
Sample Return Object
[
  {
    "HttpAction": "Get",
    "MethodName": "GetAdditionalChargeType",
    "Description": "Returns the record for a single 'AdditionalChargeType' given the passed in ID value (see Path).",
    "Path": "/AdditionalChargeType/GetAdditionalChargeType/2"
  },
  {
    "HttpAction": "Get",
    "MethodName": "GetAdditionalChargeTypes",
    "Description": "Returns all 'AdditionalChargeTypes' in the database (see Path).",
    "Path": "/AdditionalChargeType/GetAdditionalChargeTypes"
  }
]
URL base/Workforce/AdditionalChargeType/AddAdditionalChargeType
Action POST
Description This method allows for the creation of an Additional Charge Type. The newly created object is returned. The Code and Description are required fields.
Parameters
Name Required? Type Description
Code Yes String The Code for the Additional Charge Type.
Description Yes String The Description of the Additional Charge Type.
Sample JSON Package
{
      "Code": "XX1",
      "Description": "Example Description"
}
Returns A JSON AdditionalChargeType data object
Sample Return Object
{
      "ID": 9,
      "Code": "XX1",
      "Description": "Example Description"
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.

Description:
  • The Description must be unique among all existing Additional Charge Types.
URL base/Workforce/AdditionalChargeType/GetAdditionalChargeType/ID
Action GET
Description Returns an AdditionalChargeType object when given an ID of a valid AdditionalChargeType in the M4 database.
Parameters
Name Required? Type Description
ID Yes Integer An integer value representing the ID of an AdditionalChargeType in the M4 database.
Returns A JSON AdditionalChargeType data object
Sample Return Object
{
      "ID": 9,
      "Code": "XX1",
      "Description": "Example Description"
}
URL base/Workforce/AdditionalChargeType/GetAdditionalChargeTypes
Action GET
Description Returns a list of all valid AdditionalChargeType objects in the M4 database.
Parameters None
Returns A JSON AdditionalChargeType data object list
Sample Return Object list
[
{
      "ID": 9,
      "Code": "XX1",
      "Description": "Example Description A"
},
{
      "ID": 10,
      "Code": "X10",
      "Description": "Example Description B"
}
]
URL base/Workforce/AdditionalChargeType/UpdateAdditionalChargeType
Action POST
Description This method allows for the updating of an Additional Charge Type. The updated object is returned. The ID, TCode and Description are required fields.
Parameters
Name Required? Type Description
ID Yes Integer The ID for the Additional Charge Type.
Code Yes String The Code for the Additional Charge Type.
Description Yes String The unique Description of the Additional Charge Type.
Sample JSON Package
{
      "ID": 9,
      "Code": "XXC4",
      "Description": "Example Description C"
}
Returns A JSON Additional Charge Type data object
Sample Return Object
{
      "ID": 9,
      "Code": "XXC4",
      "Description": "Example Description C"
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.

Description:
  • The Description must be unique among all existing Additional Charge Types.
URL base/Workforce/AdditionalChargeType/DeleteAdditionalChargeType/ID
Action POST
Description Deletes an Additional Charge Type.
Parameters
Name Required? Type Description
ID Yes Integer The ID of a valid Additional Charge Type
Sample JSON Package
{
      "ID": 175
}
Returns A JSON object with a message either the confirming the deletion or notifying the user of an invalid ID.
Sample Return Object
"The Additional Charge Type with ID [7] was Deleted successfully."
Business Rules
ID:
  • Represents the ID of the Additional Charge Type to be Deleted. Must be greater than 0, and not in use for any appointment/ticket.

Was this article helpful?

Related Articles