Loyalty Google Wallet

Overview

Google Wallet is an app for Android devices that allows consumers to store digital versions of items they would normally find in a physical wallet. The app can store credit cards, bank account information, gift cards, coupons, customer loyalty cards, and even event tickets and boarding passes. The information can be stored on the Android device itself, or in the cloud. Google Wallet can be used at brick-and-mortar locations and online.

Passes, such as loyalty cards and coupons, can contain member information, images, barcodes, and reward details. Consumers can redeem these items at kiosks that accept the card. You can use the Loyalty Google Wallet service to update these passes through push notifications and allow consumers to manage and view their passes in the Google Wallet app.

There are three essential parts to a Loyalty solution:

  • Your server, containing a web service
  • A Google Wallet, where you store loyalty information
  • The Google Wallet app, in which consumers to access their loyalty information
To manage and configure the Loyalty Cards service, you must have an administrator role for projects that use the service.

To access the configuration feature, click Configuration > Wallet Configuration in the Builder.

Scopes prevent unauthorized access to Loyalty microservices. The accepted scopes for Loyalty Google Wallet service are:

  • sap.googlewallet_view - View loyalty class/objects and offer class/objects for Google Wallet.
  • sap.googlewallet_manage - Create or edit loyalty class/objects and offer class/objects for Google Wallet.


API Reference

/loyaltyClasss

This resourceType defines the GET, POST, DELETE methods and their responses for a collection resource.

/loyaltyClasss

get

Gets all Card Templates [Loyalty Classes] Designed by a merchant/issuer. |

Accepted scopes:

  • 'sap.googlewallet_view' - Perform read operations on Google Wallet Loyalty Class.
post

Creates a Loyalty Class for the Google Wallet | A Loyalty Class represents a card template on Google Console which contains the common attributes for a specific set of users.

Accepted scopes:

  • 'sap.googlewallet_manage' - Perform write operations on Google Wallet Loyalty Class

/loyaltyClasss/{id}

This resource type defines the GET, PUT, DELETE methods and their responses for a single element resource.

get

Gets a specific Loyalty class present on the Google wallet Merchant console.

Accepted scopes:

  • 'sap.googlewallet_view' - Perform read operations on Google Wallet Loyalty Class
put

Updates a specific Loyalty class present on the Google wallet Merchant console.

Accepted scopes:

  • 'sap.googlewallet_manage' - Perform write operations on Google Wallet Loyalty Class
delete

Deletes a specific Loyalty class that is present on the Google wallet Merchant console .

Accepted scopes:

  • 'sap.googlewallet_delete' - Perform delete operations on Google Wallet Loyalty Class

/{customerId}/loyaltyObject

This resourceType defines the GET, POST, DELETE methods and their responses for a collection resource.

/{customerId}/loyaltyObject

get

Gets all Loyalty cards referenced by a Loyalty class based on customer id

Accepted scopes:

  • 'sap.googlewallet_view' - Perform read operations on Google Wallet Loyalty Object
post

adds a Loyalty card object for a customer in google wallet app

Accepted scopes:

  • 'sap.googlewallet_manage' - Perform write operations on Google Wallet Loyalty Object
put

Updates a specific Loyalty card based on customer id

Accepted scopes:

  • 'sap.googlewallet_manage' - Perform write operations on Google Wallet Loyalty Object

/{cardType}/{id}/generateWalletUrl

This resourceType defines the GET, POST, DELETE methods and their responses for a collection resource.

/{cardType}/{id}/generateWalletUrl

get

Generate a email URL for a Loyalty/Offer object | Card Type can be either LOYALTY or OFFER | if the card type is Loyalty then specify the customer id | if the card type is Offer then specify the offer id Accepted scopes:

  • 'sap.googlewallet_view' - Perform read operations on Loyalty/Offer object

/offerClasss

This resourceType defines the GET, POST, DELETE methods and their responses for a collection resource.

/offerClasss

get

Gets all Offer classes referenced by a provider(merchant).

Accepted scopes:

  • 'sap.googlewallet_view' - Perform read operations on Google Wallet Loyalty Class
