Pagination check membership transactions

Created by Yee Sin Lum, Modified on Fri, 17 Jun 2022 at 01:00 AM by Yee Sin Lum

Pagination check membership transactions

interface address

hostname/openapi/v1/ticketOpenApi/queryCustomerHistoryTicketsByUid

Request header

User-Agent: openApi

Content-Type: application/json; charset=utf-8

accept-encoding: gzip,deflate

time-stamp: 1437528688233

data-signature: BF706E6AC693BA3B1BABD32E6713431D

Request method

POST

Request body

{

   "appId": "abcdefghijklmn",

   "startTime": "2015-11-12 01:59:59",

   "endTime": "2015-11-12 23:59:59",

   "customerUid": "886263699231969848",

   "queryAllStoreConsume": 1,

   "Postback parameter": {

      "parameterType": "LAST_RESULT_MIN_ID",

      "parameterValue": "3764404"

   }

}

parameter name

Is it necessary

Types of

Instructions

appId

Yes

String

KBYIO configured access credentials

startTime

Yes

String

The format is yyyy-MM-dd hh:mm:ss

endTime

Yes

String

The format is yyyy-MM-dd hh:mm:ss
endTime - startTime<=1 days

customerUid

Yes

String

The unique ID of the member in the KBYIO system

queryAllStoreConsume

no

int

Whether to query the consumption records of all members in all stores
1: Yes, 0: No, Default 0

postback parameters

no

Json

Cannot pass the query from home page, after the content is retrieve from the results

parameterType

Yes

String

Retrieve from the result

parameterValue

Yes

String

Retrieve from the result

Return result

{

   "status": "success",

   "messages": [],

   "data":{

      "postBackParameter": {

         "parameterType": "LAST_RESULT_MIN_ID",

         "parameterValue":"3764404"

      },

      "result": [

         {

            "cashierUid": 832101480292933201,

            "customerUid": 0,

            "sn": "201511121602084680006",

            "datetime": "2015-11-12 16:02:12",

            "totalAmount": 72,

            "totalProfit": 42,

            "discount": 100,

            "externalOrderNo": "2017121521001004460219576817",

            "rounding": 0,

            "ticketType": "SELL",

            ""invalid": 0,

            "payments": [

               {

                  "code": "payCode_1",

                  "amount": 9.42

               }

            ],

            "items": [

               {

               "name": "Coffee",

               "buyPrice": 10,

               "sellPrice": 24,

               "customerPrice": 22,

               "quantity": 1,

               "discount": 100,

               "customerDiscount": 100,

               "totalAmount": 24,

               "totalProfit": 14,

               "isCustomerDiscount": 1,

               "productUid":379659791803681560,

               ticketitemattributes": [

                  {

                     "attributeName":"Extra",

                     "attributeValue":"one spoon"

                  }

               ]

               }

            ],

            "ticketStoreAppIdOrAccount": "87EB2C555BBF382E7F6C7B275B0C502A"

         }

      ],

      "pageSize": 100

   }

}

Field name

Types of

Instructions

status

String

Whether the request is processed correctly, return success or error, case-insensitive

messages

String[]

Processing result message

errorCode

int

Operation process error code, see error code table

pageSize

Int

This query is expected to take the number of records from the inventory. If the length of the result set is less than pageSize, no query is required on the next page.

postback parameters

Json

The parameter structure of the paging query sent back to the server must be passed back from the second page. If not, each query is the first page.

parameterType

String

Taken directly from the returned result for postback, cannot change its value

parameterValue

String

Taken directly from the returned result for postback, cannot change its value

result

List

Transaction entity information, field information reference 5. According to sales transactions uid, sn, orderNo query corresponding sales - refund transactions

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article