Dev.Sniip.com API Reference

Developer portal for Sniip API's

API Endpoint
https://api.sniipit.com/api
Schemes: https
Version: 1.0.0

Paths

Generate QR code

POST /qr-code/generate

Generate one or multiple QR codes. For each qr code, reference must be provided for identification in response.

Create QRCode

Request Example
{
  "type": "b",
  "contents": [
    {
      "reference": "9871",
      "clientCode": "BCC",
      "billType": "RAT",
      "customerRef": "123456789012950",
      "dueDate": "170916",
      "amount": "00002099",
      "dueAmount": "00002000"
    },
    {
      "reference": "9872",
      "clientCode": "BCC",
      "billType": "RAT",
      "customerRef": "003456789012950",
      "dueDate": "170916",
      "amount": "00002099",
      "dueAmount": "00002000"
    }
  ]
}
200 OK

Request was successful

422 Unprocessable Entity

Request was failed

Response Example (200 OK)
{
  "qrcodes": [
    {
      "status": "success",
      "reference": "9871",
      "deeplink": "www.qr.lk/?b=BCCRAT1234567890129501709160000209900002000",
      "qrcode": "https://s3-ap-southeast-2.amazonaws.com/sniip-qrcode/BCCRAT1234567890129501709160000209900002000_default_template.png"
    },
    {
      "status": "success",
      "reference": "9872",
      "deeplink": "www.qr.lk/?b=BCCRAT0034567890129501709160000209900002000",
      "qrcode": "https://s3-ap-southeast-2.amazonaws.com/sniip-qrcode/BCCRAT0034567890129501709160000209900002000_default_template.png"
    },
    {
      "status": "failed",
      "reference": "9999",
      "error": {
        "name": "ValidationError",
        "message": "The `QRCodeB` instance is not valid. Details: `dueAmount` can't be blank (value: undefined).",
        "statusCode": 422
      }
    },
    {
      "status": "failed",
      "reference": null,
      "error": {
        "name": "ValidationError",
        "message": "The `QRCodeB` instance is not valid. Details: `reference` can't be blank (value: undefined).",
        "statusCode": 422
      }
    }
  ]
}
Response Example (422 Unprocessable Entity)
{
  "error": {
    "statusCode": 422,
    "name": "ValidationError",
    "message": "The `QRCode` instance is not valid. Details: `contents` can't be blank (value: undefined)."
  }
}

Schema Definitions

QRCode: object

type: string b
contents: object[]
Example