1. Overview
Support with the image upload for registration scenario.
2. API Specification
Endpoint |
|
BNC Service Code | Q4 |
3. Request
3.1. Request Header
Name | Type | M/O | Description | Sample |
---|---|---|---|---|
Content-Type | application/json | M | Content type | application/json |
Authorization | String | M | / | Bearer gp9HjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a" |
X-TIMESTAMP | String | M | yyyy-MM-dd HH:mm:ss | 2020-12-17T10:55:00+07:00 |
X-SIGNATURE | String | M | / | 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c8625 61b19a5 |
ORIGIN | String | M | / | |
X-PARTNER-ID | String | M | / | 82150823919040624621823174737537 |
X-EXTERNAL-ID | String (36) | M | / | 41807553358950093184162180797837 |
CHANNEL-ID | String | M | / | 95221 |
3.1.1 Sample Request Header
Content-type: application/json Authorization: Bearer gp9HjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a" X-TIMESTAMP: 2020-12-17T10:55:00+07:00 X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5 ORIGIN: www.hostname.com X-PARTNER-ID: 82150823919040624621823174737537 X-EXTERNAL-ID: 41807553358950093184162180797837 CHANNEL-ID: 95221
3.2 Request Body
Field | Type | M/O | Length | Description |
---|---|---|---|---|
file | MultipartFile | M | 10M | Only support the format as JPG,JPEG,PNG and PDF and the size of the image must be less than 10M. |
fileName | String | M | 256 | Support the merchant to define a name for the image. |
3.2.1 Sample Request Body
upload image request body: from-data --form 'file=@"/C:/Pictures/image.jpeg"' \ --form 'fileName="TestUploadImage"' upload pdf request body: from-data --form 'file=@"/C:/Users/caozw/Downloads/test.pdf"' \ --form 'fileName="TestUploadPdf.pdf" // When uploading non-picture files, such as uploading pdf, the fileName needs to be suffixed with .pdf
4. Response
4.1 Response Body
Field | Type | M/O | Length | Description |
---|---|---|---|---|
responseCode | String | M | 7 | SNAP Response code. |
responseMessage | String | M | 256 | SNAP response message |
mediaId | String | M | 512 | A key string will be generated by the BNC system and used for the registration scenario. |
4.1.1 Sample Response Body
Success:
{ "additionalInfo": {}, "responseMessage": "Successful", "mediaId": "qris/merchant/img/11nH_QDjwmgT9fv30CFtHQntRRVj2QQ44q30MbBNOk0.jpeg", "responseCode": "200Q400"
5. Reference
Field Code | Field Name | Description | |
---|---|---|---|
1 | M | Mandatory | Mandatory |
2 | ME | Mandatory Equal | Mandatory Equal – value in the request and the response must be the same. |
3 | C | Conditional | Conditional |
4 | CE | Conditional Equal | Conditional Equal – value in the request and the response must be the same. |
5 | O | Optional | Optional |