Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Error rendering macro 'excerpt-include' : No link could be created for 'PUG:Container Event Subscriptions'.

Endpoint

POST https://api.portconnect.io/v2/subscriptions

Request Body

  • subscriptionData: The object defining the events being subscribed to.

Example Request:

Create a new container event subscription.

POST https://api.portconnect.io/v2/subscriptions

Example Request Body

{
  "portCode": "NZTRG",
  "category": "IMPORT",
  "eventTypeCodes": ["DISCHARGE", "AVAILABLE"],
  "webhookURI": "https://enb8apr7yans.x.pipedream.net", // Optional if emailAddressList is present
  "webhookToken": "123-456-789-000", // Optional if emailAddressList is present
  "emailAddressList": ["me@test.com"], // Optional if webhookURI and webhookToken is present
  "facilityCode": null,
  "containers": [
    {"containerNumber": "TCNU8050683", "userDefinedReference" : "Azure Test 2"}  
  ]
}

Example Response:

{
    "subscriptionId": 162,
    "containers": [
        {
            "expirationDatetime": "2023-06-23T11:21:49.1+12:00",
            "subscriptionContainerId": 679,
            "containerNumber": "FSCU8191670",
            "userDefinedReference": "LFT ISO code"
        }
    ]
}
  • No labels