Package google.walletobjects.v1.offer

Index

OfferClassService

AddMessage

rpc AddMessage(OfferClassAddMessageRequest) returns (OfferClassAddMessageResponse)

Adds a message to the offer class referenced by the given class ID.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer
Get

rpc Get(OfferClassGetRequest) returns (OfferClass)

Returns the offer class with the given class ID.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer
Insert

rpc Insert(OfferClassInsertRequest) returns (OfferClass)

Inserts an offer class with the given ID and properties.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer
List

rpc List(OfferClassListRequest) returns (OfferClassListResponse)

Returns a list of all offer classes for a given issuer ID.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer
Patch

rpc Patch(OfferClassPatchRequest) returns (OfferClass)

Updates the offer class referenced by the given class ID. This method supports patch semantics.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer
Update

rpc Update(OfferClassUpdateRequest) returns (OfferClass)

Updates the offer class referenced by the given class ID.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer

OfferObjectService

AddMessage

rpc AddMessage(OfferObjectAddMessageRequest) returns (OfferObjectAddMessageResponse)

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

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer
Get

rpc Get(OfferObjectGetRequest) returns (OfferObject)

Returns the offer object with the given object ID.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer
Insert

rpc Insert(OfferObjectInsertRequest) returns (OfferObject)

Inserts an offer object with the given ID and properties.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer
List

rpc List(OfferObjectListRequest) returns (OfferObjectListResponse)

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

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer
Patch

rpc Patch(OfferObjectPatchRequest) returns (OfferObject)

Updates the offer object referenced by the given object ID. This method supports patch semantics.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer
Update

rpc Update(OfferObjectUpdateRequest) returns (OfferObject)

Updates the offer object referenced by the given object ID.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer

OfferClass

Fields
kind
(deprecated)

string

Identifies what kind of resource this is. Value: the fixed string "walletobjects#offerClass".

title

string

Required. The title of the offer, such as "20% off any t-shirt." Recommended maximum length is 60 characters to ensure full string is displayed on smaller screens.

redemption_channel

RedemptionChannel

Required. The redemption channels applicable to this offer.

provider

string

Required. The offer provider (either the aggregator name or merchant name). Recommended maximum length is 12 characters to ensure full string is displayed on smaller screens.

title_image

Image

The title image of the offer. This image is displayed in both the details and list views of the app.

details

string

The details of the offer.

fine_print

string

The fine print or terms of the offer, such as "20% off any t-shirt at Adam's Apparel."

help_uri

Uri

The help link for the offer, such as http://myownpersonaldomain.com/help

localized_title

LocalizedString

Translated strings for the title. Recommended maximum length is 60 characters to ensure full string is displayed on smaller screens.

localized_provider

LocalizedString

Translated strings for the provider. Recommended maximum length is 12 characters to ensure full string is displayed on smaller screens.

localized_details

LocalizedString

Translated strings for the details.

localized_fine_print

LocalizedString

Translated strings for the fine_print.

short_title

string

A shortened version of the title of the offer, such as "20% off," shown to users as a quick reference to the offer contents. Recommended maximum length is 20 characters.

localized_short_title

LocalizedString

Translated strings for the short title. Recommended maximum length is 20 characters.

class_template_info

ClassTemplateInfo

Template information about how the class should be displayed. If unset, Google will fallback to a default set of fields to display.

id

string

Required. The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.

version
(deprecated)

int64

Deprecated

issuer_name

string

Required. The issuer name. Recommended maximum length is 20 characters to ensure full string is displayed on smaller screens.

messages[]

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.

allow_multiple_users_per_object
(deprecated)

bool

Deprecated. Use multipleDevicesAndHoldersAllowedStatus instead.

homepage_uri

Uri

The URI of your application's home page. Populating the URI in this field results in the exact same behavior as populating an URI in linksModuleData (when an object is rendered, a link to the homepage is shown in what would usually be thought of as the linksModuleData section of the object).

locations[]

LatLongPoint

Note: This field is currently not supported to trigger geo notifications.

review_status

ReviewStatus

Required. The status of the class. This field can be set to draft or The status of the class. This field can be set to draft or underReview using the insert, patch, or update API calls. Once the review state is changed from draft it may not be changed back to draft.

You should keep this field to draft when the class is under development. A draft class cannot be used to create any object.

You should set this field to underReview when you believe the class is ready for use. The platform will automatically set this field to approved and it can be immediately used to create or migrate objects.

When updating an already approved class you should keep setting this field to underReview.

review

Review

The review comments set by the platform when a class is marked approved or rejected.

info_module_data
(deprecated)

InfoModuleData

Deprecated. Use textModulesData instead.

image_modules_data[]

ImageModuleData

Image module data. The maximum number of these fields displayed is 1 from object level and 1 for class object level.

text_modules_data[]

TextModuleData

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

redemption_issuers[]

int64

Identifies which redemption issuers can redeem the pass over Smart Tap. Redemption issuers are identified by their issuer ID. Redemption issuers must have at least one Smart Tap key configured.

The enableSmartTap and object level smartTapRedemptionLevel fields must also be set up correctly in order for a pass to support Smart Tap.

country_code

string

Country code used to display the card's country (when the user is not in that country), as well as to display localized content when content is not available in the user's locale.

hero_image

Image

Optional banner image displayed on the front of the card. If none is present, nothing will be displayed. The image will display at 100% width.

word_mark
(deprecated)

Image

Deprecated.

enable_smart_tap

bool

Identifies whether this class supports Smart Tap. The redemptionIssuers and object level smartTapRedemptionLevel fields must also be set up correctly in order for a pass to support Smart Tap.

