Searching For, and Exporting, Cargo Data
The Search Request API will return a cargoID, barcode, and scanDate based on an inputted search parameter. The search parameter can be a barcode, a date from, a date to, a machine name, or any combination of them.
Cargo Spectre date format
Dates must be specified in ISO 8601 format (yyyy-mm-ddT00:00:00) with at least a date (but optionally a time as well), e.g. February 1, 2022 at 2PM (1400) would be 2022-02-01T14:00:00.
Cargo sort
Results are returned from newest to oldest. Older cargo will have a CargoId
of type int
that is smaller than newer cargo. For example, for CargoId
100 vs 99, 100 will be the newer one and will be returned first.
HTTPS required
The cloud server is separate from Spectre Dimensioner API calls and uses a different endpoint. Please note that for security, the endpoint MUST be HTTPS and not HTTP.
<Api/Cargo/Search>
Request
The search API returns at most 60 items per response to keep server load manageable. For that reason, the API can accept a "last ID received" parameter LastCargoID
to return unique results on the next request. This parameter should be the oldest (smallest) cargoID received from the last search response. One can keep querying the server for this information until the server returns a null in the search results (or, equivalently, an error of "End of results list").
- POST
- GET
Endpoint
Body
- JSON
- XML
{
"email": "fake@company.com",
"password": "FakePassword123!",
"barcode": "12341234",
"dateFrom": "2022-03-01",
"dateTo": "2023-01-01T03:23:10",
"machineName": "TestMachine"
}
Unsupported
This body type is unsupported for this API command.
Unsupported
This request is unsupported for this API command.
Response with Results Returned
- JSON
- XML
{
"searchResults": [
{
"barcode": "12341234",
"cargoID": 11111,
"scanDate": "yyyy-mm-ddT12:00:00",
"machineName": "Laptop1"
},
{
"barcode": "12345",
"cargoID": 11110,
"scanDate": "yyyy-mm-ddT00:00:00",
"machineName": "TestComputer-1"
}
],
"error": null
}
Unsupported
This body type is unsupported for this API command.
Response with No Results
Compare the below response example to the above, with two returned results where the oldest (smallest) cargoID was 11110, to the response shown below. If 11110 is the last ID that meets the search constraints, and a subsequent search with "lastCargoID":"11110"
is performed, a result of "null" and "End of results list" will be received. If there are older cargo items than 11110, they will be returned instead, again up to a count of 60. The process can then be repeated with the new lastCargoID
received.
- JSON
- XML
{
"searchResults": null,
"error": "End of results list"
}
Unsupported
This body type is unsupported for this API command.
<Api/Cargo/Export>
The Export Cargo API will return the entire set of data about a piece of cargo. A cargo can only be retrieved by knowing its cargoID (as returned in the search API).
Parameters
The api/cargo/export
endpoint can take optional parameters.
- IncludeShareLink
IncludeShareLink will include a share GUID that can be appended to https://spectre-licensing.com/Cargo/Shared/
to provide no-authentication access to that specific scan. The share GUID will be created if one does not exist, or the existing one will be sent if one already exists.
Type: Bool
Default: none
Request
- POST
- GET
Response
The response will have the same format as data returned by performing a Dimension+Snapshot
command via the Spectre Dimensioner API. However, it will also have Custom Fields associated with the cargo's Cloud data.
Retrieving files
Pictures, PDFs, and other files associated with the cargo record can be retrieved by sending a GET to https://cargospectre.blob.core.windows.net/scans/ as in the response comments below.
- JSON
- XML
- CSV
{
"responses": {
"dimension": {
"code": 0, // Number - Anything besides 0 indicates an error has occurred
"info": {
"cargoID": 43286, // Number - Internal Cargo Spectre ID
"name": "", // String - Optional cargo name
"barcode": "FAKEBARCODE123", // String
"comments": "Comments are optional and can be left blank.", // String
"scanDate": "2018-11-16T03:49:18", // String - UTC time in ISO format
"machineName": "Laptop", // String - Human readable name of the Spectre machine that authored the data
"scanGuid": "3a75b02a-9300-4ba4-a117-87869dc14e9a", // String - This may be used in future sharing scenarios
"dimensions": {
"length": 0.81, // Number
"width": 0.54, // Number
"height": 0.55, // Number
"volume": 0.247132, // Number
"density": 305.504750, // Number
"weight": {
"net": 75.5, // Number
"gross": 76.5, // Number
"tare": 1.5 // Number
},
},
"units": {
"length": "meters", // String - Applies to Length, Width, and Height
"volume": "cubic meters", // String - Applies to Volume
"weight": "lb", // String - Applies to Net, Gross, and Tare
"density": "lb/cubic meters" // String - Applies to Net, Gross, and Tare
},
"customFields": { // Optional custom fields that your organization can configure will show up here
"Is Damaged": true,
"Piece Count": 3,
"Destination": "LAX",
}
}
},
"snapshot": {
"code": 0, // Number - Anything besides 0 indicates an error has occurred
"directory": { // All path values are relative to: https://cargospectre.blob.core.windows.net/scans/
"clouds": {
"path": [ // Array of strings - Point cloud 3D models of the scene
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\combined-raw.pcd",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\box.pcd"
]
},
"images":{
"path": [ // Array of strings - Images of the cargo
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-0.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-0-marked.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-1.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-1-marked.jpg"
]
},
"thumbnails": {
"path": [ // Array of strings - Same as the images above just smaller (for faster loading if needed)
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\thumbnail\\cameraName-0.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\thumbnail\\cameraName-0-marked.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\thumbnail\\cameraName-1.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\thumbnail\\cameraName-1-marked.jpg"
]
},
"misc": {
"path": [ // Array of strings - Freight reports or other cargo documents
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\Freight-Report.pdf"
]
}
}
}
}
}
Unsupported
This body type is unsupported for this API command.
Unsupported
This body type is unsupported for this API command.
Request with ShareGuid
- POST
- GET
Response with ShareGuid
The response will have the same format as data returned by performing a Dimension+Snapshot
command via the Spectre Dimensioner API. However, it will also have Custom Fields associated with the cargo's Cloud data.
Retrieving files
Pictures, PDFs, and other files associated with the cargo record can be retrieved by sending a GET to https://cargospectre.blob.core.windows.net/scans/ as in the response comments below.
- JSON
- XML
- CSV
{
"responses": {
"dimension": {
"code": 0, // Number - Anything besides 0 indicates an error has occurred
"info": {
"cargoID": 43286, // Number - Internal Cargo Spectre ID
"name": "", // String - Optional cargo name
"barcode": "FAKEBARCODE123", // String
"comments": "Comments are optional and can be left blank.", // String
"scanDate": "2018-11-16T03:49:18", // String - UTC time in ISO format
"machineName": "Laptop", // String - Human readable name of the Spectre machine that authored the data
"scanGuid": "3a75b02a-9300-4ba4-a117-87869dc14e9a", // String
"shareGuid": "20060ff1-427b-419d-be81-72a18d4e98b5", // String
"dimensions": {
"length": 0.81, // Number
"width": 0.54, // Number
"height": 0.55, // Number
"volume": 0.247132, // Number
"density": 305.504750, // Number
"weight": {
"net": 75.5, // Number
"gross": 76.5, // Number
"tare": 1.5 // Number
},
},
"units": {
"length": "meters", // String - Applies to Length, Width, and Height
"volume": "cubic meters", // String - Applies to Volume
"weight": "lb", // String - Applies to Net, Gross, and Tare
"density": "lb/cubic meters" // String - Applies to Net, Gross, and Tare
},
"customFields": { // Optional custom fields that your organization can configure will show up here
"Is Damaged": true,
"Piece Count": 3,
"Destination": "LAX",
}
}
},
"snapshot": {
"code": 0, // Number - Anything besides 0 indicates an error has occurred
"directory": { // All path values are relative to: https://cargospectre.blob.core.windows.net/scans/
"clouds": {
"path": [ // Array of strings - Point cloud 3D models of the scene
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\combined-raw.pcd",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\box.pcd"
]
},
"images":{
"path": [ // Array of strings - Images of the cargo
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-0.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-0-marked.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-1.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-1-marked.jpg"
]
},
"thumbnails": {
"path": [ // Array of strings - Same as the images above just smaller (for faster loading if needed)
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\thumbnail\\cameraName-0.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\thumbnail\\cameraName-0-marked.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\thumbnail\\cameraName-1.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\thumbnail\\cameraName-1-marked.jpg"
]
},
"misc": {
"path": [ // Array of strings - Freight reports or other cargo documents
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\Freight-Report.pdf"
]
}
}
}
}
}
Unsupported
This body type is unsupported for this API command.
Unsupported
This body type is unsupported for this API command.
Receiving Exports from the Web GUI
Single Export
Cargo Spectre users can export cargo data from the cloud using the Cloud API or the Export feature on the website itself. There are three ways to export cargo data:
- As cargo is scanned (from the remote control page)
- From the cargo details page
- From the cargo export API in the previous section
In order to export from the cloud website via the user interface, you will need to provide a URL endpoint that accepts HTTP POST requests. Cargo Spectre users have the ability to set a different URL for each Cargo Spectre device, so you may want to have a few different URL paths. For example:
EXPORTED FROM | URL |
---|---|
Customer 1, Machine A | https://my-company-name.com/customer-1/machine-A |
Customer 1, Machine B | https://my-company-name.com/customer-1/machine-B |
Customer 2, Machine A | https://my-company-name.com/customer-2/machine-A |
The exported data will take the JSON form by default, although there are other export formats available to users as well.
The following formats are standard, however some custom formats also exist for specific WMS, TMS, or ERP systems.
- JSON
- XML
- CSV
- BatchJSON
{
"responses": {
"dimension": {
"code": 0, // Number - Anything besides 0 indicates an error has occurred
"info": {
"cargoID": 43286, // Number - Internal Cargo Spectre ID
"name": "", // String - Optional cargo name
"barcode": "FAKEBARCODE123", // String
"comments": "Comments are optional and can be left blank.", // String
"scanDate": "2018-11-16T03:49:18", // String - UTC time in ISO format
"machineName": "Laptop", // String - Human readable name of the Spectre machine that authored the data
"scanGuid": "3a75b02a-9300-4ba4-a117-87869dc14e9a", // String - This may be used in future sharing scenarios
"dimensions": {
"length": 0.81, // Number
"width": 0.54, // Number
"height": 0.55, // Number
"volume": 0.247132, // Number
"density": 305.504750, // Number
"weight": {
"net": 75.5, // Number
"gross": 76.5, // Number
"tare": 1.5 // Number
},
},
"units": {
"length": "meters", // String - Applies to Length, Width, and Height
"volume": "cubic meters", // String - Applies to Volume
"weight": "lb", // String - Applies to Net, Gross, and Tare
"density": "lb/cubic meters" // String - Applies to Net, Gross, and Tare
},
"customFields": { // Optional custom fields that your organization can configure will show up here
"Is Damaged": true,
"Piece Count": 3,
"Destination": "LAX",
}
}
},
"snapshot": {
"code": 0, // Number - Anything besides 0 indicates an error has occurred
"directory": { // All path values are relative to: https://cargospectre.blob.core.windows.net/scans/
"clouds": {
"path": [ // Array of strings - Point cloud 3D models of the scene
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\combined-raw.pcd",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\box.pcd"
]
},
"images":{
"path": [ // Array of strings - Images of the cargo
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-0.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-0-marked.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-1.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-1-marked.jpg"
]
},
"thumbnails": {
"path": [ // Array of strings - Same as the images above just smaller (for faster loading if needed)
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\thumbnail\\cameraName-0.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\thumbnail\\cameraName-0-marked.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\thumbnail\\cameraName-1.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\thumbnail\\cameraName-1-marked.jpg"
]
},
"misc": {
"path": [ // Array of strings - Freight reports or other cargo documents
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\Freight-Report.pdf"
]
}
}
}
}
}
<Responses>
<Dimension code="0">
<Info>
<CargoID>43286</CargoID>
<Name/>
<Barcode>FAKEBARCODE123</Barcode>
<ScanDate>2018-11-16T03:49:18</ScanDate>
<MachineName>Laptop</MachineName>
<ScanGuid>3a75b02a-9300-4ba4-a117-87869dc14e9a</ScanGuid>
<Dimensions>
<Length>0.81</Length>
<Width>0.54</Width>
<Height>0.55</Height>
<Volume>0.247132</Volume>
<Weight>
<Net>75.5</Net>
<Gross>76.5</Gross>
<Tare>1.5</Tare>
</Weight>
<Density>305.504750</Density>
</Dimensions>
<Units>
<Length>meters</Length>
<Volume>cubic meters</Volume>
<Weight>lb</Weight>
<Density>lb/cubic meters</Density>
</Units>
<CustomFields>
<IsDamaged>true</IsDamaged>
<PieceCount>3</PieceCount>
<Destination>LAX</Destination>
</CustomFields>
<Scanner>
<Mode/>
</Scanner>
</Info>
</Dimension>
<Snapshot code="0">
<Directory>
<Misc>
<Path>fake@shipper.com/f2222139-ca9a-4c4a-8f44-e144455f0721/Freight-Report.pdf</Path>
</Misc>
<Clouds>
<Path>fake@shipper.com/f2222139-ca9a-4c4a-8f44-e144455f0721/box.pcd</Path>
<Path>fake@shipper.com/f2222139-ca9a-4c4a-8f44-e144455f0721/combined-raw.pcd</Path>
</Clouds>
<Images>
<Path>fake@shipper.com/f2222139-ca9a-4c4a-8f44-e144455f0721/cameraName-0.jpg</Path>
<Path>fake@shipper.com/f2222139-ca9a-4c4a-8f44-e144455f0721/cameraName-0-marked.jpg</Path>
<Path>fake@shipper.com/f2222139-ca9a-4c4a-8f44-e144455f0721/cameraName-1.jpg</Path>
<Path>fake@shipper.com/f2222139-ca9a-4c4a-8f44-e144455f0721/cameraName-1-marked.jpg</Path>
</Images>
<Thumbnails>
<Path>fake@shipper.com/f2222139-ca9a-4c4a-8f44-e144455f0721/thumbnail/cameraName-0.jpg</Path>
<Path>fake@shipper.com/f2222139-ca9a-4c4a-8f44-e144455f0721/thumbnail/cameraName-0-marked.jpg</Path>
<Path>fake@shipper.com/f2222139-ca9a-4c4a-8f44-e144455f0721/thumbnail/cameraName-1.jpg</Path>
<Path>fake@shipper.com/f2222139-ca9a-4c4a-8f44-e144455f0721/thumbnail/cameraName-1-marked.jpg</Path>
</Thumbnails>
</Directory>
</Snapshot>
</Responses>
cargoID,name,barcode,comments,scanDate,machineName,scanGuid,length,width,height,volume,density,netWeight,lengthUnit,volumeUnit,weightUnit,densityUnit,"Is Damaged","Piece Count","Destination",images,pointClouds,miscFiles
43286,"",FAKEBARCODE123,"Comments are optional and can be left blank.",11/16/2018 03:49:18 AM,"Laptop",,0.81,0.54,0.55,0.247132,305.504750,75.5,Meters,CubicMeters,Pounds,PoundsPerCubicMeters,"true","1","LAX","fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-0.jpg;fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-0-marked.jpg;fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-1.jpg;fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-1-marked.jpg","fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\combined-raw.pcd;fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\box.pcd","fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\Freight-Report.pdf"
This schema mimics the Batch Export schema to allow a consistency between formats.
{
"cargoResponses": [
{
"responses": {
"dimension": {
"code": 0, // Number - Anything besides 0 indicates an error has occurred
"info": {
"cargoID": 43286, // Number - Internal Cargo Spectre ID
"name": "", // String - Optional cargo name
"barcode": "FAKEBARCODE123", // String
"comments": "Comments are optional and can be left blank.", // String
"scanDate": "2018-11-16T03:49:18", // String - UTC time in ISO format
"machineName": "Laptop", // String - Human readable name of the Spectre machine that authored the data
"scanGuid": "3a75b02a-9300-4ba4-a117-87869dc14e9a", // String - This may be used in future sharing scenarios
"dimensions": {
"length": 0.81, // Number
"width": 0.54, // Number
"height": 0.55, // Number
"volume": 0.247132, // Number
"density": 305.504750, // Number
"weight": {
"net": 75.5, // Number
"gross": 76.5, // Number
"tare": 1.5 // Number
},
},
"units": {
"length": "meters", // String - Applies to Length, Width, and Height
"volume": "cubic meters", // String - Applies to Volume
"weight": "lb", // String - Applies to Net, Gross, and Tare
"density": "lb/cubic meters" // String - Applies to Net, Gross, and Tare
},
"customFields": { // Optional custom fields that your organization can configure will show up here
"Is Damaged": true,
"Piece Count": 3,
"Destination": "LAX",
}
}
},
"snapshot": {
"code": 0, // Number - Anything besides 0 indicates an error has occurred
"directory": { // All path values are relative to: https://cargospectre.blob.core.windows.net/scans/
"clouds": {
"path": [ // Array of strings - Point cloud 3D models of the scene
"fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\combined-raw.pcd",
"fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\box.pcd"
]
},
"images":{
"path": [ // Array of strings - Images of the cargo
"fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\cameraName-0.jpg",
"fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\cameraName-0-marked.jpg",
"fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\cameraName-1.jpg",
"fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\cameraName-1-marked.jpg"
]
},
"thumbnails": {
"path": [ // Array of strings - Same as the images above just smaller (for faster loading if needed)
"fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\thumbnail\\cameraName-0.jpg",
"fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\thumbnail\\cameraName-0-marked.jpg",
"fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\thumbnail\\cameraName-1.jpg",
"fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\thumbnail\\cameraName-1-marked.jpg"
]
},
"misc": {
"path": [ // Array of strings - Freight reports or other cargo documents
"fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\Freight-Report.pdf"
]
}
}
}
}
}
]
}
Batch Export
Cargo Spectre users can batch-export cargo data from the cloud using the Batch Export functionality.
In order to export from the cloud website via the user interface, you will need to provide a URL endpoint that accepts HTTP POST requests. Cargo Spectre users have the ability to set a different URL for each Cargo Spectre device, so you may want to have a few different URL paths. For example:
EXPORTED FROM | URL |
---|---|
Customer 1, Machine A | https://my-company-name.com/customer-1/machine-A |
Customer 1, Machine B | https://my-company-name.com/customer-1/machine-B |
Customer 2, Machine A | https://my-company-name.com/customer-2/machine-A |
The exported data will take the JSON form by default, although there are other export formats available to users as well.
The following formats are standard, however some custom formats also exist for specific WMS, TMS, or ERP systems.
- JSON
- XML
- CSV
{
"cargoResponses": [
{
"responses": {
"dimension": {
"code": 0, // Number - Anything besides 0 indicates an error has occurred
"info": {
"cargoID": 43286, // Number - Internal Cargo Spectre ID
"name": "", // String - Optional cargo name
"barcode": "FAKEBARCODE123", // String
"comments": "Comments are optional and can be left blank.", // String
"scanDate": "2018-11-16T03:49:18", // String - UTC time in ISO format
"machineName": "Laptop", // String - Human readable name of the Spectre machine that authored the data
"scanGuid": "3a75b02a-9300-4ba4-a117-87869dc14e9a", // String - This may be used in future sharing scenarios
"dimensions": {
"length": 0.81, // Number
"width": 0.54, // Number
"height": 0.55, // Number
"volume": 0.247132, // Number
"density": 305.504750, // Number
"weight": {
"net": 75.5, // Number
"gross": 76.5, // Number
"tare": 1.5 // Number
},
},
"units": {
"length": "meters", // String - Applies to Length, Width, and Height
"volume": "cubic meters", // String - Applies to Volume
"weight": "lb", // String - Applies to Net, Gross, and Tare
"density": "lb/cubic meters" // String - Applies to Net, Gross, and Tare
},
"customFields": { // Optional custom fields that your organization can configure will show up here
"Is Damaged": true,
"Piece Count": 3,
"Destination": "LAX",
}
}
},
"snapshot": {
"code": 0, // Number - Anything besides 0 indicates an error has occurred
"directory": { // All path values are relative to: https://cargospectre.blob.core.windows.net/scans/
"clouds": {
"path": [ // Array of strings - Point cloud 3D models of the scene
"fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\combined-raw.pcd",
"fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\box.pcd"
]
},
"images":{
"path": [ // Array of strings - Images of the cargo
"fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\cameraName-0.jpg",
"fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\cameraName-0-marked.jpg",
"fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\cameraName-1.jpg",
"fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\cameraName-1-marked.jpg"
]
},
"thumbnails": {
"path": [ // Array of strings - Same as the images above just smaller (for faster loading if needed)
"fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\thumbnail\\cameraName-0.jpg",
"fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\thumbnail\\cameraName-0-marked.jpg",
"fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\thumbnail\\cameraName-1.jpg",
"fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\thumbnail\\cameraName-1-marked.jpg"
]
},
"misc": {
"path": [ // Array of strings - Freight reports or other cargo documents
"fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\Freight-Report.pdf"
]
}
}
}
}
},
{
"responses": {
"dimension": {
"code": 0, // Number - Anything besides 0 indicates an error has occurred
"info": {
"cargoID": 713286, // Number - Internal Cargo Spectre ID
"name": "", // String - Optional cargo name
"barcode": "FAKEBARCODE456", // String
"comments": "Comments are optional and can be left blank.", // String
"scanDate": "2024-11-16T03:49:18", // String - UTC time in ISO format
"machineName": "Laptop3", // String - Human readable name of the Spectre machine that authored the data
"scanGuid": "f2222139-ca9a-4c4a-8f44-e144455f0721", // String - This may be used in future sharing scenarios
"dimensions": {
"length": 6.81, // Number
"width": 2.54, // Number
"height": 6.55, // Number
"volume": 0.247132, // Number
"density": 1.5490127, // Number
"weight": {
"net": 175.5, // Number
"gross": 176.5, // Number
"tare": 1.5 // Number
},
},
"units": {
"length": "meters", // String - Applies to Length, Width, and Height
"volume": "cubic meters", // String - Applies to Volume
"weight": "lb", // String - Applies to Net, Gross, and Tare
"density": "lb/cubic meters" // String - Applies to Net, Gross, and Tare
},
"customFields": { // Optional custom fields that your organization can configure will show up here
"Is Damaged": false,
"Piece Count": 1,
"Destination": "LAX",
}
}
},
"snapshot": {
"code": 0, // Number - Anything besides 0 indicates an error has occurred
"directory": { // All path values are relative to: https://cargospectre.blob.core.windows.net/scans/
"clouds": {
"path": [ // Array of strings - Point cloud 3D models of the scene
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\combined-raw.pcd",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\box.pcd"
]
},
"images":{
"path": [ // Array of strings - Images of the cargo
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-0.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-0-marked.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-1.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-1-marked.jpg"
]
},
"thumbnails": {
"path": [ // Array of strings - Same as the images above just smaller (for faster loading if needed)
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\thumbnail\\cameraName-0.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\thumbnail\\cameraName-0-marked.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\thumbnail\\cameraName-1.jpg",
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\thumbnail\\cameraName-1-marked.jpg"
]
},
"misc": {
"path": [ // Array of strings - Freight reports or other cargo documents
"fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\Freight-Report.pdf"
]
}
}
}
}
}
]
}
<BatchResponse>
<CargoResponses>
<Responses>
<Dimension code="0">
<Info>
<CargoID>43286</CargoID>
<Name/>
<Barcode>FAKEBARCODE123</Barcode>
<ScanDate>2018-11-16T03:49:18</ScanDate>
<MachineName>Laptop</MachineName>
<ScanGuid>3a75b02a-9300-4ba4-a117-87869dc14e9a</ScanGuid>
<Dimensions>
<Length>0.81</Length>
<Width>0.54</Width>
<Height>0.55</Height>
<Volume>0.247132</Volume>
<Density>305.504750</Density>
<Weight>
<Net>75.5</Net>
<Gross>76.5</Gross>
<Tare>1.5</Tare>
</Weight>
</Dimensions>
<Units>
<Length>meters</Length>
<Volume>cubic meters</Volume>
<Weight>lb</Weight>
<Density>lb/cubic meters</Density>
</Units>
<CustomFields>
<IsDamaged>true</IsDamaged>
<PieceCount>3</PieceCount>
<Destination>LAX</Destination>
</CustomFields>
</Info>
</Dimension>
<Snapshot code="0">
<Directory>
<Misc>
<Path>fake@shipper.com/3a75b02a-9300-4ba4-a117-87869dc14e9a/Freight-Report.pdf</Path>
</Misc>
<Clouds>
<Path>fake@shipper.com/3a75b02a-9300-4ba4-a117-87869dc14e9a/box.pcd</Path>
<Path>fake@shipper.com/3a75b02a-9300-4ba4-a117-87869dc14e9a/combined-raw.pcd</Path>
</Clouds>
<Images>
<Path>fake@shipper.com/3a75b02a-9300-4ba4-a117-87869dc14e9a/cameraName-0.jpg</Path>
<Path>fake@shipper.com/3a75b02a-9300-4ba4-a117-87869dc14e9a/cameraName-0-marked.jpg</Path>
<Path>fake@shipper.com/3a75b02a-9300-4ba4-a117-87869dc14e9a/cameraName-1.jpg</Path>
<Path>fake@shipper.com/3a75b02a-9300-4ba4-a117-87869dc14e9a/cameraName-1-marked.jpg</Path>
</Images>
<Thumbnails>
<Path>fake@shipper.com/3a75b02a-9300-4ba4-a117-87869dc14e9a/thumbnail/cameraName-0.jpg</Path>
<Path>fake@shipper.com/3a75b02a-9300-4ba4-a117-87869dc14e9a/thumbnail/cameraName-0-marked.jpg</Path>
<Path>fake@shipper.com/3a75b02a-9300-4ba4-a117-87869dc14e9a/thumbnail/cameraName-1.jpg</Path>
<Path>fake@shipper.com/3a75b02a-9300-4ba4-a117-87869dc14e9a/thumbnail/cameraName-1-marked.jpg</Path>
</Thumbnails>
</Directory>
</Snapshot>
</Responses>
<Responses>
<Dimension code="0">
<Info>
<CargoID>713286</CargoID>
<Name/>
<Barcode>FAKEBARCODE456</Barcode>
<ScanDate>2024-11-16T03:49:18</ScanDate>
<MachineName>Laptop3</MachineName>
<ScanGuid>f2222139-ca9a-4c4a-8f44-e144455f0721</ScanGuid>
<Dimensions>
<Length>6.81</Length>
<Width>2.54</Width>
<Height>6.55</Height>
<Volume>113.29797</Volume>
<Density>1.5490127</Density>
<Weight>
<Net>175.5</Net>
<Gross>176.5</Gross>
<Tare>1.5</Tare>
</Weight>
</Dimensions>
<Units>
<Length>meters</Length>
<Volume>cubic meters</Volume>
<Weight>lb</Weight>
<Density>lb/cubic meters</Density>
</Units>
<CustomFields>
<IsDamaged>false</IsDamaged>
<PieceCount>1</PieceCount>
<Destination>LAX</Destination>
</CustomFields>
</Info>
</Dimension>
<Snapshot code="0">
<Directory>
<Misc>
<Path>fake@shipper.com/f2222139-ca9a-4c4a-8f44-e144455f0721/Freight-Report.pdf</Path>
</Misc>
<Clouds>
<Path>fake@shipper.com/f2222139-ca9a-4c4a-8f44-e144455f0721/box.pcd</Path>
<Path>fake@shipper.com/f2222139-ca9a-4c4a-8f44-e144455f0721/combined-raw.pcd</Path>
</Clouds>
<Images>
<Path>fake@shipper.com/f2222139-ca9a-4c4a-8f44-e144455f0721/cameraName-0.jpg</Path>
<Path>fake@shipper.com/f2222139-ca9a-4c4a-8f44-e144455f0721/cameraName-0-marked.jpg</Path>
<Path>fake@shipper.com/f2222139-ca9a-4c4a-8f44-e144455f0721/cameraName-1.jpg</Path>
<Path>fake@shipper.com/f2222139-ca9a-4c4a-8f44-e144455f0721/cameraName-1-marked.jpg</Path>
</Images>
<Thumbnails>
<Path>fake@shipper.com/f2222139-ca9a-4c4a-8f44-e144455f0721/thumbnail/cameraName-0.jpg</Path>
<Path>fake@shipper.com/f2222139-ca9a-4c4a-8f44-e144455f0721/thumbnail/cameraName-0-marked.jpg</Path>
<Path>fake@shipper.com/f2222139-ca9a-4c4a-8f44-e144455f0721/thumbnail/cameraName-1.jpg</Path>
<Path>fake@shipper.com/f2222139-ca9a-4c4a-8f44-e144455f0721/thumbnail/cameraName-1-marked.jpg</Path>
</Thumbnails>
</Directory>
</Snapshot>
</Responses>
</CargoResponses>
</BatchResponse>
cargoID,name,barcode,comments,scanDate,machineName,scanGuid,length,width,height,volume,density,netWeight,lengthUnit,volumeUnit,weightUnit,densityUnit,"Is Damaged","Piece Count","Destination",images,pointClouds,miscFiles
43286,"",FAKEBARCODE123,"Comments are optional and can be left blank.",11/16/2018 03:49:18 AM,"Laptop",3a75b02a-9300-4ba4-a117-87869dc14e9a,0.81,0.54,0.55,0.247132,305.504750,75.5,Meters,CubicMeters,Pounds,PoundsPerCubicMeters,"true","3","LAX","fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\cameraName-0.jpg;fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\cameraName-0-marked.jpg;fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\cameraName-1.jpg;fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\cameraName-1-marked.jpg","fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\combined-raw.pcd;fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\box.pcd","fake@shipper.com\\3a75b02a-9300-4ba4-a117-87869dc14e9a\\Freight-Report.pdf"
713286,"",FAKEBARCODE456,"Comments are optional and can be left blank.",11/16/2024 03:49:18 AM,"Laptop3",f2222139-ca9a-4c4a-8f44-e144455f0721,6.81,2.54,6.55,113.29797,1.5490127,175.5,Meters,CubicMeters,Pounds,PoundsPerCubicMeters,"false","1","LAX","fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-0.jpg;fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-0-marked.jpg;fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-1.jpg;fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\cameraName-1-marked.jpg","fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\combined-raw.pcd;fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\box.pcd","fake@shipper.com\\f2222139-ca9a-4c4a-8f44-e144455f0721\\Freight-Report.pdf"
Optional Security Header
To ensure that webhook export content is coming from Cargo Spectre and not an external source, you can optionally set a custom HTTP header to be a secret key that only Cargo Spectre would know about.
The secret key can be any text string and will be included as a basic
authorization header. The following example shows what the HTTP request would look like when using Pass123!
as the secret key:
POST
host: https://example.com/export/bay-4
authorization: Basic Pass123!
content-type: application/json
content-length: 1024
{
"responses": {
"dimension": {
"code": 0,
"info": {
"dimensions": {
"length": 49.5,
"width": 49,
"height": 36.5,
"volume": 51.23310089111328,
"density": 7.8074524680855815,
"weight": {
"net": 400,
"gross": 400,
"tare": 0
}
// ...JSON body truncated for this example