Skip to main content

Implement webhook

  • May 12, 2022 10:34 AM UTC
  • 1 reply
  • 1 view

I am trying to implement webhook payloads. I want to know more details of fields for following data.

 

Sample data for webhook payloads is given in the following URL: 

URL: https://help.shipstation.com/hc/en-us/articles/360025856252#UUID-1a4971f4-8fb5-f4a5-c399-f36cff610435_UUID-851a5fd2-a181-b302-41de-c32ced43eb92

 

On Orders Shipped (SHIP_NOTIFY):

{"resource_url":"https://ssapiX.shipstation.com/shipments?storeID=123456&batchId=12345678","resource_type":"SHIP_NOTIFY"}

 

1. What is use of resource_url?

2. What is batchId which pass in query string?

3. Where I can get that batchId?

4. Is storeId is optional?

1 reply

  • May 12, 2022 6:21 PM UTC

Once a webhook is executed, it'll post that JSON data to whatever endpoint URL you specify. So say, your endpoint is mydomain.com/api/order-shipped-notify... When an order is shipped (for SHIP_NOTIFY), ShipStation will POST {"resource_url":"https://ssapiX.shipstation.com/shipments?storeID=123456&batchId=12345678","resource_type":"SHIP_NOTIFY"} to mydomain.com/api/order-shipped-notify.

 

On your end, once the request comes in, you decode the JSON and do a GET request on the resource_url given (which is unique to that webhook notification). You'll have to include the Authentication header as with other API calls. Once you made that call to the resource_url, you'll receive in return the details of the order shipped that triggered the webhook.