Skip to main content

Example Transaction

Updated: 2021-06-15 03:46

This example reflects the current release of the Smart Shopping API. Depending on the version you have, this may or may not reflect the actual json in your data.

Request

This initial request includes the first item in the transaction.

{    requestResponseInfo: class RequestResponseInfo {        statusCode: null        requestType: PROCESS_TRANSACTION        responseType: null        responseSequence: null        errorReason: null        applicationContext: null    }    clientInfo: class ClientInfo {        uuid: ed640c46-7492-4d1f-85b2-fd118617268e        type: MOBILE_POS        attributes: null    }    applicationContext: class ApplicationContext {        clientSequenceID: null        result: OK        resultMessage: null        responseSequenceNumber: null        responseTime: null        operatorInfo: class OperatorInfo {            operatorId: 1            operatorPw: 1            signOnState: Unknown            result: null        }        applStatus: class ApplicationStatus {            txnVoidPending: null            txnInProgress: false            txnVoidOrTenderRequired: null        }        transaction: class Transaction {            actionType: SALES            actionSubType: null            customerinfo: class CustomerInfo {                associateInfo: null                zipCode: 99999            }            items: [class TransItem {                result: null                quantity: 1                scannedInput: 051000005243                scannedInputLabelType: UPC-A                keyedInput: null                itemDescription: null                itemType: null                itemCode: null                itemPrice: null                extendedPrice: null                regularPrice: null                responseTime: null                clientItemID: f175447b-8bd3-4125-9b3d-78438fc797f7                itemSaleAuditFlags: null                itemOrdinalNumber: null                linkedItemOrdinalNumber: null                weight: null                value: null                dateOfBirth: null                isAdditionalItem: null            }]            suspendTransaction: false            exceptionItems: null            suspendInfo: null            prepareToTender: null            tenders: null            totals: class Total {                totalSavings: null                foodStampTotal: null                foodStampBalance: null                totalCouponCount: null                totalCouponAmount: null                subTotal: $0.00                tax: $0.00                total: null                balanceDue: $0.00                changeDue: null                totalItems: null                tenderExchanged: null            }            purgeCRAfterSerialize: null            receiptDisplays: null            receiptPrints: null        }    }}

Response

The response provides item lookup information and running totals.

{    requestResponseInfo: class RequestResponseInfo {        statusCode: OK        requestType: PROCESS_TRANSACTION        responseType: PROCESS_TRANSACTION        responseSequence: 0        errorReason: null        applicationContext: null    }    clientInfo: class ClientInfo {        uuid: ed640c46-7492-4d1f-85b2-fd118617268e        type: MOBILE_POS        attributes: class ClientInfoAttributes {            mobile: true            isMobile: true            isAssociateFacing: true        }    }    applicationContext: class ApplicationContext {        clientSequenceID: 20c9264a-8a9f-40a5-b1ad-b53cf270d7f7        result: ITEM_ERR        resultMessage: NOT_ON_FILE        responseSequenceNumber: 1        responseTime: 562        operatorInfo: class OperatorInfo {            operatorId: 302            operatorPw: null            signOnState: SignedOn            result: OK        }        applStatus: class ApplicationStatus {            txnVoidPending: false            txnInProgress: true            txnVoidOrTenderRequired: false        }        transaction: class Transaction {            actionType: SALES            actionSubType: SALES            customerinfo: null            items: [class TransItem {                result: OK                quantity: 1                scannedInput: null                scannedInputLabelType: UPC-A                keyedInput: null                itemDescription: CAMP CHKY NE CLM C                itemType: 0                itemCode: 5100000524                itemPrice: null                extendedPrice: 2.66                regularPrice: null                responseTime: null                clientItemID: f175447b-8bd3-4125-9b3d-78438fc797f7                itemSaleAuditFlags: ....................                itemOrdinalNumber: 1                linkedItemOrdinalNumber: null                weight: 0                value: null                dateOfBirth: null                isAdditionalItem: true            }]            suspendTransaction: null            exceptionItems: [class ExceptionItem {                result: NOT_ON_FILE                resultErrorDescription: NOT_ON_FILE                quantity: 1                scannedInput: 051000005243                scannedInputLabelType: UPC-A                itemDescription: s051000005243 NOT_ON_FILE                clientItemID: f175447b-8bd3-4125-9b3d-78438fc797f7            }]            suspendInfo: null            prepareToTender: null            tenders: null            totals: class Total {                totalSavings: 0.00                foodStampTotal: 2.66                foodStampBalance: 2.66                totalCouponCount: 0                totalCouponAmount: 0.00                subTotal: 2.66                tax: 0.00                total: 2.66                balanceDue: 2.66                changeDue: 0.00                totalItems: 1                tenderExchanged: 0.00            }            purgeCRAfterSerialize: null            receiptDisplays: null            receiptPrints: [,                                  ,        Welcome to XXXXXXXX       ,         of EAST BRUNSWICK        , ,                                  , ,  06%2f15%2f21 03:46pm S900 R302 T138 C302 ,  ** Store Phone Number (732) 257-]        }    }}

