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 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
Gets all Card Templates [Loyalty Classes] Designed by a merchant/issuer. |
Accepted scopes:
- 'sap.googlewallet_view' - Perform read operations on Google Wallet Loyalty Class.
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
get /loyaltyClasss
Gets all Card Templates [Loyalty Classes] Designed by a merchant/issuer. |
Accepted scopes:
- 'sap.googlewallet_view' - Perform read operations on Google Wallet Loyalty Class.
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- q: (string)
The simple query criteria based on available fields to limit returned results or a set of modified documents.
Example:
species:dog name:"Clifford"
- pageNumber: (integer - minimum: 1)
The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. The number of the first page is 1.
Example:
5
- pageSize: (integer - minimum: 1)
The number of records retrieved at one time.
Example:
45
HTTP status code 200
Resource successfully retrieved.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema (http://json-schema.org/draft-04/schema)#",
"title": "loyalty Class List",
"type": "array",
"items": {
"$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",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"id": {
"type": "string"
},
"header": {
"type": "string"
},
"body": {
"type": "string"
},
"imageUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"actionUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"displayInterval": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
}
}
},
"textModule": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"header": {
"type": "string"
},
"body": {
"type": "string"
}
}
},
"infoModule": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
}
}
},
"linkUri": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"description": {
"type": "string"
},
"uri": {
"type": "string"
}
}
},
"programLogo": {
"type": "string"
},
"location": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
}
}
},
"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",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
}
},
"required": [
"programLogo",
"programName",
"className",
"issuerName",
"infoModule"
]
}
}
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "There are validation problems, see details section for more information",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "validation_violation",
"details": [
{
"field": "q",
"message": "not a valid query",
"type": "invalid_query_parameter"
}
]
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
post /loyaltyClasss
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
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema (http://json-schema.org/draft-04/schema)#",
"title": "loyalty Class List",
"type": "array",
"items": {
"$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",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"id": {
"type": "string"
},
"header": {
"type": "string"
},
"body": {
"type": "string"
},
"imageUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"actionUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"displayInterval": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
}
}
},
"textModule": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"header": {
"type": "string"
},
"body": {
"type": "string"
}
}
},
"infoModule": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
}
}
},
"linkUri": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"description": {
"type": "string"
},
"uri": {
"type": "string"
}
}
},
"programLogo": {
"type": "string"
},
"location": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
}
}
},
"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",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
}
},
"required": [
"programLogo",
"programName",
"className",
"issuerName",
"infoModule"
]
}
}
HTTP status code 200
Body
Type: application/json
HTTP status code 201
The collection resource has been successfully created.
Headers
- Location: required (string)
The Location of the new resource which was created by the request. The value consists of a single absolute URI.
Example:
http://www.hybris.com/items/myItem
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "The request payload has incorrect syntax.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "bad_payload_syntax"
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 409
Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 409,
"message": "The requested resource could not be created due to server-side validation.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "conflict_resource"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
/loyaltyClasss/{id}
This resource type defines the GET, PUT, DELETE methods and their responses for a single element resource.
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
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
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
get /loyaltyClasss/{id}
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
URI Parameters
- id: required (string)
the id of the Loyalty Class present on the Google wallet Merchant console.
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
HTTP status code 200
loyaltyClasss successfully retrieved.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema (http://json-schema.org/draft-04/schema)#",
"title": "loyalty Class List",
"type": "array",
"items": {
"$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",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"id": {
"type": "string"
},
"header": {
"type": "string"
},
"body": {
"type": "string"
},
"imageUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"actionUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"displayInterval": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
}
}
},
"textModule": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"header": {
"type": "string"
},
"body": {
"type": "string"
}
}
},
"infoModule": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
}
}
},
"linkUri": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"description": {
"type": "string"
},
"uri": {
"type": "string"
}
}
},
"programLogo": {
"type": "string"
},
"location": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
}
}
},
"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",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
}
},
"required": [
"programLogo",
"programName",
"className",
"issuerName",
"infoModule"
]
}
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 404
The requested resource does not exist.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 404,
"message": "The requested URI does not map to a single element resource.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "element_resource_non_existing"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
put /loyaltyClasss/{id}
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
URI Parameters
- id: required (string)
the id of the Loyalty Class present on the Google wallet Merchant console.
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema (http://json-schema.org/draft-04/schema)#",
"title": "loyalty Class List",
"type": "array",
"items": {
"$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",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"id": {
"type": "string"
},
"header": {
"type": "string"
},
"body": {
"type": "string"
},
"imageUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"actionUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"displayInterval": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
}
}
},
"textModule": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"header": {
"type": "string"
},
"body": {
"type": "string"
}
}
},
"infoModule": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
}
}
},
"linkUri": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"description": {
"type": "string"
},
"uri": {
"type": "string"
}
}
},
"programLogo": {
"type": "string"
},
"location": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
}
}
},
"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",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
}
},
"required": [
"programLogo",
"programName",
"className",
"issuerName",
"infoModule"
]
}
}
HTTP status code 200
The resource has been successfully updated
Body
Type: application/json
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "The request payload has incorrect syntax.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "bad_payload_syntax"
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 404
The requested resource does not exist.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 404,
"message": "The requested URI does not map to a single element resource.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "element_resource_non_existing"
}
HTTP status code 409
Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 409,
"message": "The requested resource could not be updated due to server-side validation.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "conflict_resource"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
delete /loyaltyClasss/{id}
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
URI Parameters
- id: required (string)
the id of the Loyalty Class present on the Google wallet Merchant console.
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
HTTP status code 204
The resource has been successfully deleted.
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 404
The requested resource does not exist.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 404,
"message": "The requested URI does not map to a single element resource.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "element_resource_non_existing"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
/{customerId}/loyaltyObject
This resourceType defines the GET, POST, DELETE methods and their responses for a collection resource.
/{customerId}/loyaltyObject
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
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
Updates a specific Loyalty card based on customer id
Accepted scopes:
- 'sap.googlewallet_manage' - Perform write operations on Google Wallet Loyalty Object
get /{customerId}/loyaltyObject
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
URI Parameters
- customerId: required (string)
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- q: (string)
The simple query criteria based on available fields to limit returned results or a set of modified documents.
Example:
species:dog name:"Clifford"
- pageNumber: (integer - minimum: 1)
The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. The number of the first page is 1.
Example:
5
- pageSize: (integer - minimum: 1)
The number of records retrieved at one time.
Example:
45
HTTP status code 200
Resource successfully retrieved.
Body
Type: application/json
Schema:
{
"$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",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Barcode ",
"properties": {
"type": {
"type": "string"
},
"value": {
"type": "string"
},
"label": {
"type": "string"
},
"alternateText": {
"type": "string"
}
}
},
"infoModuleObject": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Object Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
},
"labelValueRows": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
},
"columns": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"showLastUpdateTime": {
"type": "string"
}
}
},
"location": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
}
}
},
"textModuleData": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"header": {
"type": "string"
},
"body": {
"type": "string"
}
}
},
"loyaltyPointsData": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Data",
"properties": {
"label": {
"type": "string"
},
"balance": {
"type": "object",
"properties": {
"string": "string",
"int": "string",
"double": "string",
"money": {
"type": "object",
"properties": {
"micros": "string",
"currencyCode": "string"
}
}
}
}
}
},
"message": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"id": {
"type": "string"
},
"header": {
"type": "string"
},
"body": {
"type": "string"
},
"imageUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"actionUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"displayInterval": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
}
}
},
"pointsType": {
"type": "string"
},
"pointsValidInterval": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Points Valid Interval",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
},
"classReference": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Loyalty class",
"properties": {
"className": {
"type": "string"
},
"issuerName": {
"type": "string"
},
"programName": {
"type": "string"
},
"message": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"id": {
"type": "string"
},
"header": {
"type": "string"
},
"body": {
"type": "string"
},
"imageUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"actionUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"displayInterval": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
}
}
},
"textModule": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"header": {
"type": "string"
},
"body": {
"type": "string"
}
}
},
"infoModule": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
}
}
},
"linkUri": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"description": {
"type": "string"
},
"uri": {
"type": "string"
}
}
},
"programLogo": {
"type": "string"
},
"location": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
}
}
},
"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",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
}
},
"required": [
"programLogo",
"programName",
"className",
"issuerName",
"infoModule"
]
},
"imageModuleData": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"accountName": {
"type": "string"
},
"accountId": {
"type": "string"
},
"linkUri": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"description": {
"type": "string"
},
"uri": {
"type": "string"
}
}
},
"validTimeInterval": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Valid Time Interval for Offer",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
}
}
}
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "There are validation problems, see details section for more information",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "validation_violation",
"details": [
{
"field": "q",
"message": "not a valid query",
"type": "invalid_query_parameter"
}
]
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
post /{customerId}/loyaltyObject
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
URI Parameters
- customerId: required (string)
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Body
Type: application/json
Schema:
{
"$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",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Barcode ",
"properties": {
"type": {
"type": "string"
},
"value": {
"type": "string"
},
"label": {
"type": "string"
},
"alternateText": {
"type": "string"
}
}
},
"infoModuleObject": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Object Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
},
"labelValueRows": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
},
"columns": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"showLastUpdateTime": {
"type": "string"
}
}
},
"location": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
}
}
},
"textModuleData": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"header": {
"type": "string"
},
"body": {
"type": "string"
}
}
},
"loyaltyPointsData": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Data",
"properties": {
"label": {
"type": "string"
},
"balance": {
"type": "object",
"properties": {
"string": "string",
"int": "string",
"double": "string",
"money": {
"type": "object",
"properties": {
"micros": "string",
"currencyCode": "string"
}
}
}
}
}
},
"message": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"id": {
"type": "string"
},
"header": {
"type": "string"
},
"body": {
"type": "string"
},
"imageUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"actionUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"displayInterval": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
}
}
},
"pointsType": {
"type": "string"
},
"pointsValidInterval": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Points Valid Interval",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
},
"classReference": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Loyalty class",
"properties": {
"className": {
"type": "string"
},
"issuerName": {
"type": "string"
},
"programName": {
"type": "string"
},
"message": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"id": {
"type": "string"
},
"header": {
"type": "string"
},
"body": {
"type": "string"
},
"imageUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"actionUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"displayInterval": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
}
}
},
"textModule": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"header": {
"type": "string"
},
"body": {
"type": "string"
}
}
},
"infoModule": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
}
}
},
"linkUri": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"description": {
"type": "string"
},
"uri": {
"type": "string"
}
}
},
"programLogo": {
"type": "string"
},
"location": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
}
}
},
"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",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
}
},
"required": [
"programLogo",
"programName",
"className",
"issuerName",
"infoModule"
]
},
"imageModuleData": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"accountName": {
"type": "string"
},
"accountId": {
"type": "string"
},
"linkUri": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"description": {
"type": "string"
},
"uri": {
"type": "string"
}
}
},
"validTimeInterval": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Valid Time Interval for Offer",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
}
}
}
HTTP status code 200
Body
Type: application/json
HTTP status code 201
The collection resource has been successfully created.
Headers
- Location: required (string)
The Location of the new resource which was created by the request. The value consists of a single absolute URI.
Example:
http://www.hybris.com/items/myItem
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "The request payload has incorrect syntax.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "bad_payload_syntax"
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 409
Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 409,
"message": "The requested resource could not be created due to server-side validation.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "conflict_resource"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
put /{customerId}/loyaltyObject
Updates a specific Loyalty card based on customer id
Accepted scopes:
- 'sap.googlewallet_manage' - Perform write operations on Google Wallet Loyalty Object
URI Parameters
- customerId: required (string)
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Body
Type: application/json
HTTP status code 200
Body
Type: application/json
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
/{cardType}/{id}/generateWalletUrl
This resourceType defines the GET, POST, DELETE methods and their responses for a collection resource.
/{cardType}/{id}/generateWalletUrl
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
get /{cardType}/{id}/generateWalletUrl
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
URI Parameters
- cardType: required (string)
- id: required (string)
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- q: (string)
The simple query criteria based on available fields to limit returned results or a set of modified documents.
Example:
species:dog name:"Clifford"
- pageNumber: (integer - minimum: 1)
The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. The number of the first page is 1.
Example:
5
- pageSize: (integer - minimum: 1)
The number of records retrieved at one time.
Example:
45
HTTP status code 200
Resource successfully retrieved.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
]
}
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "There are validation problems, see details section for more information",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "validation_violation",
"details": [
{
"field": "q",
"message": "not a valid query",
"type": "invalid_query_parameter"
}
]
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
/offerClasss
This resourceType defines the GET, POST, DELETE methods and their responses for a collection resource.
/offerClasss
Gets all Offer classes referenced by a provider(merchant).
Accepted scopes:
- 'sap.googlewallet_view' - Perform read operations on Google Wallet Loyalty Class
Insert an Offer class for a merchant
Accepted scopes:
- 'sap.googlewallet_manage' - Perform write operations on Google Wallet Offer Class
get /offerClasss
Gets all Offer classes referenced by a provider(merchant).
Accepted scopes:
- 'sap.googlewallet_view' - Perform read operations on Google Wallet Loyalty Class
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- q: (string)
The simple query criteria based on available fields to limit returned results or a set of modified documents.
Example:
species:dog name:"Clifford"
- pageNumber: (integer - minimum: 1)
The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. The number of the first page is 1.
Example:
5
- pageSize: (integer - minimum: 1)
The number of records retrieved at one time.
Example:
45
HTTP status code 200
Resource successfully retrieved.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema (http://json-schema.org/draft-04/schema)#",
"title": "Offer Class List",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Offer class",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"version": {
"type": "string"
},
"message": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"id": {
"type": "string"
},
"header": {
"type": "string"
},
"body": {
"type": "string"
},
"imageUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"actionUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"displayInterval": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
}
}
},
"homePageUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"location": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
}
}
},
"review": {
"type": "object",
"properties": {
"comment": {
"type": "string"
}
}
},
"infoModuleObject": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Object Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
},
"labelValueRows": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
},
"columns": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"showLastUpdateTime": {
"type": "string"
}
}
},
"imageModuleData": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"textModule": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"header": {
"type": "string"
},
"body": {
"type": "string"
}
}
},
"linkUri": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"description": {
"type": "string"
},
"uri": {
"type": "string"
}
}
},
"distributionTimeInterval": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Distribution Time Interval ",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
},
"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": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Render Spec",
"type": "object",
"properties": {
"templateFamily": {
"type": "string"
},
"viewName": {
"type": "string"
}
}
}
},
"allowMultipleUsersPerObject": {
"type": "string"
}
},
"required": [
"distributionTimeInterval",
"infoModuleObject",
"imageModuleData",
"id",
"provider",
"redemptionChannel",
"renderSpecs",
"reviewStatus",
"title"
]
}
}
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "There are validation problems, see details section for more information",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "validation_violation",
"details": [
{
"field": "q",
"message": "not a valid query",
"type": "invalid_query_parameter"
}
]
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
post /offerClasss
Insert an Offer class for a merchant
Accepted scopes:
- 'sap.googlewallet_manage' - Perform write operations on Google Wallet Offer Class
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema (http://json-schema.org/draft-04/schema)#",
"title": "Offer Class List",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Offer class",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"version": {
"type": "string"
},
"message": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"id": {
"type": "string"
},
"header": {
"type": "string"
},
"body": {
"type": "string"
},
"imageUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"actionUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"displayInterval": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
}
}
},
"homePageUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"location": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
}
}
},
"review": {
"type": "object",
"properties": {
"comment": {
"type": "string"
}
}
},
"infoModuleObject": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Object Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
},
"labelValueRows": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
},
"columns": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"showLastUpdateTime": {
"type": "string"
}
}
},
"imageModuleData": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"textModule": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"header": {
"type": "string"
},
"body": {
"type": "string"
}
}
},
"linkUri": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"description": {
"type": "string"
},
"uri": {
"type": "string"
}
}
},
"distributionTimeInterval": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Distribution Time Interval ",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
},
"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": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Render Spec",
"type": "object",
"properties": {
"templateFamily": {
"type": "string"
},
"viewName": {
"type": "string"
}
}
}
},
"allowMultipleUsersPerObject": {
"type": "string"
}
},
"required": [
"distributionTimeInterval",
"infoModuleObject",
"imageModuleData",
"id",
"provider",
"redemptionChannel",
"renderSpecs",
"reviewStatus",
"title"
]
}
}
HTTP status code 200
Body
Type: application/json
HTTP status code 201
The collection resource has been successfully created.
Headers
- Location: required (string)
The Location of the new resource which was created by the request. The value consists of a single absolute URI.
Example:
http://www.hybris.com/items/myItem
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "The request payload has incorrect syntax.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "bad_payload_syntax"
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 409
Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 409,
"message": "The requested resource could not be created due to server-side validation.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "conflict_resource"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
/offerClasss/{id}
This resource type defines the GET, PUT, DELETE methods and their responses for a single element resource.
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
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
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
get /offerClasss/{id}
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
URI Parameters
- id: required (string)
the id of the Offer class to work on
Example:
merchantname.coupontemplateid
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
HTTP status code 200
offerClasss successfully retrieved.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema (http://json-schema.org/draft-04/schema)#",
"title": "Offer Class List",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Offer class",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"version": {
"type": "string"
},
"message": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"id": {
"type": "string"
},
"header": {
"type": "string"
},
"body": {
"type": "string"
},
"imageUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"actionUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"displayInterval": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
}
}
},
"homePageUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"location": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
}
}
},
"review": {
"type": "object",
"properties": {
"comment": {
"type": "string"
}
}
},
"infoModuleObject": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Object Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
},
"labelValueRows": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
},
"columns": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"showLastUpdateTime": {
"type": "string"
}
}
},
"imageModuleData": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"textModule": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"header": {
"type": "string"
},
"body": {
"type": "string"
}
}
},
"linkUri": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"description": {
"type": "string"
},
"uri": {
"type": "string"
}
}
},
"distributionTimeInterval": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Distribution Time Interval ",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
},
"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": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Render Spec",
"type": "object",
"properties": {
"templateFamily": {
"type": "string"
},
"viewName": {
"type": "string"
}
}
}
},
"allowMultipleUsersPerObject": {
"type": "string"
}
},
"required": [
"distributionTimeInterval",
"infoModuleObject",
"imageModuleData",
"id",
"provider",
"redemptionChannel",
"renderSpecs",
"reviewStatus",
"title"
]
}
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 404
The requested resource does not exist.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 404,
"message": "The requested URI does not map to a single element resource.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "element_resource_non_existing"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
put /offerClasss/{id}
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
URI Parameters
- id: required (string)
the id of the Offer class to work on
Example:
merchantname.coupontemplateid
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema (http://json-schema.org/draft-04/schema)#",
"title": "Offer Class List",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Offer class",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"version": {
"type": "string"
},
"message": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"id": {
"type": "string"
},
"header": {
"type": "string"
},
"body": {
"type": "string"
},
"imageUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"actionUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"displayInterval": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
}
}
},
"homePageUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"location": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
}
}
},
"review": {
"type": "object",
"properties": {
"comment": {
"type": "string"
}
}
},
"infoModuleObject": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Object Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
},
"labelValueRows": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
},
"columns": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"showLastUpdateTime": {
"type": "string"
}
}
},
"imageModuleData": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"textModule": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"header": {
"type": "string"
},
"body": {
"type": "string"
}
}
},
"linkUri": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"description": {
"type": "string"
},
"uri": {
"type": "string"
}
}
},
"distributionTimeInterval": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Distribution Time Interval ",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
},
"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": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Render Spec",
"type": "object",
"properties": {
"templateFamily": {
"type": "string"
},
"viewName": {
"type": "string"
}
}
}
},
"allowMultipleUsersPerObject": {
"type": "string"
}
},
"required": [
"distributionTimeInterval",
"infoModuleObject",
"imageModuleData",
"id",
"provider",
"redemptionChannel",
"renderSpecs",
"reviewStatus",
"title"
]
}
}
HTTP status code 200
The resource has been successfully updated
Body
Type: application/json
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "The request payload has incorrect syntax.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "bad_payload_syntax"
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 404
The requested resource does not exist.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 404,
"message": "The requested URI does not map to a single element resource.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "element_resource_non_existing"
}
HTTP status code 409
Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 409,
"message": "The requested resource could not be updated due to server-side validation.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "conflict_resource"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
delete /offerClasss/{id}
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
URI Parameters
- id: required (string)
the id of the Offer class to work on
Example:
merchantname.coupontemplateid
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
HTTP status code 204
The resource has been successfully deleted.
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 404
The requested resource does not exist.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 404,
"message": "The requested URI does not map to a single element resource.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "element_resource_non_existing"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
/{offerId}/offerObject
This resourceType defines the GET, POST, DELETE methods and their responses for a collection resource.
/{offerId}/offerObject
Gets all Loyalty objects referenced by a Loyalty class
Accepted scopes:
- 'sap.googlewallet_view' - Perform read operations on Google Wallet Offer Object
creates a specific Offer object based on offer id
Accepted scopes:
- 'sap.googlewallet_manage' - Perform read operations on Google Wallet Offer Object
updates a specific Loyalty object Accepted scopes:
- 'sap.googlewallet_view' - Perform read operations on Google Wallet Offer Object
get /{offerId}/offerObject
Gets all Loyalty objects referenced by a Loyalty class
Accepted scopes:
- 'sap.googlewallet_view' - Perform read operations on Google Wallet Offer Object
URI Parameters
- offerId: required (string)
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- q: (string)
The simple query criteria based on available fields to limit returned results or a set of modified documents.
Example:
species:dog name:"Clifford"
- pageNumber: (integer - minimum: 1)
The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. The number of the first page is 1.
Example:
5
- pageSize: (integer - minimum: 1)
The number of records retrieved at one time.
Example:
45
HTTP status code 200
Resource successfully retrieved.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Offer Object",
"type": "object",
"properties": {
"classId": {
"type": "string"
},
"id": {
"type": "string"
},
"state": {
"type": "string"
},
"version": {
"type": "string"
},
"barcode": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Barcode ",
"properties": {
"type": {
"type": "string"
},
"value": {
"type": "string"
},
"label": {
"type": "string"
},
"alternateText": {
"type": "string"
}
}
},
"customerId": {
"type": "string"
},
"objectType": {
"type": "string"
},
"message": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"id": {
"type": "string"
},
"header": {
"type": "string"
},
"body": {
"type": "string"
},
"imageUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"actionUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"displayInterval": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
}
}
},
"validTimeInterval": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Valid Time Interval for Offer",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
},
"location": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
}
}
},
"hasUsers": {
"type": "String"
},
"infoModuleObject": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Object Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
},
"labelValueRows": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
},
"columns": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"showLastUpdateTime": {
"type": "string"
}
}
},
"imageModuleData": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"textModuleData": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"header": {
"type": "string"
},
"body": {
"type": "string"
}
}
},
"linksModuleData": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"description": {
"type": "string"
},
"uri": {
"type": "string"
}
}
},
"classReference": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Offer class",
"properties": {
"id": {
"type": "string"
},
"version": {
"type": "string"
},
"message": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"id": {
"type": "string"
},
"header": {
"type": "string"
},
"body": {
"type": "string"
},
"imageUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"actionUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"displayInterval": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
}
}
},
"homePageUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"location": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
}
}
},
"review": {
"type": "object",
"properties": {
"comment": {
"type": "string"
}
}
},
"infoModuleObject": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Object Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
},
"labelValueRows": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
},
"columns": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"showLastUpdateTime": {
"type": "string"
}
}
},
"imageModuleData": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"textModule": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"header": {
"type": "string"
},
"body": {
"type": "string"
}
}
},
"linkUri": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"description": {
"type": "string"
},
"uri": {
"type": "string"
}
}
},
"distributionTimeInterval": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Distribution Time Interval ",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
},
"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": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Render Spec",
"type": "object",
"properties": {
"templateFamily": {
"type": "string"
},
"viewName": {
"type": "string"
}
}
}
},
"allowMultipleUsersPerObject": {
"type": "string"
}
},
"required": [
"distributionTimeInterval",
"infoModuleObject",
"imageModuleData",
"id",
"provider",
"redemptionChannel",
"renderSpecs",
"reviewStatus",
"title"
]
}
}
}
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "There are validation problems, see details section for more information",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "validation_violation",
"details": [
{
"field": "q",
"message": "not a valid query",
"type": "invalid_query_parameter"
}
]
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
post /{offerId}/offerObject
creates a specific Offer object based on offer id
Accepted scopes:
- 'sap.googlewallet_manage' - Perform read operations on Google Wallet Offer Object
URI Parameters
- offerId: required (string)
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Offer Object",
"type": "object",
"properties": {
"classId": {
"type": "string"
},
"id": {
"type": "string"
},
"state": {
"type": "string"
},
"version": {
"type": "string"
},
"barcode": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Barcode ",
"properties": {
"type": {
"type": "string"
},
"value": {
"type": "string"
},
"label": {
"type": "string"
},
"alternateText": {
"type": "string"
}
}
},
"customerId": {
"type": "string"
},
"objectType": {
"type": "string"
},
"message": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"id": {
"type": "string"
},
"header": {
"type": "string"
},
"body": {
"type": "string"
},
"imageUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"actionUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"displayInterval": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
}
}
},
"validTimeInterval": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Valid Time Interval for Offer",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
},
"location": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
}
}
},
"hasUsers": {
"type": "String"
},
"infoModuleObject": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Object Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
},
"labelValueRows": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
},
"columns": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"showLastUpdateTime": {
"type": "string"
}
}
},
"imageModuleData": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"textModuleData": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"header": {
"type": "string"
},
"body": {
"type": "string"
}
}
},
"linksModuleData": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"description": {
"type": "string"
},
"uri": {
"type": "string"
}
}
},
"classReference": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Offer class",
"properties": {
"id": {
"type": "string"
},
"version": {
"type": "string"
},
"message": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"id": {
"type": "string"
},
"header": {
"type": "string"
},
"body": {
"type": "string"
},
"imageUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"actionUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"displayInterval": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
}
}
},
"homePageUri": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"location": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
}
}
},
"review": {
"type": "object",
"properties": {
"comment": {
"type": "string"
}
}
},
"infoModuleObject": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Object Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
},
"labelValueRows": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Info Module Data",
"properties": {
"hexFontColor": {
"type": "string"
},
"hexBackgroundColor": {
"type": "string"
},
"columns": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"showLastUpdateTime": {
"type": "string"
}
}
},
"imageModuleData": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Message Class",
"properties": {
"uri": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"textModule": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"header": {
"type": "string"
},
"body": {
"type": "string"
}
}
},
"linkUri": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "URI Links",
"properties": {
"description": {
"type": "string"
},
"uri": {
"type": "string"
}
}
},
"distributionTimeInterval": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Distribution Time Interval ",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
},
"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": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Render Spec",
"type": "object",
"properties": {
"templateFamily": {
"type": "string"
},
"viewName": {
"type": "string"
}
}
}
},
"allowMultipleUsersPerObject": {
"type": "string"
}
},
"required": [
"distributionTimeInterval",
"infoModuleObject",
"imageModuleData",
"id",
"provider",
"redemptionChannel",
"renderSpecs",
"reviewStatus",
"title"
]
}
}
}
HTTP status code 200
Body
Type: application/json
HTTP status code 201
The collection resource has been successfully created.
Headers
- Location: required (string)
The Location of the new resource which was created by the request. The value consists of a single absolute URI.
Example:
http://www.hybris.com/items/myItem
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "The request payload has incorrect syntax.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "bad_payload_syntax"
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 409
Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 409,
"message": "The requested resource could not be created due to server-side validation.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "conflict_resource"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
put /{offerId}/offerObject
updates a specific Loyalty object Accepted scopes:
- 'sap.googlewallet_view' - Perform read operations on Google Wallet Offer Object
URI Parameters
- offerId: required (string)
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Body
Type: application/json
HTTP status code 200
Body
Type: application/json
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
/{customerId}/updateLoyaltyCardObject
/{customerId}/updateLoyaltyCardObject
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
get /{customerId}/updateLoyaltyCardObject
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
URI Parameters
- customerId: required (string)
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- q: (string)
The simple query criteria based on available fields to limit returned results or a set of modified documents.
Example:
species:dog name:"Clifford"
- pageNumber: (integer - minimum: 1)
The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. The number of the first page is 1.
Example:
5
- pageSize: (integer - minimum: 1)
The number of records retrieved at one time.
Example:
45
HTTP status code 200
Body
Type: application/json
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "There are validation problems, see details section for more information",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "validation_violation",
"details": [
{
"field": "q",
"message": "not a valid query",
"type": "invalid_query_parameter"
}
]
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
/{offerId}/updateOfferObject
/{offerId}/updateOfferObject
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
get /{offerId}/updateOfferObject
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
URI Parameters
- offerId: required (string)
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- q: (string)
The simple query criteria based on available fields to limit returned results or a set of modified documents.
Example:
species:dog name:"Clifford"
- pageNumber: (integer - minimum: 1)
The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. The number of the first page is 1.
Example:
5
- pageSize: (integer - minimum: 1)
The number of records retrieved at one time.
Example:
45
HTTP status code 200
Body
Type: application/json
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "There are validation problems, see details section for more information",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "validation_violation",
"details": [
{
"field": "q",
"message": "not a valid query",
"type": "invalid_query_parameter"
}
]
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
/landingPage/decode/{landingPageUri}
/landingPage/decode/{landingPageUri}
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
get /landingPage/decode/{landingPageUri}
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
URI Parameters
- landingPageUri: required (string)
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- q: (string)
The simple query criteria based on available fields to limit returned results or a set of modified documents.
Example:
species:dog name:"Clifford"
- pageNumber: (integer - minimum: 1)
The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. The number of the first page is 1.
Example:
5
- pageSize: (integer - minimum: 1)
The number of records retrieved at one time.
Example:
45
HTTP status code 200
Body
Type: application/json
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "There are validation problems, see details section for more information",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "validation_violation",
"details": [
{
"field": "q",
"message": "not a valid query",
"type": "invalid_query_parameter"
}
]
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
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.
- Authorization
- Scopes
The table shows the scopes that the Loyalty Google Wallet service supports.
Scope | Description |
---|---|
sap.googlewallet_view | Use this scope to view the card and coupon configurations for Google Wallet. |
sap.googlewallet_manage | Use this scope to manage and edit the card and coupon configurations for Google Wallet. |
sap.googlewallet_delete | Use 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.
- 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.
- 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 toACCEPTED
orREJECTED
.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.
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.
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 toACCEPTED
orREJECTED
.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.
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"
}
If you find any information that is unclear or incorrect, please let us know so that we can improve the Dev Portal content.
Use our private help channel. Receive updates over email and contact our specialists directly.
If you need more information about this topic, visit hybris Experts to post your own question and interact with our community and experts.