Creating a new pass

Creates a new pass using the given pass template.
Required input parameters

• HTTP Authorization Header that contains your API key
• pass-template UID as parameter with the parameter name passtemplate
• boolean zapierStyle is optional. If it is true you don't have to submit the nested array structure but can use the keys that have been returned by the pass-template endpoint that describes the required fields of a pass-template.
• the required keys or if you omit or set zapierStyle to false the array that is specified in the endpoind that describes a pass must be submitted as JSON-Payload.
See the examples below.
• (optional) userProvidedId - this is a ID you can specify - it can be used as URL parameter to access the created pass. The URL to access the pass via this ID is always You can find the fixed part of the URL including your customer ID in your Passcreator account settings.
• (optional) groupingIdentifier - a value that is used to group passes. If a grouping identifier is specified, passes with the same style, pass type identifier, and grouping identifier are displayed as a group.Only valid for event tickets and boarding passes. Will be ignored when it is submitted for other passes. In order to have this value respected, you need to enable the correspondig option on your pass template (tab general --> extended options --> ask for grouping identifier on pass creation)
• (optional) additionalProperties - if you're using additional properties in your template, provide the ID of the additional property together with its value in an array called additional properties.
• (optional) urlToThumbnail - if you're template is using a different thumbnail per pass, you can pass a URL to a valid image here. It will then be used on the pass that is about to be created.
• (optional) expirationDate - if your template is using a different expiration date per pass you can specify this date here in the format Y-m-d H:i.
• (optional) relevantDate - if your template is using a different relevant date per pass you can specify this date here in the format Y-m-d H:i. It's the date when the pass shows up on the lockscreen.

Returned values
JSON-Array containing the following information:
• identifier - the unique identifier of the created pass. You should store it in your application if you want to update or delete the pass later.
• uri - the URI of the pass that can be used to update or delete it
• linkToPassFile - the link where the pkpass-file can be downloaded. The pkpass-file is the actual pass that can be opened on iPhones directly.
    Attention: Don't use this link to provide the pass to your users in general. It should only be used e.g. if you want to send the Wallet pass to your customers via email after creating a pass. This file is subject to change if you send push notifications which means it might become outdated pretty soon.
• linkToPassPage - link to the download page for this pass that detects the operating system of the Smartphone that is used and provides device specific help. You are encouraged to always use this link when providing the pass to users because it provides the best user experience on all devices.
• genericProperties - an array containing the values that you can specify in the extended properties of a pass template
• ErrorMessage - if an error occurs we'll include the error message here

Example input (zapierStyle=false or omitted)

  1. {
  2. "passFrontFields": {
  3. "headerFields": [{
  4. "value": "Valid to"
  5. },
  6. {
  7. "value": "Second value"
  8. }
  9. ],
  10. "primaryFields": [{
  11. "value": "Customer-No."
  12. }]
  13. },
  14. "passBackFields": [],
  15. "additionalProperties": {
  16. "5b3f2f9f66a228.52093670": "John",
  17. "5b3f2f9f66a228.52093671": "Doe"
  18. },
  19. "urlToThumbnail": ""
  20. }

Example input (zapierStyle=true)

  1. {
  2. "primaryFields_0_Customerno": "382716",
  3. "secondaryFields_0_FirstName": "John",
  4. "secondaryFields_1_LastName": "Doe",
  5. "barcodeValue": "3897897988979823497234",
  6. "5b3f2f9f66a228.52093670": "Zurich",
  7. "5b3f2f9f66a228.52093671": "Example street 1",
  8. "urlToThumbnail": ""
  9. }

Example output:

  1. {
  2. "identifier": "f4379715-7a69-1742-38ae-836554724306",
  3. "uri": "",
  4. "linkToPassFile": "",
  5. "linkToPassPage": "",
  6. "genericProperties": {
  7. "my-id": "12345678",
  8. "second-field": "Example value"
  9. },
  10. "ErrorMessage": ""
  11. }