Skip to main content
Aria Knowledge Central

create_legal_entity_m Sample Call and Response

This example shows a call to create_legal_entity_m that creates a new legal entity used to organize accounts that share a common subsidiary or geographic area. It is based on methods_m_r73.yml, Admin Tools API.

This example covers the legal entity’s name, identifiers, functional currency, and contact address details; it does not cover assigning existing accounts, plans, or legal entities to this new legal entity, since those associations are handled by other methods after the legal entity is created.

Sample call

{
  "rest_call": "create_legal_entity_m",
  "output_format": "json",
  "client_no": 10023,
  "auth_key": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
  "legal_entity_name": "Aria Northern Europe Holdings",
  "client_legal_entity_id": "ARIA-NEU-01",
  "legal_entity_registration_no": "SE5566778899",
  "legal_entity_vat_registration_no": "SE556677889901",
  "legal_entity_address1": "12 Kungsgatan",
  "legal_entity_city": "Stockholm",
  "legal_entity_postal_code": "11143",
  "legal_entity_country": "SWE",
  "legal_entity_currency": "sek",
  "legal_entity_email": "billing-neu@ariasystems.example"
}

The fields rest_call and output_format are REST-layer additions that sit outside the method’s own documented arguments in the yml; you supply rest_call with the method name and output_format with json to request a JSON response. Both legal_entity_name and client_legal_entity_id are required, as is legal_entity_currency, which the yml notes can be set only once at creation and cannot be updated later, since it drives currency conversion for legal entity level reporting. The remaining fields shown here, legal_entity_registration_no, legal_entity_vat_registration_no, legal_entity_address1, legal_entity_city, legal_entity_postal_code, legal_entity_country, and legal_entity_email, are all optional contact and registration details included to describe a realistic, fully addressed legal entity; this example omits the optional legal_entity_address2, legal_entity_address3, legal_entity_state_prov, and legal_entity_locality fields, which follow the same pattern.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "legal_entity_no": 4021
}

An error_code value of zero, together with an error_msg value of "OK", indicates that Aria created the legal entity successfully. The legal_entity_no value is the Aria-assigned unique identifier for the newly created legal entity. This example does not attempt to show a failure response, such as one where legal_entity_currency was omitted or where client_legal_entity_id was already in use for the client.

TOP
  • Was this article helpful?