Add Traceability to any Application

The Traceability Blockchain API is an easy to use REST API that allows developers to add traceability to any application without installing any software and with no upfront fees. Create a FREE account on https://traceabilityblockchain.io to get an API key and set up your first location.

/receive - Receive an Item

The /receive endpoint receives an item from a vendor or other location. Items are identified by GTIN and LOT number.

/ship - Ship an Item

The /ship endpoint ships an item to a customer or other location. Items are identified by GTIN and LOT number.

/process - Combine Items to create a new item

The /process endpoint combines input items to create a new item without changing locations. The resulting product is identified by GTIN and LOT number. If inputs are added to a product over time, the /process endpoint is called each time inputs are added.

/package - Create a new item from a single input

The /package endpoint is used to create a new item from a single input or add a single additional input to an existing product. The /package endpoint is a simplified version of the /process endpoint.

/trace - Trace an item

The /trace endpoint is used to trace the input and outputs to an item. This endpoint is used if you want to allow users to trace items from within your application. Tracing items can also be performed with the API Explorer and exported to Excel.

/post-cso - Create an immutable object (documents)

The /post-cso endpoint is hash and sign a one or more documents or detail data that is anchored to the blockchain. Each Cryptographically Secure Object is identified by a 32 byte hash that ensures the object anchored to the blockchain has not been changed.

Receiving: curl example

curl 'https://tritanium.io/2019-02-01/receive' -X POST \
--data-urlencode ':[auth key]' \
--data-urlencode 'address=1600 Golf Rd, Rolling Meadows IL 60008' \
--data-urlencode 'gtin=690988999880001' \
--data-urlencode 'lot=ARK-190803' \
--data-urlencode 'data={"vendor":"Acme Distribution"}' \
--data-urlencode 'shipment_id=1Z98009880998080 ' \
--data-urlencode 'shipment_data={"shipper":"UPS"}'

Receiving: PHP Example

<?php

$url = 'https://traceabilityblockchain.io/2019-02-01/receive';

$fields = array(
'auth_key' => urlencode(':[auth_key]'),
'gtin' => urlencode('690988999880001'),
'lot' => urlencode('ARK-190803'),
'data' => urlencode('{"vendor":"Acme Distribution"}'),
'shipment_id' => urlencode('1Z98009880998080'),
'shipment_data' => urlencode('{"shipper":"UPS"}'),
'address' => urlencode('1600 Golf Rd, Rolling Meadows IL 60008')
);

//url-ify the data for the POST
foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
rtrim($fields_string, '&');

$ch = curl_init();

//set the url, number of POST vars, POST data
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST, count($fields));
curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);

//execute post
$result = curl_exec($ch);

//close connection
curl_close($ch);
?>