0% found this document useful (0 votes)
197 views

SAP Customer Checkout Manager API Guide

This document provides an overview of the API documentation available in SAP Customer Checkout Manager for REST services related to vouchers, loyalty programs, and user management. It describes how to access the API documentation webpage in SAP Customer Checkout Manager and highlights some key aspects about how the REST APIs work, including authentication requirements, request formats, response codes, and error handling.

Uploaded by

Aarón Mendieta
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
197 views

SAP Customer Checkout Manager API Guide

This document provides an overview of the API documentation available in SAP Customer Checkout Manager for REST services related to vouchers, loyalty programs, and user management. It describes how to access the API documentation webpage in SAP Customer Checkout Manager and highlights some key aspects about how the REST APIs work, including authentication requirements, request formats, response codes, and error handling.

Uploaded by

Aarón Mendieta
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

1/27/2022

SAP Customer Checkout manager API


Guide
Generated on: 2022-01-27 22:19:36 GMT+0000

SAP Customer Checkout | 2.0 FP12

PUBLIC

Original content: https://help.sap.com/viewer/8e7761ad43884fe386f6cea829f6d26c/2.0.12/en-US

Warning

This document has been generated from the SAP Help Portal and is an incomplete version of the official SAP product
documentation. The information included in custom documentation may not re ect the arrangement of topics in the SAP Help
Portal, and may be missing important aspects and/or correlations to other topics. For this reason, it is not for productive use.

For more information, please visit the https://help.sap.com/viewer/disclaimer.

This is custom documentation. For more information, please visit the SAP Help Portal 1
1/27/2022

API for Voucher Service, Loyalty Service, and User


Management
API documentation in SAP Customer Checkout Manager
SAP Customer Checkout manager provides an API documentation for all publicly available REST services. Currently, this is
limited to REST services which are missing from this guide. However, the goal for the future is to move all information from this
guide to the API documentation webpage in SAP Customer Checkout manager.

How to access the API documentation webpage in SAP Customer Checkout manager:

While SAP Customer Checkout manager is running, the webpage can be accessed using a Web browser.

In a Web browser, enter the following URL: <server name>:<port>/ccos/api-documentation (if you used ccos as the
.war le name).

This web page provides documentation for each available REST service, about the allowed request methods, payloads and
expected responses. Service calls can be tested using the respective user interface elements. Below the service
documentation, you can nd the models section, which provides detailed information about the data structures used in these
services.

 Hinweis
All SAP Customer Checkout manager services work only if the caller has a valid session in the SAP Customer Checkout
manager. To aquire a session, call one of the available authorization services with the respective credentials.

User Authorization
All SAP Customer Checkout manager API services work only if the caller has a valid session in the SAP Customer Checkout
manager.

URL
POST/auth/admin

Payload/ Body content

{
"userName":"Username",
"secret":"password"
}

Response

 Example

{
"session": {
"sessionId": "99987769-ff55-4ee4-809c-8ff9c50dc019",
"createdAt": 1482136003987,
"expiresAt": 1482137803987,
"csrfToken": "aa4eedd6-579e-47a7-a07e-a4c930e409dc"
},
This is custom documentation. For more information, please visit the SAP Help Portal 2
1/27/2022
"user": {
"name": "Admin",
"locale": "de",
"logonLanguageCode": "EN",
"userName": "Admin",
"uuid": "8da32604-6abe-4861-bee7-204fa548a943"
}
}

User Authorization

Name Type Description

session Object Object that contains session information

For more information, see Table Session.

user Object Object that contains user information

For more information, see Table 3: User.

Session

Name Type Description

sessionId String The ID of the active session

createdAt Timestamp Creation date of the session

expiresAt Timestamp When the session becomes invalid after a


period of inactivity. (milliseconds since
January 1, 1970, UTC)

csrfToken String CSRF token for the current session

User

Name Type Description

name String Name of the user

locale String Location of the user

logonLanguageCode String Language ID of the user

userName String Login name of the user

uuid String Unique ID for user identi cation

General Remarks about the REST API


The following applies to all the API calls described in this document:

1. All request URLs, such as:

http://someserver:8080/api/auth/ticketing

include both a BASE_URL and the actual API path.

In the above example, the following is correct:

BASE_URL: http://someserver:8080/api

API path: /auth/ticketing

This is custom documentation. For more information, please visit the SAP Help Portal 3
1/27/2022
In the API calls that are described in this document, only API path is stated in all API descriptions. When it is used, the
BASE_URL must be placed rst.

2. All REST API calls use the JSON format. This means all requests must include the relevant content type in the header:

Content type: application/json

This applies to all API calls and is a precondition in the API descriptions below.

3. CSRF-Token

During the login call to /auth/admin you will receive a csrfToken in the response json. This token has to be sent in all
subsequent API calls (POST,PUT,DELETE) in the header “X-Csrf-Token”. The token will change each time a login call is
performed.

Return codes
If the service executes successfully, the HTTP return code is always in the range of 2xx.

Skip, Top, Order


Each service that is marked with the supports pagination ag can take several optional parameters.

Skip, Top, Order

Name Type Description

skip Integer Offset of the rst result that is returned.

top String Size of the returned item list.

order List List of elds that determine the order of


output.

You can pass this parameter multiple times.


It contains the elds to order by as well as
the direction.

By default, the direction is ascending. For a


descending direction, prepend a minus (-)
to the eld name.

Example:

order= eld1&order=- eld2

eld1 is the leading order by eld, which is


sorted in ascending order.

eld2 sorts in descending order.

Example
GET /somePath/service?top=10&skip=0&order=name&order=-title

Returns a list of 10 entries starting with the rst row of the result set. Is sorted rst by name in ascending order, then by title in
descending order.

Error handling

This is custom documentation. For more information, please visit the SAP Help Portal 4
1/27/2022
If an error occurs during execution, the service returns an HTTP error status code (4xx or 5xx). The response body may include
additional information about the error. This additional information is assigned a numerical errorCode and an errorMessage in
JSON form. The errorMessage is a technical message (for example, for logging purposes) and is not intended to be shown to
the reader.

Additionally, the body of the response can contain extended error information:

 Sample Code
{
"errorCode": 12345,
"errorMessage": "Some text which will describe the error"
}

Error Handling

Name Type Description

errorCode Integer Unique code of the error. This errorCode


can be used by the application to
determine the error type and provide a
translation to the user.

errorMessage String Error text from server. Is always in English.

Voucher Service (Deprecated)


 Note
Please be aware that the entire Voucher Service API described in this document is deprecated. Please use the Gift Card
Service API described on the API documentation webpage in SAP Customer Checkout manager. For more information, see
API documentation in SAP Customer Checkout Manager.

Get all Vouchers (Deprecated)


This section describes how to get all vouchers.

URL
This service supports pagination.

GET /internal/vouchers

