Update a Pass

POST Request
Endpoint URL https://veski.leikbreytir.is/api/pass/{pass-uid}?zapierStyle=false
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.
  • (optional) locations – an array of valid coordinates. latitude and longitude must contain valid values. relevantText is an optional description for the push notification that is shown. You can also specify an altitude and the maxDistance which defines the number of meters around the coordinate where the notification will be shown.
  • (optional) storedValue – a float value that reflects the pass’ value. This can e.g. be a monetary value of a gift card, the number of stamps of a stamp card or the number of points of a loyalty campaign. If you have configured a pass functionality for the template of the pass, additional actions like a change of the loyalty tier might be triggered by increasing or decreasing the stored value.
  • (optional) eligibleValidationPlaces – array of strings where this ticket is valid. This is applied when an app scan is used and and app configuration ID is given when requesting info about a pass. The given values have to be part of the validValidationPlaces array of the template. Otherwise, HTTP status 400 will be returned.
  • (optional) downloadPin – a PIN that users have to enter before being able to download a pass. Please note that you need to enable the PIN feature on a template level before the PIN verification will be shown.
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 output:

{
	"passFrontFields": {
		"headerFields": [{
				"value": "Valid to"
			},
			{
				"value": "Second value"
			}
		],
		"primaryFields": [{
			"value": "Customer-No."
		}]
	},
	"passBackFields": [],
	"additionalProperties": {
		"5b3f2f9f66a228.52093670": "John",
		"5b3f2f9f66a228.52093671": "Doe"
	},
	"urlToBackground": "https://www.veski.leikbreytir.is/default-language.png",
	"localizedBackgroundImages": {
		"de": "https://www.veski.leikbreytir.is/german.png",
		"nl": "https://www.veski.leikbreytir.is/dutch.png"
	},
	"locations": [{
		"latitude": 48.0933826,
		"longitude": 11.6286617,
		"relevantText": "Welcome to the show!",
		"altitude": 200,
		"maxDistance": 300
	}],
	"storedValue": 200,
	"eligibleValidationPlaces": ["room1"]
}

Example input (zapierStyle=true)

{
	"primaryFields_0_Customerno": "382716",
	"secondaryFields_0_FirstName": "John",
	"secondaryFields_1_LastName": "Doe",
	"barcodeValue": "3897897988979823497234",
	"5b3f2f9f66a228.52093670": "Zurich",
	"5b3f2f9f66a228.52093671": "Example street 1",
	"urlToBackground": "https://www.veski.leikbreytir.is/default-language.png",
	"localizedBackgroundImages": {
		"de": "https://www.veski.leikbreytir.is/german.png",
		"nl": "https://www.veski.leikbreytir.is/dutch.png"
	},
	"storedValue": 200
}