hex_background_color

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. The format is #rrggbb where rrggbb is a hex RGB triplet, such as #ffcc00. You can also use the shorthand version of the RGB triplet which is #rgb, such as #fc0.

localized_issuer_name

LocalizedString

Translated strings for the issuer_name. Recommended maximum length is 20 characters to ensure full string is displayed on smaller screens.

multiple_devices_and_holders_allowed_status

MultipleDevicesAndHoldersAllowedStatus

Identifies whether multiple users and devices will save the same object referencing this class.

callback_options

CallbackOptions

Callback options to be used to call the issuer back for every save/delete of an object for this class by the end-user. All objects of this class are eligible for the callback.

security_animation

SecurityAnimation

Optional information about the security animation. If this is set a security animation will be rendered on pass details.

view_unlock_requirement

ViewUnlockRequirement

View Unlock Requirement options for the offer.

wide_title_image

Image

The wide title image of the offer. When provided, this will be used in place of the title image in the top left of the card view.

RedemptionChannel

Enums
REDEMPTION_CHANNEL_UNSPECIFIED
INSTORE
instore

Legacy alias for INSTORE. Deprecated.

ONLINE
online

Legacy alias for ONLINE. Deprecated.

BOTH
both

Legacy alias for BOTH. Deprecated.

TEMPORARY_PRICE_REDUCTION
temporaryPriceReduction

Legacy alias for TEMPORARY_PRICE_REDUCTION. Deprecated.

OfferClassAddMessageRequest

Fields
resource_id

string

The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.

add_message_request

AddMessageRequest

Body of the request.

OfferClassAddMessageResponse

Fields
resource

OfferClass

The updated OfferClass resource.

OfferClassGetRequest

Fields
resource_id

string

The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.

OfferClassInsertRequest

Fields
resource

OfferClass

Body of the request.

OfferClassListRequest

Fields
issuer_id

int64

The ID of the issuer authorized to list classes.

token

string

Used to get the next set of results if maxResults is specified, but more than maxResults classes are available in a list. For example, if you have a list of 200 classes and you call list with maxResults set to 20, list will return the first 20 classes and a token. Call list again with maxResults set to 20 and the token to get the next 20 classes.

max_results

int32

Identifies the max number of results returned by a list. All results are returned if maxResults isn't defined.

OfferClassListResponse

Fields
resources[]

OfferClass

Resources corresponding to the list request.

pagination

Pagination

Pagination of the response.

OfferClassPatchRequest

Fields
resource_id

string

The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.

resource

OfferClass

Body of the request.

OfferClassUpdateRequest

Fields
resource_id

string

The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.

resource

OfferClass

Body of the request.

OfferObject

Fields
kind
(deprecated)

string

Identifies what kind of resource this is. Value: the fixed string "walletobjects#offerObject".

class_reference

OfferClass

A copy of the inherited fields of the parent class. These fields are retrieved during a GET.

id

string

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

class_id

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 issuer ID.identifier where the former is issued by Google and latter is chosen by you.

version
(deprecated)

int64

Deprecated

state

State

Required. 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.

barcode

Barcode

The barcode type and value.

messages[]

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.

valid_time_interval

TimeInterval

The time period this object will be active and object can be used. An object's state will be changed to expired when this time period has passed.

locations[]

LatLongPoint

Note: This field is currently not supported to trigger geo notifications.

has_users

bool

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

smart_tap_redemption_value

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.

has_linked_device

bool

Whether this object is currently linked to a single device. This field is set by the platform when a user saves the object, linking it to their device. Intended for use by select partners. Contact support for additional information.

disable_expiration_notification

bool

Indicates if notifications should explicitly be suppressed. If this field is set to true, regardless of the messages field, expiration notifications to the user will be suppressed. By default, this field is set to false.

Currently, this can only be set for offers.

info_module_data

InfoModuleData

Deprecated. Use textModulesData instead.

image_modules_data[]

ImageModuleData

Image module data. The maximum number of these fields displayed is 1 from object level and 1 for class object level.

text_modules_data[]

TextModuleData

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

rotating_barcode

RotatingBarcode

The rotating barcode type and value.

hero_image

Image

Optional banner image displayed on the front of the card. If none is present, hero image of the class, if present, will be displayed. If hero image of the class is also not present, nothing will be displayed.

grouping_info

GroupingInfo

Information that controls how passes are grouped together.

pass_constraints

PassConstraints

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

OfferObjectAddMessageRequest

Fields
resource_id

string

The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.

add_message_request

AddMessageRequest

Body of the request.

OfferObjectAddMessageResponse

Fields
resource

OfferObject

The updated OfferObject resource.

OfferObjectGetRequest

Fields
resource_id

string

The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.

OfferObjectInsertRequest

Fields
resource

OfferObject

Body of the request.

OfferObjectListRequest

Fields
class_id

string

The ID of the class whose objects will be listed.

token

string

Used to get the next set of results if maxResults is specified, but more than maxResults objects are available in a list. For example, if you have a list of 200 objects and you call list with maxResults set to 20, list will return the first 20 objects and a token. Call list again with maxResults set to 20 and the token to get the next 20 objects.

max_results

int32

Identifies the max number of results returned by a list. All results are returned if maxResults isn't defined.

OfferObjectListResponse

Fields
resources[]

OfferObject

Resources corresponding to the list request.

pagination

Pagination

Pagination of the response.

OfferObjectPatchRequest

Fields
resource_id

string

The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.

resource

OfferObject

Body of the request.

OfferObjectUpdateRequest

Fields
resource_id

string

The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.

resource

OfferObject

Body of the request.