Webhooks
The events performed by OMS, such as the results of actions carried out in the OMS and the new states of the domain objects, are transferred by OMS to third-party software via webhooks.
When a particular event occurs, webhooks asynchronously notify users who have subscribed to that event via a URL. The webhooks under the roof of OMS are grouped under the four headings below:
Subscribe
To monitor the actions relating to a particular event, an OMS webhook object must be created containing information such as target_url, event_type, etc.
event_type
Event subject to notification
target_url
URL with the event information
retry_countdown_config
Can be defined for retry time (fixed-linear-exponential-random)
additional_headers
If additional header information is required for the requested service, this can be filled (can be null)
secret_key
can be used if an encrypted key is required for the request. (can be null)
curl -X POST \
> -H "Authorization: Token <secret login token>" \
> -H "Content-Type: application/json" \
> -d '{"event_type": "package-created",
"target_url": "http://example.com/", "secret_key": "secret", }' \
> http://oms-app.com/whisperer/hooks/Unsubscribe
curl -X DELETE http://oms-app.com/whisperer/hooks/{webhook-id}/
> -H "Authorization: Token <secret login token>" \Creating Packages and Status Updates
package.createdTriggered when a new package is created.Triggered when the
package.status.transitionedstatus of a package is updated totransitioned.Triggered when the
package.status.packedstatus of a package is updated topacked.Triggered when the
package.status.cancelledstatus of a package is updated tocancelled.Triggered when the
package.status.shippedstatus of a package is updated toshipped.Triggered when the
package.status.packed_for_refundstatus of a package is updated topacked_for_refund.Triggered when the
awb_numberof apackage.shipment.awb_numberpackage is set.
Changing Shipment Status
shipment.createdTriggered when a new “shipment” is created for a package or a transfer is set to be made to another location.shipment.status.updatedTriggered when the “shipment” or transfer status of a package is updated.shipment.cancelledTriggered when the “shipment” or inter-location transfer of a package is canceled.
Creating Transfers and Status Updates
transfer.status.createdTriggered when new transfers are created.Triggered when the
transfer.status.transitionedstatus of a transfer is updated totransitioned.Triggered when the
transfer.status.in_transitstatus of a transfer is updated toin_transit.Triggered when the
transfer.status.transferredstatus of a transfer is updated totransferred.Triggered when the
transfer.status.cancelledstatus of a transfer is updated tocancelled.Triggered when the
transfer.status.ready_to_shipmentstatus of a transfer is updated toready_to_shipment.
Creating and Updating Stock Locations
stock_location.createdTriggered when a new stock location is created.stock_location.updatedwhen a stock location is updated
Last updated
Was this helpful?

