Skip to main content

Overview

Allows the client to create a new smart contract, based on an existing (and approved) contract template. The request must be signed using one of the keys created by the client.

HTTP request

POST /Agent/Legal/CreateContract

Authentication

Requires a valid JWT bearer token.

Request (JSON)

{
	"templateId": Required(Str(PTemplateId)),
	"visibility": Required(Str(PVisibility)),
	"Parts":
	{
		"role": Required(Str(PRole)),
		"legalId": Required(Str(PLegalId))
	}?[],
	"Parameters":
	{
		"name": Required(Str(PParameterName)),
		"value": Required(PParameterValue)
	}?[]
}

Input parameters

ParameterDescription
PTemplateIdContract ID of approved template to use to create the new smart contract.
PVisibilityVisibility of the new smart contract. Possible values are CreatorAndParts, DomainAndParts, Public and PublicSearchable.
PRoleRole of a predefined part to the contract.
PLegalIdLegal ID of a predefined part to the contract.
PLegalIdValues of properties that will be engraved into the Legal Identity.
PPropertyNameNames of properties that will be engraved into the Legal Identity.
PPropertyValueValues of properties that will be engraved into the Legal Identity.

Response (JSON)

{
	"Contract": Required(PContract)
}

Response parameters

ParameterDescription
PContractSmart contract object generated by the server.

Notes

This endpoint uses the request schema notation described in Pattern matching.