AltScore
Credit Management System (CMS)

Clients API

This API allows managing clients in the system. It provides endpoints to create, read, update, and list clients, as well as perform specific operations such as updating the status and obtaining information about clients' credit lines.

The Client Object

The Client object represents a client in the system.

{
    "clientId": "b017d15b-68ed-4912-b026-ab2fbac80ad3",
    "partnerId": "79f7509e-4683-4ddc-98f2-fe631fa27652",
    "externalId": "cli:123",
    "status": "enabled",
    "legalName": "Abrego y Muñoz A.C.",
    "taxId": "20-44556677-8",
    "dba": "Pinturerías Muñoz",
    "address": "Av. Corrientes 1234, CABA",
    "emailAddress": "info@abregoymunios.com",
    "phoneNumber": "+5491112345678",
    "activationDate": "2021-01-01T00:00:00Z",
    "isEmailVerified": true,
    "isPhoneVerified": false,
    "createdAt": "2021-01-01T00:00:00Z",
    "updatedAt": "2021-01-01T00:00:00Z"
}

Attributes

AttributeDescriptionType
clientIdUnique identifier of the clientString (UUID)
externalIdClient identifier in the Partner's systemString
legalNameLegal name of the client registered in public recordsString
taxIdTax identification of the clientString
dbaTrade name or brand used by the clientString
addressLegal address of the clientString
emailAddressEmail address of the clientString
phoneNumberPhone number of the clientString
activationDateActivation date of the clientString (ISO 8601)
partnerIdIdentifier of the Partner managing this clientString (UUID)
statusClient status (pending, enabled, disabled)String
isEmailVerifiedIndicates if the email has been verifiedBoolean
isPhoneVerifiedIndicates if the phone number has been verifiedBoolean
createdAtDate and time of client creationString (ISO 8601)
updatedAtDate and time of the last client updateString (ISO 8601)

Endpoints

Create a New Client

Creates a new client in the system.

POST /v2/clients

Input Parameters:

ParameterDescriptionTypeRequired
externalIdClient identifier in the Partner's systemStringYes
legalNameLegal name of the clientStringYes
taxIdTax identification of the clientStringYes
dbaTrade name or brand used by the clientStringYes
addressLegal address of the clientStringYes
emailAddressEmail address of the clientStringYes
phoneNumberPhone number of the clientStringNo
activationDateActivation date of the clientStringNo
partnerIdIdentifier of the Partner managing this clientStringNo

Example Request:

{
    "externalId": "cli:123",
    "legalName": "Abrego y Muñoz A.C.",
    "taxId": "20-44556677-8",
    "dba": "Pinturerías Muñoz",
    "address": "Av. Corrientes 1234, CABA",
    "emailAddress": "info@abregoymunios.com",
    "phoneNumber": "+54 9 11 1234 5678",
    "activationDate": "2023-11-29",
    "partnerId": "79f7509e-4683-4ddc-98f2-fe631fa27652"
}

Successful Response: The response will be a complete Client object, as described above.

Get a Client

Retrieves information about a specific client.

GET /v2/clients/:clientId

Path Parameters:

ParameterDescription
clientIdID of the client to get

Successful Response:

The response will be a complete Client object, as described above.

Update a Client

Updates information of an existing client.

PATCH /v2/clients/:clientId

Path Parameters:

ParameterDescription
clientIdID of the client to update

Input Parameters:

ParameterDescriptionType
emailAddressNew email address of the clientString

Example Request:

{
    "emailAddress": "nuevo.email@abregoymunios.com"
}

Successful Response:

The response will be the updated Client object.

List Clients

Retrieves a paginated list of clients with filtering and sorting options.

GET /v2/clients

Query Parameters:

ParameterDescriptionType
nameFilter by client nameString
emailFilter by emailString
partnerFilter by partner IDString
statusFilter by client statusString
tax-idFilter by tax identificationString
external-idFilter by external IDString
sort-byField to sort byString
sort-directionSorting direction (asc or desc)String
offsetList offsetInteger
limitLimit of items to returnInteger
pagePage numberInteger
per-pageItems per pageInteger

Successful Response:

[
    {
        "clientId": "b017d15b-68ed-4912-b026-ab2fbac80ad3",
        "partnerId": "79f7509e-4683-4ddc-98f2-fe631fa27652",
        "externalId": "cli:123",
        "status": "enabled",
        "legalName": "Abrego y Muñoz A.C.",
        "taxId": "20-44556677-8",
        "dba": "Pinturerías Muñoz",
        "address": "Av. Corrientes 1234, CABA",
        "emailAddress": "info@abregoymunios.com",
        "phoneNumber": "+5491112345678",
        "isEmailVerified": true,
        "isPhoneVerified": false,
        "createdAt": "2021-01-01T00:00:00Z",
        "updatedAt": "2021-01-01T00:00:00Z"
    }
]

The X-Total-Count response header carries the total unpaginated count.

Get Client Status

