create_instance_contract_m Sample Call and Response
This example shows a typical call to create_instance_contract_m that creates a twelve-month contract tied to one specific master plan instance on an account, along with a representative response. Unlike a universal contract, which applies across every plan instance on the account, an instance contract binds only the specific plan instances named in the request. The example is based on the method definition in plsql_m_r73.yml.
This example includes every field required to create a working instance contract and a representative set of commonly used optional fields; it does not cover contract rollover to a different plan or rate schedule (rollover_plan_no and related fields, and contract_rollover_custom_rates) or a multi-plan contract covering more than one plan instance.
Sample call
{
"rest_call": "create_instance_contract_m",
"output_format": "json",
"client_no": 10023,
"auth_key": "8f3e2b1a9c7d4e6f0a1b2c3d4e5f6789",
"acct_no": 3300457,
"client_contract_id": "CONTRACT-INST-2026-001",
"type_no": 2,
"start_date": "2026-08-01",
"duration_type": 3,
"duration_length": 12,
"cancel_fee": 150.00,
"create_comments": "Twelve-month minimum term on the Enterprise plan instance agreed to at upgrade.",
"do_auto_discard": "true",
"contract_plan_instances": [
{
"plan_instance_no": 8801122
}
]
}
rest_call and output_format are added by the REST layer common to every Core API call; they do not appear among the method's own documented arguments. acct_no identifies the account the contract is created on; client_acct_id is the client-defined alternative, and only one of the two is supplied, not both.
This example expresses the contract length using duration_type and duration_length together, rather than the deprecated length_months field or the alternative end_date field; only one of these approaches is supplied per contract. duration_type is set to 3, meaning the value in duration_length is expressed in months, so this contract runs for twelve months from its start_date.
type_no is set to 2, meaning that once the contract term ends, existing service continues without further contractual obligation; this is also the default if the field is omitted. Other values instead terminate service and billing at the end of the term, automatically renew the contract, or roll the plan instance over to a different plan, rate schedule, or set of custom rates.
do_auto_discard is set to true, meaning that creating this contract automatically discards any existing contract already in effect covering the same plan instance; setting it to false instead leaves any existing contract on that plan instance in place.
contract_plan_instances is an array because a single instance contract can cover more than one plan instance at once; this example includes one entry, identifying the plan instance by its Aria-assigned plan_instance_no. The client_plan_instance_id alternative is not shown.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"contract_no": 601233
}
error_code of 0 with error_msg of "OK" indicates the instance contract was created successfully. contract_no is the Aria-assigned unique identifier for the new contract.
This response omits error_details, which is populated only when the request cannot be completed as submitted.