Add Image
Request URL
PUT /chequeimage/:AFiChequeId/:imageType
Description
This endpoint allows you to add a picture to a previously added check. You can send a check without pictures through the /cheques/sync API, and then add a picture using this method. The check ID and the image type are given as path parameters. Possible image types are "front", "back", "thumbFront", or "thumbBack".
Schema
Property table for chequeimage/:AFiChequeId/:imageType
Property | Description | Required | Schema |
---|---|---|---|
AFiChequeId | AFiChequeId | Yes | { "type": "string" } |
imageType | imageType | Yes | { "type": "string", "enum": [ "front", "back", "thumbFront", "thumbBack" ] } |
b64 | b64 | Yes | { "type": "string" } |
Request Body
Snippet Examples
javascript
const axios = require('axios');
const data = {
"b64": "a+very+long+b64+encoded_string"
}
;
const config = {
method: 'PUT',
url: '${AMPLIFI_BASE_URL}/chequeimage/:AFiChequeId/:imageType',
headers: {
'Content-Type': "application/json",
'token': "A long random string token received from /token request"
},
data
};
let result;
try {
result = await axios.request(config);
if (result.status === 200) {
console.log(JSON.stringify(result.data));
}
} catch (err) {
console.log({
errCode: err.code,
responseStatus: err.response && err.response.status,
data: err.response && JSON.stringify(err.response.data)
});
}
cURL
curl --location "AMPLIFI_BASE_URL/chequeimage/:AFiChequeId/:imageType" --data "{ \"b64\":\"a+very+long+b64+encoded_string\"}" --header "Content-Type: application/json" --header "token: A long random string token received from /token request"
Successful Response Examples
200 CHEQUEIMAGE/:AFICHEQUEID/:IMAGETYPE SUCCESSFUL RESPONSE
HEADERS
Header | Value |
---|---|
Content-Type | application/json |
token | A long random string token received from /token request |
PARAMETERS
Parameter | Description | Value |
---|---|---|
AFiChequeId | [required] | qweawcqlq5if7bzdhkpkhyvopbtzbjnqvmvmokpuxtyacij |
imageType | [required] | back |
REQUEST BODY
RESPONSE BODY