Copy a Pass Template

POST Request
Endpoint URL https://veski.leikbreytir.is/api/pass-template/copy/{template-id-to-copy}
Purpose
Copies the given Pass Template. If you specify a customer ID of a Gift to Wallet account that you have created using the API the template will be copied to this account.

Required input parameters

  • HTTP Authorization Header that contains your API key
  • template-id-to-copy – the UUID of the pass template that you want to copy
  • name – the name of the copy must be specified in the JSON payload
  • description (optional) – if not specified the value from the original template will be used
  • organizationName (optional) – if not specified the value from the original template will be used
  • foregroundColor (optional) – a valid hex color
  • backgroundColor (optional) – a valid hex color
  • labelColor (optional) – a valid hex color
  • barcodeValue (optional) – the barcode value
  • barcodeAlternativeText (optional) – the text below the barcode
  • urlToLogo (optional) – a valid URL to an image or a base64 encoded image
  • urlToBackground (optional) – a valid URL to an image or a base64 encoded image
  • urlToIcon (optional) – a valid URL to an image or a base64 encoded image
  • locations (optional) – an array of locations. Each location must at least include values for latitude and longitude
  • useDefaultImages (optional) – set this to true if the default Icon and Logo of the customer should be used for the copy of the template

Returned values

If the template has been copied successfully, Status 201 (Created) will be returned. If you specify an invalid customer ID or pass ID Status 404 will be returned.

Example payload:

{
	"name": "Template copy",
	"description": "This is a description",
	"organizationName": "Dummy",
	"foregroundColor": "#000000",
	"backgroundColor": "#cccccc",
	"labelColor": "#ffffff",
	"urlToLogo": "https://veski.leikbreytir.is/examplelogo.png",
	"urlToBackground": "https://veski.leikbreytir.is/examplebackground.png",
	"urlToIcon": "https://veski.leikbreytir.is/exampleicon.png",
	"locations": [{
		"latitude": 48.0933826,
		"longitude": 11.6286617,
		"relevantText": "Welcome to the show!",
		"altitude": 200,
		"maxDistance": 300
	}]
}