GSMA-CPAS / BWRP-common-adapter

The "Layer 2.5" with all Common functionality APIs
Apache License 2.0
2 stars 0 forks source link

Extend response of get all contracts (GET /api/v1/contracts/) #26

Closed sgerhardt-trilobyte closed 3 years ago

sgerhardt-trilobyte commented 3 years ago

Response at the moment:

GET /api/v1/contracts/

[
  {
    "contractId": "6006c9c4768b44001edde0a16be7",
    "header": {
      "name": "test",
      "type": "contract",
      "version": "1.0",
      "fromMsp": {
        "mspId": "DTAG"
      },
      "toMsp": {
        "mspId": "TMUS"
      }
    },
    "state": "SENT",
    "documentId": "c3e8e4db29d3102b6fb704f5f346775d70ea99d86a022c991e1b128c86e82ed3",
    "creationDate": "2021-01-19T12:00:04.875Z",
    "lastModificationDate": "2021-01-19T12:00:55.031Z"
  }
   ...
]

Fields requested by commercial team (UI table -> show all existing contracts)

Table cols:

Current contract JSON structure https://github.com/GSMA-CPAS/BWRP/wiki/Contract-JSON-Model (last grey box)

zkong-gsma commented 3 years ago

Reference: Unique reference for both partners -> referenceId (available) - if draft -> referenceId = null or empty ???

this will always be "available" as webapp currently does not support DRAFT mode. Its sent immediately when a "contract" is being created. as we keep debating. "referenceId" technically is a "binding hash" that only exist when an "exchange" happens. Logically don't exist if you have not exchange it, ie in DRAFT mode.

will try to full fill the "rest" requirements.

sschulz-t commented 3 years ago

as we keep debating. "referenceId" technically is a "binding hash" that only exist when an "exchange" happens. Logically don't exist if you have not exchange it, ie in DRAFT mode.

The referenceId is just an arbitrary random number. Think of it as a preshared secret key among two parties. Therefor referenceId is not a hash which is calculated across some given input.

zkong-gsma commented 3 years ago

lets not go through this argument again. we been through this.