get_legal_entity_m Sample Call and Response
This example retrieves the details of two legal entities in a single call, based on the get_legal_entity_m definition in methods_m_r73.yml. Legal entities let a client organize accounts by subsidiary or by geographic region for reporting purposes.
This example covers requesting more than one legal entity at once by Aria-assigned identifier, and it shows two entities in different countries to illustrate how address and currency fields vary by region. It does not cover omitting the filter array entirely, which returns every legal entity configured for the client.
Sample call
{
"rest_call": "get_legal_entity_m",
"output_format": "json",
"client_no": 12345,
"auth_key": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
"legal_entity_array": [
{
"legal_entity_no": 4001
},
{
"legal_entity_no": 4002
}
]
}
The rest_call and output_format fields are envelope fields added by the REST layer rather than arguments defined in the yml file. Client_no and auth_key are required on every Admin Tools API call. Legal_entity_array is an optional array of objects, each identifying one legal entity; the yml file allows each object in the array to use legal_entity_no, client_legal_entity_id, or legal_entity_name as an alternative identifier, and this example uses the Aria-assigned numeric legal_entity_no for both entries. Leaving this array blank returns every legal entity configured for the client.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"legal_entity": [
{
"legal_entity_no": 4001,
"legal_entity_name": "Aria North America Holdings",
"client_legal_entity_id": "LE-NA-001",
"legal_entity_registration_no": "84-1234567",
"legal_entity_address1": "500 Corporate Drive",
"legal_entity_city": "Newark",
"legal_entity_state_prov": "NJ",
"legal_entity_postal_code": "07102",
"legal_entity_country": "USA",
"legal_entity_currency": "USD",
"legal_entity_email": "legal-na@ariasystems.example.com"
},
{
"legal_entity_no": 4002,
"legal_entity_name": "Aria Europe Limited",
"client_legal_entity_id": "LE-EU-002",
"legal_entity_registration_no": "10293847",
"legal_entity_vat_registration_no": "GB123456789",
"legal_entity_address1": "22 Finsbury Square",
"legal_entity_city": "London",
"legal_entity_locality": "Greater London",
"legal_entity_postal_code": "EC2A 1DX",
"legal_entity_country": "GBR",
"legal_entity_currency": "GBP",
"legal_entity_email": "legal-eu@ariasystems.example.com"
}
]
}
An error_code of 0 with error_msg of "OK" indicates the lookup succeeded. Legal_entity_no 4001 shows a United States entity, which reports a state or province of "NJ" and omits legal_entity_vat_registration_no, since value-added tax registration does not apply there. Legal_entity_no 4002 shows a United Kingdom entity, which reports a value-added tax registration number and a locality instead of a state or province. Legal_entity_currency shows the functional reporting currency for each entity, United States Dollars for the first and British Pounds Sterling for the second; all account activity under a given legal entity is converted into that entity's functional currency for legal entity level reporting. This example omits legal_entity_address2 and legal_entity_address3 for both entities, since neither entity needs a second or third address line.