Map legal entity to ERP
curl --request PUT \
--url https://api.entendre.finance/v1/connections/{connection_id}/entity-mappings/{legal_entity_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"external_id": "1"
}
'const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({external_id: '1'})
};
fetch('https://api.entendre.finance/v1/connections/{connection_id}/entity-mappings/{legal_entity_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.entendre.finance/v1/connections/{connection_id}/entity-mappings/{legal_entity_id}"
payload = { "external_id": "1" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "lem_507f1f77bcf86cd799439011",
"organization_id": "org_507f1f77bcf86cd799439011",
"integration_type": "quickbooks",
"realm_id": "9341455734745729",
"internal_legal_entity_id": "le_507f1f77bcf86cd799439011",
"external_legal_entity_id": "1",
"created_at": "2026-08-22T12:40:37.874Z",
"updated_at": "2026-08-31T03:49:29.365Z"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid path, query or request body.",
"request_id": "req_example"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication is required.",
"request_id": "req_example"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Insufficient access to organization",
"request_id": "req_example"
}
}{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found",
"request_id": "req_example"
}
}{
"error": {
"code": "CONFLICT",
"message": "The resource state does not allow this operation.",
"request_id": "req_example"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded. Retry after 30s.",
"request_id": "req_example"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error",
"request_id": "req_example"
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "Service unavailable.",
"request_id": "req_example"
}
}GL Mapping
Set entity mapping
Sets one entity mapping on an active general-ledger connection.
PUT
/
v1
/
connections
/
{connection_id}
/
entity-mappings
/
{legal_entity_id}
Map legal entity to ERP
curl --request PUT \
--url https://api.entendre.finance/v1/connections/{connection_id}/entity-mappings/{legal_entity_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"external_id": "1"
}
'const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({external_id: '1'})
};
fetch('https://api.entendre.finance/v1/connections/{connection_id}/entity-mappings/{legal_entity_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.entendre.finance/v1/connections/{connection_id}/entity-mappings/{legal_entity_id}"
payload = { "external_id": "1" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "lem_507f1f77bcf86cd799439011",
"organization_id": "org_507f1f77bcf86cd799439011",
"integration_type": "quickbooks",
"realm_id": "9341455734745729",
"internal_legal_entity_id": "le_507f1f77bcf86cd799439011",
"external_legal_entity_id": "1",
"created_at": "2026-08-22T12:40:37.874Z",
"updated_at": "2026-08-31T03:49:29.365Z"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid path, query or request body.",
"request_id": "req_example"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication is required.",
"request_id": "req_example"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Insufficient access to organization",
"request_id": "req_example"
}
}{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found",
"request_id": "req_example"
}
}{
"error": {
"code": "CONFLICT",
"message": "The resource state does not allow this operation.",
"request_id": "req_example"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded. Retry after 30s.",
"request_id": "req_example"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error",
"request_id": "req_example"
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "Service unavailable.",
"request_id": "req_example"
}
}Use the
external_id from List external entities for this connection. The Entendre legal entity must belong to your organization. Sending the same value again reuses the mapping.Authorizations
Your organization API key. Some operations also need a key that is associated with a user; their pages say so.
Path Parameters
ID of the connection.
Minimum string length:
1ID of the legal entity.
Minimum string length:
1Body
application/json
Copy external_id from this connection's external-entities list.
Required string length:
1 - 500Example:
"1"
Response
The mapping was saved.
Show child attributes
Show child attributes