Write Record API

  1. The record owner writes a record via nChain Event

  2. The result is the Location of the record on the blockchain

  3. The record owner stores the Location for later processing

Example code:

curl -X "POST" \
     -L "$URL/api/v1/records" \
     -H "x-api-key: $KEY" \
     -H "Content-Type: application/octet-stream" \
     --data-binary "hello"

Example response:

{
  "txId": "7d2aef40841f0109....c31c83a5505a4c147e"
}

The response includes a location that will be used in subsequent operations.

: Extract the location from the response to the write command

LOC=7d2aef40841f0109....c31c83a5505a4c147e

Last updated

Copyright © nChain Licensing AG 2024