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"
}'
{
"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"
}
{
"corporation_id": "550e8400-e29b-41d4-a716-446655440000",
"address": {
"address_line_1": "Friedrichstraße 100",
"city": "Berlin",
"postal_code": "10117",
"country": "DE"
},
"location_types": ["WAREHOUSE"],
"start_date": "2024-06-01"
}
{
"message": "Successfully created location.",
"data": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
}
}
{
"error": {
"type": "CLIENT_INVALID_REQUEST_BODY",
"title": "Failed to validate the request body",
"detail": {
"description": "invalid location type: INVALID_TYPE"
},
"status": 400,
"instance": "/api/v1/locations"
}
}
{
"error": {
"type": "CLIENT_INVALID_REQUEST_BODY",
"title": "Failed to validate the request body",
"detail": {
"description": "state is required for country US"
},
"status": 400,
"instance": "/api/v1/locations"
}
}
Locations
Create location
Create a location for a corporation
POST
/
api
/
v1
/
locations
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"
}'
{
"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"
}
{
"corporation_id": "550e8400-e29b-41d4-a716-446655440000",
"address": {
"address_line_1": "Friedrichstraße 100",
"city": "Berlin",
"postal_code": "10117",
"country": "DE"
},
"location_types": ["WAREHOUSE"],
"start_date": "2024-06-01"
}
{
"message": "Successfully created location.",
"data": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
}
}
{
"error": {
"type": "CLIENT_INVALID_REQUEST_BODY",
"title": "Failed to validate the request body",
"detail": {
"description": "invalid location type: INVALID_TYPE"
},
"status": 400,
"instance": "/api/v1/locations"
}
}
{
"error": {
"type": "CLIENT_INVALID_REQUEST_BODY",
"title": "Failed to validate the request body",
"detail": {
"description": "state is required for country US"
},
"status": 400,
"instance": "/api/v1/locations"
}
}
Create a location to track where a corporation has physical or legal presence. The address is validated against country-specific requirements.
Request body
string
required
The unique identifier (UUID) for the corporation.
object
required
The location address.
Show Address fields
Show Address fields
array
required
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, OTHERboolean
Whether this is the primary location for the corporation.
string
required
ISO date (YYYY-MM-DD) when the location became active.
string
ISO date (YYYY-MM-DD) when the location was closed. Leave empty for active locations.
boolean
Whether the location is currently active. Defaults to
true.string
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"
}'
{
"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"
}
{
"corporation_id": "550e8400-e29b-41d4-a716-446655440000",
"address": {
"address_line_1": "Friedrichstraße 100",
"city": "Berlin",
"postal_code": "10117",
"country": "DE"
},
"location_types": ["WAREHOUSE"],
"start_date": "2024-06-01"
}
{
"message": "Successfully created location.",
"data": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
}
}
{
"error": {
"type": "CLIENT_INVALID_REQUEST_BODY",
"title": "Failed to validate the request body",
"detail": {
"description": "invalid location type: INVALID_TYPE"
},
"status": 400,
"instance": "/api/v1/locations"
}
}
{
"error": {
"type": "CLIENT_INVALID_REQUEST_BODY",
"title": "Failed to validate the request body",
"detail": {
"description": "state is required for country US"
},
"status": 400,
"instance": "/api/v1/locations"
}
}
Was this page helpful?