Developer Documentation (API)
- Authentication
- PHP Package
- V2 Endpoints
- Pass Templates
- Get a list of templates
- Describe the structure of a pass template
- Create a new template
- Update a template
- Patch a template
- Publish changes of a template
- Get information about fields of a pass-template only
- Schedule a Push Notification
- List scheduled notifications of a template
- Delete a scheduled Push Notification
- Copy a Pass Template
- Delete a Pass Template
- Create an iFrame Integration for a Template
- Create an URL Integration for a Template
- Passes
- REST Hooks
- Validating passes
- Deprecated endpoints
Patch a template
PATCH Request
Endpoint URL https://veski.leikbreytir.is/api/v2/pass-template/{identifier}
Purpose
Update an existing template but keep its structure. E.g. you can update only the value of an existing field.
Required input parameters
- HTTP Authorization Header that contains your API key
- The input JSON must conform to this JSON Schema.
Some things to note compared to the create schema:
- All properties are optional. E.g. it’s perfectly fine to only include the name property if you only want to update the name of a template.
- You can’t create new fields during patch requests and the index of fields is mandatory!
This allows you to e.g. update only the value of an existing field.
Returned values
{
"fields": {
"secondaryFields": [{
"index": 0,
"value": "Tap three dots to reach the back."
}]
}
}
Update the name of an additional property:
{
"additionalProperties": [{
"id": "5cb1a40ac68f80.15012600",
"name": "Email"
}]
}
Response:
{
"success": true,
"description": "Template was patched successfully!",
"errors": [],
"data": [],
"statusCode": 200
}