curl --request POST \
--url https://api.demo.fuelboss.net/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"eventTypes": [
"nomination_cancelled"
],
"secret": "<string>",
"headers": {},
"version": 123
}
'import requests
url = "https://api.demo.fuelboss.net/v1/webhooks"
payload = {
"url": "<string>",
"eventTypes": ["nomination_cancelled"],
"secret": "<string>",
"headers": {},
"version": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
eventTypes: ['nomination_cancelled'],
secret: '<string>',
headers: {},
version: 123
})
};
fetch('https://api.demo.fuelboss.net/v1/webhooks', 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/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'eventTypes' => [
'nomination_cancelled'
],
'secret' => '<string>',
'headers' => [
],
'version' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.demo.fuelboss.net/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"eventTypes\": [\n \"nomination_cancelled\"\n ],\n \"secret\": \"<string>\",\n \"headers\": {},\n \"version\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.demo.fuelboss.net/v1/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"eventTypes\": [\n \"nomination_cancelled\"\n ],\n \"secret\": \"<string>\",\n \"headers\": {},\n \"version\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.demo.fuelboss.net/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"eventTypes\": [\n \"nomination_cancelled\"\n ],\n \"secret\": \"<string>\",\n \"headers\": {},\n \"version\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"eventTypes": [
"nomination_cancelled"
],
"secret": "<string>",
"createdAtUtc": "2023-11-07T05:31:56Z",
"version": 123,
"headerKeys": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"trace_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"trace_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"trace_id": "<string>"
}Creates a webhook subscription
Creates a new webhook subscription for the specified events. The response is the only place the signing secret is returned, whether you supplied it or FuelBoss generated it, so store it securely; it cannot be retrieved afterwards.
curl --request POST \
--url https://api.demo.fuelboss.net/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"eventTypes": [
"nomination_cancelled"
],
"secret": "<string>",
"headers": {},
"version": 123
}
'import requests
url = "https://api.demo.fuelboss.net/v1/webhooks"
payload = {
"url": "<string>",
"eventTypes": ["nomination_cancelled"],
"secret": "<string>",
"headers": {},
"version": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
eventTypes: ['nomination_cancelled'],
secret: '<string>',
headers: {},
version: 123
})
};
fetch('https://api.demo.fuelboss.net/v1/webhooks', 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/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'eventTypes' => [
'nomination_cancelled'
],
'secret' => '<string>',
'headers' => [
],
'version' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.demo.fuelboss.net/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"eventTypes\": [\n \"nomination_cancelled\"\n ],\n \"secret\": \"<string>\",\n \"headers\": {},\n \"version\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.demo.fuelboss.net/v1/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"eventTypes\": [\n \"nomination_cancelled\"\n ],\n \"secret\": \"<string>\",\n \"headers\": {},\n \"version\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.demo.fuelboss.net/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"eventTypes\": [\n \"nomination_cancelled\"\n ],\n \"secret\": \"<string>\",\n \"headers\": {},\n \"version\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"eventTypes": [
"nomination_cancelled"
],
"secret": "<string>",
"createdAtUtc": "2023-11-07T05:31:56Z",
"version": 123,
"headerKeys": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"trace_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"trace_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"trace_id": "<string>"
}Authorizations
Access token obtained from the /oauth/token endpoint using your client credentials.
Body
Request body for creating a webhook subscription.
HTTPS endpoint that webhook events are delivered to. URLs targeting private, loopback, or link-local network addresses are rejected, including hostnames that resolve to such addresses.
Event types to subscribe to.
Event type that a webhook subscription covers. Deliveries carry the corresponding
CloudEvent type string (e.g. net.fuelboss.nomination.created) in their type field.
Possible values:
nomination_cancelled— Nomination has been cancelled.nomination_bunkering_location_changed— Nomination bunkering location has changed.nomination_fuel_specification_changed— Nomination fuel specification has changed.nomination_receiver_vessel_changed— Nomination receiver vessel has changed.nomination_supplier_asset_changed— Nomination supplier asset has changed.operation_started— Bunkering operation has started.operation_ended— Bunkering operation has ended.nomination_created— Nomination has been created.nomination_draft_upserted— Draft nomination has been created or updated.nomination_bunkering_start_time_changed— Nomination estimated bunkering start time (the nomination BST) has changed.nomination_bunkering_end_time_changed— Nomination estimated bunkering end time (estimated time of completion) has changed.nomination_contract_changed— Nomination contract has changed.nomination_company_entity_changed— Nomination supplier company entity has changed.nomination_counterpart_entity_changed— Nomination counterpart entity has changed.
nomination_cancelled, nomination_bunkering_location_changed, nomination_fuel_specification_changed, nomination_receiver_vessel_changed, nomination_supplier_asset_changed, operation_started, operation_ended, nomination_created, nomination_draft_upserted, nomination_bunkering_start_time_changed, nomination_bunkering_end_time_changed, nomination_contract_changed, nomination_company_entity_changed, nomination_counterpart_entity_changed Secret used to compute the HMAC signature sent with each delivery, so you can verify the payload originates from FuelBoss. When omitted, FuelBoss generates a random secret. In both cases the secret is returned once, in the response to this request, and cannot be retrieved later.
Custom HTTP headers included in every delivery to your endpoint (e.g. for authentication). Header values are stored securely and never returned.
Show child attributes
Show child attributes
Version of the webhook payload schema delivered to this subscription, covering all of its event types. Defaults to 1 when omitted; unsupported versions are rejected. Every delivery identifies its version in the envelope's dataschema field. See Payload versions.
Response
Created
The webhook subscription that was created, including its signing secret. This is the only response that contains the secret.
System-generated unique identifier of the subscription. Use it to delete the subscription.
HTTPS endpoint that webhook events are delivered to.
Event types the subscription covers.
Event type that a webhook subscription covers. Deliveries carry the corresponding
CloudEvent type string (e.g. net.fuelboss.nomination.created) in their type field.
Possible values:
nomination_cancelled— Nomination has been cancelled.nomination_bunkering_location_changed— Nomination bunkering location has changed.nomination_fuel_specification_changed— Nomination fuel specification has changed.nomination_receiver_vessel_changed— Nomination receiver vessel has changed.nomination_supplier_asset_changed— Nomination supplier asset has changed.operation_started— Bunkering operation has started.operation_ended— Bunkering operation has ended.nomination_created— Nomination has been created.nomination_draft_upserted— Draft nomination has been created or updated.nomination_bunkering_start_time_changed— Nomination estimated bunkering start time (the nomination BST) has changed.nomination_bunkering_end_time_changed— Nomination estimated bunkering end time (estimated time of completion) has changed.nomination_contract_changed— Nomination contract has changed.nomination_company_entity_changed— Nomination supplier company entity has changed.nomination_counterpart_entity_changed— Nomination counterpart entity has changed.
nomination_cancelled, nomination_bunkering_location_changed, nomination_fuel_specification_changed, nomination_receiver_vessel_changed, nomination_supplier_asset_changed, operation_started, operation_ended, nomination_created, nomination_draft_upserted, nomination_bunkering_start_time_changed, nomination_bunkering_end_time_changed, nomination_contract_changed, nomination_company_entity_changed, nomination_counterpart_entity_changed Secret used to compute the HMAC-SHA256 X-Webhook-Signature of every delivery: the value you supplied, or the one FuelBoss generated when the request omitted secret. It is returned only in this response and cannot be retrieved later, so store it securely. See Signature verification.
Timestamp (UTC) when the subscription was created.
Version of the webhook payload schema delivered to this subscription. See Payload versions.
Names of the custom headers configured for the subscription. Header values are never returned.