Receipt Status Updation
Update the status of the receipt, reward points, and create a transaction journal for
each line item in the receipt.
Resource
1services/apexrest/receipt-status-updationHTTP methods
PUT
Signature
1curl --location --request PUT 'https://yourInstance.salesforce.com/services/apexrest/receipt-status-updation/' \
2--header 'Content-Type: text/plain' \
3--header 'Authorization: Bearer 00DB000000FX0aR!ARQAQCyXQGgMcxjFvjs1hnPCDJEZyPavtzxM26XvjDU.gr56iTgkGp_EQCZ0yyi1QZzILDqO1my3KpJqhKAOc56o4jqx6CxU' \
4--header 'Cookie: BrowserId=MZ4W4WebEe6bX0_gtfh0Tw; CookieConsentPolicy=0:1; LSKey-c$CookieConsentPolicy=0:1' \
5--data '{
6 "receiptId":"a0N1Q00000d0Rv4UAE",
7 "status":"In Progress",
8 "comments":""
9}'
10Input Parameters
| Parameter | Type | Description | Required or Optional |
|---|---|---|---|
| comments | String | The comments related to the receipt status change. | Required |
| receiptId | String | The ID of the receipt whose status is to be updated. | Required |
| status | String | The status that’s assigned to the receipt after the update. Valid status values are:
|
Required |
Sample Output
1{
2 "storeName" : "alpine nutrition",
3 "storeAddress" : "625 Market Street,\n6th floor,\nSan Francisco,\nCA, 94105",
4 "receiptSFDCId" : "a0PHp00000tstqeMAA",
5 "receiptNumber" : "#0529-0002",
6 "receiptDate" : "2020-01-10",
7 "memberShipNumber" : "124345696",
8 "lineItem" : [ {
9 "quantity" : "5",
10 "productName" : "Alpine-Bran Cereal",
11 "price" : "$7.99",
12 "lineItemPrice" : "$39.95",
13 "isEligible" : false
14 }, {
15 "quantity" : "2",
16 "productName" : "Alpine-Oat Cereal",
17 "price" : "$7.99",
18 "lineItemPrice" : "$15.98",
19 "isEligible" : false
20 } ],
21 "confidenceStatus" : "Partial"
22}Output Parameter
| Parameter | Type | Description |
|---|---|---|
| confidenceStatus | String | The receipt analysis status based on the confidence value defined in the app. Possible values are: Success, Failure, or Partial. |
| isEligible | Boolean | Indicates whether the item is eligible for accrual of loyalty points ((true)) or not ((false)).
This value is displayed only if the admin has opted to display ineligible items in the receipt. |
| lineItem | String | The details of the receipt line item. |
| lineItemPrice | String | The total price of the receipt line item. |
| memberShipNumber | String | The unique identifier of the member. |
| price | Currency | The unit price of the receipt line item. |
| productName | String | The name of the product purchased. |
| quantity | Integer | The quantity of the product purchased. |
| receiptDate | dateTime | The date when the receipt is generated. |
| receiptNumber | String | The receipt number. |
| receiptSFDCId | Reference | The unique ID of the receipt. |
| storeAddress | String | The store address. |
| storeName | String | The store name. |