# Create legal entity This endpoint creates a legal entity. Endpoint: POST /v2/companies/{companyId}/legal-entities Version: v2 Security: Bearer ## Path parameters: - `companyId` (string, required) Identifier for company. Example: "4974a66b-7493-4f41-908c-58ba81093947" ## Request fields (application/json): - `name` (string, required) Name of the legal entity - `address` (object, required) 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, required) 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. - `ccEmailAddresses` (array) List of email addresses on which all confirmation emails for this LE will be cc'ed. This is applicable only for company roles 'ORG' Example: ["example@gmail.com"] - `bccEmailAddresses` (array) List of email addresses on which all confirmation emails for this LE will be bcc'ed. This is applicable only for company roles 'ORG' Example: ["example@gmail.com"] - `externalId` (string) External id for legal entity. Example: "legal-entity-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 201 fields (application/json): - `id` (string, required) Example: "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3" ## 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.