Fincore · API reference · Business Units
List Business Units
Base URL https://apicore.stg.finch.lat · operationId listCustomers
Returns the Customers/Business Units associated with a client. In production, use only customers where customerValidationStatus = VALIDATED.
Authorization
JWT bearer token created from client credentials. Use the Authentication guide to generate a token before calling protected endpoints.
Path parameters
clientId string (uuid) requiredClient UUID.
Query parameters
customer_status string Filter Business Units by lifecycle status.
ACTIVE INACTIVE BLOCKED customer_alias string Filter Business Units by alias. Matching behavior is backend-defined.
name string Filter Business Units by legal or display name.
customer_validation_status string Filter Business Units by validation status.
PENDING VALIDATED REJECTED page integer Page number to return. The first page is 1.
per_page integer Number of Business Units returned per page.
Responses
200 Business Units list. application/json
currentPage integer Current page number.
perPage integer Number of Business Units returned per page.
totalItems integer Total number of Business Units matching the request.
data array of CustomerResponse requiredBusiness Units returned for the client and filters.
id data[].id string (uuid) requiredBusiness Unit UUID.
clientId data[].clientId string (uuid) requiredClient UUID that owns the Business Unit.
name data[].name string requiredLegal name of the Business Unit.
rfc data[].rfc string requiredRFC tax identifier of the Business Unit.
legalRepresentativeName data[].legalRepresentativeName string requiredFull name of the legal representative.
legalRepresentativeRfc data[].legalRepresentativeRfc string requiredRFC tax identifier of the legal representative.
legalRepresentativePhone data[].legalRepresentativePhone string requiredContact phone number of the legal representative.
legalRepresentativeEmail data[].legalRepresentativeEmail string (email) requiredContact email of the legal representative.
website data[].website string (uri) Business Unit website when available.
domain data[].domain string Business Unit domain when available.
customerAlias data[].customerAlias string Short alias used to identify the Business Unit.
customerStatus data[].customerStatus string Business Unit lifecycle status.
ACTIVE INACTIVE BLOCKED customerValidationStatus data[].customerValidationStatus string Business Unit validation status.
PENDING VALIDATED REJECTED audit data[].audit object Business Unit lifecycle timestamps.
createdAt data[].audit.createdAt string (date-time) Timestamp when the resource was created.
updatedAt data[].audit.updatedAt string (date-time) Timestamp when the resource was last updated.
deletedAt data[].audit.deletedAt string | null Timestamp when the resource was deleted. When it was never deleted the API returns the literal string "None", not JSON null. Do not test this field for null.
blockedAt data[].audit.blockedAt string | null Timestamp when the resource was blocked. When it was never blocked the API returns the literal string "None", not JSON null. Do not test this field for null.
activatedAt data[].audit.activatedAt string | null Timestamp when the resource was activated, or null.
suspendedAt data[].audit.suspendedAt string | null Timestamp when the resource was suspended, or null.
400 Business Unit list request is invalid. Possible causes: malformed clientId, invalid status filter, or invalid pagination values. application/json
code integer requiredgRPC status code mapped to HTTP.
message string requiredGeneral error message.
details array of ErrorDetail requiredDetailed error causes returned by the service.
reason details[].reason string requiredMachine-readable error category.
DATA_ERROR FAILED_PRECONDITION MISSING_REQUIRED_FIELDS RESOURCE_NOT_FOUND UNAUTHORIZED PERMISSION_DENIED UNIQUE_VIOLATION INTERNAL domain details[].domain string requiredService domain that produced the error.
metadata details[].metadata object requiredAdditional error metadata, including the detailed message and HTTP code.
error_detail details[].metadata.error_detail string Human-readable detail returned by the service.
http_code details[].metadata.http_code string HTTP status code associated with this error.
error_code details[].metadata.error_code string Optional internal error catalog code when available.
401 Missing, expired, invalid, or environment-mismatched API key or bearer token. See Authentication. application/json
code integer requiredgRPC status code mapped to HTTP.
message string requiredGeneral error message.
details array of ErrorDetail requiredDetailed error causes returned by the service.
reason details[].reason string requiredMachine-readable error category.
DATA_ERROR FAILED_PRECONDITION MISSING_REQUIRED_FIELDS RESOURCE_NOT_FOUND UNAUTHORIZED PERMISSION_DENIED UNIQUE_VIOLATION INTERNAL domain details[].domain string requiredService domain that produced the error.
metadata details[].metadata object requiredAdditional error metadata, including the detailed message and HTTP code.
error_detail details[].metadata.error_detail string Human-readable detail returned by the service.
http_code details[].metadata.http_code string HTTP status code associated with this error.
error_code details[].metadata.error_code string Optional internal error catalog code when available.
500 Unexpected server error. See Error catalog before retrying non-idempotent operations. application/json
code integer requiredgRPC status code mapped to HTTP.
message string requiredGeneral error message.
details array of ErrorDetail requiredDetailed error causes returned by the service.
reason details[].reason string requiredMachine-readable error category.
DATA_ERROR FAILED_PRECONDITION MISSING_REQUIRED_FIELDS RESOURCE_NOT_FOUND UNAUTHORIZED PERMISSION_DENIED UNIQUE_VIOLATION INTERNAL domain details[].domain string requiredService domain that produced the error.
metadata details[].metadata object requiredAdditional error metadata, including the detailed message and HTTP code.
error_detail details[].metadata.error_detail string Human-readable detail returned by the service.
http_code details[].metadata.http_code string HTTP status code associated with this error.
error_code details[].metadata.error_code string Optional internal error catalog code when available.
Request
curl -X GET "https://apicore.stg.finch.lat/v1/clients/c2d1d1e3-3340-4170-980e-e9269bbbc551/customers" \
-H "Authorization: Bearer $TOKEN"const res = await fetch("https://apicore.stg.finch.lat/v1/clients/c2d1d1e3-3340-4170-980e-e9269bbbc551/customers", {
method: "GET",
headers: {
"Authorization": `Bearer ${TOKEN}`,
},
});
const data = await res.json();import requests
res = requests.get(
"https://apicore.stg.finch.lat/v1/clients/c2d1d1e3-3340-4170-980e-e9269bbbc551/customers",
headers={
"Authorization": f"Bearer {TOKEN}",
},
)
data = res.json()Response
{
"currentPage": 1,
"perPage": 50,
"totalItems": 3,
"data": [
{
"id": "bb1e8fde-e68e-48e9-a483-d32153c752c2",
"clientId": "c2d1d1e3-3340-4170-980e-e9269bbbc551",
"name": "Business Unit ABC",
"rfc": "XAXX010101000",
"legalRepresentativeName": "Jane Doe",
"legalRepresentativeRfc": "XAXX010101000",
"legalRepresentativePhone": "5555555555",
"legalRepresentativeEmail": "legal@example.com",
"website": "https://example.com",
"domain": "example.com",
"customerAlias": "BU ABC",
"customerStatus": "ACTIVE",
"customerValidationStatus": "VALIDATED",
"audit": {
"createdAt": "2025-03-05 11:00:56.264527-06:00",
"updatedAt": "2025-03-05 11:00:56.264527-06:00",
"deletedAt": "None",
"blockedAt": "None",
"activatedAt": null,
"suspendedAt": null
}
}
]
}{
"code": 9,
"message": "API Error",
"details": [
{
"reason": "FAILED_PRECONDITION",
"domain": "CORE",
"metadata": {
"error_detail": "The account does not have sufficient funds.",
"http_code": "400",
"error_code": "10-E4120"
}
}
]
}{
"code": 16,
"message": "API Error",
"details": [
{
"reason": "UNAUTHORIZED",
"domain": "CORE",
"metadata": {
"error_detail": "Invalid Credentials",
"http_code": "401"
}
}
]
}{
"code": 9,
"message": "API Error",
"details": [
{
"reason": "FAILED_PRECONDITION",
"domain": "CORE",
"metadata": {
"error_detail": "The account does not have sufficient funds.",
"http_code": "400",
"error_code": "10-E4120"
}
}
]
}