Skip to main content
All CollectionsQR CodesIntegrations and APIAPI
Introduction to Uniqode’s QR Code API
Introduction to Uniqode’s QR Code API

Here's how to use our dynamic and static QR Code API to integrate Uniqode with your favorite applications easily.

Joy Arputha avatar
Written by Joy Arputha
Updated over 2 weeks ago

Love the ease of creating and managing your QR Codes within your preferred software platform? Learn how to use our dynamic and static QR Code API and make Uniqode talk easily with your favorite applications.

API expands to ‘Application Programming Interface’, allowing two standalone applications to talk to each other by functioning as an interface. With Uniqode’s QR Code API (both dynamic and static), you can integrate your own application or website with ours, and set up QR Code workflows from the specific software application or dashboard you like to work from.

Uniqode’s QR Code API solution can be integrated into your app to create dynamic and static QR Codes, track QR Code scans, create QR Codes in bulk, add multiple users, and more.

This applies to ANY QR Code you create—regardless of the particular QR Code type or use case—be it vCard QR Codes/Digital Business Cards, custom-branded landing page QR Codes with logos, or simply bulk QR Code generation for inventory management and tracking.

NOTE: Uniqode API is available to all users on the PRO plan and above.

More on Uniqode’s QR Code API

Uniqode’s API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

The Uniqode API uses an API key to authenticate requests.

Your API key carries many privileges, so keep it secure! Do not share your API keys in publicly accessible areas such as GitHub, client-side code, etc.

NOTE: All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

  • The Uniqode plan that you have subscribed to will determine the number of API requests you can make:

PLAN

RATE LIMIT

USAGE LIMIT

Pro

10

requests/second

250K

requests/month

Plus

25

requests/second

500K

requests/month

Business +

100

requests/second

2M

requests/month

1. Where can I find the API key on the Uniqode dashboard?

  1. Login to your account on the Uniqode dashboard.

  2. Find the API section on the dashboard navigation bar that’s on the left.

  3. Copy your API key and Organization ID—this will be required for authenticating Uniqode’s API.

    Users need the Organization ID to have multi-user access management functionality in their Uniqode plan. This is necessary to make organization-specific API requests based on the organizations you have specified in your account.

2. How do I authenticate Uniqode API on my preferred software platform?

  1. In your application or software tool of choice, add a plain text header field named Authorization. The contents of the header will be Token XXX, where XXX is your API Key.

  2. Here’s an example header:

    curl -X "GET" "https://api.uniqode.com/api/2.0/qrcodes/" -H "Authorization: Token Your.API.Key-HERE" -H "Content-Type: application/json"

  3. Once this authentication is added to your app, you can start using Uniqode API to set up custom QR Code workflows within your app itself.

3. Overview of the APIs supported by Uniqode

4. Understanding different Uniqode API objects

QRCode objects allow you to perform actions on your QR Codes. You can create a QR Code, retrieve or update individual QR Codes, or a list of all your QR Codes.

Field

Type

Description

id

integer

read only

Unique identifier of the QR Code

name

string

required

The name of the QR Code

view_limit

integer

Limit to the number of times the QR Code can be scanned

domain

integer

Base domain for the QR Code URL

qr.tapnscan.me: 1, qrcodes.pro: 2

Default: 2

location_enabled

boolean

Collect GPS analytics from user scanning the QR Code

Default:false

password

boolean

Password to view the contents of the QR Code

fields_data

object

required if qr_type=1

Fields data for the QR Code

attributes

Attributes

Attributes data for the QR Code

qr_type

integer

required

QR type (Static: 1, Dynamic: 2)

Default: 2

organization

integer

required

Id of the organization to which the QR Code belongs to

place

integer

ID of the place where the QR Code is deployed

Default:Default place in organization

maintainer

integer

ID of the user that maintains the QR Code

url

string

URL of the QR Code

state

string

read only

State of the QR Code (Active: A, Sleeping: S)

Default: A

place_data

list[object]

read only

Place data associated with place ID.

tags

list[integer]

List of associated tag IDs

tag_data

list[object]

read only

Tag data associated with attached tag IDs.

meta

object

Metadata associated with the QR Code

additional_params

object

Additional Params to add in the QR Code URL

created

timestamp

read only

Created timestamp of the QR Code

updated

timestamp

read only

Last updated timestamp of the QR Code

heartbeat

timestamp

read only

Timestamp when the QR Code was last detected

campaign

Campaign

required if qr_type=2

Campaign object associated with the QR Code

attributes object (these correspond to the design of the QR Code):

Field

Type

Description

margin

string

Margin to be applied around QR Code

Default: 15

dotScale

string

Size of each dot [0-1]

Default: 0.35

backgroundImage

string

URL of background image

backGroundColor

string

Background color in format #RRGGBB

Default: #ffffff

eyeFrameShape

string

Shape of QR Code eye-frame

Default: square

Options: square,circle,rounded,left-leaf, right-leaf

eyeBallShape

string

Shape of QR Code eye-ball

Default: square

Options: square,circle,rounded,left-leaf,left-diamond,right-diamond

eyeFrameColor

string

Eye Frame color in format #RRGGBB

Default: #000000

eyeBallColor

string

Eye Ball color in format #RRGGBB

Default: #000000

dataPattern

string

QR Code data pattern

Default=square

Options: square,circle,kite,left-diamond,right-diamond

colorDark

string

Data Pattern color dark in format #RRGGBB

Default: #000000

colorLight

string

Data Pattern color light in format #RRGGBB

Default: #ffffff

gradientType

string

QR Code gradient scheme

Default: none

