GET /awbs/{urn}

GET /awbs/{urn}

Use this endpoint to get all AirwayBills linked to your URN

By using one of the Customer/URN provided by the "Customer List", the user will have the possibility to display its whole list of active AWB. 

List of data which can be displayed: 

myShipment list:

  • List of active AWB of one customer (based on the URN)
  • Shipments Overview : Same information as the ones that we have as a logged-in customer in myCargo
  • Filters : Possibility to filter on the Status, Metastatus, Weight, Product and Origin/Destination
  • Quick access to the details of one AWB

 

HEADER

Name
Value
Required
Authorization Bearer {{token}} true

RESOURCE

  GET https://api.klm.com/cargo/tracking/awbs/{urn}

QUERY PARAMETERS

Name
Value
Required
urn id of the agent true

RESPONSE PARAMETERS

Name
Type
Multiplicity
Description

- Metadata

Object 0..1  
| - page Integer 1 Number of the current page
| - size Integer 1 Number of shipments per page
| - sort String 0..1 Sorting of the shipments list
| - totalElements Integer 1 Total of shipments
| - totalPages Integer 1 Total of pages

- ShipmentOverview

Object 1 Shipment overview with all totals per status
| - totalShipments Integer 1 Total of shipments
| - totalBookedShipments Integer 1 Total of booked shipments
| - totalEnRouteShipments Integer 1 Total of en route shipments
| - totalDeliveredShipments Integer 1 Total of delivered shipments
| - totalPickedUpShipments Integer 1 Total of picked up shipments
| - totalReplannedShipments Integer 1

Total of replanned shipments

| - totalToBeReplannedShipments Integer 1

Total of to be replanned shipments

- Shipments

Arrays of Object 0..n

The list of shipments linked to the provided URN

| - summary Object 1

General information of the shipment

| | - originLocationId String 1

Origin of the shipment

| | - finalDestinationLocationId String 1

Destination of the shipment

| | - airlinePrefixe String 1

AWB airline prefix number

| | - awbSerialNumber String 1

AWB unique identification code

| | - totalPieceQuantity Integer 1

Total number of pieces

| | - grossWeightMeasure String 0..1

Unit Weight

| | - totalGrossWeightMeasure String 0..1

Total Weight of the Shipment (without unit)

| | - grossVolumeMeasure String 0..1

Volume Weight

| | - totalGrossVolumeMeasure String 0..1

Total Volume of the Shipment (without unit)

| | - productCode String 0..1

Product Code

| | - transportPhase String 1

State of the shipment (Booked, En route or Delivered)

| | - metaStatus String 1

Meta-Status to describe if the shipment if on schedule or not

| - Agent

Object 0..1  
| | - name String 0..1 agent name
| | - Id String 0..1 agent Id

| - Shipper

Object 0..1  
| | - name String 0..1 shipper name
| | - Id String 0..1 shipper Id

| - Consignee

Object 0..1  
| | - name String 0..1 consignee name
| | - Id String 0..1 consignee Id

| - lastStatuses

Array of Objects 1..n  

| | - occured

Boolean 1 Already occured or expected

| | - occurrenceDateTime

Object 0..1 Date occurrence time (UTC)
| | | - dateUtc   1 UTC date in ms

| | | - dateLT

  1 Local date in ms
| | - reasonCode String 1 Milestone code
| | - routingLocationId String 1 Station Name
| | - flight Object 0..1 Flight information
| | | - carrierCode String 1 Flight Carrier
| | | - flightNumber String 1 Flight identification number
| | | - flightType String 0..1 Type of the flight
| | | - operatedBy String 0..1 Carrier which operate the flight
| | - pieceQuantity Integer 1 Pieces at the station
| | - sequence Integer 1 Occurrence order (per segment or status)
| | - isLastStatus Boolean 1 If it is the Last Status or not
| - _links Object HATEOAS link 1 Represent a HATEOAS link to get the details of awb
| | - details Object 1  
| | | - href String 1 Url to the details of awb
- _links   1 Represent a HATEOAS link to navigate
| - self Object 1  
| | - href String 1 Current url
| - next Object 0..1 Next page if exists
| | - href String 1 Next page url
| - prev Object 0..1 Previous page if exists
| | - href String 1 Previous page url

