Query code according to transaction serial number

Created by Weebo Support, Modified on Fri, 17 Jun, 2022 at 1:01 AM by Weebo Support

Query code according to transaction serial number

interface address

hostname/openapi/v1/ticketOpenApi/queryTicketBySn

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",

     "sn":"201511121549168880001"

}

parameter name

Is it necessary

Types of

Instructions

appId

Yes

String

KBYIO configured access credentials

sn

Yes

String

Transaction serial number

Return result

{

     "status": "success",

     "messages": [],

     "data":{

          "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

               },

          ],

          "item":[

               {

                    "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"

                         }

                    ]

               }

          ]

     }

}

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

data

Json

Transaction entity information

cashierUid

Long

Cashier Unique ID

customerUid

Long

Unique member identification

sn

String

Transaction serial number

datetime

String

The time when the Transaction was generated, the format is yyyy-MM-dd hh:mm:ss

totalAmount

BigDecima

Total amount

total profit

BigDecima

Total profit

discount

BigDecima

Discount

externalOrderNo

String

Third-party platform payment slip number

rounding

BigDecima

Rounding amount, such as 3.1 dollar to receive 3 dollar, 0.1 is the rounding amount

ticketType

String

Transaction type: SELL sales Transaction, SELL_RETURN return Transaction. not case sensitive

invalid

Int

A value of 1 indicates that the transaction has been voided

payments

List

Mix payment methods

code

String

Payment method code

amount

BigDecimal

Payment amount

items

List

Product list

name

String

Product Name

buyPrice

BigDecimal

Product cost price

sellPrice

BigDecimal

Product selling price

customerPrice

BigDecimal

Product member price

quantity

BigDecimal

The number of product sold in the Transaction entry, such as 3.5 boxes

discount

BigDecimal

Product discount

customerDiscount

BigDecimal

Product member's discount

totalAmount

BigDecimal

Total product price

total profit

BigDecimal

Total product profit

isCustomerDiscount

int

When the data is 1, the product is having the member discount

productUid

Long

The unique identifier of the product corresponding to the transaction.

ticketitemattributes

List

Attributes and remark of the transaction product

attributeName

String

Modifier name, ie taste options, such as add sugar, add water, add ice

attributeValue

String

Attribute value, ie modifier price

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 at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article