Retrieves a summary of the credit lines of a specific client.

GET /v2/clients/:clientId/status

Path Parameters:

ParameterDescription
clientIdID of the client to query

Successful Response:

{
    "clientId": "b017d15b-68ed-4912-b026-ab2fbac80ad3",
    "externalId": "cli:123",
    "legalName": "Abrego y Muñoz A.C.",
    "taxId": "20-44556677-8",
    "partnerId": "79f7509e-4683-4ddc-98f2-fe631fa27652",
    "status": "enabled",
    "tenant": "altscore",
    "creditLines": {
        "bnpl": {
            "assigned": {
                "amount": "100000.00",
                "currency": "ARS"
            },
            "available": {
                "amount": "90000.00",
                "currency": "ARS"
            },
            "consumed": {
                "amount": "10000.00",
                "currency": "ARS"
            }
        },
        "dpa": {
            "assigned": {
                "amount": "100000.00",
                "currency": "ARS"
            },
            "available": {
                "amount": "90000.00",
                "currency": "ARS"
            },
            "consumed": {
                "amount": "10000.00",
                "currency": "ARS"
            }
        }
    }
}

Change Client Status

Updates the status of a specific client.

PUT /v2/clients/:clientId/status

Path Parameters:

ParameterDescription
clientIdID of the client to update

Input Parameters:

ParameterDescriptionType
statusNew status of the client (enabled, disabled)String

Example Request:

{
    "status": "enabled"
}

Successful Response:

The response will be a ClientStatusResponse object, as shown in the previous example.

Error Handling

The API may return the following error codes:

CodeDescription
400Bad Request
401Unauthorized
404Not Found
409Conflict

Errors will include a descriptive message in the response body.

Credit Line Summary

The Client Summary endpoint provides comprehensive financial overviews for clients with active debts in the DPA system. It delivers real-time credit metrics (assigned, available, consumed amounts), debt information (active debt counts, total balances), and risk indicators (days past due, overdue debt counts, risk categories).

This endpoint enables partners to quickly assess client portfolio health, make informed credit decisions, and monitor risk exposure through detailed overdue balance breakdowns by component (interest, penalties, principal, taxes). Essential for credit management workflows and client financial monitoring.

Single Credit Line Summary

Will calculate and return a summary of a specific client's credit line.

GET /v2/clients/:clientId/summary

Path Parameters:

ParameterDescription
clientIdID of the client

Successful Response:

{
  "client": {
    "borrowerId": "8d9b1f3e-2d8a-4f5b-8c6d-0a1b2c3d4e5f",
    "clientId": "7c9b1f3e-2d8a-4f5b-8c6d-0a1b2c3d4e5f",
    "email": "mcgiber@irepair.com,info@irepair.com",
    "externalId": "cli:32321",
    "legalName": "Frodo Baggins",
    "partnerId": "6457c3ce-3887-45d6-92ca-299219ea96db",
    "status": "active"
  },
  "summary": {
    "creditMetrics": {
      "assigned": {
        "amount": "10000.00",
        "currency": "MXN"
      },
      "available": {
        "amount": "10000.00",
        "currency": "MXN"
      },
      "consumed": {
        "amount": "10000.00",
        "currency": "MXN"
      },
      "utilizationPercentage": 65.5
    },
    "debtInformation": {
      "numberOfActiveDebts": 3,
      "overdueBalanceBreakdown": {
        "interest": {
          "amount": "10000.00",
          "currency": "MXN"
        },
        "penalties": {
          "amount": "10000.00",
          "currency": "MXN"
        },
        "principal": {
          "amount": "10000.00",
          "currency": "MXN"
        },
        "taxes": {
          "amount": "10000.00",
          "currency": "MXN"
        }
      },
      "totalCurrentBalance": {
        "amount": "10000.00",
        "currency": "MXN"
      },
      "totalDebtAmount": {
        "amount": "10000.00",
        "currency": "MXN"
      },
      "totalDueBalance": {
        "amount": "10000.00",
        "currency": "MXN"
      },
      "totalOverdueAmount": {
        "amount": "10000.00",
        "currency": "MXN"
      }
    },
    "riskIndicators": {
      "clientRiskCategory": "medium",
      "maxDaysPastDue": 45,
      "numberOfOverdueDebts": 1,
      "oldestOverdueDate": "2025-07-01"
    }
  }
}

Query Credit Line Summary

List credit line summaries for multiple clients with filtering and pagination options.

GET /v2/clients/summary

Path Parameters:

ParameterDescription
clientIdID of the client to update

Query Parameters:

ParameterDescriptionType
client-idsFilter by client IDsString Array
overdue-days-minMinimum number of overdue daysNumber
credit-line-statusFilter by credit line statusString (pending, enabled, disabled)
risk-categoryFilter by risk categoryString (low, medium, high)
pagePage numberInteger
per-pageItems per pageInteger

Successful Response:

A list of ClientSummaryResponse objects, as shown in the previous example.

On this page