Captain Pass API - Resources


Method Resource Description
GET passes Retrieves your list of passes
GET pass/:serialNumber Retrieves a single pass
POST pass/:templateID Creates a pass using the given templateID and eventually send it to the specified customer
PUT pass/:serialNumber Updates a pass and push the update
DELETE pass/:serialNumber Deletes a pass
GET pass/:serialNumber/scan Return the number of the times the pass was marked as scanned
PUT pass/:serialNumber/scan Increase by 1 the 'scan_count' value of the pass. Call this method after the pass' barcode was scanned
GET pass/:serialNumber/json Return the JSON representation of the pass
PUT pass/:serialNumber/void Void a pass and push the update
PUT pass/:serialNumber/unvoid Unvoid a pass and push the update


Method Resource Description
GET templates Retrieves the list of templates
GET template/:templateID Retrieves a specific template
PUT template/:templateID Updates a template
DELETE template/:templateID Deletes a template
POST template/:templateID/upgrade Upgrade all passes created with this template to the most current version of it

Templates images

Method Resource Description
GET template/:templateID:/:imageType Retrieves the targeted image from a template
PUT template/:templateID:/:imageType Set the targeted image to a template
DELETE template/:templateID:/:imageType Delete the targeted image from a template

Pass fields definitions

Field Type Description
broadcast bool A broadcast pass represent a pass that is the same for everyone (eg. a coupon distributed regardless of who the user might be). You can control the distribution by setting a download limit and a date of availability.
created string ISO 8601-formatted string of the date and time of creation of the pass - UTC relative
data array Only for GET actions.
Array of key / value. The keys returned in this structure matches the keys in the template.
install_count integer Only for GET actions.
Describes on how many devices the pass is installed.
install_limit integer Optional - Maximum number of times that the pass can be installed on devices. Only relevant when 'broadcast' is set to true.
distribution_limit string Optional - Date and time when the pass distribution expires. Must be a ISO 8601 formatted string. Only relevant when 'broadcast' is set to true.
to string ID of the user the pass was delivered to.
fields array Only for POST and PUT actions.
Array of keys to json dictionaries. Each key must represent a valid field key within the targeted template (POST) or actual pass (PUT).
Values are a dictionary accepting the following :
  • value: the field's new value
  • label: the field's new label
  • changeMessage: the field's new change message
  • textAlignement: the field's new text alignement
serialNumber string Unique identifier of the pass.
user array Only for POST actions.
A json dictionary representing the person to send the pass to.
Accepted keys are:
  • id: client ID
  • name: Last name
  • firstname: First name
  • email: Email address : if present, the pass will be sent to this address
  • phone: Phone number, no format restriction
  • tags: Array of tags. Each tag is a string that you can use to categorize your customers.
updated string ISO 8601-formatted string of the date and time of last modification of the pass - UTC relative
sendByEmail bool Only for POST actions.
If true and is valid, the Pass will be sent by email
sendBySMS bool Only for POST actions.
If true and is valid, the Pass will be sent by SMS. Requires an additional SMS Plan.
emailNotification bool Only for PUT actions.
If the Pass is only registered with an email address (not Passbook or PassWallet), i.e. is set, the pass update will be notified by email using what is configured in the Template Designer > Email update notifications