Options: none,lineaar,radial

frameStyle

string

QR Code frame

Default: none

Options: none,banner-top,box-top,box-bottom,banner-bottom,balloon-top,balloon-top

frameColor

string

Frame color in format #RRGGBB

Default: #000000

frameText

string

Text to be displayed in frame

Default: SCAN ME

logoImage

string

URL of logo image

logoScale

string

Size of logo [0.1 - 0.6]

Default: 0.15

logoCornerRadius

string

Radius of corners of logo

Default: 8

logoMargin

string

Margin to be applied around logo image

Default: 0.15

campaign object (these correspond to the campaign associated with dynamic QR Codes—not applicable to static QR Codes):

Field

Type

Description

id

integer

read only

Unique identifier of the Campaign

name

string

read only

Campaign title

content_type

integer

required

Campaign type

custom_url

string

required if content_type is 1

Custom URL to redirect upon scanning the QR Code

markdown_card

integer

required if content_type is 2

Markdown Card to display upon scanning the QR Code

form

integer

required if content_type is 3

Feedback Form to display upon scanning the QR Code

schedule

integer

required if content_type is 4

Time based campaign setting

app_links

object

required if content_type is 5

OS based redirecting

vcard_plus

object

required if content_type is 7

vCard to display upon scanning the QR Code

social_media

object

required if content_type is 8

Sociaal media page links to display upon scanning the QR Code

facebook_page

object

required if content_type is 9

Link the QR Code to facilitate engagement with your Facebook page

coupon

object

required if content_type is 10

Coupon to display upon scanning the QR Code

business_card

object

required if content_type is 11

Business Card to display upon scanning the QR Code

pdf

object

required if content_type is 13

PDF to display upon scanning the QR Code

restaurant_menu

object

required if content_type is 14

Menu to display upon scanning the QR Code

campaign_active

string

read only

Current campaign status

organization

string

read only

Organization the object belongs to

start_time

timestamp

Specify the time to begin the campaign

end_time

timestamp

Specify the end time for the campaign

created

timestamp

read only

Created timestamp

updated

timestamp

read only

Last updated timestamp

In addition to the above, we have more API objects that allow you to make varying requests across Uniqode and the software tools that you use. These include Organizations, BulkQRCode, LandingPage (Markdown Card), User, and more.

To dive into the details, check out our API documentation here: https://apidocs.uniqode.com/.

Read on for examples of API workflows that allow you to create static and dynamic QR Codes for different QR Code campaign types—or put simply—the specific use case you’re using QR Codes for. It could be a custom URL website QR, a landing page QR, a feedback QR, etc.

We will look at examples for both kinds of QR Codes: dynamic QR Codes as well as static.

5. Example API Workflow: Creating Dynamic QR Codes

Dynamic QR Codes allow you to edit the encoded content on the backend, even after they are deployed. They are also tracking-enabled—meaning that you get precise analytics pertaining to the user engagement they’ve garnered.

The behavior of dynamic QR Codes is dependent on their campaign object. The following campaign types are supported for dynamic QR Codes:

Setting up API for creating dynamic QR Codes that direct to a custom URL.

Custom URL

The Custom URL campaign drives users to the specified URL once they scan the QR Code.

content_type : 1

Fields: custom_url

BODY Raw:

{

"name": "Custom URL",

"organization": ,

"qr_type": 2,

"campaign": {

"content_type": 1,

"custom_url": "https://www.uniqode.com"

},

"location_enabled": false,

"attributes":{

"color":"#2595ff",

"colorDark":"#2595ff",

"margin":80,

"isVCard":false,

"frameText":"UNIQODE",

"logoScale":0.1992,

"frameColor":"#2595FF",

"frameStyle":"banner-bottom",

"logoMargin":10,

"dataPattern":"square",

"eyeBallShape":"circle",

"gradientType":"none",

"eyeFrameColor":"#2595FF",

"eyeFrameShape":"rounded"

}

}

#6 Example API Workflow: Creating Static QR Codes

Static QR Codes, as opposed to dynamic QR Codes, do not offer the flexibility to edit the content they link to on the backend once created. They are also not tracking-enabled, meaning you won’t be able to track scans and other forms of user engagement they receive.

However—for one-off use cases where the content encoded into the QR Code is unlikely to change or usage contexts where tracking is not that important, static QR Codes can be ideal.

Here are the static QR Code types supported by Uniqode:

Setting up API for creating static QR Codes that direct to a specific website/URL.

BODY Raw

{

"name": "Static Website QR Code",

"organization": ,

"qr_type": 1,

"fields_data": {

"qr_type": 1,

"url": "https://www.uniqode.com"

},

"attributes":{

"color":"#2595ff",

"colorDark":"#2595ff",

"margin":80,

"isVCard":false,

"frameText":"UNIQODE",

"logoImage":"https://d1bqobzsowu5wu.cloudfront.net/15406/36caec11f02d460aad0604fa26799c50",

"logoScale":0.1992,

"frameColor":"#2595FF",

"frameStyle":"banner-bottom",

"logoMargin":10,

"dataPattern":"square",

"eyeBallShape":"circle",

"gradientType":"none",

"eyeFrameColor":"#2595FF",

"eyeFrameShape":"rounded"

}

}

Apart from the workflows we’ve discussed, Uniqode API allows you to integrate your applications with our dashboard for other QR Code processes.

These include pulling out analytics for your QR Code campaigns, bulk-generation of QR Codes, ensuring multi-user access management, uploading media assets for your QR designs and the linked content, and more.

Again, to learn more about these and dive deeper, check out our comprehensive API documentation:

Did this answer your question?