nChain Event
Back to All
V.1.3.1
V.1.3.1
  • nChain Event User Guide
  • Overview
    • Introduction
      • Target Audience
    • Features and Benefits
      • Independent Operations
      • Web3 Development
    • Core Concepts
    • Encoded and Unencoded Records
  • Using nChain Event
    • Initial Set-Up
  • Independent Records
    • Introduction
    • Functional Description
      • Write Record
      • Read Record
      • Verify Record
    • Use Cases
      • Lucky Number Tickets
      • Internet of Things (IoT) Data
      • Intellectual Property Rights (IPR) Evidence
      • Car Dealership
    • Tutorials
      • Data Integrity
    • API Workflow
      • Write Record
      • Get Location Status
      • Read Record
      • Verify Record
  • Linked Records
    • Introduction
      • Concept - Link Locations
    • Functional Description
      • Create Link Record
      • Read Link Record
      • Update Link Record
      • Delete Link Record
      • Verify Link Record
    • Use Cases
      • Luxury Handbag Provenance
    • Tutorials
      • Collection Integrity
      • Provenance Integrity
    • API Workflow
      • Create Link Record
      • Get Link Location Status
      • Read Link Record
      • Update Link Record
      • Delete Link Record
      • Verify Link Record
  • API Documentation
    • nChain Event API
  • Bitcoin SV Blockchain
    • Features and Benefits
    • Writing to Blockchain
    • Reading from Blockchain
    • Transaction Format
    • Troubleshooting
    • Glossary
Powered by GitBook
On this page
  1. Linked Records
  2. API Workflow

Delete Link Record

PreviousUpdate Link RecordNextVerify Link Record

This does not actually delete a link location on the blockchain. Instead, it creates a new empty record that prevents any further updates to the current link location. A deleted link location cannot be updated further.

The record will be submitted to the blockchain asynchronously.

  1. The record owner deletes the previous link location via nChain Event

  2. The result is the new link Location of an empty record on the blockchain

  3. The record owner stores the new link Location for later processing

  4. Ideally, the record owner should check the status of the new link location

Example code:

curl -X POST $URL/api/v1/linkedrecords/$LOC/delete \
     -H "x-api-key: $KEY" \
     -H "accept: text/plain"
const response = await fetch('${url}/api/v1/linkedrecords/${loc}/delete', {
  method: 'POST',
  headers: {
    'x-api-key': '$KEY',
    'accept': 'text/plain'
  }
});

Example cURL response:

{
  "txId": "880ea79ee5728333....390cdecd1a9686b4bd"
}

The response includes a location that can be used in subsequent commands.

LOC=880ea79ee5728333....390cdecd1a9686b4bd
const data = await response.json();
const loc2 = data.txId;