Update a voucher status (Deprecated)
patch
/crmRestApi/resources/11.13.18.05/loyaltyVouchers/{VoucherNumber}
Request
Path Parameters
-
VoucherNumber(required): string
The alternative way to identify a voucher. The UI shows voucher number but the VoucherNumber attribute is used in the URI to update a voucher record using the resource. The VoucherNumber attribute can also be used as parameter for the validateVoucherFinder finder. There is no default value, dependency, or limitation associated with this attribute.
Header Parameters
-
Metadata-Context:
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version:
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Supported Media Types
- application/json
The following table describes the body parameters in the request for this task.
Root Schema : schema
Type:
Show Source
object
-
ActivityDate: string
The date used by Oracle Loyalty Cloud to fetch a valid voucher for a given activity date. The ActivityDate attribute is a parameter used in the availableVoucherFinder and the validateVoucherFinder finders. There is no default value, dependency, or limitation associated with this attribute.
-
MemberNumber: string
Title:
Member Number
The member number of the loyaltyMember attribute to whom the voucher is assigned. The MemberNumber attribute is used when assigning a voucher or creating a voucher using the resource. The MemberNumber attribute is also used as a parameter in the availableVoucherFinder finder. There is no default value or dependency associated with this attribute. -
ObjectVersionNumber: integer
(int32)
Title:
Object Version Number
The voucher object version number. Oracle Loyalty Cloud sets this attribute. There is no default value, dependency, or limitation associated with this attribute. -
UsedDt: string
(date-time)
Title:
Used Date
The date when a valid voucher that is available is changed to the Used status. This date gets assigned when the voucher status is changed from Available to Used status through a PATCH request. There is no default value, dependency, or limitation associated with this attribute. -
validFlag: boolean
This flag returns true if the voucherStatus attribute is set to Available and its ActivityDate attribute falls in between the voucherEffectiveStartDt and ExpirationDt attributes. This is a calculated field which shows the validity of the voucher. There is no default value, dependency, or limitation associated with this attribute.
-
voucherStatus: string
Title:
Voucher Status
The text that defines the voucher status. A list of accepted values are Available, Expired or Used. The VoucherStatus attribute can be changed from Available to Used only through a PATCH request. There is no default value, dependency, or limitation associated with this attribute. -
VoucherType: string
Title:
Voucher Type
The product description for the voucher. The user enters the description of product as the VoucherType, which is displayed as the product description on the Loyalty Voucher UI page. Oracle Loyalty Cloud assigns the ProdId attribute value with the identifier of the product when the user inputs the product description. There is no default value, dependency, or limitation associated with this attribute.
Response
Supported Media Types
- application/json
Default Response
The following table describes the default response for this task.
Headers
-
Metadata-Context(required):
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version(required):
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Root Schema : loyaltyVouchers-item-response
Type:
Show Source
object
-
ActivityDate: string
The date used by Oracle Loyalty Cloud to fetch a valid voucher for a given activity date. The ActivityDate attribute is a parameter used in the availableVoucherFinder and the validateVoucherFinder finders. There is no default value, dependency, or limitation associated with this attribute.
-
CurrencyAmount: number
Title:
Currency Amount
The currency value of the voucher if the DiscountType attribute is set to Absolute Value. This value is provided by the user when creating a voucher and is required if the voucher is of type Absolute Value. This attribute depends up on the DiscountType attribute setting. There is no default value or limitation associated with this attribute. -
DiscountType: string
Title:
Discount Type
The discount type that the voucher offers. A voucher discount can be set to Percentage or Absolute Value. It is provided as input from a user when creating the voucher. There is no default value, dependency, or limitation associated with this attribute. -
ExpirationDt: string
(date-time)
Title:
Expiration Date
The expiration date of the voucher. Oracle Loyalty Cloud generates this attribute value when it assigns a voucher action or the attribute value can be provided as an input when creating a voucher using the resource. There is no default value, dependency, or limitation associated with this attribute. -
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
LoyMemVchrId: integer
(int64)
Title:
Member Voucher ID
The primary key to identify a voucher. Oracle Loyalty Cloud generates this attribute value when it assigns a voucher action. There is no default value, dependency, or limitation associated with this attribute. -
MemberId: integer
(int64)
Title:
Member ID
The identity of a member for the assigned voucher. Oracle Loyalty Cloud assigns this attribute value when it assigns a voucher action or the attribute value can be set indirectly by deriving MemberId from the MemberNumber attribute which is input when creating voucher using the resource. There is no default value, dependency, or limitation associated with this attribute. -
MemberNumber: string
Title:
Member Number
The member number of the loyaltyMember attribute to whom the voucher is assigned. The MemberNumber attribute is used when assigning a voucher or creating a voucher using the resource. The MemberNumber attribute is also used as a parameter in the availableVoucherFinder finder. There is no default value or dependency associated with this attribute. -
ObjectVersionNumber: integer
(int32)
Title:
Object Version Number
The voucher object version number. Oracle Loyalty Cloud sets this attribute. There is no default value, dependency, or limitation associated with this attribute. -
ProdId: integer
(int64)
The identifier of the product for an existing voucher. Although its not a best practice to expose the identifier of a product, this attribute is used for building mobile UIs and drop downs, and provides information on the product that is in use. This value cannot be set through the Oracle Loyally Cloud UI. To specify product information, use Voucher Type as input while creating the voucher. There is no default value, dependency, or limitation associated with this attribute.
-
Quantity: number
Title:
Quantity
Default Value:1
The quantity of vouchers that are assigned to a member. The value is a positive integer. There is no default value, dependency, or limitation associated with this attribute. -
TransactionId: integer
(int64)
Title:
Loyalty Transaction ID
Read Only:true
The transaction identifier of the transaction. This attribute is the primary key identifier for a loyalty transaction. This loyalty transaction is shown as read-only child of the vouchers resource. There is no default value, dependency, or limitation associated with this attribute. -
TransactionNumber: string
Title:
Transaction Number
Read Only:true
Maximum Length:30
The transaction number of the transaction. This is an alternative identifier for a transaction, and is displayed in the Oracle Loyalty Cloud UI. There is no default value, dependency, or limitation associated with this attribute. -
UsedDt: string
(date-time)
Title:
Used Date
The date when a valid voucher that is available is changed to the Used status. This date gets assigned when the voucher status is changed from Available to Used status through a PATCH request. There is no default value, dependency, or limitation associated with this attribute. -
validFlag: boolean
This flag returns true if the voucherStatus attribute is set to Available and its ActivityDate attribute falls in between the voucherEffectiveStartDt and ExpirationDt attributes. This is a calculated field which shows the validity of the voucher. There is no default value, dependency, or limitation associated with this attribute.
-
VoucherBasis: string
Title:
Voucher Basis
The voucher assignment based on the transaction type. Oracle Loyalty Cloud sets it to Accrual for accrual type transactions and Redemption for redemption type of transactions. This is provided as an input value from a user when creating the voucher. There is no default value or limitation associated with this attribute. -
VoucherDiscountValue: number
Title:
Discount Percentage
The voucher discount value. If the DiscountType attribute of a voucher is set to Percentage, the value of discount must be a positive integer. This value is provided as input value from a user when creating the voucher. There is no default value or limitation associated with this attribute. -
voucherEffectiveStartDt: string
(date)
Title:
Voucher Effective Start Date
The date when the voucher is effective. This date is assigned during an assign voucher action or when voucher is created using the resource. -
VoucherNumber: string
Title:
Voucher Number
Maximum Length:30
The alternative way to identify a voucher. The UI shows voucher number but the VoucherNumber attribute is used in the URI to update a voucher record using the resource. The VoucherNumber attribute can also be used as parameter for the validateVoucherFinder finder. There is no default value, dependency, or limitation associated with this attribute. -
voucherStatus: string
Title:
Voucher Status
The text that defines the voucher status. A list of accepted values are Available, Expired or Used. The VoucherStatus attribute can be changed from Available to Used only through a PATCH request. There is no default value, dependency, or limitation associated with this attribute. -
VoucherType: string
Title:
Voucher Type
The product description for the voucher. The user enters the description of product as the VoucherType, which is displayed as the product description on the Loyalty Voucher UI page. Oracle Loyalty Cloud assigns the ProdId attribute value with the identifier of the product when the user inputs the product description. There is no default value, dependency, or limitation associated with this attribute.
Nested Schema : Links
Type:
array
Title:
Links
The link relations associated with the resource instance.
Show Source
Nested Schema : link
Type:
Show Source
object
-
href: string
Title:
hyperlink reference
The URI to the related resource. -
kind: string
Title:
kind
Allowed Values:[ "collection", "item", "describe", "other" ]
The kind of the related resource. -
name: string
Title:
name
The name of the link to the related resource. -
properties: object
properties
-
rel: string
Title:
relation
Allowed Values:[ "self", "lov", "parent", "canonical", "child", "enclosure", "action", "custom" ]
The name of the relation to the resource instance. Example: self.
Nested Schema : properties
Type:
Show Source
object
-
changeIndicator: string
Change indicator or the ETag value of the resource instance.
Examples
This example shows how to change the status of a voucher for voucher number 300000065914101 to Used.
Use PATCH with the following URI syntax to change the status of the voucher:
https://example.com:port/crmRestApi/resources/11.13.18.05/loyaltyVouchers/300000065914101
Example of Request Body
{
"voucherStatus":"Used"
}
Example of Response Header
Cache-Control -no-cache, no-store, must-revalidate
Connection -Keep-Alive
Content-Encoding -gzip
Content-Language -en
Content-Length -1148
Content-Type -application/vnd.oracle.adf.resourceitem+json
Date -Fri, 06 Jan 2017 14:29:02 GMT
Keep-Alive -timeout=61, max=100
Link -<https://example.com:port/crmRestApi/resources/11.13.18.05/loyaltyMembers/300100090669566>;rel="self";kind="item";name="loyaltyMembers"
Location -
REST-Framework-Version -1
Server -Oracle-HTTP-Server-11g
Vary -User-Agent
X-ORACLE-DMS-ECID -005HMrMtTxd2JRM_ILl3if0006jq000SEO
Example of Response Body
{
"ExpirationDt" : "2017-09-10T00:00:00+00:00",
"MemberId" : 300000065914077,
"LoyMemVchrId" : 300000065914101,
"ProdId" : 300000065290682,
"Quantity" : 1,
"UsedDt" : null,
"voucherEffectiveStartDt" : "2016-11-10",
"VoucherNumber" : "300000065914101",
"MemberNumber" : "300000065914078",
"voucherbasis" : "Redemption",
"validFlag" : "true",
"voucherStatus" : "Used",
"VoucherType" : "Free Ride with Savvari Fleet Voucher",
"ActivityDate" : null,
"DiscountPercentage" : 0,
"CurrencyAmount" : 0,
"links" : [ {
"rel" : "self",
"href" : "https://example.com:port/crmRestApi/resources/11.13.18.05/loyaltyVouchers/300000065914101",
"name" : "loyaltyVouchers",
"kind" : "item"
}, {
"rel" : "canonical",
"href" : "https://example.com:port/crmRestApi/resources/11.13.18.05/loyaltyVouchers/300000065914101",
"name" : "loyaltyVouchers",
"kind" : "item"
} ]
}