Get a voucher detail

get

/crmRestApi/resources/11.13.18.05/loyVouchers/{VoucherNumber}

Request

Path Parameters
  • The alternative way to identify a voucher. The UI shows the 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.
Query Parameters
  • This parameter specifies dependencies which are fields that are set before and rolled back after generating the response. Generally they are used to preview the effects of an attribute change. The fields specified in this parameter are always set in the resource instance in question. When a child resource collection is requested and the parameter is set, the fields will be set in the parent resource instance before generating the resource collection payload. The value of this query parameter is a set of dependency fields. Example: dependency=ProductId=2

    Format: <attr1>=<val1>,<attr2>=<value2>
  • When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". More than one child can be specified using comma as a separator. Example: ?expand=Employees,Localizations. Nested children can also be provided following the format "Child.NestedChild" (Example: ?expand=Employees.Managers). If a nested child is provided (Example: Employees.Managers), the missing children will be processed implicitly. For example, "?expand=Employees.Managers" is the same as "?expand=Employees,Employees.Managers" (which will expand Employees and Managers).
  • This parameter filters the resource fields. Only the specified fields are returned, which means that if no fields are specified, no fields are returned (useful to get only the links). If an indirect child resource is provided (Example: Employees.Managers), the missing children will be processed implicitly. For example, "?fields=Employees.Managers:Empname" is the same as "?fields=;Employees:;Employees.Managers:Empname" (which will only return the "Empname" field for Managers). the value of this query parameter is a list of resource fields. The attribute can be a direct (Example: Employees) or indirect (Example: Employees.Managers) child. It cannot be combined with expand query parameter. If both are provided, only fields will be considered.

    Format: ?fields=Attribute1,Attribute2

    Format for fields in child resource: ?fields=Accessor1:Attribute1,Attribute2
  • This parameter can be used to show only certain links while accessing a singular resource or a resource collection. The parameter value format is a comma-separated list of : <link_relation>

    Example:
    self,canonical
  • The resource item payload will be filtered in order to contain only data (no links section, for example).
Header Parameters
  • 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".
  • 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.

There's no request body for this operation.

Back to Top

Response

Supported Media Types

Default Response

The following table describes the default response for this task.
Headers
  • 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".
  • 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.
