- 15.5
Description
The Additional Charge endpoint provides the API consumer with access to methods pertaining to additional charges and related data objects. The endpoint allows consumers to load additional charge data, add new additional charges, cancel additional charges, get additional charges by appointment or ticket, and delete additional charges.
Methods
- Specification
- AddAdditionalCharge
- GetAdditionalCharge
- GetAdditionalChargeByAppointmentID
- GetAdditionalChargeByTicketID
- UpdateAdditionalCharge
- DeleteAdditionalCharge
| URL | base/Workforce/AdditionalCharge/Specification |
|---|---|
| Action | GET |
| Description | Returns a data dictionary that details the available web service methods related to the Additional Charge. |
| Parameters | None |
| Returns | A JSON object with method descriptions |
| Sample Return Object | |
[
{
"HttpAction": "Get",
"MethodName": "GetAdditionalCharge",
"Description": "Returns the record for a single 'AdditionalCharge' given the passed in ID value (see Path).",
"Path": "/AdditionalChargeType/GetAdditionalCharge/222"
},
{
"HttpAction": "Get",
"MethodName": "GetAdditionalChargesByApptID",
"Description": "Returns all 'AdditionalCharges' in the database (see Path) associated with a specific appointment.",
"Path": "/AdditionalCharge/GetAdditionalChargesByApptID/222"
}
]
|
|
| URL | base/Workforce/AdditionalCharge/AddAdditionalCharge | ||
|---|---|---|---|
| Action | POST | ||
| Description | This method allows for create an Additional Charge. The newly created object is returned. The AdditionalChargesID, ApptID, TicketID, Qty, and Billable flag are required fields. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| AdditionalChargesID | Yes | Integer | The Additional Charge Type for the additional charge. |
| ApptID | Yes | Integer | The Appointment ID for the additional charge. |
| TicketID | Yes | Integer | The Ticket ID for the additional charge. |
| Qty | Yes | Integer | The Quantity of the additional charge. |
| Billable | Yes | Boolean | The Billable flag (true or false) of the additional charge. |
| ModelNumber | No | String | Model Number associated with the additional charge |
| Sample JSON Package | |||
{
"AdditionalChargesID": 2
"ApptID": 2
"TicketID": 2
"Qty": 1
"Billable": true
"ModelNumber": "XT5"
}
}
|
|||
| Returns | A JSON AdditionalCharge data object | ||
| Sample Return Object | |||
{
"ID": 16131,
"AdditionalChargesID": 2
"ApptID": 2
"TicketID": 2
"Qty": 1
"Billable": true
"ModelNumber": "XT5"
}
|
|||
| Business Rules | |||
|
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
AdditionalChargesID:
ApptID:
TicketID:
Qty:
Billable:
|
|||
| URL | base/Workforce/AdditionalCharge/GetAdditionalCharge/ID | ||
|---|---|---|---|
| Action | GET | ||
| Description | Returns an AdditionalCharge object when given an ID of a valid AdditionalCharge in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ID | Yes | Integer | An integer value representing the ID of an AdditionalCharge in the M4 database. |
| Returns | A JSON AdditionalCharge data object | ||
| Sample Return Object | |||
{
"ID": 16131,
"AdditionalChargesID": 2
"ApptID": 2
"TicketID": 2
"Qty": 1
"Billable": true
"ModelNumber": "XT5"
}
|
|||
| URL | base/Workforce/AdditionalCharge /GetAdditionalChargeByAppointmentID/AppointmentID | ||
|---|---|---|---|
| Action | GET | ||
| Description | Returns a list of AdditionalCharge objects when given an ID of a valid Appointment in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| AppointmentID | Yes | Integer | An integer value representing the ID of an Appointment in the M4 database. |
| Returns | A JSON AdditionalCharge data object list | ||
| Sample Return Object | |||
[
{
"ID": 16127,
"AdditionalChargesID": 5
"ApptID": 2
"TicketID": 1
"Qty": 1
"Billable": true
"ModelNumber": "XT003"
},
{
"ID": 16131,
"AdditionalChargesID": 2
"ApptID": 2
"TicketID": 9
"Qty": 1
"Billable": true
"ModelNumber": "XT5"
}
]
|
|||
| URL | base/Workforce/AdditionalCharge /GetAdditionalChargeByTicketID/TicketID | ||
|---|---|---|---|
| Action | GET | ||
| Description | Returns a list of AdditionalCharge objects when given an ID of a valid Ticket in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| TicketID | Yes | Integer | An integer value representing the ID of a Ticket in the M4 database. |
| Returns | A JSON AdditionalCharge data object list | ||
| Sample Return Object | |||
[
{
"ID": 16127,
"AdditionalChargesID": 5
"ApptID": 4
"TicketID": 5
"Qty": 1
"Billable": true
"ModelNumber": "XT003"
},
{
"ID": 16131,
"AdditionalChargesID": 2
"ApptID": 4
"TicketID": 5
"Qty": 1
"Billable": true
"ModelNumber": "XT5"
}
]
|
|||
| URL | base/Workforce/AdditionalCharge/UpdateAdditionalCharge | ||
|---|---|---|---|
| Action | POST | ||
| Description | This method allows for the updating of an Additional Charge. The updated object is returned. The ID, Code and Description are required fields. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| AdditionalChargeID | Yes | Integer | The Ticket Code for the ticket. |
| Sample JSON Package | |||
{
"ID": 16131,
"AdditionalChargesID": 2
"ApptID": 4
"TicketID": 5
"Qty": 1
"Billable": true
"ModelNumber": "XT5"
}
|
|||
| Returns | A JSON Additional Charge Type data object | ||
| Sample Return Object | |||
{
"ID": 16131,
"AdditionalChargesID": 2
"ApptID": 4
"TicketID": 5
"Qty": 1
"Billable": true
"ModelNumber": "XT5"
}
|
|||
| Business Rules | |||
|
Any violations of these business rules result in an appropriate error message being returned to the API consumer. ID:
AdditionalChargesID:
ApptID:
TicketID:
Qty:
Billable:
|
|||
| URL | base/Workforce/AdditionalCharge/DeleteAdditionalCharge/ID | ||
|---|---|---|---|
| Action | POST | ||
| Description | Deletes an Additional Charge. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ID | Yes | Integer | The ID of a valid Additional Charge |
| 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 with ID [7] was Deleted successfully." |
|||
| Business Rules | |||
|
ID:
|
|||