# Update legal entity This endpoint updates a legal entity by ID. Endpoint: PUT /v2/companies/{companyId}/legal-entities/{legalEntityId} Version: v2 Security: Bearer ## Path parameters: - `companyId` (string, required) Identifier for company. Example: "4974a66b-7493-4f41-908c-58ba81093947" - `legalEntityId` (string, required) Identifier for legal-entity. Example: "4974a66b-7493-4f41-908c-58ba81093947" ## Request fields (application/json): - `id` (string) Unique identifier of the legal entity. - `name` (string) Name of the legal entity - `address` (object) Address of the legal entity. - `address.addressLines` (array, required) Address lines Example: ["Golden Gate Bridge"] - `address.administrativeArea` (string) Code of administrative area. For example: DL for Delhi, India. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (e.g. "Barcelona" and not "Catalonia"). Many countries don't use an administrative area in postal addresses. E.g. in Switzerland this should be left unpopulated. Example: "CA" - `address.administrativeAreaName` (string) Name of administrative area. This is full name corresponding to administrativeArea. Like Delhi for DL area code. For some places, code and name maybe same as well like Tokyo. Example: "California" - `address.description` (string) Address description Example: "San Francisco Home" - `address.isDefault` (boolean) Whether this address is default address in case multiple addresses are specified. Example: true - `address.languageCode` (string) BCP-47 language code of the contents of this address (if known). This is often the UI language of the input form or is expected to match one of the languages used in the address' country/region, or their transliterated equivalents. This can affect formatting in certain countries, but is not critical to the correctness of the data and will never affect any validation or other non-formatting related operations. Examples: "zh-Hant", "ja", "ja-Latn", "en". Example: "en" - `address.locality` (string) Generally refers to the city/town portion of the address. Example: "San Francisco" - `address.locationCode` (string) IATA 3-letter location code. See https://www.iata.org/en/services/codes. Example: "LAX" - `address.organization` (string) The name of the organization at the address. Example: "Spotnana" - `address.postalCode` (string) Postal code of the address. This is a required field when setting for a user/legal entity/company etc. Example: "94130" - `address.continentCode` (string) 2 letter continent code of the continent this address falls in. Example: "AF" - `address.recipients` (array) The recipient at the address. - `address.regionCode` (string, required) Region code of the country/region of the address. Example: "US" - `address.regionName` (string) Region name of the country/region of the address. Example: "America" - `address.revision` (integer) Example: 1 - `address.sortingCode` (string) Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number alone, representing the "sector code" (Jamaica), "delivery area indicator" (Malawi) or "post office indicator" (e.g. Côte d'Ivoire). Example: "Jamaica" - `address.sublocality` (string) Sublocality of the address. This can be neighborhoods, boroughs, districts. - `address.timezone` (string) Time zone of the address. Example: "America/Los_Angeles" - `address.coordinates` (object) Map coordinates of the address. - `address.coordinates.latitude` (number, required) Latitude of the Location Example: 77.1025 - `address.coordinates.longitude` (number, required) Longitude of the Location Example: 28.7041 - `billingCurrency` (string) Billing currency for the legal entity. - `dba` (string) Business name, sort form of Doing Business As - `ein` (string) Tax number - `phoneNumbers` (array) - `phoneNumbers.countryCode` (integer) two digit country code Example: 91 - `phoneNumbers.countryCodeSource` (string) Enum: "UNSPECIFIED", "FROM_NUMBER_WITH_PLUS_SIGN", "FROM_NUMBER_WITH_IDD", "FROM_NUMBER_WITHOUT_PLUS_SIGN", "FROM_DEFAULT_COUNTRY" - `phoneNumbers.extension` (string) phone number extension Example: "222" - `phoneNumbers.isoCountryCode` (string) ISO alpha-2 code Example: "IN" - `phoneNumbers.italianLeadingZero` (boolean) Example: true - `phoneNumbers.nationalNumber` (integer) Example: 8150 - `phoneNumbers.numberOfLeadingZeros` (integer) Example: 1 - `phoneNumbers.preferredDomesticCarrierCode` (string) Example: "7" - `phoneNumbers.rawInput` (string) Example: "77777" - `phoneNumbers.type` (string) Enum: "UNKNOWN_TYPE", "MOBILE", "LANDLINE" - `isDelayedInvoicingEnabled` (boolean) Whether delayed invoicing is enabled for the legal entity. If enabled, travelers of the legal entity won't be charged for trip on checkout, rather the bills would be sent to the company later on based on the billing cycle. - `bookingTmcRef` (object) Booking TMC of the legal entity. - `bookingTmcRef.id` (string, required) Example: "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3" - `bookingTmcRef.name` (string) Example: "Name" - `expensePartnerConfig` (object) Configured details of expense partner. - `expensePartnerConfig.partner` (string, required) The expense partner name as enum. Enum: "EXPENSIFY", "EMBURSE_CHROMERIVER", "BREX" - `expensePartnerConfig.emailConfig` (object) The email configuration part of the ExpensePartnerConfig. - `expensePartnerConfig.emailConfig.personalCardConfig` (object) Configuration for bookings done with Personal card. - `expensePartnerConfig.emailConfig.personalCardConfig.sendToTraveler` (boolean) A boolean flag to show if expenses are to be sent to traveler's Expense partner account. - `expensePartnerConfig.emailConfig.personalCardConfig.personalCardExpenseEmail` (string) The email for the expense partner account. Example: "user@company.com" - `expensePartnerConfig.emailConfig.centralCardExpenseEmail` (string) Central email for bookings done with central card. Example: "finance+le@company.com" - `expensePartnerConfig.emailConfig.expensePartnerEmail` (string, required) The expense partner email where expense receipts are sent to. Example: "receipts@expensify.com" - `expensePartnerConfig.emailConfig.bccEmail` (string) Email to which we bcc expensify emails Example: "docs@company.com" - `expensePartnerConfig.travelType` (array) Applicable segments Enum: "AIR", "HOTEL", "CAR", "RAIL", "LIMO", "MISC", "ALL" - `expensePartnerConfig.isExpensePartnerEnabled` (boolean) A flag denoting is the expense partner config is enabled or not. Example: true - `expensePartnerConfig.reportCustomFields` (boolean) Send custom fields to the expense partner if enabled. Example: true - `expensePartnerConfig.personalCardExpenseOwner` (object) Determines who should the expense be reported against. - `expensePartnerConfig.personalCardExpenseOwner.traveler` (boolean) Report the expense against the traveler who made the booking. If set to true, central email should not be set. Example: true - `expensePartnerConfig.personalCardExpenseOwner.centralEmail` (string) Report the expense against a central email. Example: "docs@company.com" - `expensePartnerConfig.centralCardExpenseOwner` (object) Determines who should the expense be reported against. - `expensePartnerConfig.partnerReferralId` (string) Referral id used for this company/legal entity during expense partner setup Example: "1234hgd" - `expensePartnerConfig.itineraryConfig` (object) Itinerary configuration to control what expenses to send to the partner - `expensePartnerConfig.itineraryConfig.skipModificationUpdate` (boolean) Allow modification expenses to be skipped from sending to the partner Example: true - `expensePartnerConfig.itineraryConfig.skipCancellationUpdate` (boolean) Allow cancellation expenses to be skipped from sending to the partner Example: true - `ccEmailAddresses` (array) List of email addresses on which all confirmation emails will be CCed. This is applicable only for company roles 'ORG' Example: ["example@gmail.com"] - `bccEmailAddresses` (array) List of email addresses on which all confirmation emails will be BCCed. This is applicable only for company roles 'ORG' Example: ["example@gmail.com"] - `externalId` (string) External id for the legal entity. Example: "my-external-id" - `companySpecifiedAttributes` (array) Company specified attributes or fields for the legal entity. - `companySpecifiedAttributes.fieldName` (string, required) Field name of the attribute Example: "businessId" - `companySpecifiedAttributes.value` (string, required) Field value of the attribute Example: "ABCD" ## Response 400 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error. ## Response 401 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error. ## Response 403 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error. ## Response 404 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error. ## Response 204 fields