Skip to main content

/uploads (POST)

The API will allow you to upload images or attachments to a file. The Content-Type must be a "multipart/form-data".

Parameters​

reference required (max 255 char)

The used file reference, as a string. This represents the barcode (scan code) value used in the barcode scanner, as well as the value used on the platform. Note: make sure to URL encode any special characters! Example value: reference=76543234567

uploads[] optional (array) An array with 1-10 files, in total less than 50MB per call. Remember to set the Content-Type=multipart/form-data

include_in_share optional

A Boolean value which will indicate if the uploads are to be included in a share or report; if not supplied value is assumed to be “false”. Example value: include_in_share=1

location optional

A location reference. A location in the API is what the platform calls a team (see Terminology). If not supplied, the file will be created in the first available known location. The location is a unique number and can be found in the platform, under “Teams”: select the team and the number will show in the header information.

Response values​

The content of the response will depend on the query parameters, the implemented features on Cargosnap as well as the actual available data. The typical response will be: HTTP Code 200

Example Request​

POST https://api.cargosnap.com/api/v2/uploads?reference=ABC12345&include_in_share=0&location=1

This query would: Return a 200 response code, with the URL to the report in the content body:

{
"response": "success"
}