Open API

Created by Weebo Support, Modified on Fri, 17 Jun, 2022 at 12:58 AM by Weebo Support

Open API

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

According to the sales transaction uid interface address

https://host:port/pospal-api2/openapi/v1/ticketOpenApi/queryRefunTicketBySellTicketUid

According to the sales transaction uid request body

{

   "appId": "abcdefghijklmn",

   "sellTcketUid": 66663989680866397

}

 

According to the sales transaction sn interface address

https://host:port/pospal-api2/openapi/v1/ticketOpenApi/queryRefunTicketBySellTicketSn

According to the sales transaction sn request body

{

   "appId": "abcdefghijklmn",

   "sellTcketSn": "20170509154301968000"

}

 

According to the refund transaction uid interface address

https://host:port/pospal-api2/openapi/v1/ticketOpenApi/querySellTicketByRefunTicketUid

According to the refund transaction uid request body

{

   "appId": "abcdefghijklmn",

   "refunTcketUid": 1508919704366308111

}

 

According to the refund transaction Sn interface address

https://host:port/pospal-api2/openapi/v1/ticketOpenApi/querySellTicketByRefunTicketSn

According to the refund transaction Sn request body

{

   "appId": "abcdefghijklmn",

   "refunTcketSn": "201710251621443620002"

}

 

According to the network number interface address

https://host:port/pospal-api2/openapi/v1/ticketOpenApi/queryTicketByOrderNo

According to the request number

{

   "appId": "abcdefghijklmn",

   "orderNo": "20170509154301968000"

}

parameter name

Is it necessary

Types of

Instructions

appId

Yes

String

KBYIO configured access credentials

sellTcketSn

Yes - according to the sales transaction Sn

String

Sales transaction serial number

sellTcketUid

Yes - based on sales transactions uid

Long

Unique value of sales transaction

orderNo

Yes - net number

String

Net list serial number -> unique value

Return result

{

   "status": "success",

   "messages": [],

   "data":{

      "cashierUid": 832101480292933201,

      "customerUid": 0,

      "sn": "201705091518217950003",

      "datetime": "2017-05-09 15:18:21",

      "totalAmount": 250,

      "totalProfit": 225,

      "discount": 100,

      "rounding": 0,

      "ticketType": "SELL_RETURN",

      "invalid": 0,

      "remark": "",

      "items": [

         {

            "name": "api1",

            "buyPrice": 25,

            "sellPrice": 250,

            "customerPrice": 0,

            "quantity": 1,

            "discount": 100,

            "customerDiscount": 100,

            "totalAmount": 250,

            "totalProfit": 225,

            "isCustomerDiscount": 1,

            "productUid": 127984014338793015,

            "ticketitemattributes": []

         }

      ],

      "payments": [

         {

            "code": "payCode_1",

            "amount": 250

         }

      ]

   }

}

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

ticketStoreAppIdOrAccount

String

Account or ID of the consumer store

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