Skip to main content
Aria Knowledge Central

update_legal_entity_m Sample Call and Response

This example shows a call to update_legal_entity_m that revises the registration details and mailing address of an existing legal entity, based on the update_legal_entity_m method defined in methods_m_r73.yml, Admin Tools API, release seventy-three.

This example covers every required field, plus a representative set of the optional contact and registration fields the method accepts. It does not cover every address line the method supports.

Sample call

{
  "rest_call": "update_legal_entity_m",
  "output_format": "json",
  "client_no": 100024,
  "auth_key": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
  "legal_entity_no": 61044,
  "legal_entity_name": "Aria Nordics ApS",
  "legal_entity_registration_no": "DK-38412207",
  "legal_entity_vat_registration_no": "DK38412207",
  "legal_entity_address1": "Amagertorv 14",
  "legal_entity_city": "Copenhagen",
  "legal_entity_state_prov": "84",
  "legal_entity_postal_code": "1160",
  "legal_entity_country": "DNK",
  "legal_entity_email": "billing@arianordics.example.com"
}

The rest_call and output_format fields sit outside the method’s own documented arguments in the yml; the REST layer common to the Admin Tools API adds these two fields to every call. Client_no and auth_key come from the shared param_defaults block.

Legal_entity_no identifies the existing legal entity being updated; it is one side of an alternative pair with client_legal_entity_id, and this example uses the Aria-assigned numeric identifier. Legal_entity_name is the method’s other required field (nullable: false).

The yml’s own description for this method notes that the required fields select which legal entity to update, and that every additional field sent with the call replaces the corresponding stored value, with any field left out of the call resulting in a null value being stored. Because of that full-replace behavior, this example includes every contact and registration field it intends to keep populated: legal_entity_registration_no and legal_entity_vat_registration_no, and a mailing address built from legal_entity_address1, legal_entity_city, legal_entity_state_prov, legal_entity_postal_code, legal_entity_country, and legal_entity_email.

Sample response

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

An error_code of zero and an error_msg of “OK” indicate that Aria updated the legal entity successfully. Legal_entity_no echoes back the Aria-assigned identifier for the legal entity that was updated.

Left out of this example are the client_legal_entity_id alternative identifier, and the legal_entity_address2, legal_entity_address3, and legal_entity_locality fields, which would add a second and third address line and a locality value; per the full-replace behavior described above, leaving them out of this call means any values previously stored in those fields are cleared to null.

TOP
  • Was this article helpful?