Excerpt | ||
---|---|---|
| ||
|
...
...
V2 Summary
To receive callbacks for particular container events, you need to create a subscription by POSTing to the subscriptions endpoint.
Subscriptions can be created by Container Number or Booking Number.
For version 2, a new subscription is created for every unique combination of PortCode
, Category
and FacilityCode
.
Callbacks can be sent as emails to multiple email addresses, or as HTTP requests. When creating the subscription you must pass either WebhookURI and WebhookToken or an EmailAddressList.
For the eventTypeCodes
we allow for more than 10 event types to be specified in the subscription request. Users can also use the "ALL" to subscribe to all event types.
V1 vs V2 differences
Version 1 allows a single container visit event type code per request, Version 2 supports multiple container visit event type codes in a single request. Version 2 also supports the use of “ALL” to subscribe to all events for one or more containers.
Endpoint
Code Block |
---|
POST https://api.portconnect.io/v2/subscriptions |
...