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 updated on the pass.
• (optional) urlToBackground - if you're template is using a different background image per pass you can pass a URL to a valid image here. It will then be updated on the pass.
• (optional) urlToLogo - if you're template is using a different logo image per pass you can pass a URL to a valid image here. It will then be updated on the pass.
• (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.
• (optional) labelColor - if your template is using a different label color per pass you can specify a valid hexadecimal color here. Invalid values will be dropped and the default color is used.
• (optional) foregroundColor - if your template is using a different foreground color (the color that field values have) per pass you can specify a valid hexadecimal color here. Invalid values will be dropped and the default color is used.
• (optional) backgroundColor - if your template is using a different background color per pass you can specify a valid hexadecimal color here. Invalid values will be dropped and the default color is used.

 

If you have enabled different background images for each pass for your template and are using translations for the template, you can specify different images per language using the API.
To do this submit an array called localizedBackgroundImages with elements that use the language code as key and the URL to the image as the value. An example is included in the code snippet below. If you want to know the activated languages for the template, call the endpoint that returns details about a template.

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. "urlToBackground": "https://www.passcreator.com/default-language.png",
  16. "localizedBackgroundImages": {
  17. "de": "https://www.passcreator.com/german.png",
  18. "nl": "https://www.passcreator.com/dutch.png"
  19. }
  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. "urlToBackground": "https://www.passcreator.com/default-language.png",
  9. "localizedBackgroundImages": {
  10. "de": "https://www.passcreator.com/german.png",
  11. "nl": "https://www.passcreator.com/dutch.png"
  12. }
  13. }