get https://sandbox.link.kiban.com/api/v1/bc_pm/query?itemsPerPage=&page=&from=&to=
Intro
With this API you can get all the executions made to the Buró de Crédito Persona Moral service.
Important Points
Pagination Parameters
The next two pagination parameters are mandatory to do the request.
- itemsPerPage, number of items by page, should be an integer between [1, 1000]
- page, the page index, should be an integer greater than 0
The next two parameters are required if you want to filter by a period:
- from
- to
Both parameters are a string date with the format YYYY-MM-DDTHH:MM:SSZ eg 2023-04-20T13%3A24%3A45Z with the : encoded as %3A.
Errors
The next errors can be returned if there is a problem with the request body or the execution of this service:
Errors by required field:
{
"itemsPerPage": "ERROR_QUERY_PARAM_EMPTY",
"page": "ERROR_QUERY_PARAM_EMPTY"
}
Errors by an incorrect format:
{
"itemsPerPage": "ERROR_QUERY_PARAM_FORMAT; should be integer value, [1, 1000]",
"page": "ERROR_QUERY_PARAM_FORMAT; should be integer value, > 0",
"from": "FORMAT_ERROR; Invalid date format. The format must comply with format ISO 8601",
"to": "FORMAT_ERROR; Invalid date format. The format must comply with format ISO 8601"
}
Response
Kiban will return a list of items with the next structure:
{
"currentPage": 1,
"hasNextPage": false,
"items": [
{
"id": "641cecac3c5442fb56e89770",
"createdAt": "2023-03-24T00:19:56.998Z",
"finishedAt": "2023-03-24T00:19:57.541Z",
"duration": 543108594,
"status": "SUCCESS"
},
{
"id": "641cec4e3c5442fb56e8976c",
"createdAt": "2023-03-24T00:18:22.144Z",
"finishedAt": "2023-03-24T00:18:22.45Z",
"duration": 306252902,
"status": "SUCCESS"
},
{
"id": "641cebf93c5442fb56e89767",
"createdAt": "2023-03-24T00:16:57.437Z",
"finishedAt": "2023-03-24T00:16:57.684Z",
"duration": 247130697,
"status": "SUCCESS"
}
]
}
- currentPage, the actual recovered page
- hasNextPage, indicate if there are more pages
- items, list of items in the request
- id, identifier of the request.
- createdAt, date time with the exact moment of creation.
- finishedAt, date time with the exact moment of finalization.
- duration, indicates how long it took to execute the service.
- status, status of the request