Filter Pass Templates
You can use following fields for template filtering.
protocol
(name of PassKit protocols) - string value e.g. MEMBERSHIP, SINGLE_USE_COUPONname
(name of template) - string valuecreated
(created date of template) - RFC3339 or timestamp e.g. 2020-01-21T00:00:00Z, 1579564800updated
(last updated date of template) - RFC3339 or timestamp e.g. 2020-01-21T00:00:00Z, 1579564800
Operators:
eq
- equalgt
- greater thanlt
- less thangte
- greater than or equal tolte
- less than or equal tolike
- contain a value
List templates endpoint
POST https://api.pub1.passkit.io/templates/list
Count templates endpoint
POST https://api.pub1.passkit.io/templates/count
Example POST payloads for list templates
Filter templates for Membership protocol.
{
"limit": 100,
"offset": 0,
"orderBy": "created",
"orderAsc": true,
"filterGroups": [{
"condition": "AND",
"fieldFilters": [{
"filterField": "protocol",
"filterValue": "MEMBERSHIP",
"filterOperator": "eq"
}]
}]
}
Filter templates created between Jan 2020 AND Mar 2020.
{
"limit": 100,
"offset": 0,
"orderBy": "created",
"orderAsc": true,
"filterGroups": [{
"condition": "AND",
"fieldFilters": [{
"filterField": "created",
"filterValue": "2020-01-01T00:00:00Z",
"filterOperator": "gt"
},{
"filterField": "created",
"filterValue": "2020-04-01T00:00:00Z",
"filterOperator": "lt"
}]
}]
}
Filter templates with name contains a keyword 'vip' OR 'VIP'.
{
"limit": 100,
"offset": 0,
"orderBy": "created",
"orderAsc": true,
"filterGroups": [{
"condition": "OR",
"fieldFilters": [{
"filterField": "name",
"filterValue": "vip",
"filterOperator": "like"
},{
"filterField": "name",
"filterValue": "VIP",
"filterOperator": "like"
}]
}]
}
Filter Locations
You can use following fields to filter locations.
name
(name of locations) - string valuelat
(latitude of locations) - string value e.g. 30, 37.66900lon
(longitude of locations) - string value e.g. 157, 144.84100alt
(altitude of locations) - string value e.g. 3, 5lockScreenMessage
- string valueposition
(ordering of locations on the pass) - string value e.g. 0,1,2,3created
(created date of locations) - RFC3339 or timestamp e.g. 2020-01-21T00:00:00Z, 1579564800
Operators:
eq
- equalgt
- greater thanlt
- less thangte
- greater than or equal tolte
- less than or equal tolike
- contain a value
List locations endpoint
POST https://api.pub1.passkit.io/locations/list
Count locations endpoint
POST https://api.pub1.passkit.io/locations/count
Example POST payloads for list locations
Filter locations which have a keyword 'limited offer' in lockScreenMessage.
{
"limit": 100,
"offset": 0,
"orderBy": "created",
"orderAsc": true,
"filterGroups": [{
"condition": "AND",
"fieldFilters": [{
"filterField": "lockScreenMessage",
"filterValue": "limited offer",
"filterOperator": "like"
}]
}]
}
Filter locations for latitude between 30 AND 35.
{
"limit": 100,
"offset": 0,
"orderBy": "created",
"orderAsc": true,
"filterGroups": [{
"condition": "AND",
"fieldFilters": [{
"filterField": "lat",
"filterValue": "30",
"filterOperator": "gte"
},{
"filterField": "lat",
"filterValue": "35",
"filterOperator": "lte"
}]
}]
}
Filter locations with name containing 'station' OR 'office'.
{
"limit": 100,
"offset": 0,
"orderBy": "created",
"orderAsc": true,
"filterGroups": [{
"condition": "OR",
"fieldFilters": [{
"filterField": "name",
"filterValue": "station",
"filterOperator": "like"
},{
"filterField": "name",
"filterValue": "office",
"filterOperator": "like"
}]
}]
}
Filter Beacons
You can use following fields to filter beacons.
name
(name of beacons) - string valueuuid
(beacon uuid) - string value e.g. 39400000-8cf0-11bd-b23e-11b96e4ef00dmajor
(major indicator) - string valueminor
(minor indicator) - string valuelockScreenMessage
- string valueposition
(ordering of locations on the pass) - string value e.g. 0,1,2,3created
(created date of beacons) - RFC3339 or timestamp e.g. 2020-01-21T00:00:00Z, 1579564800
Operators:
eq
- equalgt
- greater thanlt
- less thangte
- greater than or equal tolte
- less than or equal tolike
- contain a value
List beacons endpoint
POST https://api.pub1.passkit.io/beacons/list
Count beacons endpoint
POST https://api.pub1.passkit.io/beacons/count
Example POST payload for filter beacons
Filter beacons with name starting from 'a'.
{
"limit": 100,
"offset": 0,
"orderBy": "created",
"orderAsc": true,
"filterGroups": [{
"condition": "AND",
"fieldFilters": [{
"filterField": "name",
"filterValue": "a",
"filterOperator": "gt"
},{
"filterField": "name",
"filterValue": "b",
"filterOperator": "lt"
}]
}]
}
Filter beacons at position <5 AND created in Feb 2020.
{
"limit": 100,
"offset": 0,
"orderBy": "created",
"orderAsc": true,
"filterGroups": [{
"condition": "AND",
"fieldFilters": [{
"filterField": "position",
"filterValue": "5",
"filterOperator": "lt"
},{
"filterField": "created",
"filterValue": "2020-02-01T00:00:00Z",
"filterOperator": "gt"
},{
"filterField": "created",
"filterValue": "2020-03-01T00:00:00Z",
"filterOperator": "lt"
}]
}]
}
Filter beacons at position 1 OR 3.
{
"limit": 100,
"offset": 0,
"orderBy": "created",
"orderAsc": true,
"filterGroups": [{
"condition": "OR",
"fieldFilters": [{
"filterField": "position",
"filterValue": "1",
"filterOperator": "eq"
},{
"filterField": "position",
"filterValue": "3",
"filterOperator": "eq"
}]
}]
}
Filter Links
You can filter links with following fields.
url
(link url) - string value e.g. tel:1522228519800, https://passkit.comtitle
(url title) - string valuetype
(url type) - URI_WEB, URI_TEL, URI_EMAIL, URI_LOCATION or URI_CALENDARusage
(usage type) - USAGE_APPLE_WALLET, USAGE_GOOGLE_PAY or USAGE_DATA_COLLECTION_PAGEposition
(ordering of locations on the pass) - string value e.g. 0,1,2,3created
(created date of beacons) - RFC3339 or timestamp e.g. 2020-01-21T00:00:00Z, 1579564800
Operators:
eq
- equalgt
- greater thanlt
- less thangte
- greater than or equal tolte
- less than or equal tolike
- contain a value
List links endpoint
POST https://api.pub1.passkit.io/links/list
Count links endpoint
POST https://api.pub1.passkit.io/links/count
Example POST payload to filter links
Filter links with url containing 'passkit.com'.
{
"limit": 100,
"offset": 0,
"orderBy": "created",
"orderAsc": true,
"filterGroups": [{
"condition": "AND",
"fieldFilters": [{
"filterField": "url",
"filterValue": "passkit.com",
"filterOperator": "like"
}]
}]
}
Filter links with usage switched on for Apple Wallet AND Google Pay.
{
"limit": 100,
"offset": 0,
"orderBy": "created",
"orderAsc": true,
"filterGroups": [{
"condition": "AND",
"fieldFilters": [{
"filterField": "usage",
"filterValue": "USAGE_APPLE_WALLET",
"filterOperator": "eq"
},{
"filterField": "usage",
"filterValue": "USAGE_GOOGLE_PAY",
"filterOperator": "eq"
}]
}]
}
Filter links with type tel OR email.
{
"limit": 100,
"offset": 0,
"orderBy": "created",
"orderAsc": true,
"filterGroups": [{
"condition": "OR",
"fieldFilters": [{
"filterField": "type",
"filterValue": "URI_TEL",
"filterOperator": "eq"
},{
"filterField": "type",
"filterValue": "URI_EMAIL",
"filterOperator": "eq"
}]
}]
}
Note: Limit has maximum limit of 1000 for REST API call. Unlimited Limit is available for gRPC request.