Skip to content

Commit e8fe30d

Browse files
author
Patrick Kosterman
committed
Support added in for GPS, Beacons, Images & Colours.
1 parent 609e30e commit e8fe30d

File tree

3 files changed

+65
-7
lines changed

3 files changed

+65
-7
lines changed

README.md

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ The following fields are currently supported. These are the field names to use a
6969
* `person.salutation`: salutation or title.
7070
* `person.suffix`: suffix. For multiple suffixes, separate with spaces.
7171
* `person.displayName`: if required, a string representing the user's preferred designation.
72-
* `person.gender`: gender, as per government issued id. Possible values: `NOT_KNOWN`, `MALE` or `FEMALE`
72+
* `person.gender`: gender, as per government issued id. Possible values: `0` (Not known), `1` (Male) or `2` (Female)
7373
* `person.dateOfBirth`: valid date in yyyy-mm-dd format (1980-06-22).
7474
* `person.emailAddress`: valid email address.
7575
* `person.mobileNumber`: valid telephone number.
@@ -98,6 +98,64 @@ The following fields are currently supported. These are the field names to use a
9898
* `utm_term`: used for paid search. Use term to note the keywords for the ad that led to the pass.
9999
* `utm_content`: used for A/B testing and content-targeted ads. Use content to differentiate ads or links that point to the same URL.
100100

