二维彩虹API文件

我们的自定义二维码API能为商家提供专业的解决方案,无论您是需要带有追踪系统的自定义二维码模板、动态二维码、批量二维码还有需要将二维码整合到CRM之中。

有任何其他问题,您可以随时与我们联系,我们的API可以在世界范围内使用,联系我们以获取更多信息。我们也可以为移动支付来设计定制二维码。

API结果示例:
example 1
example 2
example 3
example 4
example 5

文档

创建二维码

1.

首先登陆并获取API密钥授权:进入追踪数据--> 账户设置 --> API 密钥

2.
用此API创建自定义视觉二维码。这将创建很容易追踪访问者的动态二维码活动。
3. 生成自定义静态二维码
网站/api/qr/static
方法POST
AuthorizationBearer API KEY
响应Binary Image File (PNG, SVG)
Request parameter
qrCategorystringurlqrCategory 定义不同类型的二维码,例如:网址链接,电子名片等。查看下方qrCategory 列表
textStringhttps://qrtiger.com您想要跳转的网址链接将会被嵌入进此二维码
sizenumber500二维码尺寸
logourlnull添加任何logo的链接来使logo位于二维码的正中心
colorDarkstring#5e0bf0二维码样式的颜色
backgroundColorString#ffffff二维码的背景颜色(注意:为确保二维码可扫描请尽量选择明亮的颜色)
gradientBooleanfalse设置 “true” 使用颜色渐变
grdTypeNumber0 (Left-to-Right)查看下方 grdType列表
color01String#5e0bf0二维码样式的渐变颜色1
color02String#f30505二维码样式的渐变颜色2
eye_colorBooleanfalse设置 “true” 更改图眼颜色
eye_color01String#5e0bf0外部图眼的颜色
eye_color02String#f30505内部图眼的颜色
eye_outerStringeyeOuter0外部图眼的不同设计,从下方列表查看所有设计
eye_innerStringeyeInner0内部图眼的不同设计,从下方列表查看所有设计
qrDataStringpattern0二维码数据样式的不同设计,从下方列表查看所有设计
qrFormatStringpng下载“PNG”或“SVG”格式的二进制图像文件
transparentBkgBooleanfalse是否使二维码背景为透明背景
frameNumbernull是否给二维码添加一个边框. 从下方列表查看边框设计
frameColorStringnullFrame color 改变边框文本的颜色
frameTextStringSCAN MEFrame text 在二维码边框中显示
示例
网站/api/qr/static
方法POST
参数
{
  "size": 500,
  "colorDark": "rgb(5,64,128)",
  "logo": "scan_me.png",
  "eye_outer": "eyeOuter2",
  "eye_inner": "eyeInner1",
  "qrData": "pattern0",
  "backgroundColor": "rgb(255,255,255)",
  "transparentBkg": false,
  "qrCategory": "url",
  "text": "https://qrtiger.com"
}
响应
example 5
{
  "data": "base 64 QR image data",
  "url": "1601477992984.png"
}
4. 获取不同种类二维码的所有活动列表
网站/api/campaign/
方法GET
AuthorizationBearer API KEY
响应JSON object of QR list
GET /campaign/?page=1&limit=5&sort=1
查询参数
参数违约描述
page1页码
limit5每页的二维码数量
sort1根据日期(1)或名称(2)排序
categoryurlcategory 定义不同种类二维码,例如网址链接,电子名片等。查看下方 qrCategory 列表.
示例
网站/api/campaign/?page=1&limit=5&sort=1&category=url
方法GET
参数
{
  "size": 500,
  "colorDark": "rgb(5,64,128)",
  "logo": "scan_me.png",
  "eye_outer": "eyeOuter2",
  "eye_inner": "eyeInner1",
  "qrData": "pattern0",
  "backgroundColor": "rgb(255,255,255)",
  "transparentBkg": false,
  "qrCategory": "url",
  "text": "https://qrtiger.com"
}
响应
{
  "query": {
    "limit": 1,
    "page": 1,
    "total": 146
  },
  "data": [
    {
      "scans": 0,
      "_id": "5f6f373a33320a0ca52581b0",
      "qrId": "HNXP",
      "qrType": "qr2",
      "qrCategory": "url",
      "shortUrl": "https://qrtiger.com/HNXP",
      "redirectUrl": "https://www.qrcode-tiger.com/",
      "murlData": [],
      "qrName": "Campaign HNXP",
      "qrImage": "HNXP.png",
      "createdAt": "2020-09-26T12:42:34.070Z",
      "updatedAt": "2020-09-26T12:42:34.070Z",
      "user": null,
      "id": "5f6f373a33320a0ca52581b0"
    }
  ]
}
5. 生成一个自定义视觉动态二维码
网站/api/campaign/
方法POST
AuthorizationBearer API KEY
响应Binary Image File (PNG, SVG)
查询参数
参数类型违约描述
qrUrlStringhttps://qrtiger.com您想要跳转的网址链接将会被嵌入进此二维码
qrTypeStringqr2qrType 定义二维码活动,例如单个网址链接的跳转或多个网址链接的跳转 (“qr2” or “murl”)
qrCategoryStringurlqrCategory 定义不同类型的二维码,例如:网址链接,电子名片等。查看下方qrCategory 列表
qr:JSON Object在此设计二维码的颜色,样式,图眼等.
sizeNumber500二维码尺寸
logoString (url)null添加任何logo的链接来使logo位于二维码的正中心
colorDarkString#5e0bf0二维码样式的颜色
backgroundColorString#ffffff二维码的背景颜色(注意:为确保二维码可扫描请尽量选择明亮的颜色)
gradientBooleanfalse设置 “true” 使用颜色渐变
grdTypeNumber0 (Left-to-Right)查看下方 grdType列表
color01String#5e0bf0二维码样式的渐变颜色1
color02String#f30505二维码样式的渐变颜色2
eye_colorBooleanfalse设置 “true” 更改图眼颜色
eye_color01String#5e0bf0外部图眼的颜色
eye_color02String#f30505内部图眼的颜色
eye_outerStringeyeOuter0外部图眼的不同设计,从下方列表查看所有设计
eye_innerStringeyeInner0内部图眼的不同设计,从下方列表查看所有设计
qrDataStringpattern0二维码数据样式的不同设计,从下方列表查看所有设计
qrFormatStringpng下载“PNG”或“SVG”格式的二进制图像文件
transparentBkgBooleanfalse是否使二维码背景为透明背景
frameNumbernull是否给二维码添加一个边框. 从下方列表查看边框设计
frameColorStringnullFrame color 改变边框文本的颜色
frameTextStringSCAN MEFrame text 在二维码边框中显示
示例
网站/api/campaign
方法POST
Request Body
{
  "qr": {
    "size": 500,
    "colorDark": "rgb(5,64,128)",
    "logo": "1545827032075.png",
    "eye_outer": "eyeOuter2",
    "eye_inner": "eyeInner1",
    "qrData": "pattern0",
    "backgroundColor": "rgb(255,255,255)",
    "transparentBkg": false,
    "qrCategory": "url",
    "text": "https://www.qrcode-tiger.com/"
  },
  "murlData": [],
  "qrUrl": "https://www.qrcode-tiger.com",
  "qrType": "qr2",
  "qrCategory": "url",
  "qrId": "MP72"
}
Request Body
example 5
grdType (Default 0)
参数类型Value描述
左-右StringlinearGradient flow left to right
从上到下StringupDownGradient flow Top to Bottom
西北 - 东南Stringdiagonal1Gradient flow Digaonaly Downword
南西 - 北东Stringdiagonal2Gradient flow Diagonaly Upword
中心渐变StringradialGradient flow Radially
eye_outer (Default 0)
参数类型Value描述
eye_outerStringeyeOuter0
eyeOuter1
eyeOuter2
eyeOuter3
eyeOuter4
eyeOuter5
eyeOuter6
eyeOuter7
eyeOuter8
eyeOuter9
eye_inner
参数类型Value描述
eye_innerStringeyeInner0
eyeInner1
eyeInner2
eyeInner3
eyeInner4
eyeInner5
eyeInner6
eyeInner7
eyeInner8
eyeInner9
QrData
参数类型Value描述
qrDataStringpattern0
pattern1
pattern2
pattern3
pattern4
pattern5
pattern6
pattern7
pattern8
pattern9
pattern10
Frame (Default : null)
参数类型Value描述
frameNumber1
2
3
5. 追踪二维码数据,扫描量,扫描国家,扫描城市,扫描设备类型
网站/data/qrid?period=month&tz=Asia/Singapore
方法GET
AuthorizationBearer API KEY
响应JSON object of track data
Request parameter
参数类型描述
qrIdparamsUnique id of the qr
periodquery
“day” (Day viz data of current day/ today)
“week” (Day viz data of current week)
“month” (Day viz data of current month)
“months” (Month viz data of the current year)
“year” (Yearly data)
tzqueryDefault Asia/Singapore
Response
{
  "data": {
    "campaign": {
      "scanLoop": false,
      "bulk": false,
      "scans": 5,
      "scanCounter": 0,
      "_id": "5f297b7b88c80a7e70afbbc5",
      "qrId": "BXFO",
      "qrType": "qr2",
      "qrCategory": "url",
      "shortUrl": "https://qrtiger.com/BXFO",
      "redirectUrl": "http://hello.com.vn",
      "murlData": [],
      "qrName": "Campaign BXFO",
      "qrImage": "BXFO.png",
      "owner": "5a84402c08004f37a2b87831",
      "scanData": [],
      "createdAt": "2020-08-04T15:15:07.057Z",
      "updatedAt": "2020-08-29T00:39:47.416Z",
      "__v": 0,
      "user": null,
      "id": "5f297b7b88c80a7e70afbbc5"
    },
    "city": [
      {
        "_id": {
          "city": "New York"
        },
        "count": 3
      },
      {
        "_id": {
          "city": "Ho Chi Minh City"
        },
        "count": 2
      }
    ],
    "data": [
      {
        "_id": {
          "device": "iOS",
          "loc": "VN",
          "city": "Ho Chi Minh City"
        },
        "count": 1
      },
      {
        "_id": {
          "device": null,
          "loc": "NY",
          "city": "New York"
        },
        "count": 3
      },
      {
        "_id": {
          "device": null,
          "loc": "VN",
          "city": "Ho Chi Minh City"
        },
        "count": 1
      }
    ],
    "country": [
      {
        "_id": {
          "loc": "VN"
        },
        "count": 2
      },
      {
        "_id": {
          "loc": "NY"
        },
        "count": 3
      }
    ],
    "device": [
      {
        "_id": {
          "device": "Android"
        },
        "count": 4
      },
      {
        "_id": {
          "device": "iOS"
        },
        "count": 1
      }
    ],
    "scans": 5,
    "unique": {
      "label": [
        {
          "month": "Aug",
          "year": 2020
        }
      ],
      "scans": [
        2
      ]
    },
    "graph": {
      "label": [
        {
          "month": "Aug",
          "year": 2020
        }
      ],
      "scans": [
        5
      ]
    }
  }
}
6. 上传您的logo
网站/accounts/uploads/
方法POST
Content-Typemultipart/form-data
Form-FieldFile
ResponseImage file url {“qrUrl”: 1526460566643.png}