post

Insert an Offer class for a merchant

Accepted scopes:

  • 'sap.googlewallet_manage' - Perform write operations on Google Wallet Offer Class

/offerClasss/{id}

This resource type defines the GET, PUT, DELETE methods and their responses for a single element resource.

get

Gets a specific Offer class on the basis of coupon id provided

Accepted scopes:

  • 'sap.googlewallet_view' - Perform read operations on Google Wallet Offer Class
put

Updates a specific Offer class on the basis of coupon id provided

Accepted scopes:

  • 'sap.googlewallet_manage' - Perform write operations on Google Wallet Offer Class
delete

Deletes a specific Offer class on the basis of coupon id provided

Accepted scopes:

  • 'sap.googlewallet_delete' - Perform write operations on Google Wallet Offer Class

/{offerId}/offerObject

This resourceType defines the GET, POST, DELETE methods and their responses for a collection resource.

/{offerId}/offerObject

get

Gets all Loyalty objects referenced by a Loyalty class

Accepted scopes:

  • 'sap.googlewallet_view' - Perform read operations on Google Wallet Offer Object
post

creates a specific Offer object based on offer id

Accepted scopes:

  • 'sap.googlewallet_manage' - Perform read operations on Google Wallet Offer Object
put

updates a specific Loyalty object Accepted scopes:

  • 'sap.googlewallet_view' - Perform read operations on Google Wallet Offer Object

/{customerId}/updateLoyaltyCardObject

/{customerId}/updateLoyaltyCardObject

get

Updates a Loyalty object for a customer referenced by a Loyalty class

Accepted scopes:

  • 'sap.googlewallet_view' - Perform read operations on Google Wallet Loyalty Object

/{offerId}/updateOfferObject

/{offerId}/updateOfferObject

get

Gets a Loyalty objects referenced by a Loyalty class based on customer id

Accepted scopes:

  • 'sap.googlewallet_view' - Perform read operations on Google Wallet Offer Object

/landingPage/decode/{landingPageUri}

/landingPage/decode/{landingPageUri}

get

Decode the landing page uri and gives the jwtToken corresponding to the Loyalty/Offer object

Accepted scopes:

  • 'sap.googlewallet_view' - Perform read operations on Google Wallet Loyalty/Offer object


Scopes

Scopes are strings that you can use to specify the type of access you need to resources and operations in the Loyalty Google Wallet service.

You must provide a scope that allows users to perform operations. Grant the scopes in an access token from the OAuth2 service. For more information about the authorization and authentication used in SAP Hybris services, and also about the scopes in general, see:

- Authorization
- Scopes

The table shows the scopes that the Loyalty Google Wallet service supports.

ScopeDescription
sap.googlewallet_viewUse this scope to view the card and coupon configurations for Google Wallet.
sap.googlewallet_manageUse this scope to manage and edit the card and coupon configurations for Google Wallet.
sap.googlewallet_deleteUse this scope to delete card and coupon configurations for Google Wallet.

If an operation requires two scopes, both scopes must be assigned to the role of the user who performs the operation. Here are two example scenarios.

  1. To allow a user to view a specified geofence, as well as change and update the properties, you must assign the sap.googlewallet_view and sap.googlewallet_manage scopes to the user's role.
  2. To allow a user to view and delete a specified Google card or coupon configuration, the user's role must include the sap.googlewallet_view and sap.googlewallet_delete scopes.


Create a Loyalty Class in the Google cloud for a Merchant

This tutorial shows you how to create a loyalty class for use with a merchant account in the Google Cloud Platform. You can create only one loyalty class for each tier.

You must submit the classes that you create to Google for review. The Review Status field reflects the class's status before, during, and after review. The possible values for Review Status are DRAFT, UNDERREVIEW, ACCEPTED, or REJECTED.

  • DRAFT indicates the class is still under development.
  • UNDERREVIEW submits the design to the Google cloud platform for approval. Based on the review, Google changes the Review Status to ACCEPTED or REJECTED.
  • ACCEPTED indicates that Google reviewed and approved the class. All fields must be properly-set and follow Google's requirements.
  • REJECTED indicates that Google reviewed and rejected the class.

