MPET
  1. Listening
MPET
  • HNA-API
    • Operator - Handlings
      • cancelHandling
      • createDetachedHandling
      • createHandling
      • detachHandling
      • getDetachedHandling
      • moveHandling
      • updateDetachedHandling
      • updateHandling
    • Operator - Visits
      • cancelVisit
      • createVisit
      • finalizeLoadDischargeList
      • moveVisit
      • sendLoadDischargeList
      • updateVisit
    • Operator - Voyages
      • cancelVoyage
      • createVoyage
      • getVoyage
      • updateCargoDeclarations
      • updateVoyage
      • updateVoyageRestrictions
    • Listening
      • disconnectClient
        POST
      • listenToShipmentUpdates
        POST
      • listenToUpdate
        POST
      • resetPosition
        POST
      • updatePosition
        POST
  1. Listening

listenToUpdate

POST
/hna/listen
Request Request Example
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
curl --location --request POST '/hna/listen' \
--header 'Content-Type: application/json' \
--data-raw '{
    "clientId": "string",
    "maxTimeout": 0,
    "maxSize": 0
}'
Response Response Example
{
    "lastIndex": 0,
    "clientSegment": [
        0,
        0
    ],
    "updates": [
        {
            "index": 0,
            "timestamp": "2019-08-24T14:15:22Z",
            "before": {
                "type": "string",
                "voyageId": "string",
                "declarant": {
                    "fullName": "string",
                    "shortName": "string",
                    "emailAddress": "string",
                    "address": "string",
                    "city": "string",
                    "countryUnCode": "string",
                    "countryName": "string",
                    "zipCode": "string",
                    "phoneNumber": "string",
                    "faxNumber": "string",
                    "contact": "string",
                    "customsEORINumber": "string",
                    "ean": "string",
                    "chamberOfCommerceNumber": "string",
                    "scacCode": "string",
                    "scacDisplayCode": "string"
                },
                "cancelled": true,
                "modality": "road",
                "cargoDeclarants": [
                    {
                        "fullName": "string",
                        "shortName": "string",
                        "emailAddress": "string",
                        "address": "string",
                        "city": "string",
                        "countryUnCode": "string",
                        "countryName": "string",
                        "zipCode": "string",
                        "phoneNumber": "string",
                        "faxNumber": "string",
                        "contact": "string",
                        "customsEORINumber": "string",
                        "ean": "string",
                        "chamberOfCommerceNumber": "string",
                        "scacCode": "string"
                    }
                ],
                "voyageData": {
                    "inHouseDischargeNumber": "string",
                    "inHouseLoadingNumber": "string",
                    "eta": "2019-08-24T14:15:22Z",
                    "etd": "2019-08-24T14:15:22Z",
                    "modality": "string",
                    "voyageId": "string",
                    "teuOnArrival": 0,
                    "reservedTeu": 0,
                    "barge": {
                        "europeId": "string"
                    },
                    "additionalCapacity": {
                        "teuCapacity": 0,
                        "length": 0
                    },
                    "planningNotBeforeEta": true,
                    "entryPoint": {},
                    "exitPoint": {},
                    "previousVoyageId": "string"
                },
                "visits": [
                    {
                        "visitId": "string",
                        "visitData": {
                            "modality": "string",
                            "externalReferenceVisit": "string",
                            "eta": "string"
                        },
                        "requestedVisitData": {},
                        "plannedVisitData": {},
                        "visitCancelled": true,
                        "terminal": {},
                        "handlings": "2019-09-12T21:34:22Z",
                        "loadDischargeListDeclarations": [
                            {}
                        ],
                        "endOfOperations": "2019-09-12T21:34:22Z",
                        "loadDischargeListClosed": "2019-08-24T14:15:22Z",
                        "loadDischargeListClosing": "2019-08-24T14:15:22Z",
                        "visitCompleted": true,
                        "loadDischargeListStatus": "open",
                        "terminalRemarks": "string",
                        "modality": "road",
                        "neverAcknowledged": true,
                        "arrived": true,
                        "visitDeclaration": {
                            "acknowledgedByTerminal": true,
                            "status": "string",
                            "rejectReasons": [
                                {
                                    "code": "string",
                                    "terminalDescription": "string",
                                    "parsedReason": "string"
                                }
                            ]
                        }
                    }
                ]
            },
            "after": {
                "type": "string",
                "voyageId": "string",
                "declarant": {
                    "fullName": "string",
                    "shortName": "string",
                    "emailAddress": "string",
                    "address": "string",
                    "city": "string",
                    "countryUnCode": "string",
                    "countryName": "string",
                    "zipCode": "string",
                    "phoneNumber": "string",
                    "faxNumber": "string",
                    "contact": "string",
                    "customsEORINumber": "string",
                    "ean": "string",
                    "chamberOfCommerceNumber": "string",
                    "scacCode": "string",
                    "scacDisplayCode": "string"
                },
                "cancelled": true,
                "modality": "road",
                "cargoDeclarants": [
                    {
                        "fullName": "string",
                        "shortName": "string",
                        "emailAddress": "string",
                        "address": "string",
                        "city": "string",
                        "countryUnCode": "string",
                        "countryName": "string",
                        "zipCode": "string",
                        "phoneNumber": "string",
                        "faxNumber": "string",
                        "contact": "string",
                        "customsEORINumber": "string",
                        "ean": "string",
                        "chamberOfCommerceNumber": "string",
                        "scacCode": "string"
                    }
                ],
                "voyageData": {
                    "inHouseDischargeNumber": "string",
                    "inHouseLoadingNumber": "string",
                    "eta": "2019-08-24T14:15:22Z",
                    "etd": "2019-08-24T14:15:22Z",
                    "modality": "string",
                    "voyageId": "string",
                    "teuOnArrival": 0,
                    "reservedTeu": 0,
                    "barge": {
                        "europeId": "string"
                    },
                    "additionalCapacity": {
                        "teuCapacity": 0,
                        "length": 0
                    },
                    "planningNotBeforeEta": true,
                    "entryPoint": {},
                    "exitPoint": {},
                    "previousVoyageId": "string"
                },
                "visits": [
                    {
                        "visitId": "string",
                        "visitData": {
                            "modality": "string",
                            "externalReferenceVisit": "string",
                            "eta": "string"
                        },
                        "requestedVisitData": {},
                        "plannedVisitData": {},
                        "visitCancelled": true,
                        "terminal": {},
                        "handlings": "2019-09-12T21:34:22Z",
                        "loadDischargeListDeclarations": [
                            {}
                        ],
                        "endOfOperations": "2019-09-12T21:34:22Z",
                        "loadDischargeListClosed": "2019-08-24T14:15:22Z",
                        "loadDischargeListClosing": "2019-08-24T14:15:22Z",
                        "visitCompleted": true,
                        "loadDischargeListStatus": "open",
                        "terminalRemarks": "string",
                        "modality": "road",
                        "neverAcknowledged": true,
                        "arrived": true,
                        "visitDeclaration": {
                            "acknowledgedByTerminal": true,
                            "status": "string",
                            "rejectReasons": [
                                {
                                    "code": "string",
                                    "terminalDescription": "string",
                                    "parsedReason": "string"
                                }
                            ]
                        }
                    }
                ]
            },
            "type": "string",
            "triggeredByOrganisation": true,
            "triggeredByUser": true,
            "triggeredByRecipient": {}
        }
    ]
}

Request

Body Params application/json

Examples

Responses

🟢200default response
application/json
Body

Modified at 12 months ago
Previous
listenToShipmentUpdates
Next
resetPosition
Built with