import shippo
from shippo.models import components
s = shippo.Shippo(
api_key_header='ShippoToken <API_TOKEN>',
shippo_api_version='2018-02-08',
)
res = s.webhooks.update_webhook(webhook_update_request=components.WebhookUpdateRequest(
event=components.WebhookEventTypeEnum.BATCH_CREATED,
url='https://example.com/shippo-webhook',
active=True,
is_test=False,
), webhook_id='<id>')
if res is not None:
# handle response
pass{
"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>"
}Updates an existing webhook using the webhook object ID.
import shippo
from shippo.models import components
s = shippo.Shippo(
api_key_header='ShippoToken <API_TOKEN>',
shippo_api_version='2018-02-08',
)
res = s.webhooks.update_webhook(webhook_update_request=components.WebhookUpdateRequest(
event=components.WebhookEventTypeEnum.BATCH_CREATED,
url='https://example.com/shippo-webhook',
active=True,
is_test=False,
), webhook_id='<id>')
if res is not None:
# handle response
pass{
"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>"
}API key authentication using the ShippoToken scheme. Format: Authorization: ShippoToken <API_TOKEN> Example: Authorization: ShippoToken shippo_live_abc123
Object ID of the webhook to retrieve
Type of event that triggered the webhook.
transaction_created, transaction_updated, track_updated, batch_created, batch_purchased, all "track_updated"
URL webhook events are sent to.
"https://example.com/shippo-webhook"
Determines whether the webhook is active or not.
true
Determines whether the webhook is a test webhook or not.
false
Webhook updated successfully
Type of event that triggers the webhook.
"track_updated"
URL webhook events are sent to.
"https://example.com/shippo-webhook"
Determines whether the webhook is active or not.
true
Determines whether the webhook is a test webhook or not.
false
Timestamp of the creation of the webhook.
Unique identifier of the webhook. This can be used to retrieve or delete the webhook.
Timestamp of the last update of the webhook.
Username of the user who created the webhook.
Was this page helpful?