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. Independent Records
  2. API Workflow

Get Location Status

PreviousWrite RecordNextRead Record

Depending on the use case, check whether the record is on the blockchain at the location:

  1. The record owner waits at least 10 minutes for the write operation to be confirmed on the blockchain

  2. The record owner checks the status of the location

  3. If not confirmed, the record owner either waits again or retries writing the record

  4. The record owner optionally stores the evidence of the write operation

  5. The record owner optionally sends or publishes the location to any other parties

Example code:

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

Example immediate cURL response:

{
  "confirmation": null
}

Example cURL response after waiting for an hour:

{
  "confirmation": {
    "confirmedBlocks": 6,
    "blockHash": "0e551049775fd9a3fc6516....5819eb375e4664b72adf17f41d",
    "blockTimestamp": "2024-01-02T13:14:17Z",
    "merkleProof": {
      "index": 1,
      "txOrId": "7d2aef40841f0109....c31c83a5505a4c147e",
      ....
    }
  }
}

The Merkle proof is described in the blockchain section.