Intro
With this API you can get all the executions made to the Employment history service or the Social Security Number service.
Important Points
Path Parameter
The path parameter imss_subservice must be replaced to call the correct subservice, there are two possible path parameters that can be used to obtain the service queries.
- semanas_cotizadas
- nss
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 and the format must comply with format ISO 8601.
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": "ERROR_QUERY_PARAM_FORMAT; should be RFC 3339",
"to": "ERROR_QUERY_PARAM_FORMAT; should be RFC 3339"
}
Response
Kiban will return a list of items with the next structure:
{
"currentPage": 1,
"hasNextPage": false,
"items": [
{
"id": "64432ba4c86dc73d371c5cd6",
"createdAt": "2023-04-22T00:34:44.512Z",
"finishedAt": "2023-04-22T00:34:44.512Z",
"duration": 96134,
"status": "SUCCESS"
},
{
"id": "64432b9dc86dc73d371c5cd4",
"createdAt": "2023-04-22T00:34:37.117Z",
"finishedAt": "2023-04-22T00:34:37.118Z",
"duration": 239263,
"status": "SUCCESS"
},
{
"id": "64432ad0c86dc73d371c5cd2",
"createdAt": "2023-04-22T00:31:12.825Z",
"finishedAt": "2023-04-22T00:31:12.825Z",
"duration": 95083,
"status": "SUCCESS"
},
{
"id": "64432ab3c86dc73d371c5cd0",
"createdAt": "2023-04-22T00:30:43.36Z",
"finishedAt": "2023-04-22T00:30:43.361Z",
"duration": 100379,
"status": "SUCCESS"
}
]
}
- currentPage, the actual page returned
- 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