In this tutorial, the loyalty class status is ACCEPTED.

Prerequisites

Before you create a loyalty class, you must:

  • Ensure that a valid tier exists in the Loyalty service system. Every member in the loyalty program must belong to a tier, and every tier is associated with a class.
  • Configure the Google Wallet setting in the Builder. The Google Wallet configuration contains details about the tenant. To configure the wallet, click Configuration > Wallet Configuration in the Builder.
You must have a Google Wallet merchant account to use loyalty service digital wallets on Android devices. You can register for an account here.

Request

This example shows how to create a loyalty class.

  • Method: POST
  • Request URL: Partial loyalty_googlewalleturl doesn't exist/loyaltyClasss
  • Content Type: application/json
  • Body: The request body must contain the fields in JSON format. The required fields are programLogo , programName className , issuerName, and infoModule.

Example

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title":"Loyalty class",
  "type":"object",
  "properties":
  {
    "className":
    {
      "type":"string"
    },
    "issuerName":
     {
       "type":"string"

     },
     "programName":
     {
       "type":"string"

     },
     "message":
     {
      "type":"object",
      "$ref":"message"
     }, 
     "textModule":
     {
      "type":"object",
      "$ref":"textModule"
     },
     "infoModule":
     {
      "type":"object",
      "$ref":"infoModule"
     },
     "linkUri":
     {
      "type":"object",
      "$ref":"linkUri"
     },
     "programLogo" :
     {
        "type":"string"      
     },
     "location":
     {
      "type":"object",
      "$ref":"location"
     },
     "reviewStatus":
     {
      "type":"string"
     },
     "tierType":
     {
       "type": "string"
     },
     "objectType":
     {
      "type":"string"
     },
     "version":
     {
      "type":"string"
     },
     "rewardsTier":
     {
      "type":"string"
     },
     "rewardsTierLabel":
     {
     "type":"string"
     },
     "accountNameLabel":
     {
      "type":"string"
     },
     "accountIdLabel":
     {
      "type":"string"
     },
     "imageModulesData":
     {
      "type":"object",
      "$ref":"imageModuleData"

     }
  },
   "required":["programLogo","programName","className","issuerName", "infoModule"]

}

Example

{
      "className":"e8befd399be444fcbcdc2c48b95b8acb",
      "issuerName":"Felton",
      "programName":"SatelliteOne",
      "reviewStatus":"UNDERREVIEW",
      "infoModule":
      {
       "hexFontColor":"#141716",
       "hexBackgroundColor":"#7ee6c3"
      }
}

Response

  • Status Code: 201

 


Fetch all Loyalty Class For a Merchant

This tutorial describes how to get all of the loyalty classes for a merchant, or tenant. A loyalty class contains data common to every user of the same loyalty card type, including, for example, ID, program logo, and the template that displays loyalty card information in the Google Wallet App. All updates to a LoyaltyClass object are propagated to all objects that reference the class.

Tenants can create distinct loyalty classes for each loyalty tier they want to offer to their customers. They can also design multiple loyalty classes for different sets of users in different tiers of their loyalty program.

Prerequisites

Before you create a loyalty class, you must:

  • Ensure that a valid tier exists in the Loyalty service system. Every member in the loyalty program must belong to a tier, and every tier is associated with a class.
  • Configure the Google Wallet setting in the Builder. The Google Wallet configuration contains details about the tenant. To configure the wallet, click Configuration > Wallet Configuration in the Builder.
You must have a Google Wallet merchant account to use loyalty service digital wallets on Android devices. You can register for an account here.

Request

Follow this example to get all of the loyalty classes that exist for a particular tenant.

  • Method: GET
  • Request URL: https://api.beta.yaas.io/hybris/loy-google-wallet/v1/loyaltyClass

