cancel
Showing results for 
Search instead for 
Did you mean: 

Implement webhook

ept
Occasional Contributor

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-f36cff61043...

 

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 1

pleasure
Contributor

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.