{"openapi":"3.0.3","info":{"version":"2.2.0","title":"DCSA OpenAPI specification for Track & Trace","description":"Managing and sending Shipment-, Transport- and Equipment-events and subscriptions for Track &amp; Trace (T&amp;T). API specification issued by DCSA.org.\n\nFor explanation to specific values or objects please refer to the <a href='https://dcsa.org/wp-content/uploads/2021/10/202108_DCSA_P1_Information-Model-v3.3_TNT22_Final.pdf'>Information Model v3.3</a>\n\nPolling can be done on the <b>GET /v2/events</b> endPoint. It is also possible to setup a subscription on the <b>/v2/event-subscriptions</b> endPoints in order to use the push model. Here events are pushed as they occur.\n\nFor a changelog please click <a href=\"https://github.com/dcsaorg/DCSA-OpenAPI/blob/master/tnt/v2#v220\">here</a>\n","license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"contact":{"name":"Digital Container Shipping Association (DCSA)","url":"https://dcsa.org","email":"info@dcsa.org"}},"tags":[{"name":"Events","description":"Event operations"},{"name":"Subscriptions","description":"Subscription operations"},{"name":"Secret","description":"Update secret"}],"paths":{"/v2/events":{"get":{"tags":["Events"],"summary":"Find events.","description":"Returns all events filtered by the queryParameters.\n\n<b>NB</b>&#58; It is possible to combine queryParameters. When combining queryParameters be aware that it is also possible to make combinations that are mutual contradicting.\n\nExample&#58; <i>shipmentEventTypeCode=DRFT and equipmentEventTypeCode=GTIN</i>\n\nSince there is no event that can be a ShipmentEvent <u>and</u> an EquipmentEvent at the same time <b>this will return an empty list<b>!\n","parameters":[{"name":"eventType","in":"query","description":"The type of event(s) to filter by. Possible values are\n\n- SHIPMENT (Shipment events)\n- TRANSPORT (Transport events)\n- EQUIPMENT (Equipment events)\n\nIt is possible to select multiple values by comma (,) separating them. For multiple values the OR-operator is used. For example eventType=SHIPMENT,EQUIPMENT matches both Shipment- and Equipment-events.\n\nDefault value is all event types.\n","required":false,"style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["SHIPMENT","TRANSPORT","EQUIPMENT"]}}},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/shipmentEventTypeCode"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/documentTypeCode"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/carrierBookingReference"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/bookingReference"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/transportDocumentID"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/transportDocumentReference"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/transportEventTypeCode"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/scheduleID"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/transportCallID"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/vesselIMONumber"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/carrierVoyageNumber"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/exportVoyageNumber"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/carrierServiceCode"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/UNLocationCode"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/equipmentEventTypeCode"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/equipmentReference"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/eventCreatedDateTime"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/parameters/limit"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/parameters/cursor"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/parameters/sort"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/parameters/Api-Version-Major"}],"responses":{"200":{"description":"Successful operation","headers":{"API-Version":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/API-Version"},"Current-Page":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/Current-Page"},"Next-Page":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/Next-Page"},"Prev-Page":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/Prev-Page"},"Last-Page":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/Last-Page"},"First-Page":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/First-Page"}},"content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/schemas/transportEvent"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/schemas/shipmentEvent"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/schemas/equipmentEvent"}]}}}}},"default":{"description":"Unexpected error","headers":{"API-Version":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/API-Version"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/ERROR_DOMAIN/1.0.0#/components/schemas/error"},{"type":"object","properties":{"httpMethod":{"example":"GET"}}},{"type":"object","properties":{"requestUri":{"example":"https://dcsa.org/dcsa/tnt/v2/events"}}}]}}}}}}},"/v2/events/{eventID}":{"get":{"tags":["Events"],"summary":"Find events by eventID.","description":"Returns event with the specified eventID.","deprecated":true,"parameters":[{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/eventID"}],"responses":{"200":{"description":"Successful operation","headers":{"API-Version":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/API-Version"}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/schemas/shipmentEvent"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/schemas/transportEvent"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/schemas/equipmentEvent"}],"discriminator":{"propertyName":"eventType"},"example":{"eventID":"84db923d-2a19-4eb0-beb5-446c1ec57d34","eventType":"SHIPMENT","eventCreatedDateTime":"2019-11-12T07:41:00+08:30","eventSubtype":"ISSU","documentID":"84db923d-2a19-4eb0-beb5-446c1ec57d34","documentTypeCode":"TRD","reason":"All good"}}}}},"default":{"description":"Unexpected error","headers":{"API-Version":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/API-Version"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/ERROR_DOMAIN/1.0.0#/components/schemas/error"},{"type":"object","properties":{"httpMethod":{"example":"GET"}}},{"type":"object","properties":{"requestUri":{"example":"https://dcsa.org/dcsa/tnt/v2/events/123e4567-e89b-12d3-a456-426614174000"}}}]}}}}}}},"/v2/event-subscriptions":{"get":{"tags":["Subscriptions"],"summary":"Receive a list of your active subscriptions","parameters":[{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/parameters/limit"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/parameters/cursor"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/parameters/sort"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/parameters/Api-Version-Major"}],"responses":{"200":{"description":"Returns a list of subscriptions","headers":{"API-Version":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/API-Version"},"Current-Page":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/Current-Page"},"Next-Page":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/Next-Page"},"Prev-Page":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/Prev-Page"},"Last-Page":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/Last-Page"},"First-Page":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/First-Page"}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/subscription"}}}}},"default":{"description":"Unexpected error","headers":{"API-Version":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/API-Version"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/ERROR_DOMAIN/1.0.0#/components/schemas/error"},{"type":"object","properties":{"httpMethod":{"example":"GET"}}},{"type":"object","properties":{"requestUri":{"example":"https://dcsa.org/dcsa/tnt/v2/event-subscriptions"}}}]}}}}}},"post":{"tags":["Subscriptions"],"summary":"Create a subscription","parameters":[{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/parameters/Api-Version-Major"}],"requestBody":{"description":"Parameters used to configure the subscription. It is possible to only receive cirtain types of events by adding filter values to the subscription.\n\nAll values in the subscription body except&#58; <i>callback, secret and subscriptionID</i> will be used as filters. All filters specified must be filfilled in order to match an Event. A logical <b>AND</b> is used between filters. So\n\n<i>shipmentEventTypeCode=DRFT<b>&</b>carrierBookingReference=ABC123123</i>\n\nmeans that the events matched must both be Draft (shipmentEventTypeCode=DRFT) <b>and</b> be connected to carrierBookingReference ABC123123 (carrierBookingReference=ABC123123)\n\nFilters that are specified as (comma separated) lists use logical <b>OR</b> between list values. So\n\n<i>eventType=SHIPMENT,TRANSPORT</i>\n\nmeans that <b>both</b> Shipment- <b>and</b> Transport-events will be matched by this subscription.\n","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/subscriptionBodyWithSecret"}}}},"responses":{"201":{"description":"Subscription created","headers":{"API-Version":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/API-Version"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/subscription"}}}},"default":{"description":"Unexpected error","headers":{"API-Version":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/API-Version"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/ERROR_DOMAIN/1.0.0#/components/schemas/error"},{"type":"object","properties":{"httpMethod":{"example":"POST"}}},{"type":"object","properties":{"requestUri":{"example":"https://dcsa.org/dcsa/tnt/v2/event-subscriptions"}}}]}}}}},"callbacks":{"event":{"{$request.body.callbackUrl}":{"post":{"parameters":[{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/signatureHeader"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/subscriptionIDHeader"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/notificationSignature"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/apiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/schemas/transportEvent"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/schemas/shipmentEvent"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/schemas/equipmentEvent"}]}}}}},"responses":{"204":{"description":"Your server returns this code if it accepts the callback"}}}}}}}},"/v2/event-subscriptions/{subscriptionID}":{"get":{"tags":["Subscriptions"],"summary":"Find a subscription by subscription ID","parameters":[{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/subscriptionID"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/parameters/Api-Version-Major"}],"responses":{"200":{"description":"Subscription returned","headers":{"API-Version":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/API-Version"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/subscription"}}}},"default":{"description":"Unexpected error","headers":{"API-Version":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/API-Version"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/ERROR_DOMAIN/1.0.0#/components/schemas/error"},{"type":"object","properties":{"httpMethod":{"example":"GET"}}},{"type":"object","properties":{"requestUri":{"example":"https://dcsa.org/dcsa/tnt/v2/event-subscriptions/8fbdc2d8-57c8-48b9-a04b-18fd8ec1d809"}}}]}}}}}},"delete":{"tags":["Subscriptions"],"summary":"Stop a subscription, using the subscription ID","parameters":[{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/subscriptionID"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/parameters/Api-Version-Major"}],"responses":{"204":{"description":"Subscription stopped","headers":{"API-Version":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/API-Version"}}},"default":{"description":"Unexpected error","headers":{"API-Version":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/API-Version"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/ERROR_DOMAIN/1.0.0#/components/schemas/error"},{"type":"object","properties":{"httpMethod":{"example":"DELETE"}}},{"type":"object","properties":{"requestUri":{"example":"https://dcsa.org/dcsa/tnt/v2/event-subscriptions/8fbdc2d8-57c8-48b9-a04b-18fd8ec1d809"}}}]}}}}}},"put":{"tags":["Subscriptions"],"summary":"Alter a subscription","parameters":[{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/subscriptionID"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/parameters/Api-Version-Major"}],"requestBody":{"description":"Parameters used to configure the subscription","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/subscription"}}}},"responses":{"200":{"description":"Subscription updated","headers":{"API-Version":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/API-Version"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/subscription"}}}},"default":{"description":"Unexpected error","headers":{"API-Version":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/API-Version"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/ERROR_DOMAIN/1.0.0#/components/schemas/error"},{"type":"object","properties":{"httpMethod":{"example":"PUT"}}},{"type":"object","properties":{"requestUri":{"example":"https://dcsa.org/dcsa/tnt/v2/event-subscriptions/8fbdc2d8-57c8-48b9-a04b-18fd8ec1d809"}}}]}}}}}}},"/v2/event-subscriptions/{subscriptionID}/secret":{"put":{"tags":["Secret"],"summary":"Resets the Secret on an existing subscription.","parameters":[{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/parameters/subscriptionID"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/parameters/Api-Version-Major"}],"requestBody":{"description":"Parameters used to configure the subscription","required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"secret":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/schemas/secret"}}}]}}}},"responses":{"204":{"description":"Secret updated","headers":{"API-Version":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/API-Version"}}},"default":{"description":"Unexpected error","headers":{"API-Version":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.3#/components/headers/API-Version"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/ERROR_DOMAIN/1.0.0#/components/schemas/error"},{"type":"object","properties":{"httpMethod":{"example":"PUT"}}},{"type":"object","properties":{"requestUri":{"example":"https://dcsa.org/dcsa/tnt/v2/event-subscriptions/8fbdc2d8-57c8-48b9-a04b-18fd8ec1d809/secret"}}}]}}}}}}}},"components":{"schemas":{"eventTypes":{"type":"array","description":"List of eventType to filter by. If multiple values are selected - the OR-operator will be used.\n\nPossible values are\n- SHIPMENT (Shipment events)\n- TRANSPORT (Transport events)\n- EQUIPMENT (Equipment events)\n\nDefault is none as it will not filter on eventType if not specified.\n","example":["TRANSPORT","EQUIPMENT"],"items":{"type":"string","enum":["SHIPMENT","TRANSPORT","EQUIPMENT"]}},"subscriptionBody":{"type":"object","allOf":[{"type":"object","properties":{"callbackUrl":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/schemas/callbackUrl"}}},{"type":"object","properties":{"eventType":{"$ref":"#/components/schemas/eventTypes"}}},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/schemas/shipmentSubscriptionBody"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/schemas/transportSubscriptionBody"},{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/schemas/equipmentSubscriptionBody"}],"required":["callbackUrl"]},"subscriptionBodyWithSecret":{"type":"object","allOf":[{"$ref":"#/components/schemas/subscriptionBody"},{"type":"object","properties":{"secret":{"allOf":[{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/schemas/secret"},{"description":"A shared secret shared between the Publisher and the Subscriber. It is used to compute the contents of the Notification-Signature header. <b>Only</b> valid in POST calls - anywhere else must be omitted!"}]}}}],"required":["secret"]},"subscription":{"type":"object","allOf":[{"type":"object","properties":{"subscriptionID":{"$ref":"https://api.swaggerhub.com/domains/dcsaorg/EVENT_DOMAIN/1.0.4#/components/schemas/subscriptionID"}}},{"$ref":"#/components/schemas/subscriptionBody"}]}}}}