curl --request GET \
--url https://api.demo.fuelboss.net/v1/contracts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.demo.fuelboss.net/v1/contracts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.demo.fuelboss.net/v1/contracts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.demo.fuelboss.net/v1/contracts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.demo.fuelboss.net/v1/contracts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.demo.fuelboss.net/v1/contracts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.demo.fuelboss.net/v1/contracts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"reference": "<string>",
"name": "<string>",
"externalReference": "<string>",
"type": "term",
"supplierEntities": [
"<string>"
],
"ports": [
"<string>"
],
"counterpartCompanies": [
"<string>"
],
"counterpartEntities": [
"<string>"
],
"priceType": "floating",
"startDateUtc": "2023-11-07T05:31:56Z",
"endDateUtc": "2023-11-07T05:31:56Z"
}
]Retrieves all contracts available for your company
Retrieves a list of all contracts available for your company
curl --request GET \
--url https://api.demo.fuelboss.net/v1/contracts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.demo.fuelboss.net/v1/contracts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.demo.fuelboss.net/v1/contracts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.demo.fuelboss.net/v1/contracts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.demo.fuelboss.net/v1/contracts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.demo.fuelboss.net/v1/contracts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.demo.fuelboss.net/v1/contracts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"reference": "<string>",
"name": "<string>",
"externalReference": "<string>",
"type": "term",
"supplierEntities": [
"<string>"
],
"ports": [
"<string>"
],
"counterpartCompanies": [
"<string>"
],
"counterpartEntities": [
"<string>"
],
"priceType": "floating",
"startDateUtc": "2023-11-07T05:31:56Z",
"endDateUtc": "2023-11-07T05:31:56Z"
}
]Authorizations
Access token obtained from the /oauth/token endpoint using your client credentials.
Response
OK
Unique reference for the contract, used as contractReference on nominations.
Contract name.
External reference for the contract in your own systems.
Contract type.
Possible values:
term— Term contract.spot— Spot contract.
term, spot, null "term"
Company entity references of the supplier entities covered by the contract (from Get Company Entities).
UN/LOCODEs of the ports covered by the contract.
Identifiers of the counterpart companies covered by the contract (from Get Companies).
References of the counterpart entities covered by the contract (from Get Counterpart Entities).
Price type.
Possible values:
floating— Floating price.fixed— Fixed price.
floating, fixed, null "floating"
Start of the contract validity period (UTC).
End of the contract validity period (UTC).