101+
### Location Parameters
102+
Used to embed locations on a pass level. Each unique pass can have upto 10 different locations embedded in it.
103+
104+
_LOCATION_NUMBER needs to be 1-10_:
105+
106+
* `location[LOCATION_NUMBER].lat`: a valid float for the location latitude, for example 51.507351.
107+
* `location[LOCATION_NUMBER].lon`: a valid float for the location longitude, for example 1.507351.
108+
* `location[LOCATION_NUMBER].lockScreenMessage`: the message to trigger on the lock-screen when someone is within range of the lat/lon.
109+
* `location[LOCATION_NUMBER].alt`: a valid integer for the location altitude, for example 647 (optional).
110+
* `location[LOCATION_NUMBER].name`: an internal name for the location in the PassKit database (optional).
111+
* `location[LOCATION_NUMBER].position`: the position of the location in the locations array (optional).
112+
113+
_When using the above, lat, lon & lock-screen message are mandatory: all 3 need to be provided for each location._
114+
115+
### Beacon Parameters
116+
Used to embed beacons on a pass level (Apple Wallet only). Each unique pass can have upto 10 different beacons embedded in it.
117+
118+
_BEACON_NUMBER needs to be 1-10_:
119+
120+
* `beacon[BEACON_NUMBER].uuid`: a valid UUID string for the beacon.
121+
* `beacon[BEACON_NUMBER].major`: a valid integer for beacon major. Range between 0-65535.
122+
* `beacon[BEACON_NUMBER].minor`: a valid integer for beacon minor. Range between 0-65535.
123+
* `beacon[BEACON_NUMBER].lockScreenMessage`: the message to trigger on the lock-screen when someone is within range of the beacon.
124+
* `beacon[BEACON_NUMBER].name`: an internal name for the beacon in the PassKit database (optional).
125+
* `beacon[BEACON_NUMBER].position`: the position of the beacon in the beacons array (optional).
126+
127+
_When using the above, uuid, major, minor & lock-screen message are mandatory: all 4 need to be provided for each beacon._
128+
129+
### Color Parameters
130+
Used to override colors on a pass level.
131+
132+
* `colors.backgroundColor`: pass background color.
133+
* `colors.labelColor`: label text color (Apple Wallet only).
134+
* `colors.textColor`: value text color (Apple Wallet only).
135+
* `colors.stripColor`: text over Strip Image color (Apple Wallet only).
136+
137+
### Image Parameters
138+
Used to override images on a pass level. Need to contain a valid [https://docs.passkit.io/common/images/#operation/createImages](PassKit 22 character image ID).
139+
140+
* `images.icon`
141+
* `images.logo`
142+
* `images.appleLogo`
143+
* `images.hero`
144+
* `images.eventStrip`
145+
* `images.strip`
146+
* `images.thumbnail`
147+
* `images.background`
148+
* `images.footer`
149+
* `images.security`
150+
* `images.thumbnail`
151+
* `images.privilige`
152+
* `images.airlineAlliance`
153+
* `images.personalization`
154+
* `images.banner`
155+
* `images.message`
156+
* `images.profile`
157+
* `images.appImage`
158+
101159
## Examples
102160
Example CSV files with all supported field names are found in the [examples](/examples) folder in this repo; just delete the columns that you don't need.
103161

examples/example-coupon-data.csv

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
universal.optIn,universal.expiryDate,person.surname,person.forename,person.otherNames,person.salutation,person.suffix,person.displayName,person.gender,person.dateOfBirth,person.emailAddress,person.mobileNumber,person.externalId,singleUseCoupons.coupon.externalId,singleUseCoupons.coupon.sku,meta.customField,utm_source,utm_medium,utm_name,utm_term,utm_content
2-
TRUE,2021-06-22T23:59:00-05:00,Kosterman,Patrick,,Mr,,Patrick Kosterman,male,1986-06-22,[email protected],,ABC,ABC,SKU10,USD 10,facebook,social,,,
3-
FALSE,2021-06-22T23:59:00-05:00,Tomes,Paul,,Mr,,Paul Tomes,male,1971-08-05,[email protected],,DEF,DEF,SKU20,USD 20,instagram,social,,,
1+
universal.optIn,universal.expiryDate,person.surname,person.forename,person.otherNames,person.salutation,person.suffix,person.displayName,person.gender,person.dateOfBirth,person.emailAddress,person.mobileNumber,person.externalId,singleUseCoupons.coupon.externalId,singleUseCoupons.coupon.sku,meta.customField,utm_source,utm_medium,utm_name,utm_term,utm_content,location[1].lat,location[1].lon,location[1].lockScreenMessage
2+
TRUE,2021-06-22T23:59:00-05:00,Kosterman,Patrick,,Mr,,Patrick Kosterman,1,1986-06-22,[email protected],,ABC,ABC,SKU10,USD 10,facebook,social,,,42.2342,10.123,GPS lock screen notification
3+
FALSE,2021-06-22T23:59:00-05:00,Tomes,Paul,,Mr,,Paul Tomes,1,1971-08-05,[email protected],,DEF,DEF,SKU20,USD 20,instagram,social,,,42.2342,10.123,GPS lock screen notification

examples/example-member-data.csv

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
universal.optIn,universal.expiryDate,person.surname,person.forename,person.otherNames,person.salutation,person.suffix,person.displayName,person.gender,person.dateOfBirth,person.emailAddress,person.mobileNumber,person.externalId,members.tier.name,members.member.externalId,members.member.points,members.member.tierPoints,members.member.secondaryPoints,members.member.groupingIdentifier,members.member.profileImage,meta.customField,utm_source,utm_medium,utm_name,utm_term,utm_content
2-
TRUE,2021-06-22T23:59:00-05:00,Kosterman,Patrick,,Mr,,Patrick Kosterman,male,1986-06-22,[email protected],,ABC,blue,ABC,1000,10,200,AZSD,https://passkit.com/images/[email protected],My custom value,facebook,social,,,
3-
FALSE,2021-06-22T23:59:00-05:00,Tomes,Paul,,Mr,,Paul Tomes,male,1971-08-05,[email protected],,DEF,blue,DEF,2000,20,400,AZSD,https://passkit.com/images/[email protected],My custom value,instagram,social,,,
1+
universal.optIn,universal.expiryDate,person.surname,person.forename,person.otherNames,person.salutation,person.suffix,person.displayName,person.gender,person.dateOfBirth,person.emailAddress,person.mobileNumber,person.externalId,members.tier.name,members.member.externalId,members.member.points,members.member.tierPoints,members.member.secondaryPoints,members.member.groupingIdentifier,members.member.profileImage,meta.customField,utm_source,utm_medium,utm_name,utm_term,utm_content,location[1].lat,location[1].lon,location[1].lockScreenMessage
2+
TRUE,2021-06-22T23:59:00-05:00,Kosterman,Patrick,,Mr,,Patrick Kosterman,1,1986-06-22,[email protected],,ABC,blue,ABC,1000,10,200,AZSD,https://passkit.com/images/[email protected],My custom value,facebook,social,,,42.2342,10.123,GPS lock screen notification
3+
FALSE,2021-06-22T23:59:00-05:00,Tomes,Paul,,Mr,,Paul Tomes,1,1971-08-05,[email protected],,DEF,blue,DEF,2000,20,400,AZSD,https://passkit.com/images/[email protected],My custom value,instagram,social,,,42.2342,10.123,GPS lock screen notification

0 commit comments

Comments
 (0)