/
Webhook Callback Payload

Webhook Callback Payload

 

When PortConnect detects an event that matches your subscription, it will send an HTTP POST to your specified end point.  Event matching happens when new events are processed into the PortConnect system, and also when the subscription is first created (for events that have occurred for a currently active container).

For testing purposes, you may find it useful to create a webhook uri using Request Bin or similar. This allows you to easily view the webhook payload.

Event Payload example

Multiple events may be returned in a single payload, as in this example:

[ { "subscriptionEventId": 13752, "subscriptionId": 9, "partnerPortCode": "NZAKL", "containerVisitTypeCode": "EXPORT", "containerVisitEventTypeCode": "GATEIN", "containerVisitEventDatetime": "2019-06-19T12:41:02+12:00", "containerVisitEventLocation": "NZAKL", "containerNumber": "APHU6303593", "containerIsoTypeCode": "4510", "containerVisitUri": "v1/container-visits/5046168", "subscriptionContainerId": 12, "userDefinedReference": "User ref 1", "containerVisitEventValue": "Road", "containerVisitEventValue2": "REL328", "inboundVesselRef":null, "inboundVesselName":null, "inboundVesselIMONumber":null, "outboundVesselRef":"KOC0130", "outboundVesselName":"KOTA LOCENG", "outboundVesselIMONumber":9628336, "bookingReference": "ACD0764410", "containerStatus": "Full", "containerOperatorSCACCode": "ANNU" }, { "subscriptionEventId": 13752, "subscriptionId": 9, "partnerPortCode": "NZAKL", "containerVisitTypeCode": "EXPORT", "containerVisitEventTypeCode": "GATEIN", "containerVisitEventDatetime": "2019-06-19T12:41:02+12:00", "containerVisitEventLocation": "NZAKL", "containerNumber": "MEDU3085895", "containerIsoTypeCode": "2210", "containerVisitUri": "v1/container-visits/5046572", "subscriptionContainerId": 11, "userDefinedReference": "User ref 2", "containerVisitEventValue": "Road", "containerVisitEventValue2": "REL328", "inboundVesselRef":null, "inboundVesselName":null, "inboundVesselIMONumber":null, "outboundVesselRef":"KOC0130", "outboundVesselName":"KOTA LOCENG", "outboundVesselIMONumber":9628336, "bookingReference": "ACD0764410", "containerStatus": "Full", "containerOperatorSCACCode": "ANNU" }, { "subscriptionEventId": 13752, "subscriptionId": 9, "partnerPortCode": "NZAKL", "containerVisitTypeCode": "EXPORT", "containerVisitEventTypeCode": "GATEIN", "containerVisitEventDatetime": "2019-06-19T12:41:02+12:00", "containerVisitEventLocation": "NZAKL", "containerNumber": "MEDU5129708", "containerIsoTypeCode": "2210", "containerVisitUri": "v1/container-visits/5046997", "subscriptionContainerId": 13, "userDefinedReference": "User ref 3", "containerVisitEventValue": "Road", "containerVisitEventValue2": "REL328", "inboundVesselRef":null, "inboundVesselName":null, "inboundVesselIMONumber":null, "outboundVesselRef":"KOC0130", "outboundVesselName":"KOTA LOCENG", "outboundVesselIMONumber":9628336, "bookingReference": "ACD0764410", "containerStatus": "Full", "containerOperatorSCACCode": "ANNU" } ]

 

Webhook token

Included as a header key of the callback is a value X-WebhookToken which includes the webhookToken value specified when creating the subscription.   This is designed to help protect your webhook end point from unauthorised access.

headers accept: application/json content-length: 16577 content-type: application/json; charset=utf-8 host: eooh8n59jjcq4mz.m.pipedream.net x-webhooktoken: 123-456-789-000

 

Codes

PortConnect uses many codes and a list of our codes can be found here, Code Lists

Related content

V1 - Create Container Event Subscriptions
V1 - Create Container Event Subscriptions
More like this
V2 - Create Container Event Subscription
V2 - Create Container Event Subscription
Read with this
Webhook Callback Payload - Vessel Schedule
Webhook Callback Payload - Vessel Schedule
More like this
Container Visit Event Types
Container Visit Event Types
Read with this
Create Vessel Schedule Subscription
Create Vessel Schedule Subscription
More like this
Container Event Subscriptions API
Container Event Subscriptions API
Read with this

© PortConnect 2023