client_has_event_class_m Sample Call and Response
This example shows a call that checks whether a client is subscribed to a specified event notification class, based on the client_has_event_class_m method as defined in plsql_m_r73.yml.
This example covers querying a single event class. It does not cover the other four event classes defined by the method's enumerated values.
Sample call
{
"rest_call": "client_has_event_class_m",
"output_format": "json",
"client_no": 60123,
"auth_key": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
"class_no": 2
}
The rest_call and output_format fields form the envelope that the REST layer adds to every call; they are not part of the method arguments defined in the yml file. The class_no field uses an enumerated value of two, which represents the Orders class, covering creation and modification of orders for inventory items. The other allowable values are one for Accounts, three for Financial Transactions, four for Account Notifications, and five for Usage Monitoring.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"response": ["Order Created", "Order Modified", "Order Cancelled"]
}
An error_code of zero and an error_msg of "OK" indicate that the query completed successfully. The response field is an array of the specific events within the queried class that the client is currently subscribed to; this example shows three representative entries for the Orders class, and the array would list additional event names if the client is subscribed to more events in that class, or it would be empty if the client is not subscribed to any events in that class.