Update a pass

URL
https://app.passcreator.com/api/pass/{pass-uid}?zapierStyle=false
HTTP-Method
POST
Purpose
Updates an existing pass
Required input parameters
• HTTP Authorization Header that contains your API key
• ID or userProvidedId of the pass that must be updated in the URI.
• 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 instead.
• the required keys or if you omit or set zapierStyle to false the array that is specified in the endpoint that describes a pass must be submitted as JSON-Payload.
See the examples below.
• (optional) voided - a boolean that indicates if the pass is voided or not. Voided means the QR-Code will be greyed out and the pass can't be used any longer. Submit true if the pass should be voided. Submit false if the pass shouldn't be voided. If you omit the value we'll just leave it as it is.
• (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
If the pass has been updated successfully HTTP status 204 is returned.

Example input (zapierStyle=false or omitted)

  1. {
  2. "passFrontFields": {
  3. "headerFields": [{
  4. "value": "Valid to"
  5. }],
  6. "primaryFields": [{
  7. "value": "Customer-No."
  8. }]
  9. },
  10. "passBackFields": [],
  11. "additionalProperties": [{
  12. "5b3f2f9f66a228.52093670": "John",
  13. "5b3f2f9f66a228.52093671": "Doe"
  14. }],
  15. "urlToThumbnail": "https://www.passcreator.com/_Resources/Static/Packages/Brainswarm.PasscreatorDe/Images/passcreator_logo.png"
  16. }

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": "https://www.passcreator.com/_Resources/Static/Packages/Brainswarm.PasscreatorDe/Images/passcreator_logo.png"
  9. }