REST Resource: genericobject

Resource: GenericObject

Generic Object

JSON representation
{
  "genericType": enum (GenericType),
  "cardTitle": {
    object (LocalizedString)
  },
  "subheader": {
    object (LocalizedString)
  },
  "header": {
    object (LocalizedString)
  },
  "logo": {
    object (Image)
  },
  "hexBackgroundColor": string,
  "notifications": {
    object (Notifications)
  },
  "id": string,
  "classId": string,
  "barcode": {
    object (Barcode)
  },
  "heroImage": {
    object (Image)
  },
  "validTimeInterval": {
    object (TimeInterval)
  },
  "imageModulesData": [
    {
      object (ImageModuleData)
    }
  ],
  "textModulesData": [
    {
      object (TextModuleData)
    }
  ],
  "linksModuleData": {
    object (LinksModuleData)
  },
  "appLinkData": {
    object (AppLinkData)
  },
  "groupingInfo": {
    object (GroupingInfo)
  },
  "smartTapRedemptionValue": string,
  "rotatingBarcode": {
    object (RotatingBarcode)
  },
  "state": enum (State),
  "hasUsers": boolean,
  "messages": [
    {
      object (Message)
    }
  ],
  "passConstraints": {
    object (PassConstraints)
  },
  "wideLogo": {
    object (Image)
  },
  "saveRestrictions": {
    object (SaveRestrictions)
  },
  "valueAddedModuleData": [
    {
      object (ValueAddedModuleData)
    }
  ],
  "linkedObjectIds": [
    string
  ]
}
Fields
genericType

enum (GenericType)

Specify which GenericType the card belongs to.

cardTitle

object (LocalizedString)

Required. The header of the pass. This is usually the Business name such as "XXX Gym", "AAA Insurance". This field is required and appears in the header row at the very top of the pass.

subheader

object (LocalizedString)

The title label of the pass, such as location where this pass can be used. Appears right above the title in the title row in the pass detail view.

header

object (LocalizedString)

Required. The title of the pass, such as "50% off coupon" or "Library card" or "Voucher". This field is required and appears in the title row of the pass detail view.

hexBackgroundColor

string

The background color for the card. If not set, the dominant color of the hero image is used, and if no hero image is set, the dominant color of the logo is used and if logo is not set, a color would be chosen by Google.

notifications

object (Notifications)

The notification settings that are enabled for this object.

id

string

Required. The unique identifier for an object. This ID must be unique across all objects from an issuer. This value needs to follow the format issuerID.identifier where issuerID is issued by Google and identifier is chosen by you. The unique identifier can only include alphanumeric characters, ., _, or -.

classId

string

Required. The class associated with this object. The class must be of the same type as this object, must already exist, and must be approved.

Class IDs should follow the format issuerID.identifier where issuerID is issued by Google and identifier is chosen by you.

barcode

object (Barcode)

The barcode type and value. If pass does not have a barcode, we can allow the issuer to set Barcode.alternate_text and display just that.

heroImage

object (Image)

Banner image displayed on the front of the card if present. The image will be displayed at 100% width.

validTimeInterval

object (TimeInterval)

The time period this object will be considered valid or usable. When the time period is passed, the object will be considered expired, which will affect the rendering on user's devices.

imageModulesData[]

object (ImageModuleData)

Image module data. Only one of the image from class and one from object level will be rendered when both set.

textModulesData[]

object (TextModuleData)

Text module data. If textModulesData is also defined on the class, both will be displayed. The maximum number of these fields displayed is 10 from class and 10 from object.

groupingInfo

object (GroupingInfo)

Information that controls how passes are grouped together.

smartTapRedemptionValue

string

The value that will be transmitted to a Smart Tap certified terminal over NFC for this object. The class level fields enableSmartTap and redemptionIssuers must also be set up correctly in order for the pass to support Smart Tap. Only ASCII characters are supported.

rotatingBarcode

object (RotatingBarcode)

The rotating barcode settings/details.

state

