Webhooks
Register a webhook endpoint
Registers (or replaces) the HTTPS URL to which the supplier will deliver event notifications. Each RTI User has one active webhook URL per supplier.
POST
/
v1
/
webhook
Register a webhook endpoint
curl --request POST \
--url https://example-supplier.co.uk/v1/webhook \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"webhook_url": "https://my-optimiser.example.com/hooks/tariff-events"
}
'import requests
url = "https://example-supplier.co.uk/v1/webhook"
payload = { "webhook_url": "https://my-optimiser.example.com/hooks/tariff-events" }
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({webhook_url: 'https://my-optimiser.example.com/hooks/tariff-events'})
};
fetch('https://example-supplier.co.uk/v1/webhook', 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://example-supplier.co.uk/v1/webhook",
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([
'webhook_url' => 'https://my-optimiser.example.com/hooks/tariff-events'
]),
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://example-supplier.co.uk/v1/webhook"
payload := strings.NewReader("{\n \"webhook_url\": \"https://my-optimiser.example.com/hooks/tariff-events\"\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://example-supplier.co.uk/v1/webhook")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"webhook_url\": \"https://my-optimiser.example.com/hooks/tariff-events\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://example-supplier.co.uk/v1/webhook")
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 \"webhook_url\": \"https://my-optimiser.example.com/hooks/tariff-events\"\n}"
response = http.request(request)
puts response.read_body{
"webhook_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "tariff_not_found",
"message": "No tariff found for the given tariff_id and supplier MPID.",
"details": "tariff_id a1b2c3d4-e5f6-7890-abcd-ef1234567890 does not exist for supplier SEBD."
}{
"code": "tariff_not_found",
"message": "No tariff found for the given tariff_id and supplier MPID.",
"details": "tariff_id a1b2c3d4-e5f6-7890-abcd-ef1234567890 does not exist for supplier SEBD."
}{
"code": "tariff_not_found",
"message": "No tariff found for the given tariff_id and supplier MPID.",
"details": "tariff_id a1b2c3d4-e5f6-7890-abcd-ef1234567890 does not exist for supplier SEBD."
}Authorizations
OAuth 2.0 Authorisation Code flow for RTI User authentication and consumer consent.
Each supplier operates its own OAuth server. In production, substitute the
placeholder host with the relevant url from the Supplier Register.
OpenAPI does not permit URI templates in security scheme URLs, so a placeholder
is used here.
Body
application/json
The HTTPS URL that will receive event notification POSTs.
Response
Webhook registered. Returns the assigned webhook ID.
UUID uniquely identifying a registered webhook endpoint.
Example:
"550e8400-e29b-41d4-a716-446655440000"
Last modified on March 28, 2026
⌘I
Register a webhook endpoint
curl --request POST \
--url https://example-supplier.co.uk/v1/webhook \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"webhook_url": "https://my-optimiser.example.com/hooks/tariff-events"
}
'import requests
url = "https://example-supplier.co.uk/v1/webhook"
payload = { "webhook_url": "https://my-optimiser.example.com/hooks/tariff-events" }
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({webhook_url: 'https://my-optimiser.example.com/hooks/tariff-events'})
};
fetch('https://example-supplier.co.uk/v1/webhook', 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://example-supplier.co.uk/v1/webhook",
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([
'webhook_url' => 'https://my-optimiser.example.com/hooks/tariff-events'
]),
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://example-supplier.co.uk/v1/webhook"
payload := strings.NewReader("{\n \"webhook_url\": \"https://my-optimiser.example.com/hooks/tariff-events\"\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://example-supplier.co.uk/v1/webhook")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"webhook_url\": \"https://my-optimiser.example.com/hooks/tariff-events\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://example-supplier.co.uk/v1/webhook")
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 \"webhook_url\": \"https://my-optimiser.example.com/hooks/tariff-events\"\n}"
response = http.request(request)
puts response.read_body{
"webhook_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "tariff_not_found",
"message": "No tariff found for the given tariff_id and supplier MPID.",
"details": "tariff_id a1b2c3d4-e5f6-7890-abcd-ef1234567890 does not exist for supplier SEBD."
}{
"code": "tariff_not_found",
"message": "No tariff found for the given tariff_id and supplier MPID.",
"details": "tariff_id a1b2c3d4-e5f6-7890-abcd-ef1234567890 does not exist for supplier SEBD."
}{
"code": "tariff_not_found",
"message": "No tariff found for the given tariff_id and supplier MPID.",
"details": "tariff_id a1b2c3d4-e5f6-7890-abcd-ef1234567890 does not exist for supplier SEBD."
}
