create_installment_term_m Sample Call and Response
This example shows a call to create_installment_term_m that defines a twelve-month, interest-free installment term for laptop purchases, based on methods_m_r73.yml, Admin Tools API.
This example covers every required field plus a representative set of optional fields for an independent (non-aligned) installment schedule with a lump sum tax charge and one locale translation. It does not cover the aligned-to-master-plan scenario or every optional field the method accepts.
Sample call
{
"rest_call": "create_installment_term_m",
"output_format": "json",
"client_no": 900123,
"auth_key": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
"client_installment_term_id": "LAPTOP-12MO",
"installment_term_name": "Laptop 12-Month Installment Plan",
"installment_term_description": "Twelve-month, interest-free installment plan for laptop purchases.",
"aligned_installment": "N",
"term_type": "M",
"term_length": 12,
"installment_term_interval": 1,
"days_to_start": 0,
"days_until_due": 10,
"lump_sum_type": "T",
"lump_sum_days": 3,
"lump_sum_days_until_due": 5,
"installment_translations": [
{
"locale_no": 10250,
"installment_term_name": "Plan de paiement en douze mensualites pour ordinateur portable",
"description": "Plan de paiement de douze mois sans interet pour l'achat d'un ordinateur portable."
}
]
}
The rest_call and output_format fields are added by the REST layer and are not part of the method’s own documented arguments; the same is true for every sample on this page. The client_no and auth_key fields come from the shared param_defaults block rather than the method’s own declaration, and both are required. The aligned_installment field is set to “N”, meaning the installment has its own schedule and due dates rather than being aligned with an existing master plan instance; the other allowable value, “Y”, aligns the installment with the master plan instance’s anniversary invoice instead. Because aligned_installment is “N”, days_to_start and days_until_due apply (they are ignored when aligned_installment is “Y”), and the aligned_lump_sum field, which only applies when aligned_installment is “Y”, is left out. The lump_sum_type field is set to “T”, meaning the lump sum represents purchase tax only; the other allowable value, “P”, represents a proportionately split charge and tax amount and would require the companion lump_sum_amount field, which this example therefore omits. The installment_translations array supplies one translated locale entry; a real call could include additional entries, one per locale, each with its own locale_no.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"installment_term_no": 48213,
"client_installment_term_id": "LAPTOP-12MO"
}
An error_code of zero and an error_msg of “OK” indicate that Aria created the installment term successfully. The installment_term_no field is the Aria-assigned numeric identifier for the new installment term, returned alongside the client_installment_term_id you supplied on the call. This example leaves out installment_term_interval validation errors, the aligned-installment scenario, and any additional locale translations beyond the single one shown, since only one representative translation entry is included here.