enum (State)

The state of the object. This field is used to determine how an object is displayed in the app. For example, an inactive object is moved to the "Expired passes" section. If this is not provided, the object would be considered ACTIVE.

hasUsers

boolean

Indicates if the object has users. This field is set by the platform.

messages[]

object (Message)

An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.

passConstraints

object (PassConstraints)

Pass constraints for the object. Includes limiting NFC and screenshot behaviors.

saveRestrictions

object (SaveRestrictions)

Restrictions on the object that needs to be verified before the user tries to save the pass. Note that this restrictions will only be applied during save time. If the restrictions changed after a user saves the pass, the new restrictions will not be applied to an already saved pass.

valueAddedModuleData[]

object (ValueAddedModuleData)

Optional value added module data. Maximum of ten on the object.

linkedObjectIds[]

string

linkedObjectIds are a list of other objects such as event ticket, loyalty, offer, generic, giftcard, transit and boarding pass that should be automatically attached to this generic object. If a user had saved this generic card, then these linkedObjectIds would be automatically pushed to the user's wallet (unless they turned off the setting to receive such linked passes).

Make sure that objects present in linkedObjectIds are already inserted - if not, calls would fail. Once linked, the linked objects cannot be unlinked. You cannot link objects belonging to another issuer. There is a limit to the number of objects that can be linked to a single object. After the limit is reached, new linked objects in the call will be ignored silently.

Object IDs should follow the format issuer ID.identifier where the former is issued by Google and the latter is chosen by you.

GenericType

The type of the generic card.

Enums
GENERIC_TYPE_UNSPECIFIED Unspecified generic type.
GENERIC_SEASON_PASS Season pass
GENERIC_UTILITY_BILLS Utility bills
GENERIC_PARKING_PASS Parking pass
GENERIC_VOUCHER Voucher
GENERIC_GYM_MEMBERSHIP Gym membership cards
GENERIC_LIBRARY_MEMBERSHIP Library membership cards
GENERIC_RESERVATIONS Reservations
GENERIC_AUTO_INSURANCE Auto-insurance cards
GENERIC_HOME_INSURANCE Home-insurance cards
GENERIC_ENTRY_TICKET Entry tickets
GENERIC_RECEIPT Receipts
GENERIC_LOYALTY_CARD Loyalty cards. Please note that it is advisable to use a dedicated Loyalty card pass type instead of this generic type. A dedicated loyalty card pass type offers more features and functionality than a generic pass type.
GENERIC_OTHER Other type

Notifications

Indicates if the object needs to have notification enabled. We support only one of ExpiryNotification/UpcomingNotification. expiryNotification takes precedence over upcomingNotification. In other words if expiryNotification is set, we ignore the upcomingNotification field.

JSON representation
{
  "expiryNotification": {
    object (ExpiryNotification)
  },
  "upcomingNotification": {
    object (UpcomingNotification)
  }
}
Fields
expiryNotification

object (ExpiryNotification)

A notification would be triggered at a specific time before the card expires.

upcomingNotification

object (UpcomingNotification)

A notification would be triggered at a specific time before the card becomes usable.

ExpiryNotification

Indicates that the issuer would like Google Wallet to send expiry notifications 2 days prior to the card expiration.

JSON representation
{
  "enableNotification": boolean
}
Fields
enableNotification

boolean

Indicates if the object needs to have expiry notification enabled.

UpcomingNotification

Indicates that the issuer would like Google Wallet to send an upcoming card validity notification 1 day before card becomes valid/usable.

JSON representation
{
  "enableNotification": boolean
}
Fields
enableNotification

boolean

Indicates if the object needs to have upcoming notification enabled.

Methods

addmessage

Adds a message to the generic object referenced by the given object ID.

get

Returns the generic object with the given object ID.

insert

Inserts a generic object with the given ID and properties.

list

Returns a list of all generic objects for a given issuer ID.

patch

Updates the generic object referenced by the given object ID.

update

Updates the generic object referenced by the given object ID.