Webhooks

ShipServ Webhooks will allow client's systems to receive almost real time notifications thus enabling an Efficient, Even Based, Light Weight notification system. Adapting a Don’t call us, we’ll call you approach, where data updates are sent to your system instead of having a long polling mechanism to fetch data.


How does it Work?

  • You should Subscribe a webhook.

  • You choose the event you want to trigger the webhook notification.

  • You provide a URL, where we can send you the notification.

  • We send a notification to the URL each time the event occurs.

  • You respond if the notification has been received successfully.

  • You decide what to do with the notification.

API call process

Data Flow

 

Webhook Notification

After you configure a webhook subscription, the events that you specified will trigger a webhook notification each time they occur. This notification contains information you need to action an event.

id– webhook notification unique identifier

name – name of the event

formatted as {context}.{entity}.{event}

 

e.g. order-management.quote.created

master-data.supplier.updated

invoicing.invoice.issued

account.user.created

 

data – contains the reference to the entity

createdDate - date when the event occurred

 

Sample:

 

{    "id": "dd849a7a-5038-49ab-ade3-b95df385cd73",    "name": "order-management.quote.submitted",    "data": {       "entityId": "dc236224-97bd-4e82-8920-2c5ffed78f9a"    },    "createDate": "2021-05-26T08:56:56.303Z" } 

 

After receiving the webhook notification, you decide what to do with it. Using the sample, you can download the Quote from the Order Management API using the Entity Id.

 

GET  https://www.shipserv.com/api/order-management/documents/dc236224-97bd-4e82-8920-2c5ffed78f9a 


List of supported webhook events

Order-Management

Events

Codes

RequestforQuote (Sent)

order-management.requestForQuote.submitted

RequestforQuote (Received)

order-management.requestForQuote.received

Quote (Sent)

order-management.quote.submitted

Quote (Received)

order-management.quote.received

PurchaseOrder (Sent)

order-management.purchaseOrder.submitted

PurchaseOrder (Received)

order-management.purchaseOrder.received

PurchaseOrderConfirmation (Sent)

order-management.purchaseOrderConfirmation.submitted

PurchaseOrderConfirmation (Received)

order-management. purchaseOrderConfirmation.received

Invoicing (WIP)

Events

Codes

Invoice (Sent)

invoicing.invoice.submitted

Invoice (Received)

invoicing.invoice.received

CreditNote (Sent)

Invoicing.credit-note.submitted

CreditNote (Received)

Invoicing.credit-note.received

Errors and failures

We consider the following cases as failures:

  • We can’t connect to the URL you specified (e.g. DNS failure, Network failure, or a firewall issue)

  • We send you the notification and got an error response e.g. HTTP 5XX

When are webhook notifications retried?

After a failure, we will retry to deliver every X minute for X hours.


How do I subscribe a webhook?

You can subscribe in two ways:

  • You contact us and we’ll set it up for you