Example

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title":"Loyalty class",
  "type":"object",
  "properties":
  {
    "className":
    {
      "type":"string"
    },
    "issuerName":
     {
       "type":"string"

     },
     "programName":
     {
       "type":"string"

     },
     "message":
     {
      "type":"object",
      "$ref":"message"
     }, 
     "textModule":
     {
      "type":"object",
      "$ref":"textModule"
     },
     "infoModule":
     {
      "type":"object",
      "$ref":"infoModule"
     },
     "linkUri":
     {
      "type":"object",
      "$ref":"linkUri"
     },
     "programLogo" :
     {
        "type":"string"      
     },
     "location":
     {
      "type":"object",
      "$ref":"location"
     },
     "reviewStatus":
     {
      "type":"string"
     },
     "tierType":
     {
       "type": "string"
     },
     "objectType":
     {
      "type":"string"
     },
     "version":
     {
      "type":"string"
     },
     "rewardsTier":
     {
      "type":"string"
     },
     "rewardsTierLabel":
     {
     "type":"string"
     },
     "accountNameLabel":
     {
      "type":"string"
     },
     "accountIdLabel":
     {
      "type":"string"
     },
     "imageModulesData":
     {
      "type":"object",
      "$ref":"imageModuleData"

     }
  },
   "required":["programLogo","programName","className","issuerName", "infoModule"]

}

Response

  • Status Code: 200

Example

[
  {
    "className": "3037655040395587734.027656e6f77241a4a6569587d9fa0c8d",
    "infoModule": {
      "hexBackgroundColor": "#d84343"
    },
    "issuerName": "Felton",
    "programLogo": "https://api.stage.yaas.io/hybris/media/v2/public/files/56a5cb1cb272c1001dad0c38",
    "programName": "Prevelage club on stage",
    "reviewStatus": "approved",
    "tierType": "Gold4",
    "version": "0"
  },
  {
    "className": "3037655040395587734.0e6ab89df09f42da9dca22d55913a89d",
    "infoModule": {
      "hexBackgroundColor": "#d12121"
    },
    "issuerName": "Felton",
    "programLogo": "https://api.stage.yaas.io/hybris/media/v2/public/files/56a5b118b272c1001dad0c26",
    "programName": "Prevelage club on stage",
    "reviewStatus": "approved",
    "tierType": "Gold1",
    "version": "0"
  },
  {
    "className": "3037655040395587734.14a50736e5574fd09e73d080dca51a24",
    "infoModule": {
      "hexBackgroundColor": "#591212"
    },
    "issuerName": "Felton",
    "programLogo": "https://api.stage.yaas.io/hybris/media/v2/public/files/5729a5d7941b90001d169289",
    "programName": "SatelliteOne",
    "reviewStatus": "approved",
    "tierType": "Diamond",
    "version": "0"
  },
  {
    "className": "3037655040395587734.31cd621d165b4c9f87d652760f414a53",
    "infoModule": {
      "hexBackgroundColor": "#ab2b2b"
    },
    "issuerName": "SAP",
    "programLogo": "https://api.stage.yaas.io/hybris/media/v2/public/files/56a64ee7b272c1001dad0c97",
    "programName": "Felton's Reward",
    "reviewStatus": "approved",
    "tierType": "Bronze",
    "version": "0"
  },
  {
    "className": "3037655040395587734.32d992d7222f47709fc0515611a37fa4",
    "infoModule": {
      "hexBackgroundColor": "#995c5c"
    },
    "issuerName": "Felton",
    "programLogo": "https://api.beta.yaas.io/hybris/media/v2/public/files/56aed6b879e6ab001d8b7aa4",
    "programName": "Privilege Club2",
    "reviewStatus": "approved",
    "tierType": "Silver",
    "version": "0"
  }
]


Fetch a Loyalty Class By ID

This tutorial shows how to get a loyalty class by the ID for a particular loyalty program tier in the Loyalty Google Wallet service.

Request

Follow this example to get a loyalty class by tier ID.

  • Method: GET
  • Request URL: https://api.beta.yaas.io/hybris/loy-google-wallet/v1/loyaltyClasss/{id}

Example


