create_service_m Sample Call and Response
This example shows a client creating a new recurring service that is taxable and tied to a previously created service location. It is based on the create_service_m method as defined in methods_m_r73.yml, Admin Tools API.
This example includes every required field, plus a representative set of optional fields covering general ledger coding, taxation, a service location assignment, and one supplemental object field. It does not attempt to show every optional field the method accepts, such as usage_type, which applies only when service_type is Usage-Based.
Sample call
{
"rest_call": "create_service_m",
"output_format": "json",
"client_no": 700123,
"auth_key": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"service_name": "Premium Support Plan",
"service_type": "Recurring",
"gl_cd": "4000-SVC",
"rev_rec_ind": 1,
"ar_gl_cd": "1200-AR",
"taxable_ind": 1,
"tax_group": 205,
"client_service_id": "SVC-PREMSUPP-001",
"svc_location_no": 30045,
"commodity_cd": "81112500",
"allow_service_credits": "Y",
"supplemental_obj_field": [
{
"field_no": 88,
"field_value": ["Gold Tier"]
}
]
}
The rest_call and output_format fields are not part of the method’s own documented arguments. The REST layer adds them to every call: rest_call names the method being invoked, and output_format requests a JSON response rather than the default WDDX format. Within the method’s own arguments, client_no and auth_key identify and authenticate the client making the call. The three required fields are service_name, service_type, and gl_cd. This example sets service_type to "Recurring," meaning the service carries recurring charges, as opposed to the other available values such as Usage-Based or Order-Based. Because rev_rec_ind is set to one, ar_gl_cd becomes required and is supplied here; deferred_ind is left out, so def_gl_cd is not needed. Because taxable_ind is set to one, indicating the service is taxable, tax_group becomes required; this example supplies the Aria-assigned tax_group identifier rather than the alternative client_tax_group_id. Similarly, svc_location_no identifies the service location by its Aria-assigned number, reusing the identifier a create_service_location_m call would return, rather than the alternative client_svc_location_id. The supplemental_obj_field entry identifies one supplemental object field by its Aria-assigned field_no rather than the alternative field_name, and supplies its value as a single-element array, since field_value itself accepts more than one value per field. A call with more supplemental fields would repeat this pattern with additional entries in the array.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"service_no": 583210
}
An error_code of zero, paired with an error_msg of “OK,” indicates that Aria created the service successfully. The service_no field returns the Aria-assigned unique identifier for the new service. The method’s returns block consists only of these three fields, so there is no additional output to show.