post https://sandbox.link.kiban.com/api/v2/nip/auditoria_bc_pm
Important points
Request
The elements to send in the request body are:
field Name | type | required | Description |
---|---|---|---|
startDate | Alphabetic | Yes | Indicate the start date with the format ISO 8601 date format |
endDate | Alphabetic | Yes | Indicate the end date with the format ISO 8601 date format |
Successful response
To know the fields of a successful response we suggest you look at our example called success in the response section.
Inside the response object you will receive the csvBase64 parameter.
field Name | Description |
---|---|
csvBase64 | Will be a base64 string with the content of the generated CSV file |
{
"id": "6503a50fbb44cde7af340493",
"createdAt": "2023-09-15T00:27:59.236667712Z",
"finishedAt": "2023-09-15T00:27:59.289182666Z",
"duration": 52,
"status": "SUCCESS",
"request": {
"endDate": "2023-09-15T23:17:26.446Z",
"startDate": "2023-06-29T16:17:26.446Z"
},
"response": {
"csvBase64": "LHNlcD07Ck5vLjtObyBkZSB0cmFuc2FjY2lvbiBSZWZlcmVuY2lhIGRlbCBPcGVyYWRvcjtGZWNoYTtSYXrDs24gU29jaWFsO1JGQwoxOzEyMzIxMzsyMDIzLTA5LTE0O0tJQkFOIENMT1VEO0tJQkE5NzA4MTVBQkMK"
}
}
Just decode in base64 the value in response.csvBase64 and you will get the plain text like below :
Possible Errors
Required fields
If any of the required fields are not provided in the request body, a 400 bad request HTTP error code will be returned.
{
"endDate": "EMPTY_ERROR; can't be empty",
"startDate": "EMPTY_ERROR; can't be empty"
}
Invalid format
If any of the required fields does not conform the specific format in the request body, a 400 bad request HTTP error code will be returned.
{
"endDate": "FORMAT_ERROR; make sure the date format is correct, should be: 2006-01-02T15:04:05.700Z",
"startDate": "FORMAT_ERROR; make sure the date format is correct, should be: 2006-01-02T15:04:05.700Z"
}
End date before start date
If the end date is before the start date, you will receive an HTTP error with code 400.
{
"endDate": "the end date cannot be less than the start date"
}