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
required

the id of the multicode coupon

string

Path

mediaCode
required

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
required

The codeGenerationConfigurationName of the requested codeGenerationConfiguration

string

Query

fields
optional

Fields to retrieve

enum (DEFAULT, BASIC, FULL)

"DEFAULT"

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
optional

Current page number

integer (int32)

0

Query

fields
optional

Fields to retrieve

enum (DEFAULT, BASIC, FULL)

"DEFAULT"

Query

pageSize
optional

Number of items on a page

integer (int32)

100

Query

sort
optional

Type of sorting to be applied to the retrieved set

enum (asc, desc)

"name:asc"

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
required

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
required

Batch size for generated coupons

integer (int32)

Path

couponId
required

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
required

The couponId of the requested coupon

string

Query

fields
optional

Fields to retrieve

enum (DEFAULT, BASIC, FULL)

"DEFAULT"

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
optional

Current page number

integer (int32)

0

Query

fields
optional

Fields to retrieve

enum (DEFAULT, BASIC, FULL)

"DEFAULT"

Query

pageSize
optional

Number of items on a page

integer (int32)

100

Query

sort
optional

Type of sorting to be applied to the retrieved set

enum (asc, desc)

"name:asc"

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
required

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
required

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
required

The code of the coupon to validate

string

Query

fields
optional

Fields to retrieve

enum (DEFAULT, BASIC, FULL)

"DEFAULT"

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
required

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
required

The couponId of the requested coupon

string

Query

fields
optional

Fields to retrieve

enum (DEFAULT, BASIC, FULL)

"DEFAULT"

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
optional

Current page number

integer (int32)

0

Query

fields
optional

Fields to retrieve

enum (DEFAULT, BASIC, FULL)

"DEFAULT"

Query

pageSize
optional

Number of items on a page

integer (int32)

100

Query

sort
optional

Type of sorting to be applied to the retrieved set

enum (asc, desc)

"name:asc"

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
required

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
required

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
required

The couponId of the coupon to validate

string

Query

customerId
optional

The customerId

string

Query

fields
optional

Fields to retrieve

enum (DEFAULT, BASIC, FULL)

"DEFAULT"

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
required

The couponId of the requested coupon

string

Query

customerId
required

The user id

string

Query

fields
optional

Fields to retrieve

enum (DEFAULT, BASIC, FULL)

"DEFAULT"

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
optional

boolean

absoluteFile
optional

absolutePath
optional

string

canonicalFile
optional

canonicalPath
optional

string

directory
optional

boolean

file
optional

boolean

freeSpace
optional

integer (int64)

hidden
optional

boolean

name
optional

string

parent
optional

string

parentFile
optional

path
optional

string

totalSpace
optional

integer (int64)

usableSpace
optional

integer (int64)

3.2. InputStream

Type : object

3.3. InputStreamResource

Name Schema

description
optional

string

file
optional

filename
optional

string

inputStream
optional

open
optional

boolean

readable
optional

boolean

uri
optional

URI

url
optional

URL

3.4. URI

Name Schema

absolute
optional

boolean

authority
optional

string

fragment
optional

string

host
optional

string

opaque
optional

boolean

path
optional

string

port
optional

integer (int32)

query
optional

string

rawAuthority
optional

string

rawFragment
optional

string

rawPath
optional

string

rawQuery
optional

string

rawSchemeSpecificPart
optional

string

rawUserInfo
optional

string

scheme
optional

string

schemeSpecificPart
optional

string

userInfo
optional

string

3.5. URL

Name Schema

authority
optional

string

content
optional

object

defaultPort
optional

integer (int32)

file
optional

string

host
optional

string

path
optional

string

port
optional

integer (int32)

protocol
optional

string

query
optional

string

ref
optional

string

userInfo
optional

string

3.6. codeGenerationConfiguration

Code generation configuration

Name Schema

codeSeparator
optional

string

couponPartCount
optional

integer (int32)

couponPartLength
optional

integer (int32)

name
optional

string

3.7. codeGenerationConfigurationsSearchPage

Code generation configurations search page

Name Description Schema

pagination
optional

Pagination info

results
optional

Result list

sorts
optional

< sort > array

3.8. couponGeneratedCode

Coupon generated code

Name Schema

code
optional

string

link
optional

string

3.9. couponRedemption

Coupon redemption

Name Schema

couponId
optional

string

customerId
optional

string

maxRedemptionsLimitPerCustomer
optional

integer (int32)

maxTotalRedemptionsLimit
optional

integer (int32)

redemptionsPerCustomer
optional

integer (int32)

totalRedemptions
optional

integer (int32)

3.10. couponStatus

Coupon status

Name Description Schema

active
optional

Coupons status

boolean

couponId
optional

The coupon Id is a mandatory property

string

3.11. couponValidationResponse

Coupon validation response

Name Schema

couponId
optional

string

generatedCouponCode
optional

string

message
optional

string

valid
optional

boolean

3.12. multiCodeCoupon

Multi code coupon

Name Description Schema

active
optional

Coupons status

boolean

codeGenerationConfiguration
optional

Mandatory field. Represents the name of the CodeGenerationConfiguration, available in the system

string

couponCodeNumber
optional

Mandatory field

integer (int64)

couponId
optional

The coupon Id is a mandatory property

string

endDate
optional

End date/time (UTC timezone) string representation in ISO-8601 format

string

generatedCodes
optional

List of media codes containing the generated codes

name
optional

string

startDate
optional

Start date/time (UTC timezone) string representation in ISO-8601 format

string

3.13. multiCodeCouponsSearchPage

Multi code coupons search page

Name Description Schema

pagination
optional

Pagination info

results
optional

Result list

< multiCodeCoupon > array

sorts
optional

< sort > array

3.14. pagination

Pagination info

Name Description Schema

count
optional

Number of elements on this page

integer (int32)

hasNext
optional

Indicates if there is next page

boolean

hasPrevious
optional

Indicates if there is previous page

boolean

page
optional

Current page number

integer (int32)

totalCount
optional

Total number of elements

integer (int64)

totalPages
optional

Total number of pages

integer (int32)

3.15. singleCodeCoupon

Single code coupon

Name Description Schema

active
optional

Coupons status

boolean

couponId
optional

The coupon Id is a mandatory property

string

endDate
optional

End date/time (UTC timezone) string representation in ISO-8601 format

string

maxRedemptionsPerCustomer
optional

integer (int32)

maxTotalRedemptions
optional

integer (int32)

name
optional

string

startDate
optional

Start date/time (UTC timezone) string representation in ISO-8601 format

string

3.16. singleCodeCouponsSearchPage

Single code coupons search page

Name Description Schema

pagination
optional

Pagination info

results
optional

Result list

< singleCodeCoupon > array

sorts
optional

< sort > array

3.17. sort

Sort option

Name Schema

asc
optional

boolean

code
optional

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