AltScore
Credit Management System (CMS)

Partners API

This API allows managing partners in the system. It provides endpoints to create, list, retrieve, and update partners, as well as perform specific operations such as obtaining the current partner.

The Partner Object

The Partner object represents a partner or collaborator in the system.

{
  "partnerId": "000f29df-28bd-4715-bbac-1f9340990ef3",
  "name": "Corporación Olivárez y Colunga",
  "shortName": "Olivares",
  "taxId": "UAT:68519327560",
  "email": "credits@superlending.com",
  "avatar": "https://www.example.com/avatar.png",
  "isAggregator": false,
  "status": "enabled",
  "createdAt": "2021-01-01T00:00:00Z",
  "updatedAt": "2021-01-01T00:00:00Z"
}

Attributes

AttributeDescriptionType
partnerIdUnique identifier of the partnerString (UUID)
nameLegal name of the partnerString
shortNameShort name of the partner for use in reportsString
taxIdTax identification of the partnerString
emailEmail address of the partnerString
avatarURL of the partner's avatarString (URL)
isAggregatorIndicates if the partner can manage other groupsBoolean
statusStatus of the partner (pending, enabled, disabled)String
createdAtDate and time of partner creationString (ISO 8601)
updatedAtDate and time of the last partner updateString (ISO 8601)

Endpoints

List Partners

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

GET /v2/partners

Query Parameters:

ParameterDescriptionType
nameFilter by partner nameString
statusFilter by partner statusString
is-aggregatorFilter by whether it is an aggregator or notBoolean
aggregatorFilter by aggregator IDString
tax-idFilter by tax identificationString
idsList of partner IDs to filterArray
offsetNumber of items to skipInteger
limitMaximum number of items to returnInteger
sort-directionSorting direction (asc or desc)String
pagePage numberInteger
per-pageItems per pageInteger

Successful Response:

[
  {
    "partnerId": "000f29df-28bd-4715-bbac-1f9340990ef3",
    "name": "Corporación Olivárez y Colunga",
    "taxId": "UAT:68519327560",
    "email": "me@corpo.com",
    "shortName": "Olivares",
    "isAggregator": false,
    "tenant": "altscore",
    "avatar": "https://www.example.com/avatar.png",
    "createdAt": "2021-01-01T00:00:00Z",
    "updatedAt": "2021-01-01T00:00:00Z"
  }
]

Create a New Partner

Creates a new partner in the system.

POST /v2/partners

Query Parameters:

ParameterDescriptionType
partner-idForce ID of the new partner (optional)String

Request Body:

The request body must contain a JSON object with the following attributes:

AttributeDescriptionTypeRequired
nameLegal name of the partnerStringYes
shortNameShort name of the partner for use in reportsStringYes
taxIdTax identification of the partnerStringYes
emailEmail address of the partnerStringYes
avatarURL of the partner's avatarStringNo
isAggregatorIndicates if the partner can manage other groupsBooleanNo
aggregatorID of the aggregator partner (if applicable)StringNo

Example Request:

{
  "name": "Nuevo Partner S.A.",
  "shortName": "NuevoP",
  "taxId": "12345678901",
  "email": "contacto@nuevopartner.com",
  "avatar": "https://www.nuevopartner.com/avatar.png",
  "isAggregator": false
}

Successful Response:

The response will be the complete Partner object created, including the assigned ID and other system-generated fields.

Get the Current Partner

Retrieves the information of the partner associated with the current user.

GET /v2/partners/me

Successful Response:

The response will be the complete Partner object of the current user.

Get a Specific Partner

Retrieves the information of a specific partner by its ID.

GET /v2/partners/:partnerId

Path Parameters:

ParameterDescription
partnerIdID of the partner to retrieve

Successful Response:

The response will be the complete Partner object of the requested partner.

Error Handling

The API may return the following error codes:

CodeDescription
400Bad Request
401Unauthorized
404Not Found

Errors will include a descriptive message in the response body.

On this page