cancel_recurring_credits_m Sample Call and Response
This example shows a call that cancels a recurring credit assigned to a master plan instance, based on the cancel_recurring_credits_m method as defined in plsql_m_r73.yml.
This example covers identifying the account and a specific master plan instance, narrowing the cancellation to one recurring credit, and supplying cancellation comments. It does not cover identifying the account by userid or by client_acct_id, and it does not cover a call that omits recurring_credit_no, which would cancel all recurring credits found on the account or plan instance.
Sample call
{
"rest_call": "cancel_recurring_credits_m",
"output_format": "json",
"client_no": 60123,
"auth_key": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
"acct_no": 3005567,
"master_plan_instance_no": 771234,
"recurring_credit_no": [55214],
"cancel_comments": "Loyalty discount recurring credit cancelled at customer request following a plan downgrade."
}
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 account is identified with acct_no; this method accepts three mutually exclusive ways of identifying the account or user, acct_no, userid, and client_acct_id, and this example uses only acct_no. The master_plan_instance_no field is optional and narrows the cancellation to recurring credits on a specific master plan instance rather than the whole account; its alternative form, client_master_plan_instance_id, is not used here. The recurring_credit_no field is a repeatable array of Aria-assigned recurring credit identifiers; this example shows one entry, but the array can contain multiple identifiers to cancel several recurring credits in one call. The cancel_comments field is optional and records the reason for the cancellation.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"error_codes": [
{
"out_acct_no": 3005567,
"out_master_plan_instance_no": 771234,
"recur_credit_no": 55214,
"error_code": 0,
"error_msg": "OK"
}
]
}
An error_code of zero and an error_msg of "OK" at the top level indicate that the overall call succeeded. The error_codes array reports a result for each recurring credit processed; this example shows one entry because the sample call requested cancellation of one recurring credit, but the array would contain one entry per recurring credit if more than one had been requested. Each entry's own error_code and error_msg reflect the result for that specific record. The out_client_mp_instance_id field, which would report a client-defined plan instance identifier, is left out of this entry because the sample call identified the plan instance using master_plan_instance_no instead.