Skip to main content
Use this API endpoint to register “webhooks” for various events such as when an order has completed or an inventory adjustment is made. A “webhook” subscribes to one or more topics and specifies a URL which event data will be sent via HTTP POST as events occur. See the Topics page for details on the available topics and the event details included.

Authentication

Webhook authenticity can be verified by the X-Plugin-Hmac-Sha256 HTTP header which is included with every webhook request. You can compare this header value with the HMAC generated locally to ensure that the request was not spoofed or modified in transit. The HMAC “message” is the entire request body and the HMAC “secret” is the secret_key associated with the webhook.
PHP Example

Webhook Retry Intervals

Webhook retries occur for any non-20X response. There is a 3-second connect timeout and a 5-second overall timeout. ShipStream will make up to 14 retires. Each failed retry will be delayed. Instead of making the 15th attempt, ShipStream will mark the queued webhook call with the status “failed”. Retry Intervals:
  • +1 minute
  • +2 minutes
  • +4 minutes
  • +8 minutes
  • +15 minutes
  • +30 minutes
  • +1 hour
  • +2 hours
  • +4 hours
  • +8 hours
  • +16 hours
  • +24 hours
  • +24 hours
  • +24 hours

Methods


Entity Properties


webhook.list

webhook.list() Retrieve webhooks list.

Parameters

The method is used without parameters.

Return Value

An array of objects with webhook information.

Example Request

Request

Example Response

Response

webhook.create

webhook.create(object $webhookData) Create new webhook for a single or multiple topics.

Parameters

object
Webhook data.

Return Value

true if webhook was successfully created.

Example Request

Request

Example Response

Response

Error Codes


webhook.update_status

webhook.update_status(string $topic, number $status) Update webhook status.

Parameters

string
Topic
number
Status. Allowed values: “0” - inactive or “1” - active.

Return Value

true if status was successfully updated.

Example Request

Request

Example Response

Response

Error Codes


webhook.delete

webhook.delete(int $webhookId) Delete webhook.

Parameters

integer
Webhook Id.

Return Value

true if webhook was successfully deleted.

Example Request

Request

Example Response

Response

Error Codes

Entity Properties

Webhook Properties

integer
The internal webhook ID.
integer
Sequential ID of each payload so missed events can be detected easily.
integer
Flag to determine whether the webhook is active. Allowed values: “0” - inactive or “1” - active.
integer
Flag to determine whether Protected Customer Data (PCD) — such as the shipping address and contact info — is populated in the webhook payload. Allowed values: “0” - excluded (default) or “1” - included.
string | array
Either a string with one or more topics separated by commas or an array of topics which the webhook is subscribed to.
string
Url for the webhook callback.
string
Extra headers.
string
Secret Key is used for the webhook signature.