v1

latestOpenAPI 3.0.12026-08-0688138402.2 KB
Webhooks

Create a webhook

  Creates a new webhook with the specified information and activates it.



  

Webhooks create an event when an action that is subscribed to is performed in Shipmondo. The event is then sent to the specified endpoint containing the current data of the affected object.

  Endpoint must be set up to receive messages before creating the webhook.


  Accepted values for action depends on the resource_name used.


  Available actions for [**Shipments**](shipment_get) resource:

  - create

  - cancel


  Available actions for [**Orders**](sales_order_get) resource:

  - create

  - status_update

  - create_fulfillment

  - create_shipment

  - payment_captured

  - payment_voided

  - delete


  Available actions for [**Drafts**](draft_shipment_get) (Draft shipments) resource:

  - create

  - create_shipment

  - delete


  Available actions for **Shipment Monitor** resource:

  - latest

  - delivered
  
post/webhooks

Request body

namestring required

User-specified name of the webhook.

endpointstring required

Endpoint the webhook sends request to.

keystring required

Encryption key that should encrypt and decrypt the webhook message with JWT.

action'create' | 'cancel' | 'status_update' | 'create_fulfillment' | 'create_shipment' | 'payment_captured' | 'payment_voided' | 'delete' | 'latest' | 'delivered' required

The action that webhook is hooked to.

resource_name'Shipments' | 'Orders' | 'Shipment Monitor' required

The name of the resource that webhook is hooked to.

Example request

{
  "name": "Example Name",
  "endpoint": "https://example.com/webhook",
  "key": "example_key_123",
  "action": "create",
  "resource_name": "Shipments"
}

Response

Successful.

idinteger

Unique identifier of the object.

endpointstring

Endpoint the webhook sends request to.

activeboolean

Indicates if the webhook is active.

created_atstring date-time

ISO 8601 datetime the object was created.

updated_atstring date-time

ISO 8601 datetime when the object was updated.

namestring

User-specified name of the webhook.

action'create' | 'cancel' | 'status_update' | 'create_fulfillment' | 'create_shipment' | 'payment_captured' | 'payment_refunded' | 'payment_voided' | 'delete' | 'latest' | 'delivered'

The action that webhook is hooked to.

resource_name'Shipments' | 'Orders' | 'Shipment Monitor'

The name of the resource that webhook is hooked to.

Example response

[
  {
    "id": 1,
    "endpoint": "https://example.com/webhook",
    "created_at": "2017-06-16T06:25:44.557Z",
    "updated_at": "2017-06-16T06:25:44.557Z",
    "name": "Example Name",
    "action": "create",
    "resource_name": "Shipments"
  }
]