Cargofive Last update: 07-12-2020
Cargofive is a platform that allows you to search, compare and manage maritime freight rates between different shipping companies in record time, managing to obtain quotes in just a few minutes.
Cargofive is a platform that allows you to search, compare and manage maritime freight rates between different shipping companies in record time, managing to obtain quotes in just a few minutes.
API is a set of rules and specifications that applications can follow to communicate with each other. So that we understand it, the use of an API is the most useful mechanism to connect two softwares with each other, in this way, we can guarantee the exchange of messages or data in standard format.
The operations available in the API environment are POST (create), GET (read and query), PUT (edit) and DELETE (delete).
In order to access the Cargofive API, you will need to have a registered and active user on our platform. Once this is accomplished, you must request the additional credentials that will allow you to obtain an access token. From Cargofive you will be provided with all the necessary data to complete this process.
Before doing a full integration you will probably want to run some tests. For this you can use the Postman application, a brief explanation of how to install and use it correctly will be given below.
To install Postman you must access the site https://www.postman.com/downloads and proceed to download the installer compatible with your operating system.
After installing Postman, you can begin to perform the necessary tests. In this section we will use some endpoints of the Cargofive API that will be explained in detail later.
Before making a request, you must configure the corresponding headers:
Content-Type: application/json
X-Requested-With: XMLHttpRequest
To perform an operation on the Cargofive API, you must have a valid Bearer Token, which certifies that it is correctly authenticated.
To obtain the Bearer Token you will have to make a POST call to the endpoint https://app.cargofive.com/oauth/token along with the following parameters that you must configure in the Body tab by selecting form-data:
When completing the request, you will be given the "access_token" with which you can access the different endpoints of the Cargofive API. To do this, you must copy the value between the quotation marks (“) and paste it in the Bearer Token value located in the authorization tab for all the requests that you will make to the Cargofive API.
By having a valid bearer token (access_token) you can perform the different operations that are allowed by the API. To do this, you must first configure the bearer token obtained in the previous process. Before making any request, go to the Authorization tab and in the Type drop-down select the Bearer Token option and finally in the token field paste the value of the bearer token (access_token).
Once the bearer token is configured, it will be ready to make a valid request to the API. In this opportunity, a GET request will be exemplified to consult rates to the following endpoint:
https://api.cargofive.com/search/rates/group/ORIGIN/DESTINY/START/END/TYPEMétodo: GET
The parameters to be used on the endpoint are:
The result of this operation will be a json with the information corresponding to the rates that meet the criteria of the parameters sent.
To access each endpoint, you must have a valid bearer token. All requests have the following optional parameters available:
Cargofive REST API https://app.cargofive.com/api/v1/
Note that there are some endpoints pointing to the URL: https://api.cargofive.com/
URL:https://app.cargofive.com/oauth/token
Method:POST
Parameters
Returns: JSON with Bearer token (access_token).
URL:https://app.cargofive.com/api/v1/user
Method:GET
Returns: JSON with the authenticated user details.
URL:https://app.cargofive.com/api/v1/quotes
Method:GET
Parameters
Returns: JSON array with the detail of each quote associated with the user who consults.
Model: Download JSON
URL:https://app.cargofive.com/api/v1/quotes/ID
Method:GET
Parámetros
Returns: JSON with the details of the requested quote.
URL:https://app.cargofive.com/api/v2/quotes
Method:GET
Parameters
Returns: JSON with list of quotes. By default, the result is paged at a maximum of 100 records per page.
Model: Download JSON
URL:https://app.cargofive.com/api/v2/quotes/ID
Method:GET
Parameters
Returns: JSON with the details of the requested quote.
URL:https://app.cargofive.com/api/v1/companies
Method:GET
Returns: JSON array with the detail of each client company associated with the querying user.
URL:https://app.cargofive.com/api/v1/company
Method:POST
Parameters
Parameters marked with * are mandatory
URL:https://app.cargofive.com/api/v1/company/ID
Method:GET
Parameters
Returns: JSON with the details of the requested company.
URL:https://app.cargofive.com/api/v1/company/ID
Method:PUT
Parameters
Important: When carrying out tests with postman, it may be that when sending the request with PUT, it may not complete the requested action (It is a documented postman incident). If this happens, change the method to POST and add the following to the body form-data: _method: PUT.
URL:https://app.cargofive.com/api/v1/company/ID
Method:DELETE
Parameters
URL:https://app.cargofive.com/api/v1/contacts
Method:GET
Returns: JSON array with the detail of each contact belonging to the companies associated with the querying user.
URL:https://app.cargofive.com/api/v1/contact
Method:POST
Parameters
Parameters marked with * are required
URL:https://app.cargofive.com/api/v1/contact/ID
Method:GET
Parameters
Returns: JSON with the details of the requested contact.
URL:https://app.cargofive.com/api/v1/contact/ID
Method:PUT
Parameters
Important: When carrying out tests with postman it may be that when sending the request with PUT, it does not complete the requested action (It is a documented postman incident), if this happens, change the method to POST and add it to the form-data of the body the following: _method: PUT.
URL:https://app.cargofive.com/api/v1/contact/ID
Method:DELETE
Parameters
URL:https://app.cargofive.com/api/v1/fcl/global/charges
Method:GET
Returns: JSON array with the detail of each local FCL charge associated with the querying user.
URL:https://api.cargofive.com/api/rates
Method:GET
Parameters (Query)
Retorna: JSON array with rates for the requested rout.
Ejemplo: Descargar JSON
URL:https://api.cargofive.com/search/rates/group/ORIGIN/DESTINY/START/END/TYPE
Method:GET
Parameters
Returns: JSON array with rates for the requested route.
Model: Download JSON
URL:https://api.cargofive.com/search/rates/nogroup/ORIGIN/DESTINY/START/END/TYPE
Method:GET
Parameters
Returns: JSON array with rates for the requested route without grouping.
Model: Download JSON
URL:https://app.cargofive.com/api/v1/_contracts
Method:GET
Returns: JSON array with the detail of each contract associated with the querying user.
URL:https://app.cargofive.com/api/v1/upload/contract
Method:POST
Parameters
Parameters marked with * are required
URL:https://app.cargofive.com/api/v1/carriers
Method:GET
Returns: JSON array with list of shipping companies.
URL:https://app.cargofive.com/api/v1/airlines
Method:GET
Returns: JSON array with list of airlines.
URL:https://app.cargofive.com/api/v1/surcharges
Method:GET
Returns: JSON array with all surcharges associated with the authenticated user's company.
URL:https://app.cargofive.com/api/v1/surcharge
Method:POST
Parameters
URL:https://api.cargofive.com/pdf
Method:GET
Parameters
Returns: Downloadable .pdf file.