Image Media Upload
Upload Image files to use it later in other KYC APIs
API Details
Request
Type | URL |
---|---|
Post | https://api.attestr.com/api/{version}/public/media/image/multipart |
Request Body Parameters
Type | Name | Description | Optional (Default) | Min Version | Max Version |
---|---|---|---|---|---|
File | file | Image File to be uplaoded. Only jpeg and png files are supported. | Required | v1 |
Request Header Parameters
Type | Name | Value / Description | Optional | Min Version | Max Version |
---|---|---|---|---|---|
String | Content-Type | multipart/form-data | Required | v1 | |
String | Authorization | Basic {authToken} | Required | v1 |
Response
Http Status Code 200
Key | Description | Type | Min Version | Max Version |
---|---|---|---|---|
_id | The media Id. | String | v1 | |
originalName | Original name of the image file uploaded | String | v1 |
Sample Response
{
"_id": "MX12zfeuv1272pkt8gc5l0",
"originalName": "input-image.jpeg"
}
Error Response
Parameter | Type | Description |
---|---|---|
code | Number | Unique error codes for different errors. Always available. |
message | String | Error message describing the error. Always Available. |
details | String | Detail error message. Available only for certain types of errors. |
Error Codes
HTTP Status | Error Code | Error Message |
---|---|---|
400 | 4001 | Malformed data or missing required parameter values |
400 | 4007 | Incompatible file type |
400 | 4005 | Image file size exceeds the maximum permissible limit of 15MB |
401 | 4016 | Invalid client authorization |
403 | 4031 | Unauthorized access |
403 | 4039 | Client's IP address is not whitelisted |
429 | 4291 | Maximum account rate limit exceeded |
429 | 4292 | Maximum API rate limit exceeded |
429 | 4293 | Maximum account daily limit exceeded |
429 | 4294 | Maximum API daily limit exceeded |
500 | 5001 | Request could not be processed |
Sample Error Response
{
"httpStatusCode": 400,
"code": 4007,
"message": "Incompatible file type"
}