Response

 Sample Code
{
"offset": 0,
"limit": 0,
"overAllCount": 2,
"resultList": [
{
"uuid":"a30fd140-83c7-4218-8889-c455b6f8f59c",
"createdAt": 1447142999438,
"modifiedAt": 1447145030292,
"id": "TEST",
"originTypeCode": "Monitor",

This is custom documentation. For more information, please visit the SAP Help Portal 5
1/27/2022
"typeCode": "VOUCHER",
"voucherMaterialID": "",
"issueDateTime": 1447142989771,
"validToDate": 4102441199000,
"usabilityNumber": -1,
"discountPercentage": null,
"discountAmount": null,
"currencyCode": "EUR",
"externalSystemID": "",
"campaignID": "",
"description": "",
"externalTransactionID": "",
"customerID": "",
"salesPersonID": null,
"cashierID": "",
"entityStatus": "ACTIVE",
"status": "PARTIALLY_CASHED",
"voucherLoyaltyItems": [
{
"uuid":"c8afe6a0-d158-43ff-9907-389f6f124a5a",
"createdAt": 1447142999446,
"modifiedAt": 1447144662083,
"externalItemID": "TEST",
"amountLoyaltyValue": 50,
"currencyCode": "EUR",
"originTypeCode": "Monitor",
"externalTransactionID": "",
"erpTransactionID": null,
"externalSystemID": "",
"customerID": "",
"salesPersonID": null,
"cashierID": "",
"postDateTime": 1447142989771,
"itemState": "CONFIRMED",
"originalAmountItem": true
},
{
"uuid":"0b205231-358f-4c58-826a-2d9598ae9212",
"createdAt": 1447143244826,
"modifiedAt": 1447144662059,
"externalItemID": "egal",
"amountLoyaltyValue": 15,
"currencyCode": "EUR",
"originTypeCode": "Monitor",
"externalTransactionID": "",
"erpTransactionID": "",
"externalSystemID": null,
"customerID": "",
"salesPersonID": "",
"cashierID": "",
"postDateTime": 1447143230868,
"itemState": "CONFIRMED",
"originalAmountItem": false
}
], + more vouchers
}

Get All Vouchers

Name Type Description

Uuid String Unique ID for voucher

createdAt Timestamp Creation date

modi edAt Timestamp Date of last modi cation

voucherLoyaltyID String Unique identi er of the item

originTypeCode String Type of the origin item

This is custom documentation. For more information, please visit the SAP Help Portal 6
1/27/2022

Name Type Description

issueDateTime Timestamp Issue date

usabilityNumber Number Number of usages

discountPercentage Number Discount percentaage

validToDate Timestamp Date until which voucher is valid

discountAmount Number Discount amount

CurrencyCode Status String Currency

Status Timestamp Voucher status

externalTransactionID String External transaction ID for example,


cashdeskID

campaignID String Campaign ID

Description String Description

externaltransactionID String External transaction ID

customerID String Customer ID

salespersonID String Salesperson

cashierID String Cashier ID

entityStatus String Status of voucher (blocked/active)

Status String Voucher status

voucherLoyaltyItems Object Additional voucher nformation

voucherLoyaltyItems

Name Type Description

Uuid String Unique ID per voucher

createdAt Timestamp Creation date

modi edAt Timestamp Date of last modi cation

externalItemID String Identi er of the loyalty item

amountLoyaltyValue String Amount of the loyalty item

currencyCode String Currency

originTypeCode String Type of origin where the Item was created

externalTransactionID String External transaction ID

erpTransactionID String ERP transaction ID

externalSystemID String External system ID

customerID String Customer ID

postDateTime Timestamp Post date

itemState String Item state

originalAmountItem Boolean Original amount item

This is custom documentation. For more information, please visit the SAP Help Portal 7
1/27/2022

Search Vouchers with Conditions (Deprecated)


The selection search is responsible for an explicit search with criteria.

URL
POST /internal/vouchers/selectionsearch

Search Vouchers with Conditions

Name Optional Type Description

id true String Unique identi er of the item

originTypeCode true String Type of the origin item

issueDateTime true Timestamp Issue date

validToDate true Timestamp Date to which the voucher is


valid

status true Timestamp Voucher status

externalTransactionID true String External transaction ID for


example, cashdeskID

customerID true String Customer ID

cashierID true String Cashier ID

creationIdentity true String Created by

entityStatus true String Status of voucher


(blocked/active)

voucherLoyaltyItems true Object Additional information about the


voucher

voucherLoyaltyItems

Name Optional Type Description

externalItemID true String Identi er of the loyalty item

amountLoyaltyValue true String Amount of the loyalty item

originTypeCode true String Type of origin where the item


was created

erpTransactionID true String ERP transaction ID

externalSystemID true String External system ID

customerID true String Customer ID

postDateTime true Timestamp Post date

Example
Sample Payload

This is custom documentation. For more information, please visit the SAP Help Portal 8
1/27/2022

{
"typeCode": "Voucher",
"top": 10,
"skip": 0,
"orderBy": "issueDateTime",
"order": "Descending",
"voucherLoyaltyID": [
{
"mode": "include",
"operator": "equalTo",
"value": "TEST",
"valueTo": ""
}
],
"originTypeCode": [],
"issueDateTime": [],
"validToDate": [
{
"mode": "include",
"operator": "greaterThanOrEqual",
"value": "1448578800",
"valueTo": ""
}
],
"status": [
{
"mode": "include",
"operator": "equalTo",
"value": "NOT_CASHED",
"valueTo": ""
}
],
"externalTransactionID": [],
"customerID": [],
"cashierID": [],
"creationIdentity": [],
"entityStatus": [],
"voucherLoyaltyItems": {
"externalItemID": [],
"amountLoyaltyValue": [],
"originTypeCode": [],
"erpTransactionID": [],
"externalSystemID": [
{
"mode":"include",
"operator": "equalTo",
"value": "MH*",
"valueTo": ""
}
],
"customerID": [],
"postDateTime": []
}
}

Output
Sample Response

{
"offset": 0,
"limit": -1,
"overAllCount": 3,
"resultList": [
{
"uuid":"7c86065b-1357-4a72-86f2-5c5d671bc8ef",
"createdAt": 1447144220288,
"modifiedAt": 1447144220288,
"voucherLoyaltyID": "EGAAL",
"originTypeCode": "Monitor",
"typeCode": "VOUCHER",
This is custom documentation. For more information, please visit the SAP Help Portal 9
1/27/2022
"voucherMaterialID": "",
"issueDateTime": 1447144211535,
"validToDate": 4102441199000,
"usabilityNumber": -1,
"discountPercentage": null,
"discountAmount": null,
"currencyCode": "EUR",
"externalSystemID": "",
"campaignID": "",
"description": "",
"externalTransactionID": "",
"customerID": "",
"salesPersonID": null,
"cashierID": "",
"entityStatus": "ACTIVE",
"status": "NOT_CASHED",
"voucherLoyaltyItems": [
{ "uuid": "72dae446-f84e-4295-b63c-b02f1fa53bc1",
"createdAt": 1447144220289,
"modifiedAt": 1447144220289,
"externalItemID": "EGAAL",
"amountLoyaltyValue": 100,
"currencyCode": "EUR",
"originTypeCode": "Monitor",
"externalTransactionID": "",
"erpTransactionID": null,
"externalSystemID": "",
"customerID": "",
"salesPersonID": null,
"cashierID": "",
"postDateTime": 1447144211535,
"itemState": "CONFIRMED",
"originalAmountItem": true,
"modifiedBy": "Admin",
"createdBy": "Admin"
}
],
"loyaltyUserAccount": null,
"meta": null,
"currentValue": 100,
"originalValue": 100,
"blocked": false,
"modifiedBy": "Admin",
"createdBy": "Admin"
}
]
}

Create New Voucher as Admin (Deprecated)


This section describes how to create a new voucher.

POST /internal/vouchers/adminCreate

 Sample Code
{
"id": "TEST1337",
"originTypeCode": "Monitor",
"typeCode": "VOUCHER",
"status": "NOT_CASHED",
"entityStatus": "ACTIVE",
"issueDateTime": 1448292658303,
"validToDate": 4102441199000,
"usabilityNumber": "-1",
"discountPercentage": "",
"discountAmount": "",
"currencyCode": "EUR",
"currentValue": "500",
"externalSystemID": "",

This is custom documentation. For more information, please visit the SAP Help Portal 10
1/27/2022
"campaignID": "",
"description": "",
"externalTransactionID": "",
"customerID": "",
"cashierID": "",
"blocked": false,
"voucherMaterialID": "",
"voucherLoyaltyItems": [
{
"amountLoyaltyValue": 500,
"uuid": null,
"cashierID": "",
"creationDateTime": "",
"creationIdentity": "",
"currencyCode": "",
"customerID": "",
"erpTransactionID": "",
"externalItemID": "InitialEntry",
"externalTransactionID": "",
"isOriginalAmountItem": "true",
"lastChangeDateTime": "",
"lastChangeIdentity": "",
"originTypeCode": "Monitor",
"postDateTime": 1448292674537,
"salesPersonID": "",
"voucherLoyaltyAccountKey": "",
"isNew": false
}
],
"originalAmount": 500
}

Response

 Sample Code
{
"uuid": "b21c43eb-738c-44b1-9129-6f200d19127d",
"createdAt": 1448292674677,
"modifiedAt": 1448292674755,
"voucherLoyaltyID": "TEST1337",
"originTypeCode": "Monitor",
"typeCode": "VOUCHER",
"voucherMaterialID": "",
"issueDateTime": 1448292658303,
"validToDate": 4102441199000,
"usabilityNumber": -1,
"discountPercentage": null,
"discountAmount": null,
"currencyCode": "EUR",
"externalSystemID": "",
"campaignID": "",
"description": "",
"externalTransactionID": "",
"customerID": "",
"salesPersonID": null,
"cashierID": "",
"entityStatus": "ACTIVE",
"status": "NOT_CASHED",
"voucherLoyaltyItems": [
{
"uuid": "1b0e9437-ae68-43fd-ba16-c26309dff850",
"createdAt": 1448292674677,
"modifiedAt": 1448292674677,
"externalItemID": "TEST1337",
"amountLoyaltyValue": 500,
"currencyCode": "EUR",
"originTypeCode": "Monitor",
"externalTransactionID": "",
"erpTransactionID": null,
"externalSystemID": "",
This is custom documentation. For more information, please visit the SAP Help Portal 11
1/27/2022
"customerID": "",
"salesPersonID": null,
"cashierID": "",
"postDateTime": 1448292658303,
"itemState": "CONFIRMED",
"originalAmountItem": true,
"createdBy": "Admin",
"modifiedBy": "Admin"
}
],
"loyaltyUserAccount": null,
"meta": null,
"currentValue": 500,
"originalValue": 500,
"blocked": false,
"createdBy": "Admin",
"modifiedBy": "Admin"
}

Get Voucher by UuID (Deprecated)


This section describes how to get a voucher using its UuID.

GET /internal/vouchers/{UuID}

The response is the same as described in Create New Voucher as Admin (Deprecated) .

Get all Redeemed Items for Voucher by UuID (Deprecated)


This section describes how to get all redeemed items for a speci c voucher using its UuID.

This service supports pagination.

GET /internal/vouchers/{UuID}/items.

The response is the same as described in Create New Voucher as Admin (Deprecated) , but only for redeemed items for the
speci c voucher.

Block Voucher by UuID (Deprecated)


This section describes how to block a voucher using a speci c UuID.

POST /internal/vouchers/{UuID}/block.

The response is the same as described in Create New Voucher as Admin (Deprecated).

 Note
The entityStatus should be BLOCKED.

Unblock Voucher by UuID (Deprecated)


This section describes how to unblock a voucher using its UuID.

DELETE /internal/vouchers/{UuID}/block

The response is the same as described in Create New Voucher as Admin (Deprecated).

This is custom documentation. For more information, please visit the SAP Help Portal 12
1/27/2022

 Note
The entityStatus should be ACTIVE.

Update Voucher (Deprecated)


This section describes how to update a voucher.

PUT /internal/vouchers/{UuID}

The response and payload are the same as described in Create New Voucher as Admin (Deprecated), with current content.

Create Voucher (Deprecated)


This section describes another way to create a new voucher.

POST /internal/vouchers

The Post Date is the same as described in Create New Voucher as Admin (Deprecated).

The response is the same as described in Create New Voucher as Admin (Deprecated).

Get Voucher by Loyalty ID (Deprecated)


This section describes how to get voucher by loyalty ID.

GET /internal/vouchers/byLoyaltyId/{LoyaltyID}

The response is the same as described in Create New Voucher as Admin (Deprecated).

Update Voucher by Loyalty ID (Deprecated)


This section describes how to update voucher by loyalty ID.

PUT /internal/vouchers/byLoyaltyId/{LoyaltyID}

The response and payload are the same as described in Create New Voucher as Admin (Deprecated).

Get all Redeemed Items for Voucher (by Loyalty ID)


(Deprecated)
This section describes how to get all redeemed items for a voucher speci ed by loyalty ID.

GET /internal/vouchers/byLoyaltyId/{LoyaltyID}/items
The response is the same as described in Create New Voucher as Admin (Deprecated).

Block Voucher by Loyalty ID (Deprecated)


This section describes how to block voucher by loyalty ID.

POST /internal/vouchers/byLoyaltyId/{LoyaltyID}/block

The response is the same as described in Create New Voucher as Admin (Deprecated).

This is custom documentation. For more information, please visit the SAP Help Portal 13
1/27/2022

 Note
The entityStatus should be BLOCKED.

Unblock Voucher by Loyalty ID (Deprecated)


This section describes how to unblock voucher by loyalty ID.

DELETE /internal/vouchers/byLoyaltyId/{LoyaltyID}/block

The response is the same as described in Create New Voucher as Admin (Deprecated).

 Note
The entityStatus should be ACTIVE.

Add Redeemed Item to Voucher (Deprecated)


This section describes how to add a redeemed item to a voucher.

The following additional parameters are possible for this service:

Parameters

Name Type Description

skipExpiredCheck Boolean If this parameter is True, the application


accepts the voucher even if the validity
date is expired.

skipAmountCheck Boolean If this parameter is set to True, the


application accepts the payment even if the
remaining amount of the voucher is too low.

Enter the respective parameters in the URL.

POST /internal/vouchers/byLoyaltyId/{LoyaltyID}/items

Add a single redeem item to the call body:

Sample Payload

{
"amountLoyaltyValue": -25,
"uuid": null,
"cashierID": "",
"creationDateTime": "",
"creationIdentity": "",
"currencyCode": "EUR",
"customerID": "",
"erpTransactionID": "",
"externalItemID": "{Your ID}",
"externalTransactionID": "",
"isOriginalAmountItem": "",
"lastChangeDateTime": "",
"lastChangeIdentity": "",
"originTypeCode": "Monitor",
"postDateTime": 1447143230868,
"salesPersonID": "",
"voucherLoyaltyAccountKey": "",

This is custom documentation. For more information, please visit the SAP Help Portal 14
1/27/2022
"isNew": true
}

The response is the added redeemed item with a new itemState CONFIRMED.

Count Number of Vouchers (Deprecated)


This section describes how to count the number of vouchers.

GET /internal/vouchers/count?typeCode=VOUCHER

The response is the number of voucher entries as integer. This call does not return a JSON-formatted response.

Return Voucher (Deprecated)


This section describes how to return a voucher using the loyalty ID.

GET /internal/vouchers/byLoyaltyId/{loylatyID}/return

The response is the same as described in Create New Voucher as Admin (Deprecated).

Loyalty Service (Deprecated)


 Note
Please be aware that the entire Loyalty Service API described in this document is deprecated. Please use the Loyalty
Service API described on the API documentation webpage in SAP Customer Checkout manager. For more information, see
API documentation in SAP Customer Checkout Manager.

Point Service (Deprecated)


Create Point Account for User (Deprecated)
This section describes how to create an account for the current user (or, if an account already exists, returns the account UUID.

URL
POST /loyalty/account

Response

 Sample Code
{
"accountUuid": "45873eea-f878-4812-a211-b18bf298c2e3"
}

Name Type Description

accountUuid String Uuid of the account

Correct Points for Loyalty Account (Deprecated)


This is custom documentation. For more information, please visit the SAP Help Portal 15
1/27/2022
This section describes how to add or remove points from a loyalty account for the current user.

URL
PUT /internal/users/{userUUID}/correctpoints

Input

 Sample Code
{
"operation": <ADD or SUBTRACT: string>,
"value": <POINTS: number>,
"reason": <REASON: string>
}

Name Optional Type Description

operation false String Two possible values:

ADD: For adding loyalty


points

SUBTRACT: For
removing loyalty points

value false Double The amount of loyalty points


which should be added or
removed.

reason true String The reason for the transaction.

Response

 Sample Code
{
"session": {
"sessionId": "6C434E2B5220FA6EC14766F71FF9EAC9",
"createdAt": 1423568133500,
"expiresAt": 1423570052879
},
"user": {
"uuid": "f03d1803-4992-4c8b-a2c2-2caf32f63712",
"createdAt": 1423568133456,
"modifiedAt": 1423568133456,
"publicId": "10",
"appToken": "b9212893-409a-407e-9522-c8602bf0cb2a",
"ticketingLeading": true,
"userName": "[email protected]",
"state": "ACTIVE",
"identities": [
{
"value": "t12345abc67de8f",
"identityProviderId": "057b304e-a85b-4033-b755-48ef5c3164ac"
}
],
"account": {
"uuid": "a13ecb97-c6ab-4e0e-82a2-0bf3e224024e",
"createdAt": 1431081658820,
"modifiedAt": 1431081658820,
"internalVersion": 1,
"firstName": null,
This is custom documentation. For more information, please visit the SAP Help Portal 16
1/27/2022
"lastName": null,
"birthday": null,
"gender": null,
"addressData": [ ],
"createdBy": null,
"modifiedBy": null
}
}

Retrieve Points for User (Deprecated)


This section shows how to retrieve the current number of points in a user's loyalty account.

URL
GET /loyalty/points

Response

 Sample Code
{
"points": 12345
}

Name Type Description

points Integer Number of points in user's account

Scan Barcode (Deprecated)


This service returns information about a scanned barcode. For example, a barcode can be printed on a ticket, or somewhere on
a coupon card.

URL
GET /loyalty/scan/(barcode)?ext=[codeExtension]

Name Optional Type Description

barcode false String Scanned / entered code

codeExtension true String Code extension. For information


about block/row/seat.

Format: [BlockNr],[RowNr],
[SeatNr]

Example:

201A, 12, 14 = Block 201A, Row


12, Seat Number 14

This is custom documentation. For more information, please visit the SAP Help Portal 17
1/27/2022

Response

 Sample Code
{
"type": "ticket",
"code": "0123456789",
"pointValue": 12345,
"description": "VIP Ticket Team A vs. Team B"
}

Name Type Description

type String Type of the scanned barcode

pointValue Integer Point value that user receives for the


barcode

Code String Scanned barcode

Description String Description of the scanned item

Add Scanned Barcode Points to Account (Deprecated)


This service describes how to add the point value of a scanned barcode to a user's loyalty account.

URL
POST /loyalty/scan/(barcode)

Input

 Sample Code
{
"ext": "[codeExtension]"
}

Name Optional Type Description

barcode false String Scanned/ entered code

codeExtension true String Code extension. Information


about block/row/seat.
Format: [BlockNr],[RowNr],
[SeatNr]

Example:

201A, 12, 14 = Block 201A, Row


12, Seat Number 14

Response

 Sample Code

This is custom documentation. For more information, please visit the SAP Help Portal 18
1/27/2022

{
"confirmationState": "CONFIRMED",
"pointValue": 1,
"accountScanItemUuid": "2442ec44-d3b5-46dc-b4f1-cb476d11169e"
}

Name Type Description

con rmationState String CONFIRMED or UNCONFIRMED. Points are


added to a user's account only if the state
is con rmed.

pointValue Double Point value of the scanned item

accountScanItemUuid String Uuid of the created scan item

Possible Error Codes

Possible Error Codes

Name Description

360 LOYALTY_CODE_INVALID: Invalid item

370 Scanned item not recognized/found in the system. : Invalid not


found in internal DB

371 Maximum per user quantity reached for the item. User cannot scan
any more items of this type.

372 Maximum overall quantity reached for item. User cannot scan any
more items of this type.

373 Maximim item sum reached. User won't receive any more points
because the upper point boundary has been reached.

374 Loyalty item validity date is in the future.

375 Loyalty item validity date is in the past.

376 Loyalty item code extension does not match.

For example, ticketing season, ticket block, row, or seat number


does not match.

Coupon Service (Deprecated)


Retrieve Coupons Purchased by User (Supports Pagination)
(Deprecated)
This section descripes how to return coupons that a user has already purchased from the coupon shop.

URL
GET /loyalty/coupons?status=(all/active/history)

Name Optional Type Description

This is custom documentation. For more information, please visit the SAP Help Portal 19
1/27/2022

Name Optional Type Description

status true String The coupons to fetch:


all = All coupons (default)

active = Only valid/active


coupons

history = Only coupons that


have already been redeemed

Response

 Sample Code
{
"overAllCount": 100,
"resultList": [
{
"uuid": "5f96d89b-f9ec-4917-a41e-362fc78b205e",
"code": "1337",
"validFrom": null,
"validTo": null,
"status": "VALID",
"shopItemUuid": "e1781460-8adc-4760-ad73-5553e412df4e"
},
{
"uuid": "1337",
...
}
]
}

Name Type Description

overAllCount Integer Total number of coupons

resultList JSON Array List with the coupons

resultList > uuid String ID of the coupon. This is the internal logical
unique ID for the coupon in the system.

resultList > code String Generated code of the coupon. This is a


unique ID (if the coupon is unique per user)
or a xed code (if the coupon is valid for
multiple users)

resultList > validFrom DateString Valid from date

resultList > validTo DateString Valid to date

resultList > status String VALID: Coupon is valid and can be used

BLOCKED: Coupon is blocked and cannot


be used

REDEEMED: Coupon has already been used

resultList > shopItemUuid String Uuid of the item in the coupon shop from
which this coupon was created.

Retrieve Coupons Details (Deprecated)


This is custom documentation. For more information, please visit the SAP Help Portal 20
1/27/2022
This section delivers the details of a coupon. Details contain extended information such as description, or validity dates.

URL
GET /loyalty/coupons/{couponUuid}

Name Optional Type Description

couponUuid False String ID of the coupon

Response

 Sample Code
{
"uuid": "5f96d89b-f9ec-4917-a41e-362fc78b205e",
"code": "1337",
"validFrom": null,
"validTo": null,
"status": "VALID",
"shopItemUuid": "e1781460-8adc-4760-ad73-5553e412df4e"
}

Name Type Description

uuid String ID of the coupon. This is the internal logical


unique ID for the coupon in the system.

code String Generated code of the coupon. This is a


unique ID (if the coupon is unique per user)
or a xed code (if the coupon is valid for
multiple users).

validFrom DateString Valid from date

validTo DateString Valid to date

status String VALID: Coupon is valid and can be used

BLOCKED: Coupon is blocked and cannot


be used

REDEEMED: Coupon has already been used

shopItemUuid String Uuid of the item in the coupon shop from


which this coupon was created.

Redeem Coupon (Deprecated)


This section describes how to redeem a coupon that is in a user's coupon list and has status of VALID.

URL

Response
POST /loyalty/coupons/{couponUuid}

This is custom documentation. For more information, please visit the SAP Help Portal 21
1/27/2022

Name Optional Type Description

couponUuid false String ID of the coupon

The response is the same as described in Retrieve Coupons Details (Deprecated).

Return Coupon (Deprecated)


This section shows how to return a coupon that is in a user's coupon list and has status of VALID. It also returns points back in a
user's loyalty account.

URL
POST /loyalty/coupons/{couponUuid}/return

Name Optional Type Description

couponUuid false String ID of the coupon

Response

 Sample Code
{
"points": 12345
}

Name Type Description

points Integer Number of points to return to user's


account

Coupon Shop Service(Deprecated)


Retrieve Item List (Supports Pagination) (Deprecated)
This section describes how to retrieve all items that aren't assigned to a category.

URL
GET /shop/items?filter=[bought|new]&newItemsSince=[ISO Date or timestamp]

Name Optional Type Description

lter true String “bought”: Show only the shop


items the user has purchased.

“new”: Show only the shop


items that are new.

This is custom documentation. For more information, please visit the SAP Help Portal 22
1/27/2022

Name Optional Type Description

newItemsSince true String If a date is provided, any items


that were created after that
date are marked as “newItem:
true”.

Response

 Sample Code
{
"offset": 0,
"limit": 0,
"overAllCount": 100,
"resultList": [
{
"uuid": "08b9cf01-711f-4c5f-9d81-13469422ca0f",
"title": "Test Coupon #0",
"publicId": "#0",
"description": "This is the description for Test Coupon #0",
"validFrom": 1424789917913,
"maxPerAccountQuantity": 2,
"maxForSaleQuantity": 1,
"leftPerAccountQuantity": 1,
"leftForSaleQuantity": 1,
"newItem": true,
"status": "ACTIVE",
"prices": [
{
"key": "b2f36edb-40fb-4b6b-9cbb-7d1d298f865e",
"value": 32,
"validFrom": null,
"validTo": null,
"shopItemUuid": "e1781460-8adc-4760-ad73-5553e412
}
],
"userCoupons": [
{
"uuid": "3b729e2f-ebe4-4813-be5a-cbc4d053
"code": "001::1337",
"validFrom": null,
"validTo": null,
"status": "VALID",
"shopItemUuid": "e1781460-8adc-4760-ad73
}
]
},
{…}
}

Name Optional Type Description

uuid false String Unique identi er of the item

title false String Title of the category

description true String Description text of the item

maxPerAccountQuantity false Integer Maximum quantity that one


single user can buy (-1 =
in nite)

This is custom documentation. For more information, please visit the SAP Help Portal 23
1/27/2022

Name Optional Type Description

maxForSaleQuantity false Integer Maximum quantity that can be


purchased overall by all users
(-1 = in nite)

leftForAccountQuantity false Integer Maximum quantity that remains


for the user (-1 = in nite)

leftForSaleQuantity false Integer Overall quantity that remains


(=maxForSaleQuantity-
alreadySoldQuantity) (-1 =
in nite)

validFrom false Date String Valid from date (can only be


purchased after this point in
time)

validTo false Date String Valid to date (cannot be


purchased after this point in
time)

publicId false String Public ID of the coupon. Can be


presented to the user.

prices false JSON Object Price (and point value) of the


item

Prices > value false Double Price of the item

Prices > validFrom false Date String Price will be valid of this point
in time

Prices > validTo false Date String Price will be valid until this
point in time

Prices > shopItemUuid false String Backref to the item

userCoupons true JSON Object If a user has already purchased


this item in the shop, any
coupons that are created from
the item are listed here. The
elds are same as described in
Retrieve Coupons Details
(Deprecated).

Retrieve Item Details (Deprecated)


This section highlights how to retrieve detailed information about an item (coupon).

URL
GET /shop/items/{itemUuid}

Response
The response is the same as described in Retrieve Item List (Supports Pagination) (Deprecated).

Retrieve Item Image (Deprecated)


This is custom documentation. For more information, please visit the SAP Help Portal 24
1/27/2022
This section describes how to retrieve raw image data for the item (the service needs no authentication).

URL
GET /shop/items/{itemUuid}/image?width=[imageWidth]

Name Optional Type Description

uuid false String Unique identi er of the item.

imageWidth true Integer Width of the image. The SAP


Customer Checkout manager
automatically sizes the image.

Response
Raw image data (png)

Buy Item (Deprecated)


This section shows how to buy an item from the coupon shop and add it to the user's coupons.

URL
POST /shop/items/{itemUuid}/purchase?quantity=X

Name Optional Type Description

itemUuid false String Unique ID of the item which


should be purchased.

quantity true Integer If more than one item is


purchased, pass the quantity in
this parameter.

Response

 Sample Code
{
"points": 12345
}

Name Type Description

points Integer New amount of points

History Service (Deprecated)


Get History Items for Account (Supports Pagination)
(Deprecated)
This is custom documentation. For more information, please visit the SAP Help Portal 25
1/27/2022
This section describes how to retrieve a list of all history items for a user's loyalty account.

URL
GET /history?type=[type]&filter=[filter]

Name Optional Type Description

type true String If a type parameter is provided,


only the corresponding types
are returned by the service.

Possible values are:

RECEIPT

COUPON

POINTS

LOYALTY_ITEM

VLA_ACCOUNT

lter true String Posible values are:

loyalty: Returns all


items that belong to
loyalty-related history
actions (COUPON,
POINTS,
LOYALTY_ITEM). All
redundant “POINT”
history items, that refer
to a prior item (for
example, “COUPON”),
are ltered out by the
server.

receipt: Returns all


items that belong to
purchase events
(RECEIPT). The
parameter “type” is
ignored if “ lter” is set.

Response

 Sample Code
{
"offset": 0,
"limit": 0,
"overAllCount": 100,
"resultList": [
{
"uuid": "8bd58615-1c1e-4453-93ad-37042cc7a47e",
"createdAt": 1431513420385,
"modifiedAt": 1431513420385,
"type": "COUPON",
"value": "3f0dbbf3-f144-44b7-849d-7ce805b6a356",
"pointValue": -620,

This is custom documentation. For more information, please visit the SAP Help Portal 26
1/27/2022
"date": 1431513420343,
"title": "Purchased coupon",
"description": "Purchased coupon",
"id": "35aae032-7c61-4cca-8814-2ea360028a4c",
"action": "PURCHASE_COUPON",
"idRef": "0.049772307965868845::1337",
"createdBy": "U001090",
},
},
{
"uuid": "2d66418f-d404-488f-8be1-df2903458dd4",
"createdAt": 1431513420422,
"modifiedAt": 1431513420422,
"type": "POINTS",
"value": "-620.000000",
"pointValue": -620,
"date": 1431513420410,
"title": "Redeemed Points",
"description": "Redeemed Points",
"id": "35aae032-7c61-4cca-8814-2ea360028a4c",
"action": "REDEEM_POINTS",
"idRef": "8bd58615-1c1e-4453-93ad-37042cc7a47e",
"createdBy": "U001090",
"modifiedBy": "U001090"
},
{
"uuid": "872a65cb-66e3-4715-bbf8-01e72c52c5c1",
"createdAt": 1431513852759,
"modifiedAt": 1431513852759,
"type": "LOYALTY_ITEM",
"value": "5224989d-5c8b-458a-a8fa-11db93d1f76d",
"pointValue": 100,
"date": 1431513852743,
"title": "Added Loyalty item: CONFIRMED",
"description": "Added Loyalty item: CONFIRMED",
"id": "35aae032-7c61-4cca-8814-2ea360028a4c",
"action": "ADD_LOYALTY_ITEM",
"idRef": "LOYALTY_100",
"createdBy": "U001090",
"modifiedBy": "U001090"
},
{
"uuid": "6b0f54c6-8a02-4946-a5f6-718bfb817f70",
"createdAt": 1431513852791,
"modifiedAt": 1431513852791,
"type": "POINTS",
"value": "100",
"pointValue": 100,
"date": 1431513852779,
"title": "Added Points",
"description": "Added Points",
"id": "35aae032-7c61-4cca-8814-2ea360028a4c",
"action": "ADD_POINTS",
"idRef": "872a65cb-66e3-4715-bbf8-01e72c52c5c1",
"createdBy": "U001090",
"modifiedBy": "U001090"
}
]
}

Name Optional Type Description

uuid false String Unique identi er of the item

type false String Type of the history item

value false String Value of the item (depends on


the type).

This is custom documentation. For more information, please visit the SAP Help Portal 27
1/27/2022

Name Optional Type Description

pointValue false Double If the purchase or return on an


item modi ed the user's point
account, the adjustment is
shown here, as a positive or
negative amount, or, if the point
account was not changed, as
null.

date false Timestamp Date when the action was


performed

title false String Title

description false String Description

id false String ID

action false String The action for which this item


was created.

idRef true String Addition ID for a reference to an


external entity.

The following types of items are supported:

RECEIPT:

User purchased a receipt at a point-of-sale station. The “value” eld contains the receipt currency and amount. “idRef”
contains the ID of the receipt. “id” contains the receipt document ID in the SAP ERP system.

LOYALTY_ITEM:

User added a loyalty item to his or her account (for example, scanned a barcode). “id” contains the uuid of the loyalty
account. “value” contains the uuid of the scanned item. “idRef” contains the code of the scanned item.

POINTS:

The total number of loyalty points has been increased or decreased. “value” contains the new point value that has been
added or subtracted. “id” contains the uuid of the loyalty account. “action” contains either “ADD_POINTS” or
“REDEEM_POINTS”. “idRef” references the history item uuid that was the reason for the change of the point value.

VLA_ACCOUNT:

Loyalty account has been created or updated. “value” contains the public ID of the account. “id” contains the uuid of the
account. “action” contains “CREATE_VLA” or “UPDATE_VLA”. “idRef” contains the uuid of the user account for which the
loyalty account was created.

COUPON:

User purchased a coupon from the shop or redeemed a coupon (for example, at a point-of-sale station). “value” contains
the uuid of the coupon. “idRef” contains the coupon ID (generated coupon code). “action” contains
“PURCHASE_COUPON” or “REDEEM_COUPON”.

User Management (Deprecated)


 Note
Please be aware that the entire User Management API described in this document is deprecated. Please use the User
Management API described on the API documentation webpage in SAP Customer Checkout manager. For more information,
see API documentation in SAP Customer Checkout Manager.
This is custom documentation. For more information, please visit the SAP Help Portal 28
1/27/2022

Overview (Deprecated)
All data that is exchanged with the SAP back end takes place using HTTP(S) over a REST JSON interface. To use the advanced
back-end services (points, coupons, and so on), the app/client must be registered with a valid user. The rst authentication of a
user is veri ed using an external system:

SAP Event Ticketing

The app sends any relevant access data to the back end (see Registration of Users (Deprecated)), and the back end veri es
the user’s identity in the relevant system. If this authentication is (??) successful, a user is created in the back-end system and
the user's data, including an app token, is returned to the client. At the same time, a session that uniquely identi es the user is
opened on the server side. After a long period of inactivity (30 minutes is the default), the session expires, meaning that a new
session must be opened. All further services (points, coupons, and so on), can be called only from within a valid session.

Therefore, if the current session has expired, the user must request a new session. The app token is used in this event, to save
performing a complete authentication using SAP Event Ticketing every time: The app sends the app token to the back end along
with the user ID. If the information is correct, a new session is opened.

Consider the following steps when implementing user registration):

1. Use SAP Event Ticketing for a user's initial registration.

2. For all further requests, use the current session.

3. After a session has expired, a new session can be requested with the app token.

 Note
The app token must be handled securely and con dentially, which means the following:

The app token is not sent with every request, but only to get a new session. The session is then used for interaction
with the server.

The app token is con dential and user-speci c.

The app saves the app token and, if required, uses it to open a new session. This process should run in the app
automatically in the background, that is, without any action on the part of the user or UI.

Registration of Users (Deprecated)


To register a user account on the back end, authentication using a third-party system is required. As of release 2.0 of SAP
Customer Checkout, only SAP Event Ticketing is supported for this authenti cation.

Registration Using SAP Event Ticketing (Deprecated)


The user can log on with an existing SAP Event Ticketing account.

1. The user communicates his or her SAP Ticketing access data; that is, login and password.

2. The app sends the access data to the back end.

3. The back end uses the data to verify the identity of the user with SAP Event Ticketing.

4. After successful authentication, a user is created in the back end.

This is custom documentation. For more information, please visit the SAP Help Portal 29
1/27/2022
5. The back end responds to the app by providing the following data:

a. User object

b. App token (also attached to the user object)

c. Session data

You can also generate a new user for the SAP Event Ticketing system (see SAP Account Registration (Deprecated)).

Session Management (Deprecated)


All further REST calls to the back end require a valid or active session. A session is automatically opened upon user registration.
The client side of a session expires after a period of inactivity. The default is 30 minutes and can be changed at any time;
however, an app should not rely on an exact value. Every call that takes place in a session (for example, vouchers, points, and so
on), extends the session by a further 30, 60 (and so on) minutes, as de ned.

Use of the Session (Deprecated)


A session can be uniquely identi ed using a session ID, for example:

“e97ac19b-fe71-477b-9dec-ccdf088c53e6”

For a REST call from the app to be assigned to the current session, the app must also send the following information in the
request header:

Cookie: JSESSIONID=e97ac19b-fe71-477b-9dec-ccdf088c53e6

If an attempt is made from the client side to access user-speci c apps without an active session, the server returns the HTTP
error 401 (unauthorized).

Requesting a New Session (Deprecated)


If a session has expired due to a period of inactivity, a new session must be requested. This should not require the complete
repetition of the SAP Event Ticketing sign-up process.

Instead, use the app token that was created and returned when the user rst registered. A session that is created using an app
token enables a user to access data and functions; the token should therefore be treated as con dential and used only for this
one API call.

User Service (Deprecated)


Logon and Registration Using SAP Event Ticketing
(Deprecated)
The service receives the user’s logon data for an SAP Event Ticketing account and, if veri cation is successful, returns the user
pro le.

The following options are available:

1. If the SAP Event Ticketing account is not known in the back end, a new user is created and this is returned.

2. If the SAP Event Ticketing account is already known in the back end, the existing user is returned. This probably happens
if the user installs the app a second time (for example, reinstallation on the same device, or installation on another

This is custom documentation. For more information, please visit the SAP Help Portal 30
1/27/2022
device) and logs on again.

URL
POST /auth/ticketing

Input

Name Type Mandatory Description

userName String Yes Login for SAP Event Ticketing


access (e-mail address or
customer number)

secret String Yes Password

 Sample Code
{
"userName": "[email protected]",
"secret": "test"

Response

Name Type Description

user JSON object The user data (either newly created or from
an existing user )

session JSON object Session information:

Session ID, start time, session end (if there


are no further requests or activities)

 Sample Code
{
"session": {
"sessionId": "6C434E2B5220FA6EC14766F71FF9EAC9",
"createdAt": 1423568133500,
"expiresAt": 1423570052879
},
"user": {
"uuid": "f03d1803-4992-4c8b-a2c2-2caf32f63712",
"createdAt": 1423568133456,
"modifiedAt": 1423568133456,
"publicId": "10",
"appToken": "b9212893-409a-407e-9522-c8602bf0cb2a",
"ticketingLeading": true,
"userName": "[email protected]",
"state": "ACTIVE",
"identities": [
{
"value": "t12345abc67de8f",
"identityProviderId": "057b304e-a85b-4033-b755-48ef5c3164ac"
}
],
"account": {
"uuid": "a13ecb97-c6ab-4e0e-82a2-0bf3e224024e",
This is custom documentation. For more information, please visit the SAP Help Portal 31
1/27/2022
"createdAt": 1431081658820,
"modifiedAt": 1431081658820,
"internalVersion": 1,
"firstName": null,
"lastName": null,
"birthday": null,
"gender": null,
"addressData": [ ],
"createdBy": null,
"modifiedBy": null
}
}

Errors

HTTP Code Error Message Error Code Description

400 Ticketing connect failed. 703 Veri cation using SAP Event
Ticketing failed. This message
probably indicates that an
invalid login or incorrect
password has been provided.

403 User not active. 600 An attempt was made to log on


a user who has been deleted.

400 Logged in but uuid was not 606 The current user is already
given. logged on (valid session);
however, his or her uuid hasn't
been provided, and must be
sent explicitly.

Request Login and New Session with App Token (Deprecated)


The service receives the user’s ID and the app token. If the data is correct, a new session is opened and the session data is
returned.

URL
POST /auth/token

Input

Name Type Mandatory Description

id String Yes The user's ID

appToken String Yes The user's app token

 Sample Code
{
"id": "158261cd-9698-42ce-b863-2c477778dae0",
"appToken": "78baab42-e3af-436b-8a4c-0e753a8a7ac5"

This is custom documentation. For more information, please visit the SAP Help Portal 32
1/27/2022

Response

Name Type Description

user JSON object Data for an existing user

session JSON object Session information:

Session ID, start time, session end (if there


are no further requests or activities)

 Sample Code
{
"session": {
"sessionId": "6C434E2B5220FA6EC14766F71FF9EAC9",
"createdAt": 1423568133500,
"expiresAt": 1423570052879
},
"user": {
"uuid": "f03d1803-4992-4c8b-a2c2-2caf32f63712",
"createdAt": 1423568133456,
"modifiedAt": 1423568133456,
"publicId": "10",
"appToken": "b9212893-409a-407e-9522-c8602bf0cb2a",
"ticketingLeading": true,
"userName": "[email protected]",
"state": "ACTIVE",
"identities": [
{
"value": "t12345abc67de8f",
"identityProviderId": "057b304e-a85b-4033-b755-48ef5c3164ac"
}
],
"account": {
"uuid": "a13ecb97-c6ab-4e0e-82a2-0bf3e224024e",
"createdAt": 1431081658820,
"modifiedAt": 1431081658820,
"internalVersion": 1,
"firstName": null,
"lastName": null,
"birthday": null,
"gender": null,
"addressData": [ ],
"createdBy": null,
"modifiedBy": null
}
}
}

Errors

HTTP Code Error Message Error Code Description

401 Unauthenticated 901 The combination of ID and


password is not correct (that is,
either incorrect or nonexistent
ID or incorrect password).

This is custom documentation. For more information, please visit the SAP Help Portal 33
1/27/2022

Logout (Deprecated)
This section ends or closes the current session.

URL
DELETE /auth/session

Input
None

Response
HTTP response: 200 OK

Refresh Session (Deprecated)


A simple call that extends the validity or duration of the current session (by triggering session “activity” and postponing
invalidation by another 30, 60 (and so on, as de ned) minutes). However, this call is probably rarely necessary, because the
session is extended anyway by 30, 60 (and so on) minutes after every call.

URL
GET /auth/session

Input
None, except the session ID, which must be sent for every call.

Response

Name Type Description

sessionId String The ID of the active session

createdAt Number (timestamp) When the session was opened


(milliseconds since January 1, 1970, UTC)

expiresAt Number (timestamp) When the session becomes invalid if there


is no further activity (milliseconds since
January 1, 1970, UTC)

 Sample Code
{
"sessionId": "c5653dd2-6819-4239-a493-aa5e8fa5444f",
"createdAt": 1418732483103,
"expiresAt": 1418736188735

This is custom documentation. For more information, please visit the SAP Help Portal 34
1/27/2022

Errors

HTTP Code Error Message Error Code Description

403 No active session found. 700 No valid session found for the
transmitted session ID
speci ed in the header

Delete Own User (Deprecated)


Deletes a user’s personal data and sets the status of the relevant account to DELETED (40). All identities and accounts that are
linked to the user (for example, the SAP Event Ticketing ID) are also deleted. This call requires a valid session.

URL
DELETE /auth/me

Input
None

Response
HTTP response: 200 OK

Errors

HTTP Code Error Message Error Code Description

403 Unauthenticated 901 The user is not logged on or has


no active session.

400 User already deleted 604 The user that is connected with
the current session has been
deleted. (This can happen if the
app is installed on two devices
and an attempt is made to
delete the user on both devices
one after the other, when a valid
session is open on each
device.)

Delete App Token (Deprecated)


Use this call when a user who is connected with the current session has been deleted. (This can happen if the app is installed on
two devices and an attempt is made to delete a user from both devices one after the other.)

To get a new app token for the user, you must reregister the user. See Logon and Registration Using SAP Event Ticketing
(Deprecated) and Request Login and New Session with App Token (Deprecated).

URL

This is custom documentation. For more information, please visit the SAP Help Portal 35
1/27/2022
DELETE /auth/token

Input
None, except the session ID, which must be sent for every call.

Response
HTTP response: 200 OK

Errors

HTTP Code Error Message Error Code Description

403 Unauthenticated 901 The user is not logged on or has


no active session.

404 No active user found. 605 The user for the currently
logged-on session no longer
exists, or the user’s status is no
longer active.

Upload User Image (Deprecated)


Upload a picture, in PNG format, of the currently logged-on user. The size is automatically scaled so that the height and width
are a maximum of 200 pixels.

The scaled image is returned as output.

URL
POST /users/avatar

Input
PNG raw data

Response
PNG raw data

Errors

HTTP Code Error Message Error Code Description

403 Unauthenticated 901 The user is not logged on or has


no active session.

404 No active user found. 605 The user for the currently
logged-on session no longer
exists or the user’s status is no
longer active.

This is custom documentation. For more information, please visit the SAP Help Portal 36
1/27/2022

HTTP Code Error Message Error Code Description

404 Invalid image format. 608 The image that was uploaded is
not in PNG format.

Download User Image (Deprecated)


Download a picture of the currently logged-on user. Image is returned in PNG format.

URL
GET /users/avatar

Input
PNG raw data

Response
PNG raw data

Errors

HTTP Code Error Message Error Code Description

403 Unauthenticated 901 The user is not logged on or has


no active session.

404 No active user found. 605 The user for the currently
logged-on session no longer
exists or the user’s status is no
longer active.

404 No image found. 607 No image was found for this


user.

SAP Account Registration (Deprecated)


Register a new user in SAP Event Ticketing.

When registration is successfully completed, the user is immediately logged on automatically.

This service can be called only if no active session is currently running for the user.

In the event of an error, the response from the server often contains further information about the error, such as permitted
values, missing values, and so on.

URL
POST /ticketingaccount

Input

This is custom documentation. For more information, please visit the SAP Help Portal 37
1/27/2022

Name Type Required Description

email String Yes E-mail address (later used for


the user name)

emailCheck String Yes E-mail check (repeated entry of


address)

secret String Yes Password

secretCheck String Yes Password check (repeated


entry of password)

rstName String Yes First name

lastName String Yes Last name

dateOfBirth String No Date of birth (YYYYMMDD)

gender String No Gender: MALE, FEMALE, or


OTHER

street String Yes Street name

houseNo String Yes House number

zipCode String Yes Zip code

city String Yes Cty

country String Yes Country (for example, DE or US)

salutation String Yes Salutation (Mr., Ms.)

additionalAddressInfo String No Additional address eld

phoneNo String No Telephone number

cellNo String No Cell phone number

 Sample Code
{
"firstName": "Max",
"lastName":"Mustermann",
"dateOfBirth":"19801231",
"secret": "1234test",
"secretCheck": "1234test",
"email": "[email protected]",
"emailCheck": "[email protected] ",
"country": "DE",
"city": "Walldorf",
"zipCode": "69190",
"street": "Dietmar-Hopp-Allee",
"houseNo": "16"
}

Response

Name Type Description

JSON object The user data

session JSON object The data of the current session

This is custom documentation. For more information, please visit the SAP Help Portal 38
1/27/2022

 Sample Code
{
"session": {
"sessionId": "5f48737d-154c-44f7-9728-21fe8cf1e9aa",
"createdAt": 1431945295425,
"expiresAt": 1431947095425
},
"user": {
"uuid": "2f1cefac-353e-4755-bd41-b1a809735693",
"createdAt": 1431945295163,
"modifiedAt": 1431945295163,
"publicId": "U002001",
"userName": "[email protected]",
"appToken": "25d1b758-00f5-4529-8dd8-df319d8e2f0a",
"ticketingLeading": false,
"state": "ACTIVE",
"identities": [
{
"value": "t5559c04e4f5ea7",
"valueTwo": "5008582",
"identityProviderId": "f1613e21-0693-4cfd-81e5-f5c150c42c9a",
"createdBy": null,
"modifiedBy": null
}
],
"account": {
"uuid": "a364c148-d56f-4ad8-bb7b-6d924ec030bb",
"createdAt": 1431945295142,
"modifiedAt": 1431945295142,
"firstName": "Max",
"lastName": "Mustermann",
"birthday": null,
"gender": null,
"addressData": [
{
"uuid": "cf8469c2-2e0c-40a0-8194-9843e927fcc9",
"createdAt": 1431945295154,
"modifiedAt": 1431945295154,
"street": null,
"houseNr": null,
"zipCode": null,
"city": null,
"createdBy": null,
"modifiedBy": null
}

],
"combinedName": "Max Mustermann ",
"createdBy": null,
"modifiedBy": null
},
"createdBy": null,
"modifiedBy": null
}
}

Errors
As well as the error code and the error message, the error response from the server may contain additional information (for
example, if the address sent is not unique).

HTTP Code Error Message Error Code Description

404 Already logged in. 609 A session is currently running


for the user (user is logged on).

This is custom documentation. For more information, please visit the SAP Help Portal 39
1/27/2022

HTTP Code Error Message Error Code Description

404 Validation failed. 611 The validation of the entries


failed.

404 User with same credentials 610 A user with same user name (or
already exists. e-mail address) already exists.

404 The new passwords do not 642 The password and password
match con rmation entries are not the
same.

404 New password does not follow 643 The password does not comply
the password policy with the server policy.

404 Blank password not allowed. 644 Blank passwords are not
allowed.

404 Password too short. 645 The password is too short.

404 Not enough special characters 646 The password does not contain
in password. enough special characters.

404 Not enough numerical 647 The password does not contain
characters in password. enough numerical characters.

404 Not enough uppercase 648 The password does not contain
characters in password. enough uppercase characters.

404 Not enough lowercase 649


characters in password.

404 Old and new password too 650 The old and new passwords are
similar. too similar.

404 Registration failed. 660 The registration has failed.

404 Invalid country. 661 Country validation has failed


(incorrect format).

404 Missing data. 662 Data is missing. The response


contains a list of the elds.

404 Invalid postal code. 663 Postal code validation has


failed (incorrect format).

404 Invalid address. 664 The address is invalid.

404 Not unique address. 665 The address is not unique. The
response contains suggested
addresses.

404 Invalid personal data. 666 The validation of the personal


data failed.

404 Invalid e-mail. 667 E-mail address validation has


failed (incorrect format).

404 Customer already exists. 668 User (e-mail address) already


exists and cannot be created
again.

404 Invalid salutation. 669 The salutation is invalid .

404 Invalid telephone number. 670 Telephone number validation


has failed (incorrect format).

This is custom documentation. For more information, please visit the SAP Help Portal 40
1/27/2022

HTTP Code Error Message Error Code Description

404 Invalid cell phone number. 671 Cell phone number validation
has failed (incorrect format).

404 Invalid birthday. 672 Date-of-birth validation has


failed (incorrect format).

404 Address not found. 674 The address entered cannot be


found. In this case, addInfoList
contains additional information
(see table below).

Possible additional information for Address not found (673)

Key Value Description

street changed Input was changed/correction

street not found Street was not found. (If the street was not
found, the address should be storable.)

street not checked Street was not checked by address


validation.

street transcoded Name of the street was transcoded (for


example, to the new name of the street).

number not found House number was not found.

number not checked House number was not checked by address


validation.

zip changed Input was changed/corrected.

zip transcoded Zip code was changed.

city changed Input was changed/corrected.

city transcoded Input was changed (new or different name


of the city).

Example of a simple error response:

 Sample Code
{
"errorCode": "668",
"errorMessage": "Customer already exists",
"addInfoList": null,
"addressSuggestions": null
}

Example of an error response if the address cannot be uniquely identi ed:

 Sample Code
{
"errorCode": "665",
"errorMessage": "Not unique address",
"addInfoList": [
"street - changed"
],
"addressSuggestions": [
This is custom documentation. For more information, please visit the SAP Help Portal 41
1/27/2022
{
"street": "Dietmar-Hopp-Allee",
"streetNumber": "16",
"postalCode": "69190",
"city": "Walldorf",
"countryCode": "DE",
"additionalInformation": null
},

...

{
"street": "Dietmar-Hopp-Allee",
"streetNumber": "16",
"postalCode": "69190",
"city": "Walldorf",
"countryCode": "DE",
"additionalInformation": null
}
]
}

Example of an error response if an address attribute, such as the street, cannot be uniquely identi ed:

 Sample Code
"errorCode": "674",The password does not contain enough lowercase
"errorMessage": "Address not found",
characters.
{
"errorCode": "674",The password does not contain enough lowercase
"errorMessage": "Address not found",
characters.
"addInfoList": [
"street - not_found",
"number - not_checked"

"addInfoList": [],
"addressSuggestions": null
}

"street - not_found",
"number - not_checked"

User Data (Deprecated)


Gets the data of the currently logged-on user.

URL
GET /users

Input
None

Response

Name Type Description

user JSON object The user's data

This is custom documentation. For more information, please visit the SAP Help Portal 42
1/27/2022

 Sample Code
{
"uuid": "f03d1803-4992-4c8b-a2c2-2caf32f63712",
"createdAt": 1423568133456,
"modifiedAt": 1423568133456,
"publicId": "10",
"appToken": "b9212893-409a-407e-9522-c8602bf0cb2a",
"ticketingLeading": true,
"userName": "[email protected]",
"state": "ACTIVE",
"identities": [
{
"value": "t12345abc67de8f",
"identityProviderId": "057b304e-a85b-4033-b755-48ef5c3164ac"
}
],
"account": {
"uuid": "a13ecb97-c6ab-4e0e-82a2-0bf3e224024e",
"createdAt": 1431081658820,
"modifiedAt": 1431081658820,
"firstName": null,
"lastName": null,
"birthday": null,
"gender": null,
"addressData": [ ],
"createdBy": null,
"modifiedBy": null
}
}

Errors

HTTP Code Error Message Error Code Description

403 Unauthenticated 901 The user is not logged on or has


no active session.

404 No active user found. 605 The user for the currently
logged-on session no longer
exists or the user’s status is no
longer active.

API Remarks (Deprecated)


The User Object (Deprecated)
The user object (which is returned in various API calls) has the following structure:

Example:

 Sample Code
{
"session": {
"sessionId": "C27F14FA3E18853A6356B5A0B1450D47",
"createdAt": 1423563794362,
"expiresAt": 1423565594362
},
"user": {
"uuid": "d690c46f-3193-4ac5-9d1d-c6d078112a08",
"createdAt": 1423563794127,
"modifiedAt": 1423563794127,
"publicId": "9",
This is custom documentation. For more information, please visit the SAP Help Portal 43
1/27/2022
"appToken": "54ef6787-3fd5-4737-9be9-43b2930a560e",
"ticketingLeading": true,
"userName": "[email protected]",
"state": “ACTIVE”,
"identities": [
{
"value": "t12345678901234",
"identityProviderId": "057b304e-a85b-4033-b755-48ef5c3164ac"
}

],
"account": {
"uuid": "a13ecb97-c6ab-4e0e-82a2-0bf3e224024e",
"createdAt": 1431081658820,
"modifiedAt": 1431081658820,
"firstName": null,
"lastName": null,
"birthday": null,
"gender": null,
"addressData": [ ],
"createdBy": null,
"modifiedBy": null
}
}
}

Consider the following:

1. UUID: the user’s internal system ID, that is, their actual ID. End customers and users should probably never be directly
confronted with this ID, because it is very long and complicated.

2. publicId: a more manageable ID, which (if at all) can be shown to users in support cases (so they need not say their 36-
character UUID when speaking with support)

3. createdAt and modi edAt: points in time in the usual form of “milliseconds since January 1, 1970”

4. ticketingLeading: a Boolean that states whether a ticketing identity is stored for the user. Not relevant for the client.

5. state: the user’s status. Currently, the following values exist: ACTIVE and DELETED

6. identities: the list of identities known for the user. In the example above, as follows:

An SAP Event Ticketing account:

{"identityProviderId": 057b304e-a85b-4033-b755-48ef5c3164ac,

"value": "t9876abcd5432ef"}

Therefore, the ID of the user in the SAP Event Ticketing system is “t9876abcd5432ef”.

7. “account” contains a user's personal data. The subobject is optional.

This is custom documentation. For more information, please visit the SAP Help Portal 44

You might also like