Manage trackable QR Codes

Notes

API allows you to create, retrieve, update and delete QR Code. Each method operates per one QR Code.
Methods listed on this page are only available to registered users.

Get QR Code

GET track/qrcode/{id}?auth={auth}

Parameters

auth string required API key for authentication. This parameter is required. Go to your Profile to get your API key.
id string required QR Code identifier

Response

id string QR Code identifier.
campaignId string Campaign identifier for reference.
name string QR Code name.
content string Content encoded into QR Code.
comment string User's comment, private.
urlinfo string Short description in shorten URL.
shortUrl string URL for tracking.
imageUrl string URL to QR Code image.
scans int Number of QR Code scans.
created timestamp Date and time when the QR Code was created.
properties object QR Code image properties, see below for Properties entity
location object Geographical location of the QR Code, see below for Location entity
isAvailable bool A value indicating whether QR Code data is available to user. May be restricted according to user's package plan.
isScheduleEnabled bool A value indicating whether scheduling is enabled. Default: false
schedule array Scheduled QR Codes can change content at the specific time, array of Schedule Event objects, see below
Properties entity:
size int Size QR Code module size ("pixel" size), values 1..20, default: 8
version int QR Code version, defines capacity and overall image size. Values 1..40 or -1 (or unspecified) value for optimal version (default value)
padding int Padding from image bounds, module units, values 0..20, default: 4
em string Encoding mode, defines what kind of characters can encode and affects total image size; values:
  • byte - can store any data, default value
  • numeric - only numbers are allowed 0-9
  • alphanumeric - numbers 0-9, letters A-Z, subset of punctuation .$%*/:-
ec string Error Correction level, defines how much code can be damaged but still recoverable, affects capacity and image size; values: M (default), H, L, Q
foreground string Foreground color as ARGB string
background string Background color as ARGB string
Location entity:
address string Address, city, country or location name
latitude double Latitude
longitude double Longitude
Schedule Event entity:
content string Content to be display active at the appointed time
recurrence int Schedule recurrance type: day of week, at the specific date
date timestamp Date when content becomes available, UTC? time? when exactly, yyyy-MM-ddTHH:mm:ssZ

Example

Get the QR Code data with id b8881b8fbd6840b0a8a2ed304bcb37b0. Note that response is re-formatted and simplified for human reading.
Request:
GET http://www.esponce.com/api/v3/track/qrcode/b8881b8fbd6840b0a8a2ed304bcb37b0?auth=d3m04u7h
Response:
{
  id: "b8881b8fbd6840b0a8a2ed304bcb37b0",
  name: "Contact card",
  urlinfo: "card",
  shortUrl: "http://goo.by/wxfpmb/card",
  imageUrl: "http://www.esponce.com/api/v3/generate?content=http%3a%2f%2fgoo.by%2fwxfpmb%2fcard&format=png&size=8&padding=4&em=Byte&ec=M&background=#FFFFFFFF&foreground=#FF000000",
  content: "MECARD:N:Bar,Foo;TEL:123456789;ADR:,,;,;,;,;,;;EMAIL:demo@esponce.com;URL:http://www.esponce.com;;",
  scans: 0,
  created: "2012-01-10T12:26:44Z",
  properties:
  {
    size: 8,
    padding: 4,
    em: "Byte",
    ec: "M",
    foreground: "#FF000000",
    background: "#FFFFFFFF"
  },
  isScheduleEnabled: true,
  schedule:
  [
    {
      content: "Summer holidays, please come back soon next week.",
      date: "2012-06-01T00:00:00Z",
      recurrence: 0
    },
    {
      content: "http://www.example.com/?feature=christmas",
      date: "2012-12-25T14:50:00Z",
      recurrence: 1
    },
    {
      content: "http://www.example.com/wish/happy/new/year",
      date: "2013-01-01T00:00:00Z",
      recurrence: 1
    }
  ]
}

Insert a new QR Code

POST track/qrcode?auth={auth}

Parameters

auth string required API key for authentication.
... (Other parameters are the same as for GET response)

Response

id string Campaign identifier.
created timestamp Date and time when the QR Code was created.

Example

Request:
POST http://www.esponce.com/api/v3/track/qrcode?auth=4u7h
{
  name: "Contact card",
  urlinfo: "card",
  content: "MECARD:N:Bar,Foo;TEL:123456789;ADR:,,;,;,;,;,;;EMAIL:demo@esponce.com;URL:http://www.esponce.com;;"
  isScheduleEnabled: true,
  schedule:
  [
    {
      content: "Summer holidays, please come back soon next week.",
      date: "2012-06-01T00:00:00Z",
      recurrence: 0
    }
  ]
}
Response:
{
  id: "b8881b8fbd6840b0a8a2ed304bcb37b0",
  created: "2012-01-10T12:26:44Z"
}

Update a QR Code

PUT track/qrcode/{id}?auth={auth}
To ignore updating a property do not specify it or set it to null. To move QR Code from one campaign to another specify only campaignId parameter.

Parameters

auth string required API key for authentication.
id string required QR Code identifier.
... (Other parameters are the same as for insert method)

Response

No data in response, only headers.

Delete a QR Code

DELETE track/qrcode/{id}?auth={auth}

Parameters

auth string required API key for authentication.
id string required QR Code identifier.

Response

No data in response, only headers.