Hi all,
I’m trying to construct an exercise command by hand and send it to the LedgerAPI using Postman.
Unfortunately, I’m getting an error, and I was hoping someone could point me to what’s going wrong.
The choice I want to exercise is:
choice CreateProposals : (ContractId TransactionManifest, [ContractId TransferProposal])
with
messageIdToLegs: [(Text, Leg)]
assembler: Party
data Leg = Leg with
legPayload: Text
approversToSettlementSteps: [(Party, SettlementStep)]
data SettlementStep = SettlementStep with
sender: Optional Text -- sender account iban
receiver: Optional Text -- receiver account iban
delivery: Instrument
data Instrument = Instrument with
amount: Decimal
label: Text
This is what I came up with:
{
"commands": {
"act_as": [
"scheduler::12203a80aea09ceaca412f7ae3d5a7a0ebba76cf78b352a2b450d566c445cabb40f5"
],
"application_id": "app",
"command_id": "myId",
"ledger_id": "sandbox",
"party": "scheduler::12203a80aea09ceaca412f7ae3d5a7a0ebba76cf78b352a2b450d566c445cabb40f5",
"submission_id": "subId",
"workflow_id": "workflowId",
"commands": [
{
"exercise": {
"choice": "CreateProposals",
"template_id": {
"package_id": "1ff2164777e6e7bc31a87b53c8301743a8594fd03c4c92abbbc7b57bb63c309b",
"entity_name": "InitiateTransfer",
"module_name": "Workflow.InitiateTransfer"
},
"choice_argument": {
"assembler": "assembler::12203a80aea09ceaca412f7ae3d5a7a0ebba76cf78b352a2b450d566c445cabb40f5",
"messageIdToLegs": {
"elements": [
"MessageId",
{
"legPayload": "PAYLOAD",
"approversToSettlementSteps": {
"elements": [
"bankA::12203a80aea09ceaca412f7ae3d5a7a0ebba76cf78b352a2b450d566c445cabb40f5",
{
"sender": "SenderIBAN",
"receiver": "ReceiverIBAN",
"delivery": {
"amount": "100.0",
"label": "USD"
}
}
]
}
}
]
}
},
"contract_id": "00daa8c866c648e13a28797b964f07208077bcff9e9af2099134700ce8f63bcd29ca01122027171d4055492024a620041a6a70f0b52bb97a1db5db191e6b193fecf4362845"
}
}
]
}
}
The error message I received was
MISSING_FIELD(8,subId): The submitted command is missing a mandatory field: value
Unfortunately I don’t know where value is expected.
I constructed this message by using postman’s “generate example message” and looking at Ledger API Reference — Daml SDK 2.5.0 documentation
Thank you for your help.
Best,
darko