Fetch QR code for B2C Invoice#
If you have created a QR Code for a B2C Invoice, and you wish to re-download the image please use following API.
Route
/enriched/o/{flynn-version}/b2c-invoices/{reference-id}
- active ‘flynn-version’: v1.0
- method: GET
URL Parameters#
| Name | Description | Type |
|---|---|---|
| flynn-version | version of the API for example, v1.0 |
string |
| reference-id | unique id for the QR code which client got in the response while creating it | string |
Headers#
All required headers to make an authenticated API call.
Response#
JSON#
When you have accept header set as application/json.
Sample Response Body
{
"data": {
"reference-id": "bda53dd2-a32a-40c7-8f43-6e9af442fa7c",
"code": "iVBORw0KGgoAAAANSUhEUgAAAMgAAADIAQAAAACFI5MzAAABtklEQVR4Xu2WUWrEMAxEDb6WQVcX+FqG7Dx5NwlL+ye1PzFpWOsFLE1GStvx22rfgXM95CGsvyTeWj/mnPoxhs3YVpB57LjN1VfrbGuIx07hofjc2yLi3SPs9n6wiCxFVhttVBLgDh6rGdsSgiXmtb68k0dYOlmlDqR9R/KJt47Xm+JLL1DLSgh6qlRlYD7MjWwqiFzY8QdtzP1ySC6RkMfCjIqbwn5Wmkv2e5OoHbOYBP5kkEtcKsJjVvA7tvkkahxdxeoZOivcmE9QkwpNTWXhkvPNpRJq41tBaKHqTdFMonay/c2gp8L0JQQdJagGEaLqdiqaTHTujg3EVJmnBtmE6z2R7D57U8kyncm5K564a51KYu6FR9RaMW2v3HKJ6X8GwyLRXP2uaCLZb81iuOpvcqsgUWXnS0G16GpFhDFOAqRDc10Z5BKZQp9YFWr4JUxfQhpu39NotG34AsLC8bIJRok8KggtG5No3+T+j6K5ZHI5Rw8KPm6K5hJHTllEzaVstKyOUJ4zLFp4pYrQV4w8p7NWEdGlDKSmZkQ02F3rPCIVO0nIJwfCbsvnk5/XQx7C+n/yAvs6Rn/Fj4oAAAAAAElFTkSuQmCC"
}
}
How to use generate image from the given json?
The attribute code in the above representational response is Base64 encoded string of the png image.
To re-create an image, first decode base64 string and get bytes array.
Then use decode bytes to generate generate a png image.
Image (png)#
When you have accept header set as image/png.
Sample Response Image

Image (bmp)#
When you have accept header set as image/bmp.
Sample Response Image

Last update: August 18, 2021