1. Overview
These services generate or administer coupons.
1.1. Version information
Version : 1.0.0
1.2. License information
License : Use of this file is subject to the terms of your agreement with SAP SE or its affiliates respecting the use of the SAP product for which this file relates.
Terms of service : null
1.3. URI scheme
Host : hostname
BasePath : /couponwebservices
1.4. Tags
-
CouponCodes : Coupon Codes Controller
-
CouponServices : Couponservices Controller
2. Paths
2.1. Retrieves the generated coupon codes for a multi-code coupon given its media code.
GET /couponcodes/{couponId}/{mediaCode}
2.1.1. Description
The media code is the code attribute of the Media
2.1.2. Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
Path |
couponId |
the id of the multicode coupon |
string |
Path |
mediaCode |
the code of the generated codes media |
string |
2.1.3. Responses
| HTTP Code | Description | Schema |
|---|---|---|
200 |
OK |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
2.1.4. Produces
-
application/text
2.1.5. Tags
-
CouponCodes
2.1.6. Security
| Type | Name |
|---|---|
oauth2 |
|
oauth2 |
2.2. Gets a code generation configuration
GET /couponservices/v2/codegenerationconfiguration/get/{codeGenerationConfigurationName}
2.2.1. Description
This endpoint retrieves a single code generation configuration for a given couponId
2.2.2. Parameters
| Type | Name | Description | Schema | Default |
|---|---|---|---|---|
Path |
codeGenerationConfigurationName |
The codeGenerationConfigurationName of the requested codeGenerationConfiguration |
string |
|
Query |
fields |
Fields to retrieve |
enum (DEFAULT, BASIC, FULL) |
|
2.2.3. Responses
| HTTP Code | Description | Schema |
|---|---|---|
200 |
OK |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
2.2.4. Produces
-
*/* -
application/text
2.2.5. Tags
-
CouponServices
2.2.6. Security
| Type | Name |
|---|---|
oauth2 |
|
oauth2 |
2.3. Gets list of code generation configurations
GET /couponservices/v2/codegenerationconfiguration/list
2.3.1. Description
This endpoint retrieves all the code generation configurations that are registered in the system
2.3.2. Parameters
| Type | Name | Description | Schema | Default |
|---|---|---|---|---|
Query |
currentPage |
Current page number |
integer (int32) |
|
Query |
fields |
Fields to retrieve |
enum (DEFAULT, BASIC, FULL) |
|
Query |
pageSize |
Number of items on a page |
integer (int32) |
|
Query |
sort |
Type of sorting to be applied to the retrieved set |
enum (asc, desc) |
|
2.3.3. Responses
| HTTP Code | Description | Schema |
|---|---|---|
200 |
OK |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
2.3.4. Produces
-
*/* -
application/text
2.3.5. Tags
-
CouponServices
2.3.6. Security
| Type | Name |
|---|---|
oauth2 |
|
oauth2 |
2.4. Creates a multi-code coupon
POST /couponservices/v2/multicodecoupon/create
2.4.1. Description
This endpoint creates a new multi-code coupon given in POST body
2.4.2. Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
Body |
couponWsDTO |
Request body parameter (DTO in xml or json format) |
2.4.3. Responses
| HTTP Code | Description | Schema |
|---|---|---|
201 |
Created |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
2.4.4. Consumes
-
application/xml -
application/json
2.4.5. Produces
-
*/* -
application/text
2.4.6. Tags
-
CouponServices
2.4.7. Security
| Type | Name |
|---|---|
oauth2 |
|
oauth2 |
2.5. Generate multi-code coupon codes
PUT /couponservices/v2/multicodecoupon/generate/{couponId}/{batchsize}
2.5.1. Description
This endpoint generates a batch of the multi-code coupon codes for a provided couponId and batch size
2.5.2. Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
Path |
batchsize |
Batch size for generated coupons |
integer (int32) |
Path |
couponId |
The couponId of related multi-code coupon |
string |
2.5.3. Responses
| HTTP Code | Description | Schema |
|---|---|---|
200 |
OK |
< string, < string > array > map |
201 |
Created |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
2.5.4. Consumes
-
application/json
2.5.5. Produces
-
*/* -
application/text
2.5.6. Tags
-
CouponServices
2.5.7. Security
| Type | Name |
|---|---|
oauth2 |
|
oauth2 |
2.6. Retrieves a multi-code coupon
GET /couponservices/v2/multicodecoupon/get/{couponId}
2.6.1. Description
This endpoint retrieves a multi-code coupon for a given couponId
2.6.2. Parameters
| Type | Name | Description | Schema | Default |
|---|---|---|---|---|
Path |
couponId |
The couponId of the requested coupon |
string |
|
Query |
fields |
Fields to retrieve |
enum (DEFAULT, BASIC, FULL) |
|
2.6.3. Responses
| HTTP Code | Description | Schema |
|---|---|---|
200 |
OK |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
2.6.4. Produces
-
*/* -
application/text
2.6.5. Tags
-
CouponServices
2.6.6. Security
| Type | Name |
|---|---|
oauth2 |
|
oauth2 |
2.7. Returns list of multi-code coupons
GET /couponservices/v2/multicodecoupon/list
2.7.1. Description
This endpoint retrieves all multi-code coupons that are registered in the system
2.7.2. Parameters
| Type | Name | Description | Schema | Default |
|---|---|---|---|---|
Query |
currentPage |
Current page number |
integer (int32) |
|
Query |
fields |
Fields to retrieve |
enum (DEFAULT, BASIC, FULL) |
|
Query |
pageSize |
Number of items on a page |
integer (int32) |
|
Query |
sort |
Type of sorting to be applied to the retrieved set |
enum (asc, desc) |
|
2.7.3. Responses
| HTTP Code | Description | Schema |
|---|---|---|
200 |
OK |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
2.7.4. Produces
-
*/* -
application/text
2.7.5. Tags
-
CouponServices
2.7.6. Security
| Type | Name |
|---|---|
oauth2 |
|
oauth2 |
2.8. Updates a multi-code coupon
PUT /couponservices/v2/multicodecoupon/update
2.8.1. Description
This endpoint updates multi-code coupon data as provided in PUT body
2.8.2. Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
Body |
couponWsDTO |
Request body parameter (DTO in xml or json format) |
2.8.3. Responses
| HTTP Code | Description | Schema |
|---|---|---|
201 |
Created |
No Content |
204 |
No Content |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
2.8.4. Consumes
-
application/xml -
application/json
2.8.5. Produces
-
*/*
2.8.6. Tags
-
CouponServices
2.8.7. Security
| Type | Name |
|---|---|
oauth2 |
|
oauth2 |
2.9. Updates status of multi-code coupon
PUT /couponservices/v2/multicodecoupon/update/status
2.9.1. Description
This endpoint updates status of a multi-code coupon as provided in POST body
2.9.2. Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
Body |
couponStatusWsDTO |
Object that contains coupon data whose status needs to be updated, such as 'couponId', 'active' |
2.9.3. Responses
| HTTP Code | Description | Schema |
|---|---|---|
201 |
Created |
No Content |
204 |
No Content |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
2.9.4. Consumes
-
application/xml -
application/json
2.9.5. Produces
-
*/*
2.9.6. Tags
-
CouponServices
2.9.7. Security
| Type | Name |
|---|---|
oauth2 |
|
oauth2 |
2.10. Validates a multi-code coupon with given coupon code
GET /couponservices/v2/multicodecoupon/validate/{couponCode}
2.10.1. Description
This endpoint validates a multi-code coupon with given coupon code
2.10.2. Parameters
| Type | Name | Description | Schema | Default |
|---|---|---|---|---|
Path |
couponCode |
The code of the coupon to validate |
string |
|
Query |
fields |
Fields to retrieve |
enum (DEFAULT, BASIC, FULL) |
|
2.10.3. Responses
| HTTP Code | Description | Schema |
|---|---|---|
200 |
OK |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
2.10.4. Produces
-
*/* -
application/text
2.10.5. Tags
-
CouponServices
2.10.6. Security
| Type | Name |
|---|---|
oauth2 |
|
oauth2 |
2.11. Creates single-code coupon entity
POST /couponservices/v2/singlecodecoupon/create
2.11.1. Description
This endpoint creates a new single-code coupon object with the parameters provided in POST body
2.11.2. Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
Body |
couponWsDTO |
Object that contains data about to-be-created coupon, such as 'startDate', 'endDate', 'couponId', 'name' etc |
2.11.3. Responses
| HTTP Code | Description | Schema |
|---|---|---|
201 |
Created |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
2.11.4. Consumes
-
application/xml -
application/json
2.11.5. Produces
-
*/* -
application/text
2.11.6. Tags
-
CouponServices
2.11.7. Security
| Type | Name |
|---|---|
oauth2 |
|
oauth2 |
2.12. Gets a single-code coupon
GET /couponservices/v2/singlecodecoupon/get/{couponId}
2.12.1. Description
This endpoint retrieves a single-code coupon for a given couponId
2.12.2. Parameters
| Type | Name | Description | Schema | Default |
|---|---|---|---|---|
Path |
couponId |
The couponId of the requested coupon |
string |
|
Query |
fields |
Fields to retrieve |
enum (DEFAULT, BASIC, FULL) |
|
2.12.3. Responses
| HTTP Code | Description | Schema |
|---|---|---|
200 |
OK |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
2.12.4. Produces
-
*/* -
application/text
2.12.5. Tags
-
CouponServices
2.12.6. Security
| Type | Name |
|---|---|
oauth2 |
|
oauth2 |
2.13. Returns list of single-code coupons
GET /couponservices/v2/singlecodecoupon/list
2.13.1. Description
This endpoint retrieves all of the single-code coupons that are registered in the system
2.13.2. Parameters
| Type | Name | Description | Schema | Default |
|---|---|---|---|---|
Query |
currentPage |
Current page number |
integer (int32) |
|
Query |
fields |
Fields to retrieve |
enum (DEFAULT, BASIC, FULL) |
|
Query |
pageSize |
Number of items on a page |
integer (int32) |
|
Query |
sort |
Type of sorting to be applied to the retrieved set |
enum (asc, desc) |
|
2.13.3. Responses
| HTTP Code | Description | Schema |
|---|---|---|
200 |
OK |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
2.13.4. Produces
-
*/* -
application/text
2.13.5. Tags
-
CouponServices
2.13.6. Security
| Type | Name |
|---|---|
oauth2 |
|
oauth2 |
2.14. Updates a single-code coupon
PUT /couponservices/v2/singlecodecoupon/update
2.14.1. Description
This endpoint updates single-code coupon data as provided in PUT body
2.14.2. Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
Body |
couponWsDTO |
Request body parameter (DTO in xml or json format) |
2.14.3. Responses
| HTTP Code | Description | Schema |
|---|---|---|
201 |
Created |
No Content |
204 |
No Content |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
2.14.4. Consumes
-
application/xml -
application/json
2.14.5. Produces
-
*/*
2.14.6. Tags
-
CouponServices
2.14.7. Security
| Type | Name |
|---|---|
oauth2 |
|
oauth2 |
2.15. Updates status of single-code coupon
PUT /couponservices/v2/singlecodecoupon/update/status
2.15.1. Description
This endpoint updates status of a single-code coupon as provided in POST body
2.15.2. Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
Body |
couponStatusWsDTO |
Object that contains coupon data whose status needs to be updated, such as 'couponId', 'active' |
2.15.3. Responses
| HTTP Code | Description | Schema |
|---|---|---|
201 |
Created |
No Content |
204 |
No Content |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
2.15.4. Consumes
-
application/xml -
application/json
2.15.5. Produces
-
*/*
2.15.6. Tags
-
CouponServices
2.15.7. Security
| Type | Name |
|---|---|
oauth2 |
|
oauth2 |
2.16. Validates a single-code coupon
GET /couponservices/v2/singlecodecoupon/validate/{couponId}
2.16.1. Description
This endpoint validates a single-code coupon with a given couponId
2.16.2. Parameters
| Type | Name | Description | Schema | Default |
|---|---|---|---|---|
Path |
couponId |
The couponId of the coupon to validate |
string |
|
Query |
customerId |
The customerId |
string |
|
Query |
fields |
Fields to retrieve |
enum (DEFAULT, BASIC, FULL) |
|
2.16.3. Responses
| HTTP Code | Description | Schema |
|---|---|---|
200 |
OK |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
2.16.4. Produces
-
*/* -
application/text
2.16.5. Tags
-
CouponServices
2.16.6. Security
| Type | Name |
|---|---|
oauth2 |
|
oauth2 |
2.17. Gets redemption status for a single-code coupon
GET /couponservices/v2/singlecodecouponredemption/get/{couponId}
2.17.1. Description
This endpoint provides redemption status for a single-code coupon with given couponId
2.17.2. Parameters
| Type | Name | Description | Schema | Default |
|---|---|---|---|---|
Path |
couponId |
The couponId of the requested coupon |
string |
|
Query |
customerId |
The user id |
string |
|
Query |
fields |
Fields to retrieve |
enum (DEFAULT, BASIC, FULL) |
|
2.17.3. Responses
| HTTP Code | Description | Schema |
|---|---|---|
200 |
OK |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
2.17.4. Produces
-
*/* -
application/text
2.17.5. Tags
-
CouponServices
2.17.6. Security
| Type | Name |
|---|---|
oauth2 |
|
oauth2 |
3. Definitions
3.1. File
| Name | Schema |
|---|---|
absolute |
boolean |
absoluteFile |
|
absolutePath |
string |
canonicalFile |
|
canonicalPath |
string |
directory |
boolean |
file |
boolean |
freeSpace |
integer (int64) |
hidden |
boolean |
name |
string |
parent |
string |
parentFile |
|
path |
string |
totalSpace |
integer (int64) |
usableSpace |
integer (int64) |
3.2. InputStream
Type : object
3.3. InputStreamResource
| Name | Schema |
|---|---|
description |
string |
file |
|
filename |
string |
inputStream |
|
open |
boolean |
readable |
boolean |
uri |
|
url |
3.4. URI
| Name | Schema |
|---|---|
absolute |
boolean |
authority |
string |
fragment |
string |
host |
string |
opaque |
boolean |
path |
string |
port |
integer (int32) |
query |
string |
rawAuthority |
string |
rawFragment |
string |
rawPath |
string |
rawQuery |
string |
rawSchemeSpecificPart |
string |
rawUserInfo |
string |
scheme |
string |
schemeSpecificPart |
string |
userInfo |
string |
3.5. URL
| Name | Schema |
|---|---|
authority |
string |
content |
object |
defaultPort |
integer (int32) |
file |
string |
host |
string |
path |
string |
port |
integer (int32) |
protocol |
string |
query |
string |
ref |
string |
userInfo |
string |
3.6. codeGenerationConfiguration
Code generation configuration
| Name | Schema |
|---|---|
codeSeparator |
string |
couponPartCount |
integer (int32) |
couponPartLength |
integer (int32) |
name |
string |
3.7. codeGenerationConfigurationsSearchPage
Code generation configurations search page
| Name | Description | Schema |
|---|---|---|
pagination |
Pagination info |
|
results |
Result list |
< codeGenerationConfiguration > array |
sorts |
< sort > array |
3.8. couponGeneratedCode
Coupon generated code
| Name | Schema |
|---|---|
code |
string |
link |
string |
3.9. couponRedemption
Coupon redemption
| Name | Schema |
|---|---|
couponId |
string |
customerId |
string |
maxRedemptionsLimitPerCustomer |
integer (int32) |
maxTotalRedemptionsLimit |
integer (int32) |
redemptionsPerCustomer |
integer (int32) |
totalRedemptions |
integer (int32) |
3.10. couponStatus
Coupon status
| Name | Description | Schema |
|---|---|---|
active |
Coupons status |
boolean |
couponId |
The coupon Id is a mandatory property |
string |
3.11. couponValidationResponse
Coupon validation response
| Name | Schema |
|---|---|
couponId |
string |
generatedCouponCode |
string |
message |
string |
valid |
boolean |
3.12. multiCodeCoupon
Multi code coupon
| Name | Description | Schema |
|---|---|---|
active |
Coupons status |
boolean |
codeGenerationConfiguration |
Mandatory field. Represents the name of the CodeGenerationConfiguration, available in the system |
string |
couponCodeNumber |
Mandatory field |
integer (int64) |
couponId |
The coupon Id is a mandatory property |
string |
endDate |
End date/time (UTC timezone) string representation in ISO-8601 format |
string |
generatedCodes |
List of media codes containing the generated codes |
< couponGeneratedCode > array |
name |
string |
|
startDate |
Start date/time (UTC timezone) string representation in ISO-8601 format |
string |
3.13. multiCodeCouponsSearchPage
Multi code coupons search page
| Name | Description | Schema |
|---|---|---|
pagination |
Pagination info |
|
results |
Result list |
< multiCodeCoupon > array |
sorts |
< sort > array |
3.14. pagination
Pagination info
| Name | Description | Schema |
|---|---|---|
count |
Number of elements on this page |
integer (int32) |
hasNext |
Indicates if there is next page |
boolean |
hasPrevious |
Indicates if there is previous page |
boolean |
page |
Current page number |
integer (int32) |
totalCount |
Total number of elements |
integer (int64) |
totalPages |
Total number of pages |
integer (int32) |
3.15. singleCodeCoupon
Single code coupon
| Name | Description | Schema |
|---|---|---|
active |
Coupons status |
boolean |
couponId |
The coupon Id is a mandatory property |
string |
endDate |
End date/time (UTC timezone) string representation in ISO-8601 format |
string |
maxRedemptionsPerCustomer |
integer (int32) |
|
maxTotalRedemptions |
integer (int32) |
|
name |
string |
|
startDate |
Start date/time (UTC timezone) string representation in ISO-8601 format |
string |
3.16. singleCodeCouponsSearchPage
Single code coupons search page
| Name | Description | Schema |
|---|---|---|
pagination |
Pagination info |
|
results |
Result list |
< singleCodeCoupon > array |
sorts |
< sort > array |
3.17. sort
Sort option
| Name | Schema |
|---|---|
asc |
boolean |
code |
string |
4. Security
4.1. oauth2_client_credentials
Type : oauth2
Flow : application
Token URL : https://{oauth2_url}/authorizationserver/oauth/token
| Name |
|---|
basic |
4.2. oauth2_password
Type : oauth2
Flow : password
Token URL : https://{oauth2_url}/authorizationserver/oauth/token
| Name |
|---|
basic |