You can create an empty parcel with this API.
| URL | {{BASE_URL}}/parcel/v1/init_parcel |
| Method | GET |
| Parameters | |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "idparcel": 8889, "parcelid": "0dd57662-7a3d-43fa-9459-2ef9e78a4a97" } |
| Response Codes | 200: ok |
You can use this API to update any unlocked parcels, including the newly created empty parcel.
| URL | {{BASE_URL}}/parcel/v1/update_parcel_metrics |
| Method | POST |
| Parameters |
parcelid, string (required) parcelweight, number (required) parcelcountry, string (required) parcelreference, string avgweight, number numberofstones, number country, string minefactory, string knownorigin, string geolocation_X, string geolocation_Y, string geolocation_Z, string workingdepartment, string workingunit, string personname, string workingpersonname, string |
| Sample Request JSON |
{ "parcelid":"961ef083-e226-4213-946c-a3433eebb685", "parcelreference":"Test Parcel", "parcelweight":"15.00", "avgweight":"15.00", "numberofstones":"5", "country":"Belgium", “parcelcountry”: “Belgium”, "minefactory": "Test", "knownorigin":"MIX", "geolocation_X": "", "geolocation_Y": "", "geolocation_Z": "", "workingdepartment": "Department Name", "workingunit": "Unit Name", "personname": "Person Name", "workingpersonname": "Working Person Name" } |
| Sample Response JSON |
{ "status": "ok", "isvalid": true } |
| Response Codes |
200: ok E147: error - parcel is locked and/or exported |
With this API, you can create multiple new parcels while providing information about each parcel.
| URL | {{BASE_URL}}/parcel/v2/init_parcel |
| Method | POST |
| Parameters |
parcelreference, string parcelweight, number avgweight, number numberofstones, string Total_Stones, string country, string parcelcountry, string minefactory, string knownorigin, string geolocation_X, string geolocation_Y, string geolocation_Z, string workingdepartment, string workingunit, string personname, string workingpersonname, string parentid, string |
| Sample Request JSON |
"parcel":[ { "parcelreference":"Test Parcel 1", "parcelweight":"15.00", "avgweight":"15.00", "numberofstones":"5", "Total_Stones":"5", "country":"Belgium", “parcelcountry”: “Belgium”, "minefactory": "Test", "knownorigin":"MIX", "geolocation_X": "", "geolocation_X": "", "geolocation_X": "", "workingdepartment": "Department Name", "workingunit": "Unit Name", "personname": "Person Name", "workingpersonname": "Working Person Name", "parentid": "" }, { "parcelreference":"Test Parcel 2", "parcelweight":"20.00", "avgweight":"1.00", "numberofstones":"20", "Total_Stones":"20", "country":"Belgium", “parcelcountry”: “Belgium”, “parcelcountry”: “Belgium”, "minefactory": "Test", "knownorigin":"MIX", "geolocation_X": "", "geolocation_X": "", "geolocation_X": "", "workingdepartment": "Department Name", "workingunit": "Unit Name", "personname": "Person Name", "workingpersonname": "Working Person Name", "parentid": "961ef083-e226-4213-946c-a3433eebb685" } ] |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "parcel": [ { "idparcel": 17853, "parcelid": "13ddb5c2-414b-4cb2-9023-ddf62e0e9092" }, { "idparcel": 17854, "parcelid": "a59de173-a900-4257-b74c-72f27f98785d" } ], "idbatch": 487, "batchid": "2ec824bc-eb9a-4bcb-83a8-f60edb7a6367", "nadded_qty": 2 } |
| Response Codes | 200: ok |
| Note |
When you set a ‘parentid’ for a parcel, the parcel reference you entered will be replaced with the parent reference/1 (eg: Parent: Parent Parcel Reference, Child: Parent Parcel Reference/1) |
You can create multiple parcels with multiple origins and assign it in a group at once using this API
| URL | {{BASE_URL}}/parcel/v1/init_parcel_with_origins |
| Method | POST |
| Parameters |
parcelreference, string parcelweight, number numberofstones, string country, string minefactory, string knownorigin, string geolocation_X, string geolocation_Y, string geolocation_Z, string workingdepartment, string workingunit, string personname, string workingpersonname, string origin, array Country_Parcel, string Country_Domain, string Parcel_Weight, string Total_Stones, string Parcel_Reference, string Known_Origin, string MineFactory, string City, string sbatchref, string |
| Sample Request JSON |
{ "parcel": [ { "parcelreference": "Test Parcel 1", "parcelweight": "15.00", "numberofstones": "5", "country": "Belgium", "minefactory": "Alrosa", "knownorigin": "Lesotho", "geolocation_X": "10", "geolocation_Y": "101", "geolocation_Z": "10", "workingdepartment": "Department Name", "workingunit": "Unit Name", "personname": "Person Name", "workingpersonname": "Working Person Name", "origin": [ { "Country_Parcel": "Angola", "Country_Domain": "Canada", "Parcel_Weight": "10.00", "Total_Stones": "8", "Parcel_Reference": "Test Parcel 1 Origin 1", "Known_Origin": "Russia", "MineFactory": "De Beers", "City": "Paris" }, { "Country_Parcel": "Australia", "Country_Domain": "Mozambique", "Parcel_Weight": "12.00", "Total_Stones": "7", "Parcel_Reference": "Test Parcel 1 Origin 2", "Known_Origin": "Guinea", "MineFactory": "IMDH", "City": "New york" } ] }, { "parcelreference": "Test Parcel 2", "parcelweight": "50.00", "numberofstones": "23", "country": "Botswana", "minefactory": "Burgundy Diamonds", "knownorigin": "Brazil", "geolocation_X": "20", "geolocation_Y": "201", "geolocation_Z": "201", "workingdepartment": "Department Name2", "workingunit": "Unit Name", "personname": "Person Name", "workingpersonname": "Working Person Name2", "origin": [ { "Country_Parcel": "Tanzania", "Country_Domain": "China", "Parcel_Weight": "13.00", "Total_Stones": "5", "Parcel_Reference": "Test Parcel 2 Origin 1", "Known_Origin": "Namibia", "MineFactory": "Trans Hex", "City": "Zurich" }, { "Country_Parcel": "DTC", "Country_Domain": "Sierra Leone", "Parcel_Weight": "14.00", "Total_Stones": "3", "Parcel_Reference": "Test Parcel 2 Origin 2", "Known_Origin": "South Africa", "MineFactory": "Grib Diamonds", "City": "London" }, { "Country_Parcel": "DR Congo", "Country_Domain": "Belgium", "Parcel_Weight": "4.44", "Total_Stones": "4", "Parcel_Reference": "Test Parcel 2 Origin 3", "Known_Origin": "Zimbabwe", "MineFactory": "Stornoway Diamond Corporation", "City": "London" } ] } ], "sbatchref": "Parcels with multiple origins test2" } |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "parcel": [ { "idparcel": 281474976710792, "parcelid": "63e23e1b-a27a-46b8-8350-2d1a09b8cbb8", "origin": [ { "country_parcel": "Angola", "country_domain": "Canada", "source_weight": "10.00", "source_stones": "8", "source_reference": "Test Parcel 1 Origin 1", "known_origin": "Russia", "minefactory": "De Beers", "city": "Paris" }, { "country_parcel": "Australia", "country_domain": "Mozambique", "source_weight": "12.00", "source_stones": "7", "source_reference": "Test Parcel 1 Origin 2", "known_origin": "Guinea", "minefactory": "IMDH", "city": "New york" } ] }, { "idparcel": 281474976710793, "parcelid": "031662a0-ad46-4d72-b50a-bd0450b6f355", "origin": [ { "country_parcel": "Tanzania", "country_domain": "China", "source_weight": "13.00", "source_stones": "5", "source_reference": "Test Parcel 2 Origin 1", "known_origin": "Namibia", "minefactory": "Trans Hex", "city": "Zurich" }, { "country_parcel": "DTC", "country_domain": "Sierra Leone", "source_weight": "14.00", "source_stones": "3", "source_reference": "Test Parcel 2 Origin 2", "known_origin": "South Africa", "minefactory": "Grib Diamonds", "city": "London" }, { "country_parcel": "DR Congo", "country_domain": "Belgium", "source_weight": "4.44", "source_stones": "4", "source_reference": "Test Parcel 2 Origin 3", "known_origin": "Zimbabwe", "minefactory": "Stornoway Diamond Corporation", "city": "London" } ] } ] } |
| Response Codes | 200: ok |
You can delete a single parcel with this API.
| URL | {{BASE_URL}}/parcel/v1/delete_parcel/{parcelid} |
| Method | GET |
| Parameters | parcelid, string |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "isvalid": true } |
| Response Codes |
200: ok E115: inaccessible token or already deleted |
You can use this API to delete multiple parcels at once.
| URL | {{BASE_URL}}/parcel/v2/delete_parcel |
| Method | POST |
| Parameters | parcel, array |
| Sample Request JSON |
{ "parcel": [ "2bf9c39e-853c-43b1-8550-c8bd1f03a106", "9c4cae2d-b05e-4681-8f42-717caa2fbd5d"] } |
| Sample Response JSON |
{ "status": "ok", "isvalid": true } |
| Response Codes |
200: ok E115: inaccessible token or already deleted |
Using this API, you can get a list of parcels that have been deleted.
| URL | {{BASE_URL}}/parcel/v1/get_parcel_list_deleted |
| Method | GET |
| Parameters | |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "domid": "d7e19951-6990-402e-a1f3-357bd375ee61", "parcel": [ { "parcelid": "e3f21f7f-bc0d-4f21-b5cc-5d28a484d57b", "parcelreference": "Delete Test", "parcelweight": 10, "numberofstones": 10, "averageweight": 1, "parceltype": 2, "parcelbatchid": "5ead3485-94e2-40ff-be53-b869a74ca53c", "owneruserid": "ef086e7c-48f4-4116-b12b-84c2cf16a004", "owneruser": "Shashika ", "datecreated": "2023-01-11T12:10:37.084", "datemodified": "2023-01-26T09:28:41.665", "parcelcountry": "DTC", "domaincountry": "BELGIUM" }, { "parcelid": "af5e30db-4038-48d7-bca4-9b21ca5faa63", "parcelreference": "12377616", "parcelweight": 0, "numberofstones": 0, "averageweight": 0, "parceltype": 2, "parcelbatchid": "95afb3db-0548-46af-a184-38756e13a78c", "owneruserid": "0592b769-f400-4acc-83ad-bacff7ec7b11", "owneruser": "Guy De Smet", "datecreated": "2022-04-28T15:26:59.659", "datemodified": "2022-04-28T15:36:40.802" "parcelcountry": "DTC", "domaincountry": "BELGIUM" } ] } |
| Response Codes | 200: ok |
With the help of this API, it is possible to recover a deleted parcel.
| URL | {{BASE_URL}}/parcel/v1/undelete_parcel{parcelid} |
| Method | GET |
| Parameters | parcelid, string |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "isvalid": true } |
| Response Codes |
200: ok E115: inaccessible token or not deleted |
You can get the details of a given parcel using this API.
| URL | {{BASE_URL}}/parcel/v1/get_parcel/{sParcelid} |
| Method | GET |
| Parameters | parcelid, string |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "parcel": { "isindomain": true, "isbatch": false, "parceltype": 2, "avgweight": 0, "parcelweight": 22, "parcelreference": "Test parcel country", "numberofstones": 0, "knownorigin": "0", "numberofchilds": 0, "parcelid": "63ff6d1c-dd90-4662-8406-d91614e42c7c", "islinkedtoparent": false, "isinfocompleted": false, "datecreated": "2023-08-04T09:10:48.554", "datemodified": "2023-08-04T09:11:48.769", "isexported": false, "islocked": false, "parcelcountry": "DTC", "domaincountry": "BELGIUM", "minefactory": "Alrosa" } } |
| Response Codes |
200: ok E109: wrong token |
You can retrieve a list of all parcels within your domain through the use of this API.
| URL | {{BASE_URL}}/parcel/v1/get_parcel_list |
| Method | GET |
| Parameters | |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "domid": "d7e19951-6990-402e-a1f3-357bd375ee61", "parcel": [ { "parcelid": "147d1e34-6652-4101-9df8-7490047756ba", "parcelreference": "TEST MERGE 2", "parcelweight": 12000, "numberofstones": 211, "averageweight": 56.87203791469, "parceltype": 3, "parcelbatchid": "00000000-0000-0000-0000-000000000000", "owneruserid": "0592b769-f400-4acc-83ad-bacff7ec7b11", "owneruser": "Guy De Smet", "datecreated": "2021-10-18T23:57:25.464", "datemodified": "2022-07-13T14:15:04.909", "parcelcountry": "DTC", "domaincountry": "BELGIUM", "city": "BRAINE-LE-COMTE", "minefactory": "", "isexported": false }, { "parcelid": "d40c0d8f-ddca-4a5d-92bc-fc92fa3286f6", "parcelreference": "TEST EXTRA FIELDS", "parcelweight": 123, "numberofstones": 2, "averageweight": 61.5, "parceltype": 2, "parcelbatchid": "00000000-0000-0000-0000-000000000000", "owneruserid": "0592b769-f400-4acc-83ad-bacff7ec7b11", "owneruser": "Guy De Smet", "datecreated": "2021-10-18T23:59:02.185", "datemodified": "2022-05-26T13:40:37.558", "parcelcountry": "DTC", "domaincountry": "BELGIUM", "city": "BRAINE-LE-COMTE", "minefactory": "", "isexported": false } ] } |
| Response Codes | 200: ok |
This API allows you to find a list of parcels by using search filters. Please refer to the last row of the table for instructions on how to use search filters.
| URL | {{BASE_URL}}/parcel/v2/get_parcel_list |
| Method | POST |
| Parameters |
dcreatedfrom, date dcreatedto, date nlimitfrom, integer nlimitto, integer ssort, string sreference, string sowneruser, string ntotalstonesfrom, intege ntotalstonesto, intege rweightfrom: float rweightto, float scountry, string sparcelcountry, string scity, string sminefactory, string nisexported, integer nislinkedtoparent, integer sparcelsearch, string nparceltype, integer nmetadatadefinitionid, string smetadatavalue, string |
| Sample Request JSON |
{ "dcreatedfrom":20230405, "dcreatedto":20230406, "nlimitfrom":0, "nlimitto":65, "ssort":"numberofstones ASC ,datecreated ASC", "reference":"", "sowneruser":"", "ntotalstonesfrom": null, “ntotalstonesto”: null, “rweightfrom”: 45.52, "rweightto": 45.52, "country":"", "sparcelcountry": “”, "scity":"", "sminefactory":"", "nisexported":0, "nislinkedtoparent": 0, "sparcelsearch": "", "nparceltype": 0, "nmetadatadefinitionid": “”, "smetadatavalue": “” } |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "domid": "d7e19951-6990-402e-a1f3-357bd375ee61", "parcel": [ { "parcelid": "11393241-59ef-4c79-8b44-1d2f38b4a8d3", "parcelreference": "", "parcelweight": 0, "numberofstones": 0, "averageweight": 0, "parceltype": 2, "parcelbatchid": "895b706b-c578-4e61-82eb-a54650b726cb", "owneruserid": "ef086e7c-48f4-4116-b12b-84c2cf16a004", "owneruser": "Shashika ", "datecreated": "2023-04-06T10:10:14.816", "datemodified": "2023-04-06T10:10:14.816", "parcelcountry": "BELGIUM", "domaincountry": "BELGIUM", "minefactory": "Alrosa", "city": "BRAINE-LE-COMTE", "isexported": false, "islinkedtoparent": false, "metadatavaluememo": "", "metadatavaluestring": "" } ], "number_parcels_sent": 1, "number_parcels": 1 } |
| Response Codes | 200: ok |
| Note |
|
If you have a parcel ID that has been exported to the blockchain, you can use this API to obtain information about that parcel. This API can also be used to obtain information about a parcel within your domain. However, the response is different when using this API to retrieve details about a blockchain-exported parcel. Please refer to the Sample Response JSON for more information.
| URL | {{BASE_URL}}/parcel/v1/get_parcel/{sParcelid} |
| Method | GET |
| Parameters | parcelid, string |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "parcel": { "parcelid": "15323846-ae37-4592-b268-d6bcca6f58e1", "isbatch": false, "isindomain": false }, "ledger_fields": { "REQ_GET_LEDGER_FIELDS_FROM_TOKENGLOBAL": [ { "IDLedger_Field_Value": 18258, "IDLedger_Field": 1, "IDTokenGlobal": 68662, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "Test mixed parcel 1 - Aprl 28/1", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "REFERENCE", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "REFERENCE", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 18259, "IDLedger_Field": 2, "IDTokenGlobal": 68662, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "BELGIUM", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "KNOWN_ORIGIN", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "KNOWN_ORIGIN", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 18261, "IDLedger_Field": 3, "IDTokenGlobal": 68662, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "", "Value_Int": 0, "Value_Real": 5, "IDMediaGlobal": 0, "Field_Name": "WEIGHT", "Field_Type": 2, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "WEIGHT", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 18262, "IDLedger_Field": 4, "IDTokenGlobal": 68662, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "", "Value_Int": 5, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "NUMBER_OF_STONES", "Field_Type": 1, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "NUMBER_OF_STONES", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 18263, "IDLedger_Field": 5, "IDTokenGlobal": 68662, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "ITALY", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_COUNTRY", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "DOMAIN_COUNTRY", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 18264, "IDLedger_Field": 6, "IDTokenGlobal": 68662, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "ROME", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_CITY", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "DOMAIN_CITY", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 18265, "IDLedger_Field": 7, "IDTokenGlobal": 68662, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "MIXED", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_FACTORY", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "DOMAIN_FACTORY", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 18266, "IDLedger_Field": 8, "IDTokenGlobal": 68662, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "RETAIL", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_DEPARTMENT", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": false, "Field_Code": "DOMAIN_DEPARTMENT", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 18267, "IDLedger_Field": 9, "IDTokenGlobal": 68662, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "iTraceiT Demo 2", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_COMPANY", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": false, "Field_Code": "DOMAIN_COMPANY", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 18268, "IDLedger_Field": 10, "IDTokenGlobal": 68662, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "MINING", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_SECTOR", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": false, "Field_Code": "DOMAIN_SECTOR", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 18269, "IDLedger_Field": 14, "IDTokenGlobal": 68662, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "{ \"origin\":[ { \"Average_Weight\":1.666666666667, \"Parcel_Weight\":1.666666666667, \"Total_Stones\":1, \"Parcel_Reference\":\"Test mix parcel 3 - Aprl 28\", \"Share_Stones\":0.3333333333333, \"Share_Weight\":0.3333333333333, \"Token_Short\":\"bb0e8903-851d-4363-8fac-5294d98b767b\", \"Parcel_Type\":0, \"Known_Origin\":\"China\", \"Country\":\"China\", \"MineFactory\":\"Burgundy Diamonds\" }, { \"Average_Weight\":1.666666666667, \"Parcel_Weight\":1.666666666667, \"Total_Stones\":1, \"Parcel_Reference\":\"Test mix parcel 2 - Aprl 28\", \"Share_Stones\":0.3333333333333, \"Share_Weight\":0.3333333333333, \"Token_Short\":\"d9a4a2ee-4320-41e1-9a58-f284ae695c22\", \"Parcel_Type\":0, \"Known_Origin\":\"Brazil\", \"Country\":\"Brazil\", \"MineFactory\":\"Mountain Province Diamonds\" }, { \"Average_Weight\":1.666666666667, \"Parcel_Weight\":1.666666666667, \"Total_Stones\":1, \"Parcel_Reference\":\"Test mix parcel 1 - Aprl 28\", \"Share_Stones\":0.3333333333333, \"Share_Weight\":0.3333333333333, \"Token_Short\":\"cd6f7648-2053-40d6-8af9-af12ea95b95d\", \"Parcel_Type\":0, \"Known_Origin\":\"DTC\", \"Country\":\"DTC\", \"MineFactory\":\"Rio Tinto\" } ] }", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "ORIGINS", "Field_Type": 5, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "ORIGINS", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 18260, "IDLedger_Field": 25, "IDTokenGlobal": 68662, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "BELGIUM", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "PARCEL_COUNTRY", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "PARCEL_COUNTRY", "MediaFileName": null, "IDMediaGlobal_Me": null } ] }, "already_imported": 1, "already_imported_in_token": "e19b3d6f-89f3-43bd-a4b0-5bf814de7178" } |
| Response Codes | 200: ok |
| Note |
already_imported = 0 (Not already imported) already_imported = 1 (Already imported) already_imported_in_token = “token_id” (If already_imported = 1) |
| URL | {{BASE_URL}}/parcel/v1/search_parcel/{ssearchtext} |
| Method | GET |
| Parameters | ssearch;, string |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "domid": "d7e19951-6990-402e-a1f3-357bd375ee61", "parcel": [ { "searchtype": "parcel", "parcelid": "bedb88ad-375e-44df-9e6f-34662c016f4c", "parcelreference": "Test Parcel" } ] } |
| Response Codes | 200: ok |
Before adding an extra field to a parcel, it's essential to ensure that you have already added it to your Extra Field list in your domain. Please take the following necessary steps to check it.
Step 1:
Check whether the Extra Field already exists in your domain's list. To do that, you may use the API provided below.
https://docs.itraceit.io/en/API/ExtraFields#get-metadata-definition-list
You must use the "nidmetadatadefinition" value of the Extra Field received from the above API as "idmetadatadefinition" when adding the Extra Field to your parcel.
Step 2:
If the Extra Field you require is not listed, you can insert a new one to your domain using the API below and then use it in your parcel.
https://docs.itraceit.io/en/API/ExtraFields#insert-metadata-definition
With the help of this API, you have the option to add an extra field to your parcel.
| URL | {{BASE_URL}}/metadata/v1/insert_metadata |
| Method | POST |
| Parameters |
FieldType, integer FieldValue, string tokenid, string (parcel_id) idmetadatadefinition, integer (To obtain the idmetadatadefinition, please refer to Step 1: mentioned in the description above.) |
| Sample Request JSON |
{ "FieldType":3, "FieldValue":"Extra Field Value", "tokenid":"a5919be0-e066-4013-8575-ec58155b8066" //parcel_id, "idmetadatadefinition":103, } |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "idmetadata": 423 } |
| Response Codes | 200: ok |
| Note |
Please select a suitable FieldType from the list below and use the FieldType to be passed in the request JSON
|
To obtain the extra fields associated with a particular parcel, you can use this API.
| URL | {{BASE_URL}}/metadata/v1/get_metadata/{parcelID} |
| Method | GET |
| Parameters | sParcelID, string |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "extrafield": [ { "Field_Name": "Certificate number", "Field_Type": 3, "Field_Value": "#CERT-123ABC", "Field_Value_Memo": "", "mediaid": "00000000-0000-0000-0000-000000000000", "idmetadata": 14, "ismaintabdisplayed": true, "ischildtransferred": true, "ismergetransferred": true, "isblockchainauthorized": true, "displayorder": 1, "tokenid": "d40c0d8f-ddca-4a5d-92bc-fc92fa3286f6" }, { "Field_Name": "Invoice Numbers", "Field_Type": 3, "Field_Value": "INV-2022013014", "Field_Value_Memo": "", "mediaid": "00000000-0000-0000-0000-000000000000", "idmetadata": 15, "ismaintabdisplayed": true, "ischildtransferred": false, "ismergetransferred": false, "isblockchainauthorized": false, "displayorder": 3, "tokenid": "d40c0d8f-ddca-4a5d-92bc-fc92fa3286f6" }, { "Field_Name": "Manufacturer", "Field_Type": 3, "Field_Value": "ittracek", "Field_Value_Memo": "0", "mediaid": "00000000-0000-0000-0000-000000000000", "idmetadata": 399, "ismaintabdisplayed": false, "ischildtransferred": false, "ismergetransferred": false, "isblockchainauthorized": false, "displayorder": 1, "tokenid": "d40c0d8f-ddca-4a5d-92bc-fc92fa3286f6" }, { "Field_Name": "Company ID", "Field_Type": 3, "Field_Value": "sdsd", "Field_Value_Memo": "0", "mediaid": "00000000-0000-0000-0000-000000000000", "idmetadata": 402, "ismaintabdisplayed": true, "ischildtransferred": false, "ismergetransferred": false, "isblockchainauthorized": false, "displayorder": 2, "tokenid": "d40c0d8f-ddca-4a5d-92bc-fc92fa3286f6" }, { "Field_Name": "Clarity", "Field_Type": 3, "Field_Value": "1254", "Field_Value_Memo": "0", "mediaid": "00000000-0000-0000-0000-000000000000", "idmetadata": 404, "ismaintabdisplayed": true, "ischildtransferred": true, "ismergetransferred": true, "isblockchainauthorized": true, "displayorder": 1, "tokenid": "d40c0d8f-ddca-4a5d-92bc-fc92fa3286f6" }, { "Field_Name": "created date", "Field_Type": 5, "Field_Value": "20220007140000520", "Field_Value_Memo": "0", "mediaid": "00000000-0000-0000-0000-000000000000", "idmetadata": 413, "ismaintabdisplayed": false, "ischildtransferred": false, "ismergetransferred": false, "isblockchainauthorized": false, "displayorder": 0, "tokenid": "d40c0d8f-ddca-4a5d-92bc-fc92fa3286f6" } ] } |
| Response Codes |
200: ok E109: nok |
Using this API, you can delete an extra field that is linked to a specific parcel.
| URL | {{BASE_URL}}/metadata/v1/delete_metadata/{idmetadata} |
| Method | GET |
| Parameters | idmetadata, integer (You can use the "idmetadata" that you received from the "Get Parcel Extra Fields" API at this point.) |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok" } |
| Response Codes |
200: ok E109: wrong token |
Using this API, you can update an extra field that is linked to a specific parcel.
| URL | {{BASE_URL}}/metadata/v1/update_metadata |
| Method | POST |
| Parameters |
FieldType, integer FieldValue, string tokenid, string (parcel_id) ndata, integer (You can use the "idmetadata" that you received from the "Get Parcel Extra Fields" API at this point.) |
| Sample Request JSON |
{ "FieldType" : 3, "FieldValue" : "123456", "tokenid" : "fe613050-0071-4e53-a365-6c000fe42ce7", //parcel_id "ndata" : 12057 } |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "idmetadata": 12057 } |
| Response Codes | 200: ok |
| Note |
Make sure to send only the related field value from the below field types FieldValue, string FieldValueInt, integer FieldValueReal, real FieldValueMemo, text FieldValueDate, date |
You can create a batch with multiple empty parcels using this API.
| URL | {{BASE_URL}}/parcel/v1/init_parcel_multiple/{nQty} |
| Method | GET |
| Parameters | nQty, integer (Number of parcels you need to add to the batch) |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "parcel": [ "69f06627-0212-41b2-a263-0020992e271d", "57f56c9d-82e8-4b8a-9cdd-a414d8587611", "fc4b4690-2ed5-4cd9-8665-65c3f79d2765" ], "idbatch": 107, "batchid": "9b4a2fb0-a96e-4dd7-b225-3f28321477f8", "nadded_qty": 3 } |
| Response Codes | 200: ok |
You can create a batch with multiple parcels using this API.
| URL | {{BASE_URL}}/parcel/v1/init_parcel_batch |
| Method | POST |
| Parameters |
parcel, array of objects sparcelid, string sbatchref, string |
| Sample Request JSON |
"parcel":[ { "sparcelid":"5ed37124-4370-42e3-8aca-6a5dfa9b0646" }, { "sparcelid":"d02f641a-c5b5-4d1f-8de5-efbc4238d1c1" } ], "sbatchref": 'Group Name' |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "idbatch": 484, "batchid": "77888ed7-0199-4b3f-a610-645b8e488bb1", "added": { "parcel": [ { "parcelid": "5ed37124-4370-42e3-8aca-6a5dfa9b0646" }, { "parcelid": "d02f641a-c5b5-4d1f-8de5-efbc4238d1c1" } ] }, "requested_qty": 2, "added_qty": 2, "duplicates": 0 } |
| Response Codes | 200: ok |
You can insert more parcels or remove parcels from a batch using this API.
| URL | {{BASE_URL}}/parcel/v1/update_parcel_batch |
| Method | POST |
| Parameters |
sbatchid, string sbatchref, string insert, object parcel, array of objects sparcelid, string remove, object |
| Sample Request JSON |
"sbatchid":"17318eba-d14c-4098-b12d-02dd1c9ca30d", "sbatchref": "Batch Name", "insert":{ "parcel":[ { "sparcelid":"94e20c14-0335-435f-bf00-d5ff890298cc" }, { "sparcelid":"12d02238-f59f-4a58-8e5e-94a84d9de369" } ] }, "remove":{ "parcel":[ { "sparcelid":"5ed37124-4370-42e3-8aca-6a5dfa9b0646" } ] } |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "idbatch": 454, "batchid": "17318eba-d14c-4098-b12d-02dd1c9ca30d", "insert": { "requested_qty": 2, "added_qty": 0, "duplicates": 2 }, "remove": { "requested_qty": 1, "removed_qty": 0, "duplicates": 1 } } |
| Response Codes | 200: ok |
You can delete a batch using this API
| URL | {{BASE_URL}}/parcel/v1/delete_parcel_batch |
| Method | POST |
| Parameters | sbatchid, string |
| Sample Request JSON |
{ "sbatchid":'e3d9b92e-03ad-42cc-b561-6bcd2749473a', } |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "info": "parcel batch e3d9b92e-03ad-42cc-b561-6bcd2749473a set as deleted" } |
| Response Codes | 200: ok |
You can get the delete batch list using this API
| URL | {{BASE_URL}}/parcel/v1/get_parcel_batch_list/deleted/{index}/{size} |
| Method | GET |
| Parameters | |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "domid": "d7e19951-6990-402e-a1f3-357bd375ee61", "info": "showing only deleted parcels batches", "parcel_batch": [ { "date_created": "2024-03-14T07:45:00.110", "date_modified": "2024-03-14T09:26:06.282", "batch_quantity": 0, "is_blockchain_exported": false, "is_deleted": true, "batchid": "e3d9b92e-03ad-42cc-b561-6bcd2749473a", "batchref": "" } ], "nquantity_total": 9, "nquantity": 9 } |
| Response Codes | 200: ok |
You can undelete a batch using this API
| URL | {{BASE_URL}}/parcel/v1/undelete_parcel_batch/{batch_id} |
| Method | GET |
| Parameters | |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "info": "parcel batch e3d9b92e-03ad-42cc-b561-6bcd2749473a set as undeleted" } |
| Response Codes | 200: ok |
| URL | {{BASE_URL}}/parcel/v1/get_parcel_batch_list/{sBatchID}/{index}/{size} |
| Method | GET |
| Parameters |
sBatchID, string index, integer size, integer |
| Sample Request JSON |
{ "status": "ok", "isvalid": true, "domid": "d7e19951-6990-402e-a1f3-357bd375ee61", "batchid": "2570516e-4dcb-40dd-9ece-7b3eb98623e9", "parcel_batch": { "parcel": [ { "parcelid": "1de7c5c5-276c-4cd1-8d29-d273a7a89942", "parcelref": "TEST M 1109/1", "is_blockchain_exported": true, "is_deleted": false, "batchid": [ "6e517025-cb4d-dd40-9ece-7b3eb98623e9", "b285e1a4-8df4-134c-a5e4-0089d5567300" ], "batches_locations": 2 }, { "parcelid": "48f21df4-11a4-435b-b5e4-bc3202875401", "parcelref": "TEST M 1109/2", "is_blockchain_exported": true, "is_deleted": false, "batchid": [ "6e517025-cb4d-dd40-9ece-7b3eb98623e9", "b285e1a4-8df4-134c-a5e4-0089d5567300" ], "batches_locations": 2 }, { "parcelid": "50be63d8-4fea-410a-8aa8-fb90aee56f6d", "parcelref": "TEST M 1109/3", "is_blockchain_exported": true, "is_deleted": false, "batchid": [ "6e517025-cb4d-dd40-9ece-7b3eb98623e9", "b285e1a4-8df4-134c-a5e4-0089d5567300" ], "batches_locations": 2 }, ], "is_blockchain_exported": false, "isindomain": true, "batchref": "" }, "nquantity_total": 5, "nquantity": 5 } |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "domid": "d7e19951-6990-402e-a1f3-357bd375ee61", "batchid": "e30607fb-1793-47e9-81ad-f795911ac6d4", "nquantity": 0 } |
| Response Codes | 200: ok |
| Note |
sBatchID => batch ID or “all” (when the sBatchID set as “all” all the batches will list) index => starting index of the parcel in a batch size => no of parcels in the batch to be listed |
| URL | {{BASE_URL}}/transferability/v1/import_parcel_batch |
| Method | POST |
| Parameters |
istestonly, integer sparcelbatchid, string sparcelbatchiddest, string |
| Sample Request JSON |
{ "istestonly":0, "sparcelbatchid":"82e7200c-ff51-45c9-bb9e-a55dc0b6a1fe", "sparcelbatchiddest": "698b11d7-14a5-44cd-8846-f5cbd8f04330" } |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "sparcelbatchid": "eb7b62fa-caa8-465b-83b4-9d72b9896ea2", "sparcelbatchiddest": "1ceea719-0294-4c1b-8e08-55de20bf5e90", "istestonly": false, "import": { "parcel": [ { "status": "ok", "parcelreference": "0", "knownorigin": "0 ", "parcelweight": 30, "numberofstones": 0, "country": "UNKNOWN", "city": "BRAINE-LE-COMTE", "minefactory": "SOFTWARE", "origin": [ { "country": "BELGIUM", "country_parcel": "Unknown", "country_domain": null, "source_weight": 10, "source_stones": 0, "known_origin": "0", "minefactory": "SOFTWARE", "city": "BRAINE-LE-COMTE" }, { "country": "BELGIUM", "country_parcel": "Unknown", "country_domain": null, "source_weight": 20, "source_stones": 0, "known_origin": "0", "minefactory": "SOFTWARE", "city": "BRAINE-LE-COMTE" } ] }, { "status": "ok", "parcelreference": "", "knownorigin": "", "parcelweight": 0, "numberofstones": 0, "country": "Unknown", "city": "BRAINE-LE-COMTE", "minefactory": "SOFTWARE", "origin": [ { "country": "BELGIUM", "country_parcel": "Unknown", "country_domain": null, "source_weight": 0, "source_stones": 0, "known_origin": "", "minefactory": "SOFTWARE", "city": "BRAINE-LE-COMTE" } ] }, { "status": "ok", "parcelreference": "test 2", "knownorigin": "0", "parcelweight": 0, "numberofstones": 0, "country": "Unknown", "city": "BRAINE-LE-COMTE", "minefactory": "SOFTWARE", "origin": [ { "country": "BELGIUM", "country_parcel": "Unknown", "country_domain": null, "source_weight": 20, "source_stones": 0, "known_origin": "0", "minefactory": "SOFTWARE", "city": "BRAINE-LE-COMTE" } ] } ], "count": 3 } } |
| Response Codes |
200: ok E160: destination batch does not exists |
| URL | {{BASE_URL}}/transferability/v1/export_parcel_batch |
| Method | POST |
| Parameters |
istestonly, integer batchid, string exportedfields, string isshadowed, integer |
| Sample Request JSON |
{ "istestonly": "batchid":"82e7200c-ff51-45c9-bb9e-a55dc0b6a1fe", "exportedfields":"REFERENCE,KNOWN_ORIGIN,WEIGHT,NUMBER_OF_STONES,DOMAIN_COUNTRY,DOMAIN_CITY,DOMAIN_FACTORY,DOMAIN_DEPARTMENT,DOMAIN_COMPANY,DOMAIN_SECTOR DOMAIN_ITRACEIT_RATE,CUSTOM,CUSTOM_FILE,ORIGINS", "isshadowed": 0 } |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "batchid": "82e7200c-ff51-45c9-bb9e-a55dc0b6a1fe", "istestonly": false, "isshadowed": 0, "exportedfields": "REFERENCE,KNOWN_ORIGIN,WEIGHT,NUMBER_OF_STONES,DOMAIN_COUNTRY,DOMAIN_CITY,DOMAIN_FACTORY,DOMAIN_DEPARTMENT,DOMAIN_COMPANY,DOMAIN_SECTOR DOMAIN_ITRACEIT_RATE,CUSTOM,CUSTOM_FILE,ORIGINS", "export_result": { "status": "ok" } } |
| Response Codes | 200: ok |
There are two methods available for uploading documents to parcels.
In order to upload a document to your parcel using this method, you need to follow a few simple steps.
Step 1: First, use the API mentioned below to upload a base64 encoded image file.
https://docs.itraceit.io/en/API/Media#insert-media
Step 2: Then, you need to add a history record using the following API.
https://docs.itraceit.io/en/API/Parcel#insert-parcel-history
Sample Request JSON:
{
"idparceltask" : "PARCEL_TASK_PICTURE",
"parcelid" => "9ae14b60-87a5-4e20-acc9-124930379b0a",
"mediaid" => "d5f69851-f012-4a20-9002-86645bd35326",
"taskdescription" => "file attachment"
}
Using method 2, you can assign multiple documents to multiple parcels at once using the following API. In that case, you have to have the parcel ID list and media ID list. This API will link all the media to each parcel in your list.
https://docs.itraceit.io/en/API/Parcel#link-multiple-documents-to-multiple-parcels
| URL | {{BASE_URL}}/media/v1/link_to_parcel |
| Method | POST |
| Parameters |
smediaidlist, array sparcelidlist, array |
| Sample Request JSON |
{ “smediaidlist”: ["9898e22d-9001-4f82-854d-b4e825242123"], “sparcelidlist”: ["940382fe-f513-4984-ab61-ccb33db0f808","c9c5e7a8-689c-448d-80a2-3f23b244219d"] } |
| Sample Response JSON | |
| Response Codes |
E101: Rejected E111: Unable to open the C:\\location file. |
Using this API, you can retrieve a list of documents that are attached to your parcel with document details.
| URL | {{BASE_URL}}/parcel/v1/get_media_list/{sParcelID} |
| Method | GET |
| Parameters | parcelid, string |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "media": [ { "mediaid": "e1e0c3a3-989b-48ea-8e5d-9a0e9fd3434c", "mediaid_long": "ba53cc90bdb4aa187e9c8932da19a2271769f2251c10807cc19cfa2a52a36ee7", "mediafilename": "download.png", "datecreated": "2022-07-14T12:32:04.764", "datemodified": "2022-07-14T12:32:04.764", "uploadedby": "Saman ", "iduserlocal": 9, "idmediacategory": 3, "isblockchain": true, "mediacategoryname": "Miscellaneous" }, { "mediaid": "2bf358c3-77ed-47af-976b-774eebc21b6a", "mediaid_long": "7cb87804d7ab8dd3ebbe4172550a3571a2d17da819cee910f6ecd3c2c6943e38", "mediafilename": "dummy.pdf", "datecreated": "2022-07-14T12:10:21.271", "datemodified": "2022-07-14T12:11:06.677", "uploadedby": "Saman ", "iduserlocal": 9, "idmediacategory": 4, "isblockchain": true, "mediacategoryname": "Confidential Documents" } ] } |
| Response Codes |
200: ok E109: wrong token |
To associate your parcel with a parent parcel, you can use the following API.
| URL | {{BASE_URL}}/parcel/v1/set_parcel_parent |
| Method | POST |
| Parameters |
parcelid, string parcelchildid, string |
| Sample Request JSON |
{ “parcelid”: “5e0b40fc-2831-4ce6-8e04-7f4556d031d6”, “parcelchildid”: “24bff88a-4d5b-4360-8336-62620fa6e0e8” } |
| Sample Response JSON |
{ "status": "ok", "isvalid": true } |
| Response Codes |
200: ok E122: child is already a parent |
With the help of this API, you can easily obtain the parent of your parcel.
| URL | {{BASE_URL}}/parcel/v1/get_parcel_parent/{sParcelid} |
| Method | GET |
| Parameters | parcelid, string |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "parcel": { "avgweight": 10, "parcelweight": 100, "parceltype": 2, "parcelreference": "Test Parcel 07-20 3", "numberofstones": 10, "numberofchilds": 1, "parcelid": "fb33f382-e0a4-4625-8b82-9ee23270ee21", "islinkedtoparent": false, "isinfocompleted": false, "datecreated": "2022-07-20T07:47:49.060", "datemodified": "2022-07-27T07:49:57.503", "knownorigin": "", "isexported": false, "islocked": false, "minefactory": "SOFTWARE", "isindomain": true, "parcelcountry": "Belgium", "domaincountry": "" } } |
| Response Codes |
200: ok E109: wrong token |
To obtain a list of child parcels for a specific parcel, you can use this API.
| URL | {{BASE_URL}}/parcel/v1/get_parcel_childs/{sParcelid} |
| Method | GET |
| Parameters | parcelid, string |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "child": [ { "Parcel_Reference": "TEST CHILD1/1", "Parcel_Token_Short": "4e3c244d-6ad9-4215-beec-cde8705f7b21", "Average_Weight": 0, "Parcel_Weight": 0, "Total_Stones": 0, "NumberOfChilds": 0, "Parcel_Type": 2, "islocked": false, "isexported": false, "Country": "Belgium", "Parcel_Country": "Belgium", "Domain_Country": "", "Known_Origin": "BELGIUM" }, { "Parcel_Reference": "TEST CHILD1/2", "Parcel_Token_Short": "f3d7b4ee-7932-42c8-b387-5aeb77e2f5dd", "Average_Weight": 0, "Parcel_Weight": 0, "Total_Stones": 0, "NumberOfChilds": 0, "Parcel_Type": 2, "islocked": false, "isexported": false, "Country": "Belgium", "Parcel_Country": "Belgium", "Domain_Country": "", "Known_Origin": "BELGIUM" } ] } |
| Response Codes |
200: ok E109: wrong token |
With this API, you can unlink individual child parcels.
| URL | {{BASE_URL}}/parcel/v1/unlink_parcel/{sParcelid} |
| Method | GET |
| Parameters | sParcelid, string |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok" } |
| Response Codes |
200: ok E109: wrong token |
If you need to unlink multiple child parcels from your parcel, you can use this API.
| URL | {{BASE_URL}}/parcel/v2/unlink_parcel |
| Method | POST |
| Parameters | sparcelid, array |
| Sample Request JSON |
{ "sparcelid":[ 'c7743507-bdce-4788-b65a-4769f8a7b44c', 'd7743507-bdce-4788-b65a-4769f8a7poip' ] } |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "qty_to_unlink": 2, "parcel": [ { "parcelid": "c7743507-bdce-4788-b65a-4769f8a7b44c", "info": "unlink done", "status": "ok" }, { "parcelid": "d7743507-bdce-4788-b65a-4769f8a7poip", "info": "unlink done", "status": "ok" } ] } |
| Response Codes |
200: ok E128: was not linked to any parent |
You can lock a parcel using this API. Please note that you won't be able to edit your parcel until the parcel is locked. If you need to edit parcel details, you have to unlock the parcel first.
| URL | {{BASE_URL}}/parcel/v1/lock_parcel/{sParcelid} |
| Method | GET |
| Parameters | parcelid, string |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "isvalid": true } |
| Response Codes | 200: ok |
This API provides the ability to unlock a parcel.
| URL | {{BASE_URL}}/parcel/v1/unlock_parcel/{sParcelID} |
| Method | GET |
| Parameters | parcelid, string |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "isvalid": true } |
| Response Codes | 200: ok |
This API provides you with all the information about the origins of your parcel.
| URL | {{BASE_URL}}/parcel/v1/get_parcel_origins/{sParcelID} |
| Method | GET |
| Parameters | parcelid, string |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "origin": [ { "Average_Weight": 2, "Parcel_Weight": 10, "Total_Stones": 5, "Parcel_Reference": "PARENT_TEST", "Share_Stones": 1, "Share_Weight": 1, "Token_Short": "e30607fb-1793-47e9-81ad-f795911ac6d4", "Parcel_Type": 0, "Known_Origin": "canada", "Country": "BELGIUM", "Parcel_Country": "BELGIUM", "Domain_Country": "BELGIUM" }, { "Average_Weight": 8, "Parcel_Weight": 32, "Total_Stones": 4, "Parcel_Reference": "Merge_test_281123_01", "Share_Stones": 0.6666666666667, "Share_Weight": 0.5614035087719, "Token_Short": "c16bc856-5ee0-45d0-b86a-d4f813a23de4", "Parcel_Type": 0, "Known_Origin": "0", "Country": "BRAZIL", "Parcel_Country": "BRAZIL", "Domain_Country": "BELGIUM", "Mine_Factory": "Rio Tinto" } ] } |
| Response Codes | 200: ok |
This API helps you to recalculate the origins accurately.
| URL | {{BASE_URL}}/parcel/v1/recalculate_origins |
| Method | GET |
| Parameters | |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "isvalid": true } |
| Response Codes | 200: ok |
With the help of this API, you have the ability to merge several parcels into a single parcel. The target parcel should be an empty or mixed (merged) parcel and this parcel should not exported in the blockchain.
| URL | {{BASE_URL}}/parcel/v1/merge_parcels |
| Method | POST |
| Parameters |
targetparcelid, string sref, string machined, string parcel, array |
| Sample Request JSON |
{ "sref":"Merg testing 6", "targetparcelid":"56740da3-edb0-4ac4-8618-500307fbf421", "machined": "", "parcel":[ { "sToken_Short":"fe613050-0071-4e53-a365-6c000fe42ce7", "ParcelWeight":100, "Total_Stones":10, "Average_Weight":5, }, { "sToken_Short":"46aa03bd-be79-4ca2-90e5-bf7c78842672", "ParcelWeight":50, "Total_Stones":5, "Average_Weight":10, } ] } |
| Sample Response JSON |
{ "status": "ok" } |
| Response Codes |
200: ok E119: not a merge parcel |
This API provides you with a list of parcels that belong to a merged parcel.
| URL | {{BASE_URL}}/parcel/v1/get_parcel_merge_components/{sParcelID} |
| Method | GET |
| Parameters | parcelid, string |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "mergecomponent": [ { "Average_Weight": 100, "Parcel_Weight": 1000, "Total_Stones": 10, "Parcel_Reference": "TEST GUY", "Domain_Country": "", "Parcel_Country": "ARUBA", "MineFactory": "", "City": "", "Share_Stones": 0.04761904761905, "Share_Weight": 0.08333333333333, "Token_Short": "276d48d4-28ed-4cdd-840e-f8dedab9be6a", "Parcel_Type": 3, "isexported": true, "islocked": true }, { "Average_Weight": 100, "Parcel_Weight": 10000, "Total_Stones": 100, "Parcel_Reference": "NEW PARCEL 1", "Domain_Country": "", "Parcel_Country": "MIXED", "MineFactory": "", "City": "", "Share_Stones": 0.4761904761905, "Share_Weight": 0.8333333333333, "Token_Short": "1c91b3e7-bcb1-46f5-8abe-ecad4512b838", "Parcel_Type": 3, "isexported": true, "islocked": true }, { "Average_Weight": 10, "Parcel_Weight": 1000, "Total_Stones": 100, "Parcel_Reference": "TEST EXTRA FIELDS", "Domain_Country": "", "Parcel_Country": "Belgium", "MineFactory": "", "City": "", "Share_Stones": 0.4761904761905, "Share_Weight": 0.08333333333333, "Token_Short": "d40c0d8f-ddca-4a5d-92bc-fc92fa3286f6", "Parcel_Type": 2, "isexported": true, "islocked": true } ] } |
| Response Codes |
200: ok E119: not a merge parcel |
This API allows you to import a parcel from the blockchain. To do that you have to have the block chain exported parcel ID and a new empty parcel ID as the destination parcel.
| URL | {{BASE_URL}}/transferability/v1/import_parcel |
| Method | POST |
| Parameters |
sparcelid, string sparceliddest, string |
| Sample Request JSON |
{ "sparcelid":"4d645e5f-661d-4636-9eec-6a3893b3b1f3", "sparceliddest":"4613d898-1994-4de6-a395-f2749b7d22c8" } |
| Sample Response JSON |
{ "status": "ok", "isvalid": true } |
| Response Codes |
200: ok E144: token already in this domain |
This API allows you to import multiple parcels to your domain using an Excel file. To access the example Excel document format, please log in to the iTraceiT workflow and navigate to "Tools → Import Parcel".
| URL | {{BASE_URL}}/parcel/v2/upload_parcel_file |
| Method | POST |
| Parameters |
userid, string file, string applicationid, string istestonly, integer (1 - test only, 0 - not test) |
| Sample Request JSON |
{ "userid":"944e0e9c-8259-471f-873a-045d3b22b435, "file":"Base64_encoded_string", "applicationid": "16ae6484-2de3-42bc-b22d-aac8a6b9ca4f" } |
| Sample Response JSON | |
| Response Codes |
E101: Rejected E111: Unable to open the C:\\location file. E194: wrong country set : asdf E195: Mother issue : there are several parcels with same reference, cannot choose E197: Merge issue : too many stones from ref TEST APR - 8 SE - 1 E198: Merge issue : too many weight from ref TEST APR - 8 SE - 1 E199: Merge issue : duplicate source reference Ref Source 1 |
Using this API, you have the option to export a parcel to the blockchain with Extra Fields and Documents. However, you need to ensure that the files you want to export are in a category that has permission to be exported to the blockchain. Similarly, any extra fields that you need to export should also have the same permission.
Note: With isshadowed, you can export your parcel without revealing your country in the Traceability report's journey detail.
isshadowed = true → hide country in the report
| URL | {{BASE_URL}}/transferability/v1/export_parcel |
| Method | POST |
| Parameters |
parcelid, string field, array isshadowed, boolean extrafields, array (of extra field ids) files, array (of media ids) |
| Sample Request JSON |
{ "parcelid":"f3f51bc9-1a2f-4602-b102-5554be3bf360", "field":[ { "fieldid":1, "fieldname":"REFERENCE", "fieldtype":3, "fieldvalue":"PARENT_TEST_EXPORTED" }, { "fieldid":2, "fieldname":"KNOWN_ORIGIN", "fieldtype":3, "fieldvalue":"" }, { "fieldid":3, "fieldname":"WEIGHT", "fieldtype":2, "fieldvalue":10.000 }, { "fieldid":4, "fieldname":"NUMBER_OF_STONES", "fieldtype":1, "fieldvalue":10 }, { "fieldid":5, "fieldname":"DOMAIN_COUNTRY", "fieldtype":3, "fieldvalue":"South Africa" }, { "fieldid":6, "fieldname":"DOMAIN_CITY", "fieldtype":3, "fieldvalue":"" }, { "fieldid":7, "fieldname":"DOMAIN_FACTORY", "fieldtype":3, "fieldvalue":"" }, { "fieldid":8, "fieldname":"DOMAIN_DEPARTMENT", "fieldtype":3, "fieldvalue":"" }, { "fieldid":9, "fieldname":"DOMAIN_COMPANY", "fieldtype":3, "fieldvalue":"" }, { "fieldid":10, "fieldname":"DOMAIN_SECTOR", "fieldtype":3, "fieldvalue":"" } ] "isshadowed": false, "extrafields": [415,417], "files": [ "2bf358c3-77ed-47af-976b-774eebc21b6a", "e1e0c3a3-989b-48ea-8e5d-9a0e9fd3434c" ] } |
| Sample Response JSON |
{ "status": "ok", "isvalid": true } |
| Response Codes | 200: ok |
| URL | {{BASE_URL}}/transferability/v2/export_parcel |
| Method | POST |
| Parameters |
parcelid, string exportedfields, array isshadowed, boolean |
| Sample Request JSON |
{ "parcelid":"84187a73-9589-40b4-ac2a-a7503fa0abdf", "exportedfields": "REFERENCE,KNOWN_ORIGIN,WEIGHT,NUMBER_OF_STONES,DOMAIN_COUNTRY,DOMAIN_CITY,DOMAIN_FACTORY, DOMAIN_DEPARTMENT,DOMAIN_COMPANY,DOMAIN_SECTOR,DOMAIN_ITRACEIT_RATE,CUSTOM, CUSTOM_FILE,ORIGINS", "isshadowed": 0, "extrafields":"281474976710994,281474976710995", "files":"30bba67b-6139-4ff0-aadd-27a11f39b8f5" } |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "export_result": { "status": "ok" } } |
| Response Codes | 200: ok |
You can get the list of parcel traceability using this API
| URL | {{BASE_URL}}/parcel/v1/get_parceltraceability/{parcelid} |
| Method | GET |
| Parameters | parcelid, string |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "tablistofparcels": [ { "sParcel_ref": "Test Parcel", "sParcel_stoken_short": "f4dcd10b-6207-41bc-905d-e05b6e520ff1", "rparcel_weight": 10, "rParcel_weight_avg": 0, "nParcel_NumberOfStones": 0, "tabParcel_parents": [], "tabParcel_childs": [ "3caf581b-a338-4ffb-9203-3f86c61f4cc4" ], "nParcel_Type": 2, "bParcel_islocked": false, "bParcel_isexported": false }, { "sParcel_ref": "Test Parcel/1", "sParcel_stoken_short": "3caf581b-a338-4ffb-9203-3f86c61f4cc4", "rparcel_weight": 10, "rParcel_weight_avg": 0, "nParcel_NumberOfStones": 0, "tabParcel_parents": [], "tabParcel_childs": [], "nParcel_Type": 2, "bParcel_islocked": false, "bParcel_isexported": false } ] } |
| Response Codes | 200: ok |
You can use this API to generate a traceability report for a blockchain-exported parcel as a PDF in base64 format. And it will provide you with additional details about the parcel in the response.
| URL | {{BASE_URL}}/transferability/v2/get_public_traceability/{sData} |
| Method | GET |
| Parameters | sData, string (parcelId) |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "ledger": [ { "transfer_date": "20230417102946", "blockchainid": "719d8a5f99b7158ac92ae2afb44e6d3614daa38913c1a3d8b6e22bfa6f04a074", "parcelid": "c5c2e3a9-ff44-4632-8406-76b59bc4a142" } ], "ledger_fields": [ { "REQ_GET_LEDGER_FIELDS_FROM_TOKENGLOBAL": [ { "IDLedger_Field_Value": 15397, "IDLedger_Field": 1, IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "Test Exported 2", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "REFERENCE", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "REFERENCE", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15398, "IDLedger_Field": 2, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "0", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "KNOWN_ORIGIN", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "KNOWN_ORIGIN", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15399, "IDLedger_Field": 3, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "", "Value_Int": 0, "Value_Real": 15, "IDMediaGlobal": 0, "Field_Name": "WEIGHT", "Field_Type": 2, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "WEIGHT", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15400, "IDLedger_Field": 4, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "", "Value_Int": 5, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "NUMBER_OF_STONES", "Field_Type": 1, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "NUMBER_OF_STONES", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15401, "IDLedger_Field": 5, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "DTC", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_COUNTRY", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "DOMAIN_COUNTRY", "MediaFileName": null, "IDMediaGlobal_Me": }, { "IDLedger_Field_Value": 15402, "IDLedger_Field": 6, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_CITY", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "DOMAIN_CITY", "MediaFileName": , "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15403, "IDLedger_Field": 7, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_FACTORY", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "DOMAIN_FACTORY", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15404, "IDLedger_Field": 8, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_DEPARTMENT", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": , "Field_Code": "DOMAIN_DEPARTMENT", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15405, "IDLedger_Field": 9, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "0", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_COMPANY", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": false, "Field_Code": "DOMAIN_COMPANY", "MediaFileName": null, "IDMediaGlobal_Me": }, { "IDLedger_Field_Value": 15406, "IDLedger_Field": 10, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_SECTOR", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": false, "Field_Code": "DOMAIN_SECTOR", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15407, "IDLedger_Field": 14, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "{ \"origin\":[ { \"Average_Weight\":3, \"Parcel_Weight\":15, \"Total_Stones\":5, \"Parcel_Reference\":\"Test Exported 2\", \"Share_Stones\":1, \"Share_Weight\":1, \"Token_Short\":\"c5c2e3a9-ff44-4632-8406-76b59bc4a142\", \"Parcel_Type\":0, \"Known_Origin\":\"\", \"Country\":\"DTC\", \"MineFactory\":\"\" } ] }", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "ORIGINS", "Field_Type": 5, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "ORIGINS", "MediaFileName": null, "IDMediaGlobal_Me": } ] } ], "origin": { "REQ_GET_TRANSFERABILITY_ORIGINS_BY_IDTOKENGLOBAL": [ { "IDTransferability_Origin": 1219, "IDTokenGlobal": 67515, "IsDeleted": false, "Date_Created": "2023-04-17T08:34:00.256", "Date_Modification": "2023-04-17T08:34:00.256", "Source_Stones": 5, "Source_Weight": 15, "Country": "DTC", "IDCountry": 0, City": "BRAINE-LE-COMTE", "MineFactory": "", "iTraceiT_Rating": 0, "Known_Origin": "", "Source_Reference": "" } ] }, "itraceit_certificate": “Base 64 string of the PDF file” } |
| Response Codes |
200: ok E109: wrong token E145: system error : token not existing globally (Not exported parcel ID) |
| URL | {{BASE_URL}}/transferability/v3/get_public_traceability |
| Method | POST |
| Parameters |
sparcelid, string nreporttype, integer |
| Sample Request JSON |
{ "sparcelid":"c5c2e3a9-ff44-4632-8406-76b59bc4a142", "nreporttype": 1 }; |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "ledger": [ { "ntokenparent": 0, "transfer_date": "20230417102946", "blockchainid": "719d8a5f99b7158ac92ae2afb44e6d3614daa38913c1a3d8b6e22bfa6f04a074", "parcelid": "c5c2e3a9-ff44-4632-8406-76b59bc4a142", "linktype": "", "extra_fields": { "REQ_GET_LEDGER_FIELDS_FROM_TOKENGLOBAL": [ { "IDLedger_Field_Value": 15397, "IDLedger_Field": 1, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "Test Exported 2", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "REFERENCE", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "REFERENCE", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15398, "IDLedger_Field": 2, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "0", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "KNOWN_ORIGIN", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "KNOWN_ORIGIN", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15399, "IDLedger_Field": 3, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "", "Value_Int": 0, "Value_Real": 15, "IDMediaGlobal": 0, "Field_Name": "WEIGHT", "Field_Type": 2, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "WEIGHT", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15400, "IDLedger_Field": 4, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "", "Value_Int": 5, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "NUMBER_OF_STONES", "Field_Type": 1, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "NUMBER_OF_STONES", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15401, "IDLedger_Field": 5, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "DTC", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_COUNTRY", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "DOMAIN_COUNTRY", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15402, "IDLedger_Field": 6, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_CITY", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "DOMAIN_CITY", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15403, "IDLedger_Field": 7, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_FACTORY", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "DOMAIN_FACTORY", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15404, "IDLedger_Field": 8, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_DEPARTMENT", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": false, "Field_Code": "DOMAIN_DEPARTMENT", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15405, "IDLedger_Field": 9, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "0", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_COMPANY", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": false, "Field_Code": "DOMAIN_COMPANY", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15406, "IDLedger_Field": 10, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_SECTOR", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": false, "Field_Code": "DOMAIN_SECTOR", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15407, "IDLedger_Field": 14, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "{ \"origin\":[ { \"Average_Weight\":3, \"Parcel_Weight\":15, \"Total_Stones\":5, \"Parcel_Reference\":\"Test Exported 2\", \"Share_Stones\":1, \"Share_Weight\":1, \"Token_Short\":\"c5c2e3a9-ff44-4632-8406-76b59bc4a142\", \"Parcel_Type\":0, \"Known_Origin\":\"\", \"Country\":\"DTC\", \"MineFactory\":\"\" } ] }", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "ORIGINS", "Field_Type": 5, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "ORIGINS", "MediaFileName": null, "IDMediaGlobal_Me": null } ] }, "domaincountry": "DTC", "domainsector": "" } ], "ledger_fields": [ { "REQ_GET_LEDGER_FIELDS_FROM_TOKENGLOBAL": [ { "IDLedger_Field_Value": 15397, "IDLedger_Field": 1, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "Test Exported 2", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "REFERENCE", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "REFERENCE", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15398, "IDLedger_Field": 2, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "0", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "KNOWN_ORIGIN", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "KNOWN_ORIGIN", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15399, "IDLedger_Field": 3, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "", "Value_Int": 0, "Value_Real": 15, "IDMediaGlobal": 0, "Field_Name": "WEIGHT", "Field_Type": 2, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "WEIGHT", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15400, "IDLedger_Field": 4, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "", "Value_Int": 5, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "NUMBER_OF_STONES", "Field_Type": 1, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "NUMBER_OF_STONES", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15401, "IDLedger_Field": 5, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "DTC", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_COUNTRY", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "DOMAIN_COUNTRY", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15402, "IDLedger_Field": 6, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_CITY", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "DOMAIN_CITY", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15403, "IDLedger_Field": 7, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_FACTORY", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "DOMAIN_FACTORY", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15404, "IDLedger_Field": 8, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_DEPARTMENT", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": false, "Field_Code": "DOMAIN_DEPARTMENT", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15405, "IDLedger_Field": 9, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "0", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_COMPANY", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": false, "Field_Code": "DOMAIN_COMPANY", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15406, "IDLedger_Field": 10, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "DOMAIN_SECTOR", "Field_Type": 3, "IsActive": true, "IsDeleted": false, "IsUsedForImport": false, "Field_Code": "DOMAIN_SECTOR", "MediaFileName": null, "IDMediaGlobal_Me": null }, { "IDLedger_Field_Value": 15407, "IDLedger_Field": 14, "IDTokenGlobal": 67515, "Value_Date": "0000-00-00T00:00:00.000", "Value_String": "", "Value_Memo": "{ \"origin\":[ { \"Average_Weight\":3, \"Parcel_Weight\":15, \"Total_Stones\":5, \"Parcel_Reference\":\"Test Exported 2\", \"Share_Stones\":1, \"Share_Weight\":1, \"Token_Short\":\"c5c2e3a9-ff44-4632-8406-76b59bc4a142\", \"Parcel_Type\":0, \"Known_Origin\":\"\", \"Country\":\"DTC\", \"MineFactory\":\"\" } ] }", "Value_Int": 0, "Value_Real": 0, "IDMediaGlobal": 0, "Field_Name": "ORIGINS", "Field_Type": 5, "IsActive": true, "IsDeleted": false, "IsUsedForImport": true, "Field_Code": "ORIGINS", "MediaFileName": null, "IDMediaGlobal_Me": null } ] } ], "journeys": { "journey": [ "67515 " ] }, "itraceit_certificate":"Base 64 string of the PDF file" } |
| Response Codes |
200: ok E109: wrong token |
| Note |
nreporttype = 0 ==> certificate in base64 format, product journey, summary, origin nreporttype = 1 ==> certificate in base64 format nreporttype = 3 ==> only ledger fields and ledger nreporttype = 2 ==>product journey, summary, origin |
You can use this API to get the history of the given parcel.
| URL | {{BASE_URL}}/parcel/v1/get_parcel_history/{sParcelID} |
| Method | GET |
| Parameters | sParcelid, string |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "history": [ { "IDTask": 21, "Action": "EXPORT_BLOCKCHAIN", "Action_Date": "2022-07-14T16:08:51.190", "Action_Description": "exported 0 fields - Price,Qualité,dummy.pdf,downlo", "User_LastName": "", "User_FirstName": "Saman", "User_Department": "", "Userid": "944e0e9c-8259-471f-873a-045d3b22b435", "UserCardID": "", "Average_Weight": 0, "Parcel_Weight": 0, "Total_Stones": 0, "Mediaid": "00000000-0000-0000-0000-000000000000", "Parcel_Reference": "", "Machine_Name": "", "smachineid": "00000000-0000-0000-0000-000000000000" }, { "IDTask": 21, "Action": "EXPORT_BLOCKCHAIN", "Action_Date": "2022-07-14T12:41:49.560", "Action_Description": "exported 10 fields - REFERENCE,KNOWN_ORIGIN,WEIGHT", "User_LastName": "", "User_FirstName": "Saman", "User_Department": "", "Userid": "944e0e9c-8259-471f-873a-045d3b22b435", "UserCardID": "", "Average_Weight": 0, "Parcel_Weight": 0, "Total_Stones": 0, "Mediaid": "00000000-0000-0000-0000-000000000000", "Parcel_Reference": "", "Machine_Name": "", "smachineid": "00000000-0000-0000-0000-000000000000" }, { "IDTask": 15, "Action": "PICTURE", "Action_Date": "2022-07-14T12:32:05.060", "Action_Description": "file attachment", "User_LastName": "", "User_FirstName": "Saman", "User_Department": "", "Userid": "944e0e9c-8259-471f-873a-045d3b22b435", "UserCardID": "", "Average_Weight": 0, "Parcel_Weight": 0, "Total_Stones": 0, "Mediaid": "e1e0c3a3-989b-48ea-8e5d-9a0e9fd3434c", "Parcel_Reference": "0", "Machine_Name": "", "smachineid": "00000000-0000-0000-0000-000000000000" }, { "IDTask": 15, "Action": "PICTURE", "Action_Date": "2022-07-14T12:10:21.550", "Action_Description": "file attachment", "User_LastName": "", "User_FirstName": "Saman", "User_Department": "", "Userid": "944e0e9c-8259-471f-873a-045d3b22b435", "UserCardID": "", "Average_Weight": 0, "Parcel_Weight": 0, "Total_Stones": 0, "Mediaid": "2bf358c3-77ed-47af-976b-774eebc21b6a", "Parcel_Reference": "0", "Machine_Name": "", "smachineid": "00000000-0000-0000-0000-000000000000" }, { "IDTask": 11, "Action": "NEW CHILD", "Action_Date": "2022-07-14T09:18:45.400", "Action_Description": "new child : 688f2159-eb2d-4854-a1cf-ba4eecd9cb08", "User_LastName": "", "User_FirstName": "Saman", "User_Department": "", "Userid": "944e0e9c-8259-471f-873a-045d3b22b435", "UserCardID": "", "Average_Weight": 0, "Parcel_Weight": 0, "Total_Stones": 0, "Mediaid": "00000000-0000-0000-0000-000000000000", "Parcel_Reference": "", "Machine_Name": "", "smachineid": "00000000-0000-0000-0000-000000000000" }, { "IDTask": 13, "Action": "EVALUATING", "Action_Date": "2022-07-14T09:16:03.660", "Action_Description": "update 5St. / 10 Ct.", "User_LastName": "", "User_FirstName": "Saman", "User_Department": "", "Userid": "944e0e9c-8259-471f-873a-045d3b22b435", "UserCardID": "", "Average_Weight": 2, "Parcel_Weight": 10, "Total_Stones": 5, "Mediaid": "00000000-0000-0000-0000-000000000000", "Parcel_Reference": "0", "Machine_Name": "", "smachineid": "00000000-0000-0000-0000-000000000000" }, { "IDTask": 13, "Action": "EVALUATING", "Action_Date": "2022-07-14T09:16:03.320", "Action_Description": "metrics update - set know origin to canada", "User_LastName": "", "User_FirstName": "Saman", "User_Department": "", "Userid": "944e0e9c-8259-471f-873a-045d3b22b435", "UserCardID": "", "Average_Weight": 2, "Parcel_Weight": 10, "Total_Stones": 5, "Mediaid": "00000000-0000-0000-0000-000000000000", "Parcel_Reference": "PARENT_TEST", "Machine_Name": "", "smachineid": "00000000-0000-0000-0000-000000000000" }, { "IDTask": 1, "Action": "CREATE", "Action_Date": "2022-07-14T09:15:15.260", "Action_Description": "", "User_LastName": "", "User_FirstName": "Saman", "User_Department": "", "Userid": "944e0e9c-8259-471f-873a-045d3b22b435", "UserCardID": "", "Average_Weight": 0, "Parcel_Weight": 0, "Total_Stones": 0, "Mediaid": "00000000-0000-0000-0000-000000000000", "Parcel_Reference": "", "Machine_Name": "", "smachineid": "00000000-0000-0000-0000-000000000000" } ] } |
| Response Codes |
200: ok E109: wrong token |
You can use this API to insert a history record for a given parcel. You need to log a history record when uploading a document to a parcel. Please check the following link for more information.
https://docs.itraceit.io/en/API/Parcel#upload-documents-to-your-parcel
| URL | {{BASE_URL}}/parcel/v1/insert_parcel_history |
| Method | POST |
| Parameters |
idparceltask, integer avgweight, real parcelweight, real numberofstones, integer parcelref, string parcelid, string mediaid, string geolocation_X, number geolocation_Y, number geolocation_Z, number taskdescription, string workingdepartment, string workingunit, string personname, string workingpersonname, string machinename, string |
| Sample Request JSON |
{ "idparceltask":1, "avgweight":"", "parcelweight":"", "numberofstones":10, "parcelref":"Test", "parcelid":"pf16bcf42-e7be-48b9-981b-bd53086967b1", "mediaid":"", "geolocation_X":"", "geolocation_Y":"", "geolocation_Z":"", "taskdescription":"", "workingdepartment":"", "workingunit":"", "personname":"", "workingpersonname":"", "machinename":"", } |
| Sample Response JSON |
{ "status": "ok", "isvalid": true } |
| Response Codes | 200: ok |
| URL | {{BASE_URL}}/parcel/v1/set_parcel_action |
| Method | POST |
| Parameters |
geolocation_X, string geolocation_Y, string geolocation_Z, string task, string idparcel_Task, string parcelid, string machineid, string |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "isvalid": true } |
| Response Codes | 200: ok |
| URL | {{BASE_URL}}/parcel/v1/get_parcel_stats |
| Method | GET |
| Parameters | |
| Sample Request JSON | |
| Sample Response JSON |
{ "status": "ok", "isvalid": true, "domid": "d7e19951-6990-402e-a1f3-357bd375ee61", "parcel_stats": [ { "nparcelcount": 57, "rparcelweight": 21325.335, "nparcelstones": 28982, "nparceltype": 3, "avgweight": 0.735813090884 }, { "nparcelcount": 8781, "rparcelweight": 66579.63682, "nparcelstones": 36249, "nparceltype": 2, "avgweight": 1.836730304836 } ], "parcelcount": 8838, "rtotalweight": 87904.97182, "ntotalstones": 65231 } |
| Response Codes | 200: ok |