Overview
This API will generate QR code to receipt/return receipt. It will use receipt’s key fields to generate the QR code.
Note!
• It accepts single receipt json as a payload and it should contain UUID value in it.
• It will gives an error if the structure of the receipt is incorrect.
Signature
Signature:
POST /toolkit/qrcode
Inputs
This API accepts a string input and it should be receipt json string with UUID value:
| Header parameter | Type | Description | Value example |
|---|---|---|---|
| version | String | version number of the toolkit. |
Body of the request contains a single object that contains these fields:
| Input parameter | Type | Description | Value example |
|---|---|---|---|
| receipt/return receipt json | String | Receipt input json with UUID. |
Outputs
It will generate QR code url and QR code image as base 64 format and given it as a response.
Upon successful submission, API must return 200 status code with the below mentioned output parameters.
| Output parameter | Type | Description | Value example |
|---|---|---|---|
| qrCode | String | receipt output QR code. | |
| qrCodeImageBase64 | String | receipt output QR code image base 64. | |
| correlationId | String | Correlation id of the successful receipt. | |
| target | String | receipt output target. | |
| code | String | Success code | 200 Ok / 201 Created etc., |
| message | String | Success message | |
| details | String | Additional details |
If 4xx or 5xx codes appeared as a result, It will be mentioned with the below error output parameters.
| Output parameter | Type | Description | Value example |
|---|---|---|---|
| correlationId | String | Correlation id of the receipt error. | |
| target | String | Error occurred field information | |
| code | String | Error code | bad request/invalid data etc., |
| message | String | Error message | |
| details | String | Error additional details, useful for further investigation |
Additional considerations
This API is called only over protected HTTPS channel.