Request

The second request provides tender information.

{    requestResponseInfo: class RequestResponseInfo {        statusCode: OK        requestType: PROCESS_TRANSACTION        responseType: PROCESS_TRANSACTION        responseSequence: 0        errorReason: null        applicationContext: null    }    clientInfo: class ClientInfo {        uuid: ed640c46-7492-4d1f-85b2-fd118617268e        type: MOBILE_POS        attributes: class ClientInfoAttributes {            mobile: true            isMobile: true            isAssociateFacing: true        }    }    applicationContext: class ApplicationContext {        clientSequenceID: 20c9264a-8a9f-40a5-b1ad-b53cf270d7f7        result: ITEM_ERR        resultMessage: NOT_ON_FILE        responseSequenceNumber: 1        responseTime: 562        operatorInfo: class OperatorInfo {            operatorId: 302            operatorPw: null            signOnState: SignedOn            result: OK        }        applStatus: class ApplicationStatus {            txnVoidPending: false            txnInProgress: true            txnVoidOrTenderRequired: false        }        transaction: class Transaction {            actionType: SALES            actionSubType: SALES            customerinfo: null            items: [class TransItem {                result: OK                quantity: 1                scannedInput: null                scannedInputLabelType: UPC-A                keyedInput: null                itemDescription: CAMP CHKY NE CLM C                itemType: 0                itemCode: 5100000524                itemPrice: null                extendedPrice: 2.66                regularPrice: null                responseTime: null                clientItemID: f175447b-8bd3-4125-9b3d-78438fc797f7                itemSaleAuditFlags: ....................                itemOrdinalNumber: 1                linkedItemOrdinalNumber: null                weight: 0                value: null                dateOfBirth: null                isAdditionalItem: true            }]            suspendTransaction: null            exceptionItems: [class ExceptionItem {                result: NOT_ON_FILE                resultErrorDescription: NOT_ON_FILE                quantity: 1                scannedInput: 051000005243                scannedInputLabelType: UPC-A                itemDescription: s051000005243 NOT_ON_FILE                clientItemID: f175447b-8bd3-4125-9b3d-78438fc797f7            }]            suspendInfo: null            prepareToTender: true            tenders: [class Tender {                tenderType: cash                result: null                clientItemID: 51782f0b-1e2f-4f85-a93d-302f364f31ec                approvalCode: null                tenderAmount: 2.66            }]            totals: class Total {                totalSavings: 0.00                foodStampTotal: 2.66                foodStampBalance: 2.66                totalCouponCount: 0                totalCouponAmount: 0.00                subTotal: 2.66                tax: 0.00                total: 2.66                balanceDue: 2.66                changeDue: 0.00                totalItems: 1                tenderExchanged: 0.00            }            purgeCRAfterSerialize: null            receiptDisplays: null            receiptPrints: [,                                  ,        Welcome to XXXXXXXX       ,         of EAST BRUNSWICK        , ,                                  , ,  06%2f15%2f21 03:46pm S900 R302 T138 C302 ,  ** Store Phone Number (732) 257-]        }    }}

Response

The response updates totals and in this case, balance due is zero, so the transaction is complete.