Body ()
Root Schema : loyVouchers-item-response
Type: object
Show Source
  • Title: Action Note
    Maximum Length: 1000
    The attribute indicates additional information pertaining to a voucher action for which the voucher was created. There is no default value or limitation associated with this attribute.
  • 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 validateVoucherFinder finders. There is no default value, dependency, or limitation associated with this attribute.
  • Title: Voucher Basis Meaning
    Read Only: true
    Maximum Length: 80
    The list of value meaning for the Basis code. There is no default value or limitation associated with this attribute.
  • Title: Voucher Basis
    Maximum Length: 30
    The accepted values are ORA_VOUC_BASIS_ACC, ORA_TXORA_VOUC_BASIS_TIER, and so on. There is no default value, dependency, or limitation associated with this attribute.
  • Title: Redeemed Transaction Number
    Maximum Length: 30
    The transaction number that used this voucher.There is no default value, dependency, or limitation associated with this attribute.
  • Title: Created By
    Read Only: true
    Maximum Length: 64
    The user that creates the voucher record. Oracle Loyalty Cloud populates this value when the loyalty administrator creates the voucher in the Oracle Loyalty Cloud UI. There is no default value, dependency, or limitation associated with this attribute.
  • Title: Creation Date
    Read Only: true
    The date when the voucher record is created. Oracle Loyalty Cloud sets this date value when the loyalty administrator creates the voucher in the Oracle Loyalty Cloud UI. There is no default value, dependency, or limitation associated with this attribute.
  • Title: Currency Exchange Date
    The currency exchange date associated with the voucher. There is no default value, dependency, or limitation associated with this attribute.
  • Title: Voucher Discount Value
    The currency amount signifies the voucher amount associated with the voucher of type absolute value voucher. This attribute is required for vouchers of type absolute value voucher. There is no default value, dependency, nor limitation associated with this attribute.
  • Title: Currency Code
    Maximum Length: 15
    The currency code associated with the voucher. There is no default value, dependency, or limitation associated with this attribute.
  • Title: Type
    Read Only: true
    Maximum Length: 240
    The attribute provides the product description for the voucher, which is displayed on the Loyalty Voucher page in the UI. 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.
  • Read Only: true
    The voucher discount value. If the VchrBasisCode attribute of a voucher is set to Percentage, the value of discount must be a positive integer. This value is provided as an input value from a user when creating the voucher. There is no default value or limitation associated with this attribute.
  • 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.
  • Title: Inventory Organization ID
    The unique identifier of the organization that provides the inventory when the user is redeeming the vouchers. There is no default value, dependency, or limitation associated with this attribute.
  • Title: Change Date
    Read Only: true
    The date when the voucher record is updated. Oracle Loyalty Cloud sets this date value when the loyalty administrator updates the voucher card in the Oracle Loyalty Cloud UI. There is no default value, dependency, or limitation associated with this attribute.
  • Title: Changed By
    Read Only: true
    Maximum Length: 64
    The user that updates the voucher record. Oracle Loyalty Cloud populates this value when the loyalty administrator updates the voucher in the Oracle Loyalty Cloud UI. There is no default value, dependency, or limitation associated with this attribute.
  • Links
  • Title: Voucher ID
    The primary key identifier which signifies a unique value for a generated voucher record. There is no default value, dependency, nor limitation associated with this attribute.
  • Title: Member ID
    The primary key of the member to whom the voucher is assigned. There is no default value, dependency, or limitation associated with this attribute.
  • 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.
  • Title: Promotion
    Read Only: true
    Maximum Length: 50
    The attribute indicates the name of the promotion for which the voucher was created. There is no default value, dependency, or limitation associated with this attribute.
  • Title: Organization Code
    Maximum Length: 18
    The organization code associated with the member voucher. There is no default value, dependency, or limitation associated with this attribute.
  • Title: Original Voucher Number
    Maximum Length: 30
    The original voucher number associated with the voucher. There is no default value, dependency, or limitation associated with this attribute.
  • Title: Primary Contact ID
    Read Only: true
    The attribute indicates the Primary contact identifier of the member for whom the voucher was created. There is no default value, dependency, or limitation associated with this attribute.
  • Title: Product Number
    The identifier of the product for an existing voucher which is used to specify the product information. There is no default value, dependency, or limitation associated with this attribute.
  • Title: Promotion Number
    Maximum Length: 30
    The promotion number that was applied to the transaction during transaction processing and created this voucher. There is no default value, dependency, or limitation associated with this attribute.
  • Title: Quantity
    Default Value: 1
    The attribute provides details of how many vouchers are assigned. There is no default value, dependency, nor limitation associated with this attribute.
  • Title: Status
    Maximum Length: 30
    Default Value: ORA_VOUC_STATUS_AVLBL
    The attribute indicates the status of the voucher. The accepted values are ORA_VOUC_STATUS_AVLBL, ORA_VOUC_STATUS_USED, ORA_VOUC_STATUS_CANC, and so on. 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.
  • Title: Voucher Status Meaning
    Read Only: true
    Maximum Length: 80
    The voucher status meaning, which shows the voucher status as follows: Available, Expired, Used, and so on. There is no default value, dependency, nor limitation associated with this attribute.
  • Title: Transaction ID
    Read Only: true
    The transaction Identifier which has led to the assignment of loyalty vouchers due to transaction processing. There is no default value or limitation associated with this attribute.
  • Title: Transaction Item ID
    The transaction item identifier which signifies the transaction identifier assigned while processing the transaction. There is no default value, dependency, nor limitation associated with this attribute.
  • Title: Transaction Number
    Read Only: true
    Maximum Length: 30
    The transaction number associated with the voucher. This attribute is automatically generated by Oracle Loyalty Cloud when a voucher gets assigned as an outcome of transaction processing. There is no default value, dependency, or limitation associated with this attribute.
  • 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 through a PATCH request. There is no default value, dependency, or limitation associated with this attribute.
  • 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 through a PATCH request. There is no default value, dependency, or limitation associated with this attribute.
  • Title: Discount Type Meaning
    Read Only: true
    Maximum Length: 80
    The list of values meaning for the Voucher Basis code. There is no default value, dependency, nor limitation associated with this attribute.
  • Title: Discount Type
    Maximum Length: 30
    The attribute indicates the discount type that the voucher offers. Accepted values are ORA_VOUC_BASIS_ABSOLUTE or ORA_VOUC_BASIS_PERCENTAGE. It is provided as input from a user when creating the voucher. There is no default value, dependency, or limitation associated with this attribute.
  • Title: Voucher Discount Value
    The voucher discount value. If the DiscountType attribute of a voucher is set to Percentage, then the value of the discount must be a positive integer. This value is provided as an input value from a user when creating the voucher. There is no default value or limitation associated with this attribute.
  • Title: Start Date
    The date when the voucher is in effect. This date is assigned during an Assign Voucher action or when the voucher is created using the resource. There is no default value, dependency, or limitation associated with this attribute.
  • Title: Voucher Number
    Maximum Length: 30
    The alternative way to identify a voucher. The UI shows the 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.