{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title":"Loyalty class",
  "type":"object",
  "properties":
  {
    "className":
    {
      "type":"string"
    },
    "issuerName":
     {
       "type":"string"

     },
     "programName":
     {
       "type":"string"

     },
     "message":
     {
      "type":"object",
      "$ref":"message"
     }, 
     "textModule":
     {
      "type":"object",
      "$ref":"textModule"
     },
     "infoModule":
     {
      "type":"object",
      "$ref":"infoModule"
     },
     "linkUri":
     {
      "type":"object",
      "$ref":"linkUri"
     },
     "programLogo" :
     {
        "type":"string"      
     },
     "location":
     {
      "type":"object",
      "$ref":"location"
     },
     "reviewStatus":
     {
      "type":"string"
     },
     "tierType":
     {
       "type": "string"
     },
     "objectType":
     {
      "type":"string"
     },
     "version":
     {
      "type":"string"
     },
     "rewardsTier":
     {
      "type":"string"
     },
     "rewardsTierLabel":
     {
     "type":"string"
     },
     "accountNameLabel":
     {
      "type":"string"
     },
     "accountIdLabel":
     {
      "type":"string"
     },
     "imageModulesData":
     {
      "type":"object",
      "$ref":"imageModuleData"

     }
  },
   "required":["programLogo","programName","className","issuerName", "infoModule"]

}

Response

  • Status Code: 200

Example

{
  "className": "3037655040395587734.bdc44400241e44fd8cf0f8f867aff5bf",
  "infoModule": {
    "hexBackgroundColor": "#8c2d2d",
    "hexFontColor": "#ebd5d5"
  },
  "issuerName": "Felton",
  "programLogo": "https://api.stage.yaas.io/hybris/media/v2/public/files/570bd097a4777e001d41709c",
  "programName": "Premium Developer Program",
  "reviewStatus": "approved",
  "tierType": "Bronze",
  "version": "0"
}


Create a Loyalty Object

A loyalty object represents a loyalty card saved in the Google Wallet app. A loyalty object contains data specific to a user such as a specific loyalty card number. The LoyaltyObject resource represents loyalty objects. The service pushes updates to the LoyaltyClass and LoyaltyObject resources to the applicable user's Google Wallet App.

This tutorial shows how to create a loyalty object by customer ID. You must supply the customer ID. The loyalty object then selects the remaining details from the card's loyalty class. After you create the loyalty object, the service saves the loyalty card to the user's Google Wallet app.

Request

This tutorial shows how to create a loyalty object by customer ID.

  • Method: CREATE
  • Request URL: https://api.beta.yaas.io/hybris/loy-google-wallet/v1/loyaltyObject/{id}

Example

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title":"Loyalty Object",
  "type":"object",
  "properties":
  {
    "classId":
    {
    "type":"string"
    },
    "id":
    {
     "type":"string"
    },
    "state":
    {
      "type":"string"
    },
    "version":
    {
      "type":"String"
    },
    "points":
     {
       "type":"string"
     },
     "customerId":
     {
       "type":"string"
     },
     "objectType":
     {
      "type":"string"
     },
     "barcode":
     {
         "type":"object",
         "$ref":"barcode"
     },
     "infoModuleObject":
     {
      "type":"object",
      "$ref":"infoModuleObject"
     },
     "location":
     {
       "type":"object",
       "$ref":"location"
     },
     "textModuleData":
     {
         "type":"object",
       "$ref":"textModule"
     },
     "loyaltyPointsData":
     {
      "type":"object",
      "$ref":"loyaltyPoints"
     },
     "message":
     {
       "type":"object",
      "$ref":"message"
     },
     "pointsType":
     {
      "type":"string"
     },
     "pointsValidInterval":
     {
      "type":"object",
      "$ref":"pointsValidInterval"
     },
     "classReference":
     {
       "type":"object",
       "$ref":"loyaltyClass"
     },
     "imageModuleData":
     {
       "type":"object",
       "$ref":"imageModuleData"
     },
     "accountName":
     {
       "type":"string"
     },
     "accountId":
     {
      "type":"string"
     },
     "linkUri":
     {
       "type":"object",
       "$ref":"linkUri"
     },
     "validTimeInterval":
     {
       "type":"object",
       "$ref":"validTimeInterval"
     }

    }
  }

