Update Notification model to latest API ontology & receive Notifications without specified IDs

The current implementation of the /notifications endpoint requires the ONE Record client to provide an @id in the request payload.

Therefore, the following Request payload fails:

{
    "@type": "api:Notification",
    "api:hasEventType": {
        "@id": "api:LOGISTICS_OBJECT_UPDATED"
    },    
    "api:hasLogisticsObject": {
        "@id": "https://1r.example.com/logistics-objects/1a8ded38-1804-467c-a369-81a411416b7c"
    },
    "api:hasLogisticsObjectType": {
        "@id": "https://onerecord.iata.org/ns/cargo:Shipment"
    },
    "api:isTriggeredBy": {
        "@id": "https://1r.example.com/action-requests/599fea49-7287-42af-b441-1fa618d2aaed"
    },
    "@context": {
        "api": "https://onerecord.iata.org/ns/api#"
    }
}

due to missing "@id" which is required as iri in the NotificationHandler

However, according to the ONE Record API spec, it should be possible to send a Notification without the "@id" property set.

Also, the Notification endpoint expects the hasTopic property in the Requet payload, which has been removed from the ONE Record API ontology. Also, the hasLogisticsObjectType was added.

Properties in the currently implemented notification model:

  • hasEventType
  • hasLogisticsObject
  • hasTopic
  • isTriggeredBy
  • hasChangedProperty

Expected properties after change:

  • hasChangedProperty
  • hasEventType
  • isTriggeredBy
  • hasLogisticsObject
  • hasLogisticsObjectType
Edited Oct 31, 2023 by Daniel A. Doeppner
Assignee Loading
Time tracking Loading

GitLab hosted by dogado | Open Logistics Foundation Privacy Policy