Create Container Event Subscription (V2)
Endpoint
POST https://api.portconnect.io/v2/subscriptions
Request Body with Container Numbers
{
"containers": [
{ "containerNumber": "MEDU3085895", "userDefinedReference" : "User ref 1"},
{ "containerNumber": "APHU6303593", "userDefinedReference" : "User ref 2"},
{ "containerNumber": "MEDU5129708", "userDefinedReference" : "User ref 3"}
],
"webhookURI": "https://api.yourcompany.co.nz/webhooks/portconnect", // Optional if emailAddressList is present
"webhookToken": "yoursecret", // Optional if emailAddressList is present
"emailAddressList": ["me@test.com"], // Optional if webhookURI and webhookToken are present
"portCode": "NZTRG",
"category": "IMPORT",
"eventTypeCodes": ["ALL", "Discharge"],
"facilityCode": null
}
Response Body with containers:
{
"subscriptionId": 32,
"containers": [
{
"expirationDatetime": "2023-06-20T14:50:30.3+12:00",
"containerNumber": "TCNU8050683",
"userDefinedReference": "Azure Test 2"
}
]
}
Request example using Booking Numbers
When creating a subscription against a Booking Number, callbacks will be sent for any Export containers with the specified booking number.
Request Body with Booking Numbers
Response Body with bookings:
Add label
© PortConnect 2023