Import and Export
Notes
Methods listed on this page are available only to PRO and Premium users.
Data formats
Data formats for import and export are compatible. Each available format is described below.
CSV and XLS
Both CSV and XLS formats consist of first row for header and every next row for data. Header defines columns:
Campaign Name,QR Code Name,Content,Trackable URL,Created (UTC),Scans,Address,Latitude,Longitude,Comment,Dynamic,Size,Padding,Version,Encode Mode,Error Correction
CSV separator is comma ',' ASCII character.
XML
<tracking>
<item>
<campaign/> - Campaign name
<name/> - QR Code name
<content/> - QR Code content
<trackUrl/> - Short URL for tracking
<created/> - Date and time when the QR Code was created, formatted as "yyyy-MM-dd HH:mm:ss"
<scans/> - Number of scans
<comments/> - Optional comment
<size/> - QR Code module size in pixels
<padding/> - QR Code padding in modules
<version/> - QR Code version
<encodeMode/> - Encode mode
<errorCorrection/> - Error Correction
</item>
<item>
...
</item>
</tracking>
ZIP
ZIP contains folders and files. Folder represent campaigns and image files represent QR Codes. Additional metadata is written to manifest.xml on export.
Export all campaigns and QR Codes
GET track/export.{ext}?auth={auth}&format={format}
Parameters
auth
| string
| required
| API key for authentication. Get API key at your Profile page.
|
ext
| string
| required
| File extension that defines output format: csv, xls, xml, zip
|
format
| string
| optional
| Only if file extension is "zip". Defines QR Code image format in zip file. Available image formats are: png, eps, svg
|
Response
Depending on the format
Example
CSV example
Request:
GET http://www.esponce.com/api/v3/track/export.csv?auth=d3m04u7h
Response:
Campaign Name,QR Code Name,Content,Trackable URL,Created (UTC),Scans,Address,Latitude,Longitude,Comment,Dynamic,Size,Padding,Version,Encode Mode,Error Correction
,Contact card,"MECARD:N:Bar,Foo;TEL:123456789;ADR:,,;,;,;,;,;;EMAIL:demo@esponce.com;URL:http://www.esponce.com;;",http://demo.goo.by/wxfpmb,2012-01-10 12:26:44,0,,,,"mecard, only electronic contacts, no physical address entered",,8,4,-1,Byte,M
API codes,Web site: esponce.com,http://www.esponce.com,http://demo.goo.by/w9KP4B,2012-01-10 12:19:11,0,,,,,,8,4,-1,Byte,M
API codes,Twitter: follow @esponcetag,http://twitter.com/esponcetag,http://demo.goo.by/wFjKeZ,2012-01-10 12:21:40,1,,,,User who scans a QR Code can follow @esponcetag,,8,4,-1,Byte,M
XML example
Request:
GET http://www.esponce.com/api/v3/track/export.xml?auth=d3m04u7h
Response:
<tracking>
<item>
<name>Contact card</name>
<content>MECARD:N:Bar,Foo;TEL:123456789;ADR:,,;,;,;,;,;;EMAIL:demo@esponce.com;URL:http://www.esponce.com;;</content>
<trackUrl>http://demo.goo.by/wxfpmb</trackUrl>
<created>2012-01-10 12:26:44</created>
<scans>0</scans>
<comments>mecard, only electronic contacts, no physical address entered</comments>
<size>8</size>
<padding>4</padding>
<version>-1</version>
<encodeMode>Byte</encodeMode>
<errorCorrection>M</errorCorrection>
</item>
<item>
<campaign>API codes</campaign>
<name>Web site: esponce.com</name>
<content>http://www.esponce.com</content>
<trackUrl>http://demo.goo.by/w9KP4B</trackUrl>
<created>2012-01-10 12:19:11</created>
<scans>0</scans>
<size>8</size>
<padding>4</padding>
<version>-1</version>
<encodeMode>Byte</encodeMode>
<errorCorrection>M</errorCorrection>
</item>
<item>
<campaign>API codes</campaign>
<name>Twitter: follow @esponcetag</name>
<content>http://twitter.com/esponcetag</content>
<trackUrl>http://demo.goo.by/wFjKeZ</trackUrl>
<created>2012-01-10 12:21:40</created>
<scans>1</scans>
<comments>User who scans a QR Code can follow @esponcetag</comments>
<size>8</size>
<padding>4</padding>
<version>-1</version>
<encodeMode>Byte</encodeMode>
<errorCorrection>M</errorCorrection>
</item>
</tracking>
Example for ZIP format
Export all campaigns QR Codes to ZIP. Each QR Code should be exported as EPS image.
Request:
GET http://www.esponce.com/api/v3/track/export.zip?auth=d3m04u7h&format=eps
Response:
Binary data, ZIP file content. ZIP contains folders as campagins and png files for QR Codes. ZIP also contains manifest.xml
Import new campaigns and QR Codes
POST track/import?auth={auth}
Parameters
auth
| string
| required
| API key for authentication. Get API key at your Profile page.
|
format
| string
| required
| File extension that defines format of the content to upload. Possible formats: csv, xls, xml, zip
|
Imports only .png files from zip
If a QR Code with the same name and content already exist in user's portfolio the QR Code is ignored and thus not duplicated. But if the two QR Codes have different content the imported QR Code gets additional prefix or suffix like (2) or (copy)
Response
List of warnings
Example
Import campaigns and QR Codes from a CSV file.
Request:
POST http://www.esponce.com/api/v3/track/import?auth=d3m04u7h&format=csv
Campaign Name,QR Code Name,Content,Trackable URL,Created (UTC),Scans,Address,Latitude,Longitude,Comment,Dynamic,Size,Padding,Version,Encode Mode,Error Correction
,Contact card,"MECARD:N:Bar,Foo;TEL:123456789;ADR:,,;,;,;,;,;;EMAIL:demo@esponce.com;URL:http://www.esponce.com;;",http://demo.goo.by/wxfpmb,2012-01-10 12:26:44,0,,,,"mecard, only electronic contacts, no physical address entered",,8,4,-1,Byte,M
API codes,Web site: esponce.com,http://www.esponce.com,http://demo.goo.by/w9KP4B,2012-01-10 12:19:11,0,,,,,,8,4,-1,Byte,M
API codes,Twitter: follow @esponcetag,http://twitter.com/esponcetag,http://demo.goo.by/wFjKeZ,2012-01-10 12:21:40,1,,,,User who scans a QR Code can follow @esponcetag,,8,4,-1,Byte,M
Example for ZIP import
Import campaigns and QR Codes from a ZIP archive.
Request:
POST http://www.esponce.com/api/v3/track/import?auth=d3m04u7h&format=zip
(ZIP binary data)