Skip to main content
POST
/
v2
/
contracts
/
contract-by-id
/v2/contracts/contract-by-id
curl --request POST \
  --url https://api.example.com/v2/contracts/contract-by-id \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "contractId": "<string>",
  "queryingParties": [
    "<string>"
  ]
}
'
{
  "createdEvent": {
    "offset": 123,
    "nodeId": 123,
    "contractId": "<string>",
    "templateId": "<string>",
    "createArgument": "<unknown>",
    "witnessParties": [
      "<string>"
    ],
    "signatories": [
      "<string>"
    ],
    "createdAt": "<string>",
    "packageName": "<string>",
    "representativePackageId": "<string>",
    "acsDelta": true,
    "contractKey": "<unknown>",
    "contractKeyHash": "<string>",
    "createdEventBlob": "<string>",
    "interfaceViews": [
      {
        "interfaceId": "<string>",
        "viewStatus": {
          "code": 123,
          "message": "<string>",
          "details": [
            {
              "typeUrl": "<string>",
              "value": "<string>",
              "unknownFields": {
                "fields": {}
              },
              "valueDecoded": "<string>"
            }
          ]
        },
        "viewValue": "<unknown>",
        "implementationPackageId": "<string>"
      }
    ],
    "observers": [
      "<string>"
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.canton.network/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Ledger API standard JWT token

Body

application/json
contractId
string
required

The ID of the contract. Must be a valid LedgerString (as described in value.proto).

Required

queryingParties
string[]

The list of querying parties The stakeholders of the referenced contract must have an intersection with any of these parties to return the result. If no querying_parties specified, all possible contracts could be returned.

Optional: can be empty

Response

createdEvent
CreatedEvent · object
required

The representative_package_id will be always set to the contract package ID, therefore this endpoint should not be used to lookup contract which entered the participant via party replication or repair service. The witnesses field will contain only the querying_parties which are also stakeholders of the contract as well. The following fields of the created event cannot be populated, so those should not be used / parsed:

  • offset
  • node_id
  • created_event_blob
  • interface_views
  • acs_delta

Required