Skip to main content

Assets

Digital twins of physical products with cryptographic signatures. Assets represent the core entities in the Optropic Trust API, binding physical products to immutable cryptographic proofs and tamper-evident lifecycle records.

Methods​

Method (TypeScript)Method (Python)DescriptionHTTP
create(data)create(data)Create a new assetPOST /assets
get(assetId)get(asset_id)Retrieve asset by IDGET /assets/{id}
list(options?)list(options=None)List assets with paginationGET /assets
listAll(options?)list_all(options=None)List all assets (auto-paginate)GET /assets
update(assetId, data)update(asset_id, data)Update asset metadataPATCH /assets/{id}
verify(assetId)verify(asset_id)Verify asset signatureGET /assets/{id}/verify
revoke(assetId, reason?)revoke(asset_id, reason=None)Revoke assetPOST /assets/{id}/revoke
batchCreate(assets[])batch_create(assets)Create multiple assetsPOST /assets/batch
batchVerify(assetIds[])batch_verify(asset_ids)Verify multiple assetsPOST /assets/batch/verify
batchRevoke(assetIds[], reason?)batch_revoke(asset_ids, reason=None)Revoke multiple assetsPOST /assets/batch/revoke

Example​

import { OptropicClient } from 'optropic';

const client = new OptropicClient({ apiKey: 'optr_live_...' });

// Create an asset
const asset = await client.assets.create({
name: 'Product SKU-12345',
metadata: {
manufacturer: 'TechCorp',
batch: 'BATCH-2024-001'
},
vertical: 'electronics'
});

console.log(`Asset created: ${asset.id}`);