JSON

POST {{baseUrl}}/data/json-files

1. Uploading diamonds events by direct ingestion to the blockchain pipeline.

The most common way on how events are added to the provenance story of a diamond is by using the API methods which details of the events in the API body.

Generic information required for every endpoint

When using the below methods and events, make sure to always provide the following information in the headers:

x-evl-client-id :

evl-public-api-key :

origin :

Content-Type : Application/Json

The method used for direct ingestion is a Post

POST http://api.everledger.io/data/json-files

The /data/json-files endpoint is used to upload an array of json documents. The parameters required would just be the schemaId (as per the above supported diamond events) and the data itself. And, for uploading Inventory data to update/sync diamonds availability, use Inventory as schemaId. The JSON data will be uploaded under a unique file name. The HTTP request Content-Type is application/json.

Request Body

{"schemaId"=>"certificate", "data"=>[{"LOT NUMBER"=>"1909BCB", "PACKET ID"=>16, "REPORT NUMBER"=>33522200813, "CERTIFIER"=>"GIA", "SHAPE"=>"OVAL", "COLOR"=>"H", "CLARITY"=>"SI2", "WEIGHT"=>1.1, "CUT"=>"VG", "SYMMETRY"=>"VG", "POLISH"=>"VG", "FLUORESCENCE"=>"FNT", "DEPTH PERCENTAGE"=>60.2, "TABLE PERCENTAGE"=>60.8, "M1"=>8.32, "M2"=>5.5, "M3"=>3.31, "GIRDLE"=>"SLT THK", "GIRDLE CONDITION"=>"", "GIRDLE PERCENTAGE"=>0, "CROWN ANGLE"=>12.9, "CROWN HEIGHT"=>0, "PAVILION ANGLE"=>43.1, "PAVILION DEPTH"=>0, "STAR LENGTH"=>"", "LOWER HALF"=>"", "CULET SIZE"=>"", "INSCRIPTION NUMBER"=>"AM 3813", "ISSUE DATE"=>"01/01/20", "IMAGEURL"=>"http://Path_to_pdf/cert.pdf"}, {"LOT NUMBER"=>"1909BCB", "PACKET ID"=>52, "REPORT NUMBER"=>33522200821, "CERTIFIER"=>"GIA", "SHAPE"=>"ROUND", "COLOR"=>"I", "CLARITY"=>"I1", "WEIGHT"=>1.9, "CUT"=>"G", "SYMMETRY"=>"VG", "POLISH"=>"VG", "FLUORESCENCE"=>"FNT", "DEPTH PERCENTAGE"=>66.7, "TABLE PERCENTAGE"=>54, "M1"=>5.04, "M2"=>5.01, "M3"=>3.35, "GIRDLE"=>"SLT THK TO THK", "GIRDLE CONDITION"=>"", "GIRDLE PERCENTAGE"=>0, "CROWN ANGLE"=>16.9, "CROWN HEIGHT"=>0, "PAVILION ANGLE"=>42.9, "PAVILION DEPTH"=>0, "STAR LENGTH"=>"", "LOWER HALF"=>"", "CULET SIZE"=>"", "INSCRIPTION NUMBER"=>"AM 321", "ISSUE DATE"=>"17/12/19", "IMAGEURL"=>"image-certificate\\321.pdf"}]}

HEADERS

KeyDatatypeRequiredDescription
x-evl-client-idstring
evl-public-api-keystring
originstring
Content-Typenull