Documentation Index
Fetch the complete documentation index at: https://mintlify.com/timepoint-ai/timepoint-clockchain/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The/ingest/tdf endpoint accepts a batch of TDF-compliant records and creates or updates nodes in the Clockchain graph. Each record is automatically deduplicated using a deterministic tdf_hash computed from canonical temporal-spatial fields.
Endpoint
/api/v1/ingest/tdfAuthentication
Requires a valid service key passed via theX-Service-Key header.
Request Body
Array of TDF record objects. Each record represents a single timepoint node.
TDF Record Structure
Each record in the array follows the Temporal Data Format specification:Response
Number of nodes successfully ingested.
Example Request
Example Response
Deduplication with tdf_hash
Each TDF record generates a deterministic SHA-256 hash from its canonical fields. This
tdf_hash is used for content-addressable deduplication.tdf_hash is computed from the following fields in the payload:
year,month,day,timecountry,region,cityslug,name,one_liner
- Missing or
nullvalues are normalized to empty strings - All values are lowercased and trimmed
- Fields are sorted alphabetically before hashing
- If a node with the same
idandtdf_hashalready exists, it is not duplicated - If the
tdf_hashdiffers (content changed), the node is updated - This enables idempotent bulk imports and change detection
Processing Flow
- Validation: Each record is validated against the TDFRecord schema
- Transformation: The
tdf_to_node_attrs()function extracts node attributes - Hash Computation: The
tdf_hashis automatically computed from canonical fields - Ingestion: The node is added or updated via
GraphManager.add_node() - Response: Returns the total count of processed nodes
Error Handling
- 400 Bad Request: Invalid TDF record structure or missing required fields
- 401 Unauthorized: Missing or invalid service key
- 422 Unprocessable Entity: TDF schema validation failed
Best Practices
- Batch Size: Optimal batch size is 100-1000 records per request
- Idempotency: Safe to retry failed batches—duplicates are handled automatically
- Confidence Scores: Use
confidencevalues to track data quality (0.0 = uncertain, 1.0 = verified) - Run IDs: Use consistent
run_idvalues to track ingestion batches - Source Types: Tag records with
source_typeto distinguish historical facts from generated or user content
Related Endpoints
- Ingest Subgraph - Ingest nodes with explicit relationships
- Get Moment - Retrieve a single timepoint node
- Search - Query ingested timepoints