{    requestResponseInfo: class RequestResponseInfo {        statusCode: OK        requestType: PROCESS_TRANSACTION        responseType: PROCESS_TRANSACTION        responseSequence: 1        errorReason: null        applicationContext: null    }    clientInfo: class ClientInfo {        uuid: ed640c46-7492-4d1f-85b2-fd118617268e        type: MOBILE_POS        attributes: class ClientInfoAttributes {            mobile: true            isMobile: true            isAssociateFacing: true        }    }    applicationContext: class ApplicationContext {        clientSequenceID: 20c9264a-8a9f-40a5-b1ad-b53cf270d7f7        result: OK        resultMessage: OK        responseSequenceNumber: 2        responseTime: 305        operatorInfo: class OperatorInfo {            operatorId: 302            operatorPw: null            signOnState: SignedOn            result: OK        }        applStatus: class ApplicationStatus {            txnVoidPending: false            txnInProgress: false            txnVoidOrTenderRequired: false        }        transaction: class Transaction {            actionType: SALES            actionSubType: SALES            customerinfo: null            items: [class TransItem {                result: OK                quantity: 1                scannedInput: null                scannedInputLabelType: UPC-A                keyedInput: null                itemDescription: CAMP CHKY NE CLM C                itemType: 0                itemCode: 5100000524                itemPrice: null                extendedPrice: 2.66                regularPrice: null                responseTime: null                clientItemID: f175447b-8bd3-4125-9b3d-78438fc797f7                itemSaleAuditFlags: ....................                itemOrdinalNumber: 1                linkedItemOrdinalNumber: null                weight: 0                value: null                dateOfBirth: null                isAdditionalItem: null            }]            suspendTransaction: null            exceptionItems: [class ExceptionItem {                result: NOT_ON_FILE                resultErrorDescription: NOT_ON_FILE                quantity: 1                scannedInput: 051000005243                scannedInputLabelType: UPC-A                itemDescription: s051000005243 NOT_ON_FILE                clientItemID: f175447b-8bd3-4125-9b3d-78438fc797f7            }, class ExceptionItem {                result: NOT_ON_FILE                resultErrorDescription: NOT_ON_FILE                quantity: 1                scannedInput: 051000005243                scannedInputLabelType: UPC-A                itemDescription: s051000005243 NOT_ON_FILE                clientItemID: f175447b-8bd3-4125-9b3d-78438fc797f7            }]            suspendInfo: null            prepareToTender: null            tenders: [class Tender {                tenderType: cash                result: OK                clientItemID: 51782f0b-1e2f-4f85-a93d-302f364f31ec                approvalCode: null                tenderAmount: 2.66            }]            totals: class Total {                totalSavings: 0.00                foodStampTotal: 0.00                foodStampBalance: 0.00                totalCouponCount: 0                totalCouponAmount: 0.00                subTotal: 2.66                tax: 0.00                total: 2.66                balanceDue: 0.00                changeDue: 0.00                totalItems: 1                tenderExchanged: 2.66            }            purgeCRAfterSerialize: true            receiptDisplays: [__CUTRECEIPT__]            receiptPrints: [,                                  ,        Welcome to XXXXXXXX       ,         of EAST BRUNSWICK        , ,                                  , ,  06%2f15%2f21 03:46pm S900 R302 T138 C302 ,  ** Store Phone Number (732) 257-,                                       , **************************************, *           Regular Items            *, **************************************,         CAMP CHKY NE CLM CPC    2.66 F, On Sale You Saved       0.33          ,         TAX                     0.00  ,    **** BALANCE                 2.66  ,         CASH                    2.66  ,         CHANGE                  0.00  , TOTAL NUMBER OF ITEMS SOLD =    1     ,                                       , -------- XXXXXXXX Savings --------    , Total On Sale Savings    $  0.33      , Total Savings today is   $  0.33      , ----------------------------------    , 06%2f15%2f21 03:46pm 900 302 138 302      ,                                       ,    Ask the manager how our Price Plus ,   Club can save you money at Shoprite ,         Find us on Facebook!          ,                                       , , **************************************, *     HOW WAS YOUR VISIT TODAY0      *, **************************************,     Please take our survey within     ,      7 days for a chance to win       ,  $500 in The Fresh Grocer Gift Cards. ,   Visit TellFreshGrocer.com  OR       ,    Call Toll Free  1-800-287-5573     ,       Keep this receipt handy!        ,           You will need it            ,         to begin the survey.          ,      Thank you for your feedback!     , **************************************, ,  YOUR CASHIER TODAY:   caper cart, ,  Thank You For Shopping With Us!!, ,                   NJ                  ,    WE CANNOT ACCEPT RETURNS OF FOOD   ,    AND GROCERY ITEMS AT THIS TIME.    ,          STORE MANAGER:          ,                                       , __CUTRECEIPT__]        }    }}