Skip to main content

Developer documentation

The Cargosnap RESTful API gives you programmatic access to all Cargosnap functionality, for any given file. The API will allow you to pull all information as well as provide you a link to the images. The information is yours, so may be used to populate fields in an own database, download the information or create reports, to name a few applications.

Getting Started

Before you get started, you'll need to register a trial or active account and have an assigned user role of either "Super Manager" or "License Admin". With such permissions you may register your app and interact with Cargosnap. This will give you a unique token which is needed for using the API. Fill in the API request form, and this token will be generated for you.

Endpoints

All API resources are accessed from the https://api.cargosnap.com/api/v2 endpoint, which supports SSL only. Accessing any API resource via vanilla HTTP will return an HTTP status of 400 Bad Request in the response headers.

Supported HTTP Methods

All resources on the Cargosnap API support HTTP GET and POST only; if an attempt is made to access the API using any other method, an HTTP status of 405 Not allowed will be returned in both the response headers and in the response status field.

Resource Information

Response format: JSON

Requires authentication?

Yes

Timestamps

Timestamps are always in UTC and date/time formats are in ISO. Example: 2020-07-05T20:40:00 would be a valid format to query start/end date fields by a timestamp

Pagination

All our endpoints return paginated data. The data has the following format:

    "first_page_url": "http://api.cargosnap.com/api/v2/files?page=1",
"from": 1,
"last_page": 18,
"last_page_url": "http://api.cargosnap.com/api/v2/files?page=18",
"next_page_url": "http://api.cargosnap.com/api/v2/files?page=2",
"path": "http://api.cargosnap.com/api/v2/files",
"per_page": "10",
"prev_page_url": null,
"to": 10,
"total": 171

Limits

API usage may be throttled to avoid excess use. Our standard terms allow 25,000 API calls per day. If you need more, please reach out to your Cargosnap account representative or log a request via the support widget in the platform.