Subscribe to Webhook

Subscribes to a specific type of webhook. If a store_id is passed in, the webhooks will only be triggered for that specific store_id. The event type that is passed in will determine what type of webhooks will be sent.

NOTE Webhooks will be sent to the URL specified in the target_url. The HTTP request will be sent via POST and will contain a webhook JSON object in the body.

Regardless of how the webhook was created, you can only modify an existing webhook through your ShipStation UI and application account Settings. To view and edit your webhooks via the application UI, log in to ShipStation and go to Settings > Integrations > Integration Partners under Integrations in the Account Settings. Learn more about webhooks in Shipstations UI in this ShipStation Webhooks KB article.

The body of this request to subscribe has the following attributes:

Name Data Type Description
target_url string The URL to send the webhooks to

Required
event string The type of webhook to subscribe to.

Must contain one of the following values: ORDER_NOTIFY, ITEM_ORDER_NOTIFY, SHIP_NOTIFY, ITEM_SHIP_NOTIFY, FULFILLMENT_SHIPPED, FULFILLMENT_REJECTED

Required
store_id number Unique identifier that specifies a store.

If passed in, the webhooks will only be triggered for this store_id

Optional
friendly_name string Display name for the webhook

Optional

Example Request

POST /webhooks/subscribe HTTP/1.1
Host: ssapi.shipstation.com
Authorization: __YOUR_AUTH_HERE__
Content-Type: application/json

{
  "target_url": "http://someexamplewebhookurl.com/neworder",
  "event": "ORDER_NOTIFY",
  "store_id": null,
  "friendly_name": "My Webhook"
}

Example Response

{
  "id": 123456
}