SAMPLE REQUEST

GET https://api.ute1.klm.com/cargo/tracking/awbs/12345?page=1&size=10

SAMPLE RESPONSE

{
  "metadata": {
    "page": 1,
    "size": 10,
    "sort": null,
    "totalElements": 15,
    "totalPages": 2
  },
  "shipmentOverview": {
    "totalShipments": 15,
    "totalBookedShipments": 1,
    "totalEnRouteShipments": 7,
    "totalDeliveredShipments": 3,
    "totalPickedUpShipments": null,
    "totalReplannedShipments": 1,
    "totalToBeReplannedShipments": 3
  },
  "shipments": [
    {
      "lastStatuses": [
        {
          "occurred": true,
          "occurenceDateTime": {
            "dateUtc": 1496516400000,
            "dateLt": 1496523600000
          },
          "reasonCode": "DEP",
          "routingLocationId": "STR",
          "flight": {
            "carrierCode": "KL",
            "flightNumber": "8326",
            "flightType": "TRUCK"
          },
          "pieceQuantity": 13,
          "sequence": 4,
          "isLastStatus": true
        }
      ],
      "summary": {
        "originLocationId": "STR",
        "finalDestinationLocationId": "PVG",
        "airlinePrefixe": "074",
        "awbSerialNumber": "47554581",
        "totalPieceQuantity": 13,
        "grossWeightMeasure": "KGM",
        "totalGrossWeightMeasure": "1242.5",
        "totalGrossVolumeMeasure": "0.0",
        "transportPhase": "EN_ROUTE",
        "metaStatus": "REPLANNED"
      },
      "_links": {
        "details": {
          "href": "http://api.ute1.klm.com/cargo/tracking/awb/074-47554581"
        }
      }
    },
    {
      "lastStatuses": [
        {
          "occurred": true,
          "occurenceDateTime": {
            "dateUtc": 1493341380000,
            "dateLt": 1493348580000
          },
          "reasonCode": "RCF",
          "routingLocationId": "CDG",
          "flight": {
            "carrierCode": "AF",
            "flightNumber": "071D",
            "flightType": "TRUCK"
          },
          "pieceQuantity": 6,
          "sequence": 6,
          "isLastStatus": true
        }
      ],
      "summary": {
        "originLocationId": "LHR",
        "finalDestinationLocationId": "NBO",
        "airlinePrefixe": "057",
        "awbSerialNumber": "25122720",
        "totalPieceQuantity": 6,
        "grossWeightMeasure": "KGM",
        "totalGrossWeightMeasure": "312.0",
        "totalGrossVolumeMeasure": "0.0",
        "transportPhase": "EN_ROUTE",
        "metaStatus": "TO_BE_REPLANNED"
      },
      "_links": {
        "details": {
          "href": "http://api.ute1.klm.com/cargo/tracking/awb/057-25122720"
        }
      }
    },
    {
      "lastStatuses": [
        {
          "occurred": true,
          "occurenceDateTime": {
            "dateUtc": 1495000680000,
            "dateLt": 1495029536738
          },
          "reasonCode": "BKD",
          "routingLocationId": "PER",
          "pieceQuantity": 3,
          "sequence": 1,
          "isLastStatus": true
        }
      ],
      "summary": {
        "originLocationId": "PER",
        "finalDestinationLocationId": "OUA",
        "airlinePrefixe": "057",
        "awbSerialNumber": "26294376",
        "totalPieceQuantity": 3,
        "grossWeightMeasure": "KGM",
        "totalGrossWeightMeasure": "15.0",
        "totalGrossVolumeMeasure": "0.0",
        "transportPhase": "BOOKED",
        "metaStatus": "BOOKED"
      },
      "_links": {
        "details": {
          "href": "http://api.ute1.klm.com/cargo/tracking/awb/057-26294376"
        }
      }
    },
    {
      "lastStatuses": [
        {
          "occurred": true,
          "occurenceDateTime": {
            "dateUtc": 1505346900000,
            "dateLt": 1505354100000
          },
          "reasonCode": "DEP",
          "routingLocationId": "AMS",
          "flight": {
            "carrierCode": "AF",
            "flightNumber": "6969",
            "flightType": "PLANE"
          },
          "pieceQuantity": 3,
          "sequence": 7,
          "isLastStatus": true
        }
      ],
      "summary": {
        "originLocationId": "BKK",
        "finalDestinationLocationId": "CDG",
        "airlinePrefixe": "074",
        "awbSerialNumber": "33932441",
        "totalPieceQuantity": 3,
        "grossWeightMeasure": "KGM",
        "totalGrossWeightMeasure": "1406.0",
        "totalGrossVolumeMeasure": "0.0",
        "transportPhase": "EN_ROUTE",
        "metaStatus": "TO_BE_REPLANNED"
      },
      "_links": {
        "details": {
          "href": "http://api.ute1.klm.com/cargo/tracking/awb/074-33932441"
        }
      }
    },
    {
      "lastStatuses": [
        {
          "occurred": true,
          "occurenceDateTime": {
            "dateUtc": 1499933700000,
            "dateLt": 1499940900000
          },
          "reasonCode": "DEP",
          "routingLocationId": "AMS",
          "flight": {
            "carrierCode": "XC",
            "flightNumber": "1009",
            "flightType": "PLANE"
          },
          "pieceQuantity": 8,
          "sequence": 7,
          "isLastStatus": true
        }
      ],
      "summary": {
        "originLocationId": "ORD",
        "finalDestinationLocationId": "LHR",
        "airlinePrefixe": "074",
        "awbSerialNumber": "44665622",
        "totalPieceQuantity": 8,
        "grossWeightMeasure": "KGM",
        "totalGrossWeightMeasure": "69.0",
        "totalGrossVolumeMeasure": "0.0",
        "transportPhase": "EN_ROUTE",
        "metaStatus": "ON_SCHEDULE"
      },
      "_links": {
        "details": {
          "href": "http://api.ute1.klm.com/cargo/tracking/awb/074-44665622"
        }
      }
    },
    {
      "lastStatuses": [
        {
          "occurred": true,
          "occurenceDateTime": {
            "dateUtc": 1489725900000,
            "dateLt": 1489729500000
          },
          "reasonCode": "ARR",
          "routingLocationId": "AMS",
          "flight": {
            "carrierCode": "KL",
            "flightNumber": "1228",
            "flightType": "PLANE"
          },
          "pieceQuantity": 10,
          "sequence": 8,
          "isLastStatus": true
        }
      ],
      "summary": {
        "originLocationId": "IAH",
        "finalDestinationLocationId": "BRU",
        "airlinePrefixe": "074",
        "awbSerialNumber": "97866904",
        "totalPieceQuantity": 10,
        "grossWeightMeasure": "KGM",
        "totalGrossWeightMeasure": "200.0",
        "totalGrossVolumeMeasure": "0.0",
        "transportPhase": "EN_ROUTE",
        "metaStatus": "ON_SCHEDULE"
      },
      "_links": {
        "details": {
          "href": "http://api.ute1.klm.com/cargo/tracking/awb/074-97866904"
        }
      }
    },
    {
      "lastStatuses": [
        {
          "occurred": true,
          "occurenceDateTime": {
            "dateUtc": 1489725900000,
            "dateLt": 1489729500000
          },
          "reasonCode": "ARR",
          "routingLocationId": "AMS",
          "flight": {
            "carrierCode": "KL",
            "flightNumber": "1228",
            "flightType": "PLANE"
          },
          "pieceQuantity": 10,
          "sequence": 8,
          "isLastStatus": true
        }
      ],
      "summary": {
        "originLocationId": "IAH",
        "finalDestinationLocationId": "BRU",
        "airlinePrefixe": "074",
        "awbSerialNumber": "92608235",
        "totalPieceQuantity": 10,
        "grossWeightMeasure": "KGM",
        "totalGrossWeightMeasure": "200.0",
        "totalGrossVolumeMeasure": "0.0",
        "transportPhase": "EN_ROUTE",
        "metaStatus": "ON_SCHEDULE"
      },
      "_links": {
        "details": {
          "href": "http://api.ute1.klm.com/cargo/tracking/awb/074-92608235"
        }
      }
    },
    {
      "lastStatuses": [
        {
          "occurred": true,
          "occurenceDateTime": {
            "dateUtc": 1489725900000,
            "dateLt": 1489729500000
          },
          "reasonCode": "ARR",
          "routingLocationId": "AMS",
          "flight": {
            "carrierCode": "KL",
            "flightNumber": "1228",
            "flightType": "PLANE"
          },
          "pieceQuantity": 10,
          "sequence": 8,
          "isLastStatus": true
        }
      ],
      "summary": {
        "originLocationId": "IAH",
        "finalDestinationLocationId": "BRU",
        "airlinePrefixe": "074",
        "awbSerialNumber": "86863055",
        "totalPieceQuantity": 10,
        "grossWeightMeasure": "KGM",
        "totalGrossWeightMeasure": "200.0",
        "totalGrossVolumeMeasure": "0.0",
        "transportPhase": "EN_ROUTE",
        "metaStatus": "ON_SCHEDULE"
      },
      "_links": {
        "details": {
          "href": "http://api.ute1.klm.com/cargo/tracking/awb/074-86863055"
        }
      }
    },
    {
      "lastStatuses": [
        {
          "occurred": true,
          "occurenceDateTime": {
            "dateUtc": 1489725900000,
            "dateLt": 1489729500000
          },
          "reasonCode": "ARR",
          "routingLocationId": "AMS",
          "flight": {
            "carrierCode": "KL",
            "flightNumber": "1228",
            "flightType": "PLANE"
          },
          "pieceQuantity": 10,
          "sequence": 8,
          "isLastStatus": true
        }
      ],
      "summary": {
        "originLocationId": "IAH",
        "finalDestinationLocationId": "BRU",
        "airlinePrefixe": "074",
        "awbSerialNumber": "40301424",
        "totalPieceQuantity": 10,
        "grossWeightMeasure": "KGM",
        "totalGrossWeightMeasure": "200.0",
        "totalGrossVolumeMeasure": "0.0",
        "transportPhase": "EN_ROUTE",
        "metaStatus": "ON_SCHEDULE"
      },
      "_links": {
        "details": {
          "href": "http://api.ute1.klm.com/cargo/tracking/awb/074-40301424"
        }
      }
    },
    {
      "lastStatuses": [
        {
          "occurred": true,
          "occurenceDateTime": {
            "dateUtc": 1489725900000,
            "dateLt": 1489729500000
          },
          "reasonCode": "ARR",
          "routingLocationId": "AMS",
          "flight": {
            "carrierCode": "KL",
            "flightNumber": "1228",
            "flightType": "PLANE"
          },
          "pieceQuantity": 10,
          "sequence": 8,
          "isLastStatus": true
        }
      ],
      "summary": {
        "originLocationId": "IAH",
        "finalDestinationLocationId": "BRU",
        "airlinePrefixe": "074",
        "awbSerialNumber": "32179464",
        "totalPieceQuantity": 10,
        "grossWeightMeasure": "KGM",
        "totalGrossWeightMeasure": "200.0",
        "totalGrossVolumeMeasure": "0.0",
        "transportPhase": "EN_ROUTE",
        "metaStatus": "ON_SCHEDULE"
      },
      "_links": {
        "details": {
          "href": "http://api.ute1.klm.com/cargo/tracking/awb/074-32179464"
        }
      }
    }
  ],
  "_links": {
    "self": {
      "href": "http://api.ute1.klm.com/cargo/tracking/awbs/22667?page=1&size=10"
    },
    "next": {
      "href": "http://api.ute1.klm.com/cargo/tracking/awbs/22667?page=2&size=10"
    }
  }
}

ERROR RESPONSES

Error

400 : Bad Request : invalid urn format

"Urn must be ([0-9]{1,6})"

412 : Precondition failed : No shipments found

Docs Navigation