Create parcels with origins
You can create multiple parcels with multiple origins and assign it in a group at once using this API
| URL | /parcel/v1/init_parcel_with_origins |
| Method | POST |
| Parameters |
parcelreference, string parcelweight, number numberofstones, string country, string minefactory, string knownorigin, string (You can use this to add "Mine") 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": "Canada", "minefactory": "Rio Tinto", "knownorigin": "Diavik", "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": "Karowe", "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 |