5.4.3.8 Retrieving transaction information API

The off-BSN system can use this interface to get the transaction information based on transaction ID.

1. Interface address:

https://PCNGatewayAddress/api/fabric/v1/node/getTransaction

2. Call Method: POST

3. Signature algorithm: required and refer to Section 5.4.3.1

4. Call parameters

No. Field name Field Type Required Remarks
1 Header header Map Y
2 Body body Map Y
3 Signature Value mac String Y
Header
1 user unique ID userCode String Y
2 DApp unique ID appCode String Y
Body
1 transactionId txId String Y

Example:

{"header":{"userCode":"USER0001202004151958010871292","appCode":"app0001202004161020152918451","tId":""},"mac":"MEUCIQDIbcNl+C1iBbXWGW3qjhf80IRgCgvJuyxx0WXU2vn2TAIgZgA020L2aXBtrdLsYEkYPyiOJ9+AFrXOEwfuzy8B4bE=","body":{"txId":"c3c6523958c3811192b8d358dd2617f1b14cb661de6b022c1a822269e8a8c48d"}}

5. Response parameters

No. Field name Field Type Required Remarks
1 Header header Map Y
2 Body body Map Y
3 Signature Value mac String Y
Header
1 Response ID code int Y 0: authentication successful -1: authentication failed
2 Response message msg String N if code=0 then can be null
Body
1 Block Hash blockHash String Y
2 Block Number blockNumber Long Y
3 Transaction status status Int Y refer to detailed transaction status description in 6.3.13
4 on-chain user name createName String Y
5 Timestamp Second timeSpanSec Int64 Y “second” in the timestamp
6 Timestamp Nanosecond timeSpanNsec Int64 Y “nanosecond” in the timestamp

Example:

{
  "header": {
    "code": 0,
    "msg": "Transaction Successful"
  },
  "mac": "MEUCIQDUFw5pa4QJcEiQjYeLTl2L94HbsZbz7DArF+djgzWoTQIgU8u+dG6CcHwBZjuf9PvhYdEFAa/ujwo8UAPbAmKxRq0=",
  "body": {
    "blockHash": "ab9366cf63881228863c884527fceefabc9ad2e375aa0bcbf71f17f75c7d3ff5",
    "blockNumber": 7,
    "status": 0,
    "createName": "test02@app0001202004161020152918451",
    "timeSpanSec": 1587445821,
    "timeSpanNsec": 249139700
  }
}
© 2019-2020 Red Date (Hong Kong) Technology Limited. all right reserved,powered by GitbookFile Modify: 2021-01-22 11:14:51

results matching ""

    No results matching ""

    results matching ""

      No results matching ""