Skip to Content

Get a template input contract

Returns one immutable input contract and the published schema it validates against.

GET
/v1/templates/{id}/input-contracts/{inputContractId}

Returns one immutable input contract and the published schema it validates against.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$
inputContractId*string
Match^tcon_[0-9a-hjkmnp-tv-z]{16,24}$

Response Body

Success

application/json
  1. response
id*TemplateInputContractId
Match^tcon_[0-9a-hjkmnp-tv-z]{16,24}$
organizationId*OrganizationId
Match^org_[0-9a-hjkmnp-tv-z]{16,24}$
templateId*TemplateId
Match^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$
version*integer
Range1 <= value <= 9007199254740991
validationDigest*string
Match^[a-f0-9]{64}$
schema*
createdAt*string
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.templates.getInputContract({
  "id": "example",
  "inputContractId": "example"
});
Example Response
{
  "id": "string",
  "organizationId": "string",
  "templateId": "string",
  "version": 1,
  "validationDigest": "string",
  "schema": {
    "property1": "string",
    "property2": "string"
  },
  "createdAt": "string"
}

Related documentation