In order to understand the Export Pre-advice submission, some familiarity with the Export Pre-advice User Guide is recommended. This details how export pre-advice submitted via the PortConnect website. The structure of the API is conceptually very similar to this screen, comprising a header with a list of containers being submitted.
Endpoint
POST https://api.portconnect.io/v1/export-preadvices
Request Body
Name | Type | Description |
---|---|---|
header | PreadviceHeader | Pre-advice header information |
containers | PreadviceContainer[] | List of container information |
comments | string (optional) | Additional comments (not included in Swagger documentation) |
PreadviceHeader
Name | Type | Description |
---|---|---|
ShipperName | string | Shipper name |
ConsigneeName | string | Consignee name |
BookingReference | string (required) | Booking reference |
MessageAction | MessageActions? | Message action type |
PointOfOriginCode | string | Point of origin code |
LoadPortFacility | string (required) | Load port facility |
Vessel | GenericPreadviceVessel | Vessel information |
NotificationEmails | string[] | List of notification email addresses |
MessageType | PreadviceMessageTypes? | Pre-advice message type |
TradingPartnerCode | string | Trading partner code |
UserName | string | User name |
UserReference | string | User reference |
LineOperatorCode | string | Line operator code |
LoadPortCode | string (required) | Load port code |
PortOfDischarge | string | Port of discharge |
ForeignPortOfDischarge | string | Foreign port of discharge |
OverseasDestinationFinal | string | Overseas destination final |
PreadviceContainer
Name | Type | Description |
---|---|---|
HazardousCertificateUri | string | URI for hazardous certificate |
LatestSubmissionStatus | GenericPreadviceContainerSubmission | Latest submission status of the container |
CurrentStatus | string | Current status of the container |
ContainerNumber | string (required) | Container number |
AttachedContainerNumbers | List<string> | List of attached container numbers |
IsoTypeCode | string (required) | ISO type code for the container |
FlexiTank | bool? | Indicates if the container is a flexi tank |
IsFull | bool? | Indicates if the container is full |
CommodityCode | string (required) | Commodity code |
IsNonOperatingReefer | bool? | Indicates if the container is a non-operating reefer |
Refrigeration | GenericPreadviceRefrigeration | Refrigeration details for the container |
Vent | GenericPreadviceVent | Vent details for the container |
IMEX | GenericPreadviceIMEX | IMEX details for the container |
CargoWeightKg | float | Cargo weight in kilograms |
TotalWeightKg | float | Total weight of the container in kilograms |
Hazardous | GenericPreadviceHazardous[] | List of hazardous details |
OverGauge | GenericPreadviceOverDimension[] | List of over-dimension details |
ContainerSeals | GenericPreadviceContainerSeal[] | List of container seals |
ArrivalCarrierType | GenericPreadviceArrivalCarrierTypes? | Arrival carrier type |
Carrier | string | Carrier details |
Example Request:
POST https://apitest.portconnect.io/v1/export-preadvices
Example Request Body:
{ "header": { "shipperName": "ALNEMAH HALAL MEAT LIMITED", "bookingReference": "1AKL026740", "lineOperatorCode": "HSUD", "loadPortCode": "NZTRG", "portOfDischarge": "USLGB", "foreignPortOfDischarge": "USLGB" "pointOfOriginCode": "Bay of Plenty", "loadPortFacility": "TCT", "vessel": { "shipName": "DEBUSSY", "voyageNumber": "138N", "partnerPortShippingReference": "USY138N", }, "notificationEmails": [ "Cameron.Pitches@portconnect.co.nz" ], "userReference": "CAMTEST001" }, "containers": [ { "containerNumber": "CDPU3736837", "isoTypeCode": "2232", "flexiTank": false, "isFull": true, "commodityCode": "0201", "isNonOperatingReefer": false, "refrigeration": { "isFantainer": false, "requiredTemperature": -5.0, "refrigerationType": "Chilled" }, "cargoWeightKg": 28000.0, "totalWeightKg": 30000.0, "containerSeals": [ { "sealType": "Shipper", "sealCode": "555" } ], "arrivalCarrierType": "Truck" } ] }
Example Response:
Export pre-advice success
{ "success": true, "errors": [], "containers": [ { "containerNumber": "CDPU3736837", "errors": [], "success": true } ] }
However, should the requiredTemperature value be set to -50 in the example above, then the following is returned:
Export pre-advice partial failure
{ "success": true, "errors": [], "containers": [ { "containerNumber": "CDPU3736837", "errors": [ "Temperature too high/low for the selected commodity (Range: -5.0 to 2.0). Change commodity or contact Terminal" ], "success": false } ] }