Create a location to track where a corporation has physical or legal presence. The address is validated against country-specific requirements.
Request body
The unique identifier (UUID) for the corporation.
The location address. Additional address details.
Additional address details.
State or province code (2-3 characters). Required for countries like US, CA, AU.
ISO 3166-1 alpha-2 country code (e.g., US, DE, GB).
Array of location types. At least one type is required. Values: HEADQUARTERS, BRANCH_OFFICE, RETAIL_LOCATION, FACTORY, WAREHOUSE, NATURAL_RESOURCE_SITE, REGISTERED_OFFICE, REPRESENTATIVE_OFFICE, CONSTRUCTION_SITE, THIRD_PARTY_FULFILLMENT, REMOTE_EMPLOYEE, DEPENDENT_AGENT, INDEPENDENT_AGENT, REGISTRATION, OTHER
Whether this is the primary location for the corporation.
ISO date (YYYY-MM-DD) when the location became active.
ISO date (YYYY-MM-DD) when the location was closed. Leave empty for active locations.
Whether the location is currently active. Defaults to true.
Optional notes about the location.
curl --request POST \
--url 'https://transaction-tax.api.in.commenda.io/api/v1/locations' \
--header 'Authorization: Bearer <your_token>' \
--header 'Content-Type: application/json' \
--data '{
"corporation_id": "550e8400-e29b-41d4-a716-446655440000",
"address": {
"address_line_1": "123 Main Street",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
},
"location_types": ["HEADQUARTERS", "REGISTERED_OFFICE"],
"is_primary": true,
"start_date": "2024-01-01"
}'
200
400 - Invalid location type
400 - Missing address fields
{
"message" : "Successfully created location." ,
"data" : {
"id" : "b2c3d4e5-f6a7-8901-bcde-f12345678901"
}
}