Python
import shippo
s = shippo.Shippo(
api_key_header='ShippoToken <API_TOKEN>',
shippo_api_version='2018-02-08',
)
res = s.webhooks.list_webhooks()
if res is not None:
# handle response
passimport { Shippo } from "shippo";
const shippo = new Shippo({
apiKeyHeader: "ShippoToken <API_TOKEN>",
shippoApiVersion: "2018-02-08",
});
async function run() {
const result = await shippo.webhooks.listWebhooks();
// Handle the result
console.log(result);
}
run();using Shippo;
using Shippo.Models.Components;
var sdk = new ShippoSDK(
apiKeyHeader: "ShippoToken <API_TOKEN>",
shippoApiVersion: "2018-02-08"
);
var res = await sdk.Webhooks.ListWebhooksAsync();
// handle responsedeclare(strict_types=1);
require 'vendor/autoload.php';
use Shippo\API;
$sdk = API\Shippo::builder()
->setSecurity(
'ShippoToken <API_TOKEN>'
)
->setShippoApiVersion('2018-02-08')
->build();
$response = $sdk->webhooks->listWebhooks(
);
if ($response->webhookPaginatedList !== null) {
// handle response
}package hello.world;
import com.goshippo.shippo_sdk.Shippo;
import com.goshippo.shippo_sdk.models.operations.ListWebhooksResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Shippo sdk = Shippo.builder()
.apiKeyHeader("ShippoToken <API_TOKEN>")
.shippoApiVersion("2018-02-08")
.build();
ListWebhooksResponse res = sdk.webhooks().listWebhooks()
.call();
if (res.webhookPaginatedList().isPresent()) {
// handle response
}
}
}curl --request GET \
--url https://api.goshippo.com/webhooks \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.goshippo.com/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.goshippo.com/webhooks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.goshippo.com/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"next": "baseurl?page=3&results=10",
"previous": "baseurl?page=1&results=10",
"count": 123,
"results": [
{
"event": "track_updated",
"url": "https://example.com/shippo-webhook",
"active": true,
"is_test": false,
"object_created": "2023-11-07T05:31:56Z",
"object_id": "<string>",
"object_updated": "2023-11-07T05:31:56Z",
"object_owner": "<string>"
}
]
}Webhooks
List all webhooks
Returns a list of all webhooks you have created.
GET
/
webhooks
Python
import shippo
s = shippo.Shippo(
api_key_header='ShippoToken <API_TOKEN>',
shippo_api_version='2018-02-08',
)
res = s.webhooks.list_webhooks()
if res is not None:
# handle response
passimport { Shippo } from "shippo";
const shippo = new Shippo({
apiKeyHeader: "ShippoToken <API_TOKEN>",
shippoApiVersion: "2018-02-08",
});
async function run() {
const result = await shippo.webhooks.listWebhooks();
// Handle the result
console.log(result);
}
run();using Shippo;
using Shippo.Models.Components;
var sdk = new ShippoSDK(
apiKeyHeader: "ShippoToken <API_TOKEN>",
shippoApiVersion: "2018-02-08"
);
var res = await sdk.Webhooks.ListWebhooksAsync();
// handle responsedeclare(strict_types=1);
require 'vendor/autoload.php';
use Shippo\API;
$sdk = API\Shippo::builder()
->setSecurity(
'ShippoToken <API_TOKEN>'
)
->setShippoApiVersion('2018-02-08')
->build();
$response = $sdk->webhooks->listWebhooks(
);
if ($response->webhookPaginatedList !== null) {
// handle response
}package hello.world;
import com.goshippo.shippo_sdk.Shippo;
import com.goshippo.shippo_sdk.models.operations.ListWebhooksResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Shippo sdk = Shippo.builder()
.apiKeyHeader("ShippoToken <API_TOKEN>")
.shippoApiVersion("2018-02-08")
.build();
ListWebhooksResponse res = sdk.webhooks().listWebhooks()
.call();
if (res.webhookPaginatedList().isPresent()) {
// handle response
}
}
}curl --request GET \
--url https://api.goshippo.com/webhooks \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.goshippo.com/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.goshippo.com/webhooks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.goshippo.com/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"next": "baseurl?page=3&results=10",
"previous": "baseurl?page=1&results=10",
"count": 123,
"results": [
{
"event": "track_updated",
"url": "https://example.com/shippo-webhook",
"active": true,
"is_test": false,
"object_created": "2023-11-07T05:31:56Z",
"object_id": "<string>",
"object_updated": "2023-11-07T05:31:56Z",
"object_owner": "<string>"
}
]
}Authorizations
API key authentication using the ShippoToken scheme. Format: Authorization: ShippoToken <API_TOKEN> Example: Authorization: ShippoToken shippo_live_abc123
Was this page helpful?
⌘I