Back to Top

Examples

This example shows how to retrieve a specific voucher.

Use GET with the following URI syntax to retrieve voucher number 300100129316575:

https://example.com:port/crmRestApi/resources/11.13.18.05/loyVouchers/300100129316575

Example of Response Header

cache-control -no-cache, no-store, must-revalidate
connection -Keep-Alive
content-encoding -gzip
content-language -en
content-length -823
content-type -application/vnd.oracle.adf.resourceitem+json
date -Thu, 23 Aug 2018 18:31:49 GMT
etag -"ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
keep-alive -timeout=61, max=100
link - <https://example.com:port/crmRestApi/resources/11.13.18.05/loyVouchers/300100129316575>;rel="self";kind="item";name="loyVouchers"
location -
rest-framework-version -1
server -Oracle-HTTP-Server
vary -User-Agent
x-content-type-options -nosniff
x-oracle-dms-ecid -005T1tsrf_OEoIILIqL6if0001wh0000d9

Example of Response Body

{
  "MemberNumber" : "300100129316529",
  "VoucherNumber" : "300100129316575",
  "BasisCode" : "ORA_VOUC_BASIS_RED",
  "ConsumedTxnId" : 0,
  "CurrencyAmount" : 0,
  "VoucherEffectiveStartDt" : "2018-08-04",
  "VoucherDiscountValue" : 10,
  "ExpirationDt" : "2018-10-01T23:59:59+00:00",
  "LoyMemVchrId" : 300100129316575,
  "MemberId" : 300100129316528,
  "Quantity" : 1,
  "TxnId" : 0,
  "StatusCode" : "ORA_VOUC_STATUS_AVLBL",
  "TxnItemId" : 0,
  "UsedDt" : null,
  "VchrBasisCode" : "ORA_VOUC_BASIS_PERCENTAGE",
  "Description" : "One Night Free Hotel Room",
  "InvOrgId" : 204,
  "DiscountValue" : null,
  "ActionNote" : "Assign Absolute",
  "ActivityDate" : null,
  "validFlag" : "true",
  "Name" : "XYZ Hotels Voucher",
  "PrConId" : 300100129316530,
  "ProductNumber" : "CRMITEM-AS54888-00182745",
  "links" : [ {
    "rel" : "self",
    "href" : "https://example.com:port/crmRestApi/resources/11.13.18.05/loyVouchers/300100129316575",
    "name" : "loyVouchers",
    "kind" : "item",
    "properties" : {
      "changeIndicator" : "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
    }
  }, {
    "rel" : "canonical",
    "href" : "https://example.com:port/crmRestApi/resources/11.13.18.05/loyVouchers/300100129316575",
    "name" : "loyVouchers",
    "kind" : "item"
  }, {
    "rel" : "lov",
    "href" : "https://example.com:port/crmRestApi/resources/11.13.18.05/loyVouchers/300100129316575/lov/BasisCodeLookupPVO",
    "name" : "BasisCodeLookupPVO",
    "kind" : "collection"
  }, {
    "rel" : "lov",
    "href" : "https://example.com:port/crmRestApi/resources/11.13.18.05/loyVouchers/300100129316575/lov/SalesCatalogProductProgPVO1",
    "name" : "SalesCatalogProductProgPVO1",
    "kind" : "collection"
  }, {
    "rel" : "lov",
    "href" : "https://example.com:port/crmRestApi/resources/11.13.18.05/loyVouchers/300100129316575/lov/SatusCodeLookupPVO",
    "name" : "SatusCodeLookupPVO",
    "kind" : "collection"
  }, {
    "rel" : "lov",
    "href" : "https://example.com:port/crmRestApi/resources/11.13.18.05/loyVouchers/300100129316575/lov/VoucherBasisLookupPVO",
    "name" : "VoucherBasisLookupPVO",
    "kind" : "collection"
  }, {
    "rel" : "lov",
    "href" : "https://example.com:port/crmRestApi/resources/11.13.18.05/loyVouchers/300100129316575/lov/MemberVO2",
    "name" : "MemberVO2",
    "kind" : "collection"
  } ]
}
Back to Top