- Retrieve all Passbook templates
- Retrieve all Passbook
- Email a PassBook to someone
- Retrieve the Key/Values/Label for a specific PassBook template
- Retrieve the Key/Values/Label for a specific PassBook
- Create PassBook
- Update a specific key/value/label pair for a specific PassBook
- Upload image for a PassBook template
- Upload image for a PassBook
- Get ID PassBook by barcode message
- Download a specific PassBook
- Delete PassBook template
- Delete PassBook
Account
Login:
GET /user.Auth
URL Parameters:
- login – E-mail user
- password – Password
Response:
{
“result” : true,
“token” : “d5206c1e2217f84fc62878c580546184”
}
“result” : true,
“token” : “d5206c1e2217f84fc62878c580546184”
}
Logout:
GET /user.Logout
Response:
{
“result” : true,
“msg” : “Logout”
}
“result” : true,
“msg” : “Logout”
}
PassBook
Retrieve all Passbook templates:
GET /pbook.templateList
URL Parameters:
- token – Token for access
Response:
{
“result” : true,
“list” : [
{
“id” : “278”,
“id_type” : “4”,
“name_type” : “Coupon”,
“name” : “test”,
“sharing” : “0”,
“image” : 1,
“date_create” : “2012-11-16 23:02:42”
},
{
“id” : “279”,
“id_type” : “2”,
“name_type” : “Event Ticket”,
“name” : “ertet”,
“sharing” : “0”,
“image” : 1,
“date_create” : “2012-11-17 03:51:12”
}
]
}
“result” : true,
“list” : [
{
“id” : “278”,
“id_type” : “4”,
“name_type” : “Coupon”,
“name” : “test”,
“sharing” : “0”,
“image” : 1,
“date_create” : “2012-11-16 23:02:42”
},
{
“id” : “279”,
“id_type” : “2”,
“name_type” : “Event Ticket”,
“name” : “ertet”,
“sharing” : “0”,
“image” : 1,
“date_create” : “2012-11-17 03:51:12”
}
]
}
Retrieve all Passbook:
GET /pbook.bookList
URL Parameters:
- token – Token for access
Response:
{
“result” : true,
“list” : [
{
“id” : “288”,
“id_type” : “4”,
“id_template” : “278”,
“name_type” : “Coupon”,
“name” : “test”,
“name_template” : “test”,
“date_create” : “2012-11-19 23:35:17”,
“image” : 1
},
{
“id” : “289”,
“id_type” : “4”,
“id_template” : “278”,
“name_type” : “Coupon”,
“name” : “test2”,
“name_template” : “test”,
“date_create” : “2012-11-19 23:33:30”,
“image” : 1
}
]
}
“result” : true,
“list” : [
{
“id” : “288”,
“id_type” : “4”,
“id_template” : “278”,
“name_type” : “Coupon”,
“name” : “test”,
“name_template” : “test”,
“date_create” : “2012-11-19 23:35:17”,
“image” : 1
},
{
“id” : “289”,
“id_type” : “4”,
“id_template” : “278”,
“name_type” : “Coupon”,
“name” : “test2”,
“name_template” : “test”,
“date_create” : “2012-11-19 23:33:30”,
“image” : 1
}
]
}
Email a PassBook to someone:
GET /pbook.send
URL Parameters:
- token – Token for access
- idBook – ID PassBook
- id_email_tmp – Optional. ID E-mail template. Default value: Use default ID template
- email – E-mail address of the recipient. To pass multiple addresses, use the separator “, or ;“
Response:
{
“result” : true
}
“result” : true
}
Retrieve the Key/Values/Label for a specific PassBook template:
GET /pbook.getTemplateKeyValue
URL Parameters:
- token – Token for access
- idTemplate – ID Template
Response:
{
“result” : true,
“value” : {
“fields” : {
“primaryFields” : [
{
“key” : “primaryFields0”,
“label” : “all sandals”,
“value” : “$10 off”
}
],
“auxiliaryFields” : [
{
“key” : “auxiliaryFields0”,
“label” : “Expires”,
“value” : “7\/4\/2012”
},
{
“key” : “auxiliaryFields1”,
“label” : “Offer valid on”,
“value” : “one item”
}
],
“backFields” : [
{
“key” : “backFields0”,
“label” : “Passport”,
“value” : “USA”
},
{
“key” : “backFields1”,
“label” : “Country”,
“value” : “United States”
}
]
},
“barcode” : {
“message” : “{‘test’:11, ‘test2’:22}”,
“altText” : “{‘test’:11, ‘test2’:22}”
}
}
}
“result” : true,
“value” : {
“fields” : {
“primaryFields” : [
{
“key” : “primaryFields0”,
“label” : “all sandals”,
“value” : “$10 off”
}
],
“auxiliaryFields” : [
{
“key” : “auxiliaryFields0”,
“label” : “Expires”,
“value” : “7\/4\/2012”
},
{
“key” : “auxiliaryFields1”,
“label” : “Offer valid on”,
“value” : “one item”
}
],
“backFields” : [
{
“key” : “backFields0”,
“label” : “Passport”,
“value” : “USA”
},
{
“key” : “backFields1”,
“label” : “Country”,
“value” : “United States”
}
]
},
“barcode” : {
“message” : “{‘test’:11, ‘test2’:22}”,
“altText” : “{‘test’:11, ‘test2’:22}”
}
}
}
Retrieve the Key/Values/Label for a specific PassBook:
GET /pbook.getBookKeyValue
URL Parameters:
- token – Token for access
- idBook – ID PassBook
Response:
{
“result” : true,
“value” : [
{
“key” : “primaryFields_primaryFields0”,
“data” : {
“label” : “all sandals”,
“value” : 777
}
},
{
“key” : “auxiliaryFields_auxiliaryFields0”,
“data” : {
“label” : “Expires”,
“value” : “7\/4\/2012”
}
},
{
“key” : “auxiliaryFields_auxiliaryFields1”,
“data” : {
“label” : “Offer valid on”,
“value” : “one item”
}
},
{
“key” : “backFields_backFields0”,
“data” : {
“label” : “Passport”,
“value” : “USA”
}
},
{
“key” : “backFields_backFields1”,
“data” : {
“label” : “Country”,
“value” : “United States”
}
},
{
“key” : “barcode_message”,
“data” : “Text”
},
{
“key” : “barcode_altText”,
“data” : “Text”
}
]
}
“result” : true,
“value” : [
{
“key” : “primaryFields_primaryFields0”,
“data” : {
“label” : “all sandals”,
“value” : 777
}
},
{
“key” : “auxiliaryFields_auxiliaryFields0”,
“data” : {
“label” : “Expires”,
“value” : “7\/4\/2012”
}
},
{
“key” : “auxiliaryFields_auxiliaryFields1”,
“data” : {
“label” : “Offer valid on”,
“value” : “one item”
}
},
{
“key” : “backFields_backFields0”,
“data” : {
“label” : “Passport”,
“value” : “USA”
}
},
{
“key” : “backFields_backFields1”,
“data” : {
“label” : “Country”,
“value” : “United States”
}
},
{
“key” : “barcode_message”,
“data” : “Text”
},
{
“key” : “barcode_altText”,
“data” : “Text”
}
]
}
To edit the PassBook, use the key:
“key” : “backFields_backFields1”
For example edit value and label:
backFields_backFields1_value = “new value”
backFields_backFields1_label = “new label”
backFields_backFields1_label = “new label”
Edit barcode:
barcode_message = “new message”
barcode_altText = “new alt text”
barcode_altText = “new alt text”
Create PassBook:
GET /pbook.createBook
URL Parameters:
- token – Token for access
- idTemplate – ID Template
- name – Name PassBook
- [KEY] – Optional. Key fields with new data
Response:
{
“result” : true,
“id” : 318,
“url” : “c3qot3fIFH8PRX9616FlredzEUsaDxMuHZ1nPMG5oNWwoCTZQj”
}
“result” : true,
“id” : 318,
“url” : “c3qot3fIFH8PRX9616FlredzEUsaDxMuHZ1nPMG5oNWwoCTZQj”
}
For example request:
GET /pbook.createBook
?token=d5206c1e2217f84fc62878c580546184
&idTemplate=278
&name=New PassBook API
&primaryFields_primaryFields0_value=156
&primaryFields_primaryFields0_label=Price
?token=d5206c1e2217f84fc62878c580546184
&idTemplate=278
&name=New PassBook API
&primaryFields_primaryFields0_value=156
&primaryFields_primaryFields0_label=Price
Update a specific key/value/label pair for a specific PassBook:
GET /pbook.editBook
URL Parameters:
- token – Token for access
- idBook – ID PassBook
- [KEY] – Key fields with new data
Response:
{
“result” : true
}
“result” : true
}
For example request:
GET /pbook.editBook
?token=d5206c1e2217f84fc62878c580546184
&idBook=278
&primaryFields_primaryFields0_value=156
&primaryFields_primaryFields0_label=Price
?token=d5206c1e2217f84fc62878c580546184
&idBook=278
&primaryFields_primaryFields0_value=156
&primaryFields_primaryFields0_label=Price
Upload image for a PassBook template:
POST /pbook.uploadImage
URL Parameters:
- token – Token for access
- idTemplate – ID Template
- icon – Optional. Icon image. Type: PNG
- logo – Optional. Logo image. Type: PNG
- strip – Optional. Strip image. Type: PNG
- thumbnail – Optional. Thumbnail image. Type: PNG
- background – Optional. Background image. Type: PNG
Response:
{
“result” : true
}
“result” : true
}
For example form:
<form action=”http://pass.ivend.com/api/pbook.uploadImage” method=”POST” enctype=”multipart/form-data”>
<input type=”text” name=”idTemplate” value=”1″ />
<input type=”text” name=”token” value=”d5206c1e2217f84fc62878c580546184″ />
<input type=”file” name=”thumbnail” value=”” />
<input type=”submit” value=”Send” />
</form>
<input type=”text” name=”idTemplate” value=”1″ />
<input type=”text” name=”token” value=”d5206c1e2217f84fc62878c580546184″ />
<input type=”file” name=”thumbnail” value=”” />
<input type=”submit” value=”Send” />
</form>
Upload image for a PassBook:
POST /pbook.uploadImagePassBook
URL Parameters:
- token – Token for access
- idBook – ID PassBook
- strip – Optional. Strip image. Type: PNG
- thumbnail – Optional. Thumbnail image. Type: PNG
Response:
{
“result” : true
}
“result” : true
}
For example form:
<form action=”http://pass.ivend.com/api/pbook.uploadImagePassBook” method=”POST” enctype=”multipart/form-data”>
<input type=”text” name=”token” value=”d5206c1e2217f84fc62878c580546184″ />
<input type=”text” name=”idBook” value=”309″ />
<input type=”file” name=”thumbnail” value=”” />
<input type=”submit” value=”Send” />
</form>
<input type=”text” name=”token” value=”d5206c1e2217f84fc62878c580546184″ />
<input type=”text” name=”idBook” value=”309″ />
<input type=”file” name=”thumbnail” value=”” />
<input type=”submit” value=”Send” />
</form>
Get ID PassBook by barcode message:
GET /pbook.getPassByBarcode
URL Parameters:
- token – Token for access
- message – Barcode message
Response:
{
“result” : true,
“data” : [
{
“id” : “289”,
“id_template” : “278”,
“name” : “PassBook Name”
}
]
}
“result” : true,
“data” : [
{
“id” : “289”,
“id_template” : “278”,
“name” : “PassBook Name”
}
]
}
Download a specific PassBook:
GET /pbook.download
URL Parameters:
- token – Token for access
- idBook – ID PassBook
Response:
File: pass.pkpass