PassKit APIs for Kony MobileFabric Messaging

Passbook is an app for iPhone and iPod touch with iOS 6. Passbook is the central piece of the PassKit ecosystem. A paas is a collection of data representing a ticket, coupon, or card. Passbook stores barcodes and other information, and displays pass reminders on the device based on the date/time or the location of the device. Pass are generated by merchants and sent to the users via email, URLs.

Upload passbook p12 Certificate

The upload API is used to publish .p12 file Kony MobileFabric Messaging server.

Request URL

The key values can be provided either in the URL or as part of the post data.

http://<host or ip>:<port>/kpns/service/rest/passbook/iphone/admin/upload/passtypes/PassBook/<bundle identifier>/certificate

Headers

authToken: xxxxx (your authtoken value)

Input Parameters

Input parameters are appended at the end of the URL.

  • filename: .p12 file


    The certificate will be used to send blank push messages. Ensure that you upload a valid push certificate.

  • certPass: XXXX

Method

HTTP POST

Response Code

{"message":"Success"}

Upload a Pass to Passtype

This API is used to upload the pkpass file to passtypes.

Request URL

The key values can be provided either in the URL or as part of the post data.

http://<host or ip>:<port>/kpns/service/rest/passbook/iphone/admin/upload/passes/<bundle identifier>/<serial number>

Headers

authToken: xxxxx (your authtoken value)

Input Parameters

Input parameters are appended at the end of the URL.

  • filename: .pkpass

Method

HTTP POST

Response Code

{"message":"Success"}

Register a Device to Receive Passes

The API is used for registering a device to receive push notifications for a pass.

Request URL

The key values can be provided either in the URL or as part of the post data.

http://<host or ip>:<port>/kpns/service//rest/passbook/iphone/v1/devices/<device token>/registrations/<bundle identifier>/<serial number>

Headers

  • Authorization: xxxxx MyAuthToken


    First value will be authorization key and second will be authoToken. The authToken should be matched with the one above you specified for Upload passbook p12 Certificate API.

  • Content-Type: application/json;charset=UTF-8

Method

HTTP POST

Body

{"pushToken":"xxxxxxxx  xxxxxxxx  xxxxxxxx  xxxxxxxx  xxxxxxxx  xxxxxxxx  xxxxxxxx  xxxxxxxx"}

The Device ID (8 x 8 characters) you receive from Apple cloud after successfull registration.

Response Code

StatusCode: 201
{"message":"Created"}

Unregister a Device

The API is used for unregistering a device to receive push notifications for a pass.

Request URL

The key values can be provided either in the URL or as part of the post data.

http://<host or ip>:<port>/kpns/service/rest/passbook/iphone/v1/devices/<device token/unregistrations/<bundle identifier>/<serial number>

Headers

  • Authorization: xxxxx MyAuthToken


    First value will be authorization key and second will be authoToken. The authToken should be matched with the one above you specified for Upload passbook p12 Certificate API.

  • Content-Type: application/json;charset=UTF-8

Method

HTTP POST

Get All Serials

The API is used to get the serial numbers for passes associated with a device.

Request URL

The key values can be provided either in the URL or as part of the post data.

http://<host or ip>:<port>/kpns/service/rest/passbook/iphone/v1/devices/<device token>/registrations/<bundle identifier>/

Method

HTTP POST

Response Code

{"lastUpdated":"1386150225176","serialNumbers":["1234567"]}

Sending a Pass

The API is used to send passbooks to your customers' devices.

Request URL

The key values can be provided either in the URL or as part of the post data.

http://<host or ip>:<port>/kpns/service/rest/passbook/iphone/admin/upload/passes/<bundle identifier>/<serial number>

Headers

  • authToken: xxxxx (your authtoken value)

Input Parameters

Input parameters are appended at the end of the URL.

  • filename: .pkpass

Response Code

{"message":"Success"}

Get the latest pass

The API is used to get the latest passes for the given serial number and bundle identifier.

Request URL

The key values can be provided either in the URL or as part of the post data.

http://<host or ip>:<port>/kpns/service/rest/passbook/iphone/v1/passes/<bundle identifier>/<serial number>

Headers

  • Authorization: xxxxx MyAuthToken


    First value will be authorization key and second wil be authoToken. The authToken should be matched with the one above you specified for Upload passbook p12 Certificate API.

  • if-modified-since: xxxxx (The value is in milli-seconds)

Method

GET