Response

  • Status Code: 200

Example

{
  "customerId": "3037655040395587734.bdc44400241e44fd8cf0f8f867aff5bf"
}


Fetch a Loyalty Object By ID

This tutorial shows how to get a loyalty object by customer ID in the Loyalty Google Wallet service. A loyalty object represents a loyalty card saved in the Google Wallet app.

Request

Follow this example to get a loyalty object by customer ID.

  • Method: GET
  • Request URL: https://api.beta.yaas.io/hybris/loy-google-wallet/v1/loyaltyObject/{id}

Example

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title":"Loyalty Object",
  "type":"object",
  "properties":
  {
    "classId":
    {
    "type":"string"
    },
    "id":
    {
     "type":"string"
    },
    "state":
    {
      "type":"string"
    },
    "version":
    {
      "type":"String"
    },
    "points":
     {
       "type":"string"
     },
     "customerId":
     {
       "type":"string"
     },
     "objectType":
     {
      "type":"string"
     },
     "barcode":
     {
         "type":"object",
         "$ref":"barcode"
     },
     "infoModuleObject":
     {
      "type":"object",
      "$ref":"infoModuleObject"
     },
     "location":
     {
       "type":"object",
       "$ref":"location"
     },
     "textModuleData":
     {
         "type":"object",
       "$ref":"textModule"
     },
     "loyaltyPointsData":
     {
      "type":"object",
      "$ref":"loyaltyPoints"
     },
     "message":
     {
       "type":"object",
      "$ref":"message"
     },
     "pointsType":
     {
      "type":"string"
     },
     "pointsValidInterval":
     {
      "type":"object",
      "$ref":"pointsValidInterval"
     },
     "classReference":
     {
       "type":"object",
       "$ref":"loyaltyClass"
     },
     "imageModuleData":
     {
       "type":"object",
       "$ref":"imageModuleData"
     },
     "accountName":
     {
       "type":"string"
     },
     "accountId":
     {
      "type":"string"
     },
     "linkUri":
     {
       "type":"object",
       "$ref":"linkUri"
     },
     "validTimeInterval":
     {
       "type":"object",
       "$ref":"validTimeInterval"
     }

    }
  }


Response

  • Status Code: 200

Example

{
  "classId": "3037655040395587734.bdc44400241e44fd8cf0f8f867aff5bf",
  "id": "3037655040395587734.C9643793530",
  "objectType": "loyalty",
  "points": "100.0",
  "state": "active",
  "version": "1"
}


Create a Offer Class in the Google cloud for a Merchant

This tutorial shows you how to create an offer class for use with a merchant account in the Google Cloud Platform. You can create only one offer class for each tier.

You must submit the classes that you create to Google for review. The Review Status field reflects the class's status before, during, and after review. The possible values for Review Status are DRAFT, UNDERREVIEW, ACCEPTED, or REJECTED.

  • DRAFT indicates the class is still under development.
  • UNDERREVIEW submits the design to the Google cloud platform for approval. Based on the review, Google changes the Review Status to ACCEPTED or REJECTED.
  • ACCEPTED indicates that Google reviewed and approved the class. All fields must be properly-set and follow Google's requirements.
  • REJECTED indicates that Google reviewed and rejected the class.

In this tutorial, the offer class status is ACCEPTED.

Prerequisites

Before you create an offer class, you must:

  • Ensure that a valid tier exists in the Loyalty service system. Every member in the loyalty program must belong to a tier, and every tier is associated with a class.
  • Configure the Google Wallet setting in the Builder. The Google Wallet configuration contains details about the tenant. To configure the wallet, click Configuration > Wallet Configuration in the Builder.
You must have a Google Wallet merchant account to use loyalty service digital wallets on Android devices. You can register for an account here.

Request

This example shows how to create an offer class for a coupon template.

  • Method: POST
  • Request URL: Partial loyalty_googlewalleturl doesn't exist/offerClasss
  • Content Type: application/json
  • Body: The request body must contain the fields in JSON format. The required fields are programLogo, programName, className, issuerName, and infoModule.

Example

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title":"Loyalty class",
  "type":"object",
  "properties":
  {
    "className":
    {
      "type":"string"
    },
    "issuerName":
     {
       "type":"string"

     },
     "programName":
     {
       "type":"string"

     },
     "message":
     {
      "type":"object",
      "$ref":"message"
     }, 
     "textModule":
     {
      "type":"object",
      "$ref":"textModule"
     },
     "infoModule":
     {
      "type":"object",
      "$ref":"infoModule"
     },
     "linkUri":
     {
      "type":"object",
      "$ref":"linkUri"
     },
     "programLogo" :
     {
        "type":"string"      
     },
     "location":
     {
      "type":"object",
      "$ref":"location"
     },
     "reviewStatus":
     {
      "type":"string"
     },
     "tierType":
     {
       "type": "string"
     },
     "objectType":
     {
      "type":"string"
     },
     "version":
     {
      "type":"string"
     },
     "rewardsTier":
     {
      "type":"string"
     },
     "rewardsTierLabel":
     {
     "type":"string"
     },
     "accountNameLabel":
     {
      "type":"string"
     },
     "accountIdLabel":
     {
      "type":"string"
     },
     "imageModulesData":
     {
      "type":"object",
      "$ref":"imageModuleData"

     }
  },
   "required":["programLogo","programName","className","issuerName", "infoModule"]

}

Example

{
      "className":"e8befd399be444fcbcdc2c48b95b8acb",
      "issuerName":"Felton",
      "programName":"SatelliteOne",
      "reviewStatus":"UNDERREVIEW",
      "infoModule":
      {
       "hexFontColor":"#141716",
       "hexBackgroundColor":"#7ee6c3"
      }
}

Response

  • Status Code: 201

 


Fetch A Offer Class for a Merchant By Id

This tutorial shows how to get an offer class for a merchant, or tenant.

Request

  • Method: GET
  • Request URL: https://api.beta.yaas.io/hybris/loy-google-wallet/v1/offerClasss/{id}

Example

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title":"Offer class",
  "type":"object",
  "properties":
  {
    "id":
    {
      "type":"string"
    },
    "version":
    {
     "type":"string"
    },
    "message":
    {
     "type":"object",
     "$ref":"message"
    },
    "homePageUri":
    {
     "type":"object",
     "properties":
     {
      "uri":
      {
       "type":"string"
      },
      "description":
      {
       "type":"string"
      }
     }
    },
    "location":
    {
     "type":"object",
     "$ref":"location"
    },
    "review":
    {
     "type":"object",
      "properties":
      {
       "comment":
       {
        "type":"string" 
       }
      }
    },
    "infoModuleObject":
    {
     "type":"object",
     "$ref":"infoModuleObject"
    },
    "imageModuleData":
    {
       "type":"object",
       "$ref":"imageModuleData"
    },
    "textModule":
    {
      "type":"object",
      "$ref":"textModule"
    },
    "linkUri":
    {
       "type":"object",
       "$ref":"linkUri"

    },
    "distributionTimeInterval":
    {
     "type":"object",
     "$ref":"distributionTimeInterval"
    },
    "helpUri":
    {
     "type":"object",
     "properties":
     {
      "description":
      {
        "type":"string"
      },
      "uri":
      {
       "type":"string"
      }
     }
    },
    "issuerName":
     {
       "type":"string",
       "maxLength":20       
     },
     "provider":
     {
       "type":"string",
        "maxLength": 12     
     },
     "redemptionChannel":
     {
      "type":"string"

     }, 
     "reviewStatus":
     {
      "type":"string"
     },
     "title":
     {
      "type":"string"
     },
     "details":
     {
       "type":"string"
     },
     "renderSpecs":
    {
      "type":"array",
      "items":
      {
        "$ref":"renderSpec"
      }
    },
    "allowMultipleUsersPerObject":
    {
      "type":"string"
    }

  },
   "required":["distributionTimeInterval","infoModuleObject","imageModuleData","id","provider", "redemptionChannel","renderSpecs","reviewStatus","title"]

}

Response

  • Status Code: 200

Example

  {
    "details": "test",
    "id": "3037655040395587734.0095eb940f5c4d5a8e38bd7ae90a97ff",
    "issuerName": "Felton",
    "provider": "adidas",
    "redemptionChannel": "both",
    "reviewStatus": "approved"
  }

 


Fetch all Offer Class for a Merchant

This tutorial shows how to get all of the offer classes for a tenant in the Loyalty Google Wallet service.

Request

Follow this example to get all of the offer classes for a tenant.

  • Method: GET
  • Request URL: https://api.beta.yaas.io/hybris/loy-google-wallet/v1/offerClass

Example

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title":"Offer class",
  "type":"object",
  "properties":
  {
    "id":
    {
      "type":"string"
    },
    "version":
    {
     "type":"string"
    },
    "message":
    {
     "type":"object",
     "$ref":"message"
    },
    "homePageUri":
    {
     "type":"object",
     "properties":
     {
      "uri":
      {
       "type":"string"
      },
      "description":
      {
       "type":"string"
      }
     }
    },
    "location":
    {
     "type":"object",
     "$ref":"location"
    },
    "review":
    {
     "type":"object",
      "properties":
      {
       "comment":
       {
        "type":"string" 
       }
      }
    },
    "infoModuleObject":
    {
     "type":"object",
     "$ref":"infoModuleObject"
    },
    "imageModuleData":
    {
       "type":"object",
       "$ref":"imageModuleData"
    },
    "textModule":
    {
      "type":"object",
      "$ref":"textModule"
    },
    "linkUri":
    {
       "type":"object",
       "$ref":"linkUri"

    },
    "distributionTimeInterval":
    {
     "type":"object",
     "$ref":"distributionTimeInterval"
    },
    "helpUri":
    {
     "type":"object",
     "properties":
     {
      "description":
      {
        "type":"string"
      },
      "uri":
      {
       "type":"string"
      }
     }
    },
    "issuerName":
     {
       "type":"string",
       "maxLength":20       
     },
     "provider":
     {
       "type":"string",
        "maxLength": 12     
     },
     "redemptionChannel":
     {
      "type":"string"

     }, 
     "reviewStatus":
     {
      "type":"string"
     },
     "title":
     {
      "type":"string"
     },
     "details":
     {
       "type":"string"
     },
     "renderSpecs":
    {
      "type":"array",
      "items":
      {
        "$ref":"renderSpec"
      }
    },
    "allowMultipleUsersPerObject":
    {
      "type":"string"
    }

  },
   "required":["distributionTimeInterval","infoModuleObject","imageModuleData","id","provider", "redemptionChannel","renderSpecs","reviewStatus","title"]

}

Response

  • Status Code: 200

Example


[
  {
    "details": "test",
    "id": "3037655040395587734.0095eb940f5c4d5a8e38bd7ae90a97ff",
    "issuerName": "Felton",
    "provider": "adidas",
    "redemptionChannel": "both",
    "reviewStatus": "approved"
  },
  {
    "details": "20% off on iphone",
    "id": "3037655040395587734.00f71b410ac54b0a8a9bac984933e8bc",
    "issuerName": "Felton'sReward",
    "provider": "SAPOFFER",
    "redemptionChannel": "both",
    "reviewStatus": "approved"
  },
  {
    "details": "dddd",
    "id": "3037655040395587734.0371dd730ea7497aaeb2013d7dffbd13",
    "issuerName": "Felton",
    "provider": "google",
    "redemptionChannel": "both",
    "reviewStatus": "draft"
  }


  • Send feedback

    If you find any information that is unclear or incorrect, please let us know so that we can improve the Dev Portal content.

  • Get Help

    Use our private help channel. Receive updates over email and contact our specialists directly.

  • hybris Experts

    If you need more information about this topic, visit hybris Experts to post your own question and interact with our community and experts.