From b691e9cbc4c77d36fcd1d5bee4782ffd7e1f9638 Mon Sep 17 00:00:00 2001 From: preetamnpr <128618622+preetamnpr@users.noreply.github.com> Date: Wed, 25 Sep 2024 14:22:31 +0200 Subject: [PATCH 1/5] DT-1691 removed CommunicationChannelCode from messages. --- .../messages/booking-api-2.0.0-dg.json | 1 - .../booking-api-2.0.0-reefer-temp-change.json | 1 - .../messages/booking-api-2.0.0-reefer.json | 1 - .../booking-api-2.0.0-regular-2re1c.json | 1 - .../booking-api-2.0.0-regular-2re2c.json | 1 - .../booking-api-2.0.0-regular-cho-dest.json | 1 - .../booking-api-2.0.0-regular-cho-orig.json | 1 - ...pi-2.0.0-regular-non-operating-reefer.json | 1 - ...oking-api-2.0.0-regular-shipper-owned.json | 1 - .../booking/schemas/booking-api-v20.json | 1270 ++++++++--------- 10 files changed, 558 insertions(+), 721 deletions(-) diff --git a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-dg.json b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-dg.json index 16833281..82b4f34a 100644 --- a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-dg.json +++ b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-dg.json @@ -10,7 +10,6 @@ "isPartialLoadAllowed": false, "isExportDeclarationRequired": true, "isImportLicenseRequired": true, - "communicationChannelCode": "AO", "isEquipmentSubstitutionAllowed": true, "carrierServiceCode": "TA1", "vessel": { diff --git a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-reefer-temp-change.json b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-reefer-temp-change.json index f165dd1d..9fa40bda 100644 --- a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-reefer-temp-change.json +++ b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-reefer-temp-change.json @@ -10,7 +10,6 @@ "isPartialLoadAllowed": false, "isExportDeclarationRequired": false, "isImportLicenseRequired": false, - "communicationChannelCode": "AO", "isEquipmentSubstitutionAllowed": true, "carrierServiceCode": "TA1", "vessel": { diff --git a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-reefer.json b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-reefer.json index 0a369bad..557f024e 100644 --- a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-reefer.json +++ b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-reefer.json @@ -10,7 +10,6 @@ "isPartialLoadAllowed": false, "isExportDeclarationRequired": true, "isImportLicenseRequired": true, - "communicationChannelCode": "AO", "isEquipmentSubstitutionAllowed": true, "vessel": { "name": "King of the Seas" diff --git a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-2re1c.json b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-2re1c.json index fef8c6a0..42015e09 100644 --- a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-2re1c.json +++ b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-2re1c.json @@ -10,7 +10,6 @@ "isPartialLoadAllowed": false, "isExportDeclarationRequired": true, "isImportLicenseRequired": true, - "communicationChannelCode": "AO", "isEquipmentSubstitutionAllowed": true, "carrierServiceCode": "TA1", "vessel": { diff --git a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-2re2c.json b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-2re2c.json index 9b497294..43a436cf 100644 --- a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-2re2c.json +++ b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-2re2c.json @@ -10,7 +10,6 @@ "isPartialLoadAllowed": false, "isExportDeclarationRequired": true, "isImportLicenseRequired": true, - "communicationChannelCode": "AO", "isEquipmentSubstitutionAllowed": true, "carrierServiceCode": "TA1", "vessel": { diff --git a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-cho-dest.json b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-cho-dest.json index 178dd28f..0b730693 100644 --- a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-cho-dest.json +++ b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-cho-dest.json @@ -10,7 +10,6 @@ "isPartialLoadAllowed": false, "isExportDeclarationRequired": true, "isImportLicenseRequired": true, - "communicationChannelCode": "AO", "isEquipmentSubstitutionAllowed": true, "carrierServiceCode": "TA1", "vessel": { diff --git a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-cho-orig.json b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-cho-orig.json index 212fd1e5..bccb20ab 100644 --- a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-cho-orig.json +++ b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-cho-orig.json @@ -10,7 +10,6 @@ "isPartialLoadAllowed": false, "isExportDeclarationRequired": false, "isImportLicenseRequired": false, - "communicationChannelCode": "AO", "isEquipmentSubstitutionAllowed": true, "carrierServiceCode": "TA1", "vessel": { diff --git a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-non-operating-reefer.json b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-non-operating-reefer.json index 558da256..62ef1654 100644 --- a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-non-operating-reefer.json +++ b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-non-operating-reefer.json @@ -10,7 +10,6 @@ "isPartialLoadAllowed": false, "isExportDeclarationRequired": false, "isImportLicenseRequired": false, - "communicationChannelCode": "AO", "isEquipmentSubstitutionAllowed": true, "carrierServiceCode": "TA1", "vessel": { diff --git a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-shipper-owned.json b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-shipper-owned.json index 7cc98ad4..bc82a581 100644 --- a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-shipper-owned.json +++ b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-shipper-owned.json @@ -10,7 +10,6 @@ "isPartialLoadAllowed": false, "isExportDeclarationRequired": false, "isImportLicenseRequired": false, - "communicationChannelCode": "AO", "isEquipmentSubstitutionAllowed": true, "carrierServiceCode": "TA1", "vessel": { diff --git a/booking/src/main/resources/standards/booking/schemas/booking-api-v20.json b/booking/src/main/resources/standards/booking/schemas/booking-api-v20.json index ef1e117f..257a1048 100644 --- a/booking/src/main/resources/standards/booking/schemas/booking-api-v20.json +++ b/booking/src/main/resources/standards/booking/schemas/booking-api-v20.json @@ -2,7 +2,7 @@ "openapi": "3.0.3", "info": { "title": "DCSA OpenAPI specification for Booking", - "description": "API specification issued by DCSA.org.\n\nFor explanation of specific values or objects please refer to the [Information Model 2024.Q1](https://dcsa-website.cdn.prismic.io/dcsa-website/ZhlC9TjCgu4jzyW5_20240402-DCSA-Information-Model-2024.Q1-ReleaseCandidate_01.pdf). This API specification does not define the allowable updates and their timing in accordance with the established business rules. Refer to the [DCSA Interface Standard for the Booking process 2.0](https://dcsa.org/standards/booking/documentation-booking-2) to address this. **All use cases mentioned in this API specification refer to use cases defined in this Booking IFS**.\n\nAll other documents related to the Booking publication can be found [here](https://dcsa.org/standards/booking-process/)\n\n### Booking (Implemented by provider)\n\nIt is possible to use the Booking API as a standalone API. In that case poll on the following endPoints:\n\n GET /v2/bookings/{bookingReference}\n\nin order to poll information about status changes.\n\n**Note:** All `/v2/bookings` endPoints must be implmented by the provider.\n\n### Notifications (Implemented by consumer)\nIt is possible to have notifications pushed to you whenever the provider needs input and/or a state change. The format of the notification is defined by the [Booking Notification endPoint](#/BookingNotification).\n\n POST /v2/booking-notifications\n\nThe endPoints support both a **Lightweight Notification** and a **Full State Transfer**. How much data is sent via this Notification endPoint depends on what kind of Notification is being subscribed to.\n\nSigning up for notifications is defined outside the scope of this API specification.\n\n**Note:** This endPoint is to be implemented by the consumers of the `Booking API` in order to receive push events.\n\n### Stats API\nThe Stats API offers crucial statistical information for both API providers and consumers to enhance their services and helps DCSA to understand and scale the ecosystem. We expect you to invoke the Stats API for every request made to the Booking API. Further details can be found [here](https://labs.dcsa.org/#/http/guides/api-guides/stats-api/introduction)\n\nFor a changelog please click [here](https://github.com/dcsaorg/DCSA-OpenAPI/tree/master/bkg/v2#v200). Please [create a GitHub issue](https://github.com/dcsaorg/DCSA-OpenAPI/issues/new) if you have any questions/comments.\n", + "description": "API specification issued by DCSA.org.\n\nFor explanation of specific values or objects please refer to the [Information Model 2024.Q1](https://dcsa-website.cdn.prismic.io/dcsa-website/ZhlC9TjCgu4jzyW5_20240402-DCSA-Information-Model-2024.Q1-ReleaseCandidate_01.pdf). This API specification does not define the allowable updates and their timing in accordance with the established business rules. Refer to the [DCSA Interface Standard for the Booking process 2.0](https://dcsa.org/standards/booking/documentation-booking-2) to address this. **All use cases mentioned in this API specification refer to use cases defined in this Booking IFS**.\n\nAll other documents related to the Booking publication can be found [here](https://dcsa.org/standards/booking-process/)\n\n### Booking (Implemented by provider)\n\nIt is possible to use the Booking API as a standalone API. In that case poll on the following endPoints:\n\n GET /v2/bookings/{bookingReference}\n\nin order to poll information about status changes.\n\n**Note:** All `/v2/bookings` endPoints must be implemented by the provider.\n\n### Notifications (Implemented by consumer)\nIt is possible to have notifications pushed to you whenever the provider needs input and/or a state change. The format of the notification is defined by the [Booking Notification endPoint](#/BookingNotification).\n\n POST /v2/booking-notifications\n\nThe endPoints support both a **Lightweight Notification** and a **Full State Transfer**. How much data is sent via this Notification endPoint depends on what kind of Notification is being subscribed to.\n\nSigning up for notifications is defined outside the scope of this API specification.\n\n**Note:** This endPoint is to be implemented by the consumers of the `Booking API` in order to receive push events.\n\n### API Design & Implementation Principles\nThis API follows the guidelines defined in version 2.1 of the API Design & Implementation Principles which can be found on the [DCSA Developer page](https://developer.dcsa.org/api_design)\n\nFor a changelog please click [here](https://github.com/dcsaorg/DCSA-OpenAPI/tree/master/bkg/v2#v200). Please [create a GitHub issue](https://github.com/dcsaorg/DCSA-OpenAPI/issues/new) if you have any questions/comments.\n", "contact": { "name": "Digital Container Shipping Association (DCSA)", "url": "https://dcsa.org", @@ -36,7 +36,7 @@ "Booking" ], "summary": "Creates a new Booking\n", - "description": "Creates a new booking request. This endPoint corresponds with **UseCase 1 - Submit booking request**.\n\n## Precondition\nThe consumer has information for a `Booking Request`\n\n## Postcondition\nThe provider has received the `Booking Request`. \n\nThe consumer will receive a `201` (Created) or a `202` (Accepted) if the request payload schema-validates or a `400` (Bad Request) if it does not.\n\n## Flow for a `201` (Created) response\nThe following occurs when a provider receives a `Booking Request`:\n\n1. The payload (`Booking Request`) is schema-validated. In case the payload **is invalid** a `400` (Bad Request) is returned.\n\n **The process stops here!**\n2. The payload is schema-valid which means\n - all required properties are provided\n - all values provided have correct data type.\n\n A `carrierBookingRequestReference` (as a reference to the `Booking Request`) is created and linked to the payload in the provider system.\n \n **For the rest of this description and in all examples the value `cbrr-123` will be used as `carrierBookingRequestReference`**\n3. A `201` (Created) response is returned with a payload containing both the `carrierBookingRequestReference` and the `bookingStatus`:\n ```\n {\n carrierBookingRequestReference: 'cbrr-123',\n bookingStatus: 'RECEIVED'\n }\n ```\n4. All '_relevant_' subscribers will be notified via a [Booking Notification](#/BookingNotification).\n\nFor `POST` `Booking Request` responding with `201` (Created) the process ends here. The `Booking Request`\n - is now stored in the provider system\n - has status `RECEIVED` and the status can be queried (a subsequent `GET` request will retrieve the payload)\n - a `201` (Created) response is sent to the consumer with a payload containing the `carrierBookingRequestReference` and `bookingStatus='RECEIVED'`\n - awaits further processing by the provider\n - '_relevant_' subscribers have been notified.\n\nThe provider will now start asynchronous processing. Once processed, the new status of the `Booking Request` will be communicated via a [Booking Notification](#/BookingNotification). In case the consumer does not subscribe to notifications it is necessary for the consumer to poll on the\n\n GET /v2/bookings/{bookingReference}\n \nendPoint to check if the `bookingStatus` of the `Booking Request` has changed.\n## Flow for a `202` (Accepted) response\nThe following occurs when a provider receives a `Booking Request`:\n\n1. The payload (`Booking Request`) is schema-validated. In case the payload **is invalid** a `400` (Bad Request) is returned.\n\n **The process stops here!**\n2. The payload is schema-valid which means\n - all required properties are provided\n - all values provided have correct data type.\n\n A `carrierBookingRequestReference` (as a reference to the `Booking Request`) is created and linked to the payload in the provider system.\n \n **For the rest of this description and in all examples the value `cbrr-123` will be used as `carrierBookingRequestReference`**\n\n3. A `202` (Accepted) response is returned with a payload containing **only** the `carrierBookingRequestReference`:\n ```\n {\n carrierBookingRequestReference: 'cbrr-123'\n }\n ```\n\nFor `POST` `Booking Request` responding with `202` (Accepted) the process ends here. The `Booking Request`:\n - is now accepted by the provider system\n - the `Booking Request` does not yet have any status and cannot be queried (no `GET` request is possible until the `Booking Request` is further processed in the provider system)\n - a `202` (Accepted) response is sent to the consumer with a payload **only** containing the `carrierBookingRequestReference`\n - awaits further processing by the provider\n\nThe provider will now start asynchronous processing. Once processed, the status `RECEIVED` of the `Booking Request` will be communicated via a [Booking Notification](#/BookingNotification). In case the consumer does not subscribe to notifications it is necessary for the consumer to poll on the\n\n GET /v2/bookings/{bookingReference}\n \nendPoint to check if the `bookingStatus` of the `Booking Request` has changed.\n\nAfter the status has changed to `RECEIVED` further processing can continue and will be communicated via a [Booking Notification](#/BookingNotification).\n", + "description": "Creates a new booking request. This endPoint corresponds with **UseCase 1 - Submit booking request**.\n\n## Precondition\nThe consumer has information for a `Booking Request`\n\n## Postcondition\nThe provider has received the `Booking Request`. \n\nThe consumer will receive a `202` (Accepted) if the request payload schema-validates or a `400` (Bad Request) if it does not.\n\n## Flow for the `202` (Accepted) response\nThe following occurs when a provider receives a `Booking Request`:\n\n1. The payload (`Booking Request`) is schema-validated. In case the payload **is invalid** a `400` (Bad Request) is returned.\n\n **The process stops here!**\n2. The payload is schema-valid which means\n - all required properties are provided\n - all values provided have correct data type.\n\n A `carrierBookingRequestReference` (as a reference to the `Booking Request`) is created and linked to the payload in the provider system.\n\n **For the rest of this description and in all examples the value `cbrr-123` will be used as `carrierBookingRequestReference`**\n\n3. A `202` (Accepted) response is returned with a payload containing **only** the `carrierBookingRequestReference`:\n ```\n {\n carrierBookingRequestReference: 'cbrr-123'\n }\n ```\n\nFor `POST` `Booking Request` the process ends here. The `Booking Request`:\n - is now accepted by the provider system\n - the `Booking Request` does not yet have any status and cannot be queried (no `GET` request is possible until the `Booking Request` is further processed in the provider system)\n - a `202` (Accepted) response is sent to the consumer with a payload **only** containing the `carrierBookingRequestReference`\n - awaits further processing by the provider\n\nThe provider will now start asynchronous processing. Once processed, the status `RECEIVED` of the `Booking Request` will be communicated via a [Booking Notification](#/BookingNotification). In case the consumer does not subscribe to notifications it is necessary for the consumer to poll on the\n\n GET /v2/bookings/{bookingReference}\n\nendPoint to check if the `bookingStatus` of the `Booking Request` has changed.\n\nAfter the status has changed to `RECEIVED` further processing can continue by provider and will be communicated via a [Booking Notification](#/BookingNotification). In case the consumer does not subscribe to notifications it is necessary for the consumer to poll the above endPoint.\n", "operationId": "create-bookings", "parameters": [ { @@ -91,7 +91,6 @@ "isImportLicenseRequired": false, "expectedDepartureDate": "2024-01-20", "incoTerms": "EXW", - "communicationChannelCode": "AO", "isEquipmentSubstitutionAllowed": false, "references": [ { @@ -142,13 +141,15 @@ "requestedEquipments": [ { "isShipperOwned": false, - "ISOEquipmentCode": "42GP", + "ISOEquipmentCode": "42G1", "units": 3, "commodities": [ { "commodityType": "Dry cargo, Freight all kinds", - "cargoGrossWeight": 36000, - "cargoGrossWeightUnit": "KGM" + "cargoGrossWeight": { + "value": 36000, + "unit": "KGM" + } } ] } @@ -157,7 +158,7 @@ }, "reeferExample": { "summary": "Reefer cargo Booking (Apple Juice)\n", - "description": "Make a `Booking Request` with reefer requirements (1° celcius with vents and drain holes open and genset required) sent from Bremerhaven, Germany to Norfolk, US\n", + "description": "Make a `Booking Request` with reefer requirements (1° celsius with vents and drain holes open and genset required) sent from Bremerhaven, Germany to Norfolk, US\n", "value": { "receiptTypeAtOrigin": "CY", "deliveryTypeAtDestination": "CY", @@ -186,7 +187,6 @@ "isImportLicenseRequired": false, "expectedDepartureDate": "2024-01-20", "incoTerms": "EXW", - "communicationChannelCode": "AO", "isEquipmentSubstitutionAllowed": false, "references": [ { @@ -253,8 +253,10 @@ "HSCodes": [ "20097919" ], - "cargoGrossWeight": 36000, - "cargoGrossWeightUnit": "KGM" + "cargoGrossWeight": { + "value": 36000, + "unit": "KGM" + } } ] } @@ -292,7 +294,6 @@ "isImportLicenseRequired": false, "expectedDepartureDate": "2024-01-20", "incoTerms": "EXW", - "communicationChannelCode": "AO", "isEquipmentSubstitutionAllowed": false, "references": [ { @@ -349,8 +350,10 @@ "commodities": [ { "commodityType": "Dry cargo, Freight all kinds", - "cargoGrossWeight": 36000, - "cargoGrossWeightUnit": "KGM" + "cargoGrossWeight": { + "value": 36000, + "unit": "KGM" + } } ] } @@ -387,7 +390,6 @@ "isImportLicenseRequired": false, "expectedDepartureDate": "2024-01-20", "incoTerms": "EXW", - "communicationChannelCode": "AO", "isEquipmentSubstitutionAllowed": false, "references": [ { @@ -438,7 +440,7 @@ "requestedEquipments": [ { "isShipperOwned": false, - "ISOEquipmentCode": "42GP", + "ISOEquipmentCode": "42G1", "units": 3, "commodities": [ { @@ -446,8 +448,10 @@ "HSCodes": [ "293499" ], - "cargoGrossWeight": 36000, - "cargoGrossWeightUnit": "KGM", + "cargoGrossWeight": { + "value": 36000, + "unit": "KGM" + }, "outerPackaging": { "imoPackagingCode": "3A1", "numberOfPackages": 100, @@ -491,31 +495,6 @@ "required": true }, "responses": { - "201": { - "description": "`Booking Request` has been successfully created in the provider system. The status of the `Booking Request` is now `RECEIVED`. The consumer is now awaiting provider to process the `Booking Request` asynchronously.\n", - "headers": { - "API-Version": { - "$ref": "#/components/headers/API-Version" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_201" - }, - "examples": { - "receivedExample": { - "summary": "Booking request received\n", - "description": "A `Booking Request` has been received (`bookingStatus='RECEIVED'`), schema validated and stored in provider system\n", - "value": { - "carrierBookingRequestReference": "cbrr-123", - "bookingStatus": "RECEIVED" - } - } - } - } - } - }, "202": { "description": "`Booking Request` has been successfully accepted by the provider. The `Booking Request` does not yet have a `bookingStatus` - it is not possible to call the `GET` endPoint until the `Booking Request` is further processed in provider system. The consumer is now awaiting provider to process the `Booking Request` asynchronously.\n", "headers": { @@ -563,7 +542,7 @@ "statusCodeText": "Bad Request", "statusCodeMessage": "receiptTypeAtOrigin not found - it is a mandatory property in Booking request\n", "providerCorrelationReference": "4426d965-0dd8-4005-8c63-dc68b01c4962", - "errorDateTime": "2023-04-13T07:41:00+08:30", + "errorDateTime": "2024-09-04T09:41:00Z", "errors": [ { "errorCode": 7003, @@ -601,7 +580,7 @@ "statusCodeText": "Internal Server Error", "statusCodeMessage": "Internal Server Error occurred while processing Booking request\n", "providerCorrelationReference": "4426d965-0dd8-4005-8c63-dc68b01c4962", - "errorDateTime": "2023-04-13T07:41:00+08:30", + "errorDateTime": "2024-09-04T09:41:00Z", "errors": [ { "errorCode": 7003, @@ -630,7 +609,7 @@ "examples": { "tooManyRequestsExample": { "summary": "Making too many Bookings Requests\n", - "description": "Calling the endPoint\n\n POST /v2/bookings\n\ntoo many times within a timeperiod.\n\n**NB**: `errorCode` not yet standardized by DCSA. Value `7003` is just a \"random example\"\n", + "description": "Calling the endPoint\n\n POST /v2/bookings\n\ntoo many times within a time period.\n\n**NB**: `errorCode` not yet standardized by DCSA. Value `7003` is just a \"random example\"\n", "value": { "httpMethod": "POST", "requestUri": "/v2/bookings", @@ -638,7 +617,7 @@ "statusCodeText": "Too Many Requests", "statusCodeMessage": "Too many request to create a booking has been requested. Please try again in 1 hour\n", "providerCorrelationReference": "4426d965-0dd8-4005-8c63-dc68b01c4962", - "errorDateTime": "2023-04-13T07:41:00+08:30", + "errorDateTime": "2024-09-04T09:41:00Z", "errors": [ { "errorCode": 7003, @@ -661,7 +640,7 @@ "Booking" ], "summary": "Gets the Booking\n", - "description": "Retrieves the `Booking Request` with the `bookingReference`. The path can contain a `carrierBookingRequestReference` or a `carrierBookingReference`. Once the Booking is confirmed - it is **only** possible to use the `carrierBookingReference`. It is recommended to use this endPoint to `GET` data before an update is made to make sure latest version is being updated.\n\nThe default payload when calling this endPoint is the \"original\" `Booking`. It is also possible to get the latest amendment to a `Booking` called the `Amended Booking`. In order to get the `Amended Booking`, it is necessary to use the query parameter `amendedContent` and set it to `true`.\n\n GET /v2/bookings/{bookingReference}?amendedContent=true\n\nThe `status` of the \"original\" `Booking` is included in both payloads as `bookingStatus`. `amendedBookingStatus` and related content is only available after the provider has approved the `Booking` via **UseCase 5: Confirm Booking request** and until:\n- the provider requests for a new amendment (**UseCase 6: Request to amend confirmed Booking**) in which case the \"old update\" is no longer accessable.\n- the consumer submits a new amendment (**UseCase 7: Request amendment to confirmed Booking**) in which case the \"new update\" provided **replaces** the \"old update\".\n- the provider re-confirms the `Booking` (**UseCase 5: Confirm booking request**) in which case the \"old update\" is no longer accessable.\n\nIf `amendedContent=true` is requested but no amendment has yet been provided by the consumer **or** the state of the \"original\" `Booking` is `PENDING AMENDMENT`, then a `404` (Not Found) is returned.\n\nIf the provider is requesting changes to the `Booking`, the `feedbacks` object is used to inform the consumer what needs to change.\n\nIn case no subscription (`Notification`) has been set up - it is possible to use this endPoint to poll on in order to detect if `bookingStatus` and/or `amendedBookingStatus` has changed.\n\nIn case a previous request is being processed by the provider - a `202` (Accepted) with **no payload** can be used as a response until the processing is finished.\n", + "description": "Retrieves the `Booking Request` with the `bookingReference`. The path can contain a `carrierBookingRequestReference` or a `carrierBookingReference`. Once the Booking is confirmed - it is **only** possible to use the `carrierBookingReference`. It is recommended to use this endPoint to `GET` data before an update is made to make sure latest version is being updated.\n\nThe default payload when calling this endPoint is the \"original\" `Booking`. It is also possible to get the latest amendment to a `Booking` called the `Amended Booking`. In order to get the `Amended Booking`, it is necessary to use the query parameter `amendedContent` and set it to `true`.\n\n GET /v2/bookings/{bookingReference}?amendedContent=true\n\nThe `status` of the \"original\" `Booking` is included in both payloads as `bookingStatus`. `amendedBookingStatus` and related content is only available after the provider has approved the `Booking` via **UseCase 5: Confirm Booking request** and until:\n- the provider requests for a new amendment (**UseCase 6: Request to amend confirmed Booking**) in which case the \"old update\" is no longer accessible.\n- the consumer submits a new amendment (**UseCase 7: Request amendment to confirmed Booking**) in which case the \"new update\" provided **replaces** the \"old update\".\n- the provider re-confirms the `Booking` (**UseCase 5: Confirm booking request**) in which case the \"old update\" is no longer accessible.\n\nIf `amendedContent=true` is requested but no amendment has yet been provided by the consumer **or** the state of the \"original\" `Booking` is `PENDING_AMENDMENT`, then a `404` (Not Found) is returned.\n\nIf the provider is requesting changes to the `Booking`, the `Feedback` object is used to inform the consumer what needs to change.\n\nIn case no subscription (`Notification`) has been set up - it is possible to use this endPoint to poll on in order to detect if `bookingStatus` and/or `amendedBookingStatus` has changed.\n\nIn case a previous request is being processed by the provider - a `202` (Accepted) with **no payload** can be used as a response until the processing is finished.\n", "operationId": "get-bookings", "parameters": [ { @@ -681,7 +660,7 @@ { "name": "amendedContent", "in": "query", - "description": "Controls wether the content of this payload is the amendmended Booking (`amendedContent=true`) or the confirmed Booking (`amendedContent=false`).\n\nIf `amendedContent=true` and no amendment has been requested or if the provider is not able to send the amendment - the response will be a `404` Not Found\n", + "description": "Controls whether the content of this payload is the amended Booking (`amendedContent=true`) or the confirmed Booking (`amendedContent=false`).\n\nIf `amendedContent=true` and no amendment has been requested or if the provider is not able to send the amendment - the response will be a `404` Not Found\n", "required": false, "style": "form", "explode": true, @@ -720,10 +699,10 @@ "examples": { "dryNotConfirmedExample": { "summary": "Standard dry cargo Booking (not confirmed)\n", - "description": "Gets a `Booking Request` with standard Dry cargo which has not yet been confirmed. The `Booking` is in state `PENDING UPDATE` and requires some changes (specified in the `feedbacks` property)\n", + "description": "Gets a `Booking Request` with standard Dry cargo which has not yet been confirmed. The `Booking` is in state `PENDING_UPDATE` and requires some changes (specified in the `feedbacks` property)\n", "value": { "carrierBookingRequestReference": "cbrr-123", - "bookingStatus": "PENDING UPDATE", + "bookingStatus": "PENDING_UPDATE", "receiptTypeAtOrigin": "CY", "deliveryTypeAtDestination": "CY", "cargoMovementTypeAtOrigin": "FCL", @@ -751,7 +730,6 @@ "isImportLicenseRequired": false, "expectedDepartureDate": "2024-01-20", "incoTerms": "EXW", - "communicationChannelCode": "AO", "isEquipmentSubstitutionAllowed": false, "references": [ { @@ -802,13 +780,15 @@ "requestedEquipments": [ { "isShipperOwned": false, - "ISOEquipmentCode": "42GP", + "ISOEquipmentCode": "42G1", "units": 3, "commodities": [ { "commodityType": "Dry cargo, Freight all kinds", - "cargoGrossWeight": 36000, - "cargoGrossWeightUnit": "KGM" + "cargoGrossWeight": { + "value": 36000, + "unit": "KGM" + } } ] } @@ -817,7 +797,7 @@ { "severity": "ERROR", "code": "PROPERTY_VALUE_MUST_CHANGE", - "message": "Not enough available \"42GP\" equipment. Please change to \"22G1\" instead\n", + "message": "Not enough available \"42G1\" equipment. Please change to \"22G1\" instead\n", "jsonPath": "$.requestedEquipment.units", "property": "units" } @@ -826,12 +806,12 @@ }, "dryConfirmedExample": { "summary": "Gets a confirmed Standard dry cargo Booking\n", - "description": "Gets a `Confirmed Booking` with standard Dry cargo. In this example the `Booking` has previously received an amendment which was confirmed (`amendedBookingStatus='AMENDMENT CONFIRMED'`)\n\nAs part of the confirmation the `Booking` is enriched with a `transportPlan`, `shipmentCutOffTimes`, `carrierClauses` and in this example also an `advanceManifestFiling` since the `Booking` is arriving in US.\n", + "description": "Gets a `Confirmed Booking` with standard Dry cargo. In this example the `Booking` has previously received an amendment which was confirmed (`amendedBookingStatus='AMENDMENT_CONFIRMED'`)\n\nAs part of the confirmation the `Booking` is enriched with a `transportPlan`, `shipmentCutOffTimes`, `carrierClauses` and in this example also an `advanceManifestFiling` since the `Booking` is arriving in US.\n", "value": { "carrierBookingRequestReference": "cbrr-123", "carrierBookingReference": "cbr-987", "bookingStatus": "CONFIRMED", - "amendedBookingStatus": "AMENDMENT CONFIRMED", + "amendedBookingStatus": "AMENDMENT_CONFIRMED", "receiptTypeAtOrigin": "CY", "deliveryTypeAtDestination": "CY", "cargoMovementTypeAtOrigin": "FCL", @@ -860,7 +840,6 @@ "isImportLicenseRequired": false, "expectedDepartureDate": "2024-01-20", "incoTerms": "EXW", - "communicationChannelCode": "AO", "isEquipmentSubstitutionAllowed": false, "references": [ { @@ -911,20 +890,22 @@ "requestedEquipments": [ { "isShipperOwned": false, - "ISOEquipmentCode": "42GP", + "ISOEquipmentCode": "42G1", "units": 3, "commodities": [ { "commodityType": "Dry cargo, Freight all kinds", - "cargoGrossWeight": 36000, - "cargoGrossWeightUnit": "KGM" + "cargoGrossWeight": { + "value": 36000, + "unit": "KGM" + } } ] } ], "confirmedEquipments": [ { - "ISOEquipmentCode": "42GP", + "ISOEquipmentCode": "42G1", "units": 3 } ], @@ -952,15 +933,15 @@ "shipmentCutOffTimes": [ { "cutOffDateTimeCode": "DCO", - "cutOffDateTime": "2024-01-17T22:30:00.000" + "cutOffDateTime": "2024-01-17T22:30:00Z" }, { "cutOffDateTimeCode": "VCO", - "cutOffDateTime": "2024-01-18T22:30:00.000" + "cutOffDateTime": "2024-01-18T22:30:00Z" }, { "cutOffDateTimeCode": "FCO", - "cutOffDateTime": "2024-01-19T13:30:00.000" + "cutOffDateTime": "2024-01-19T13:30:00Z" } ], "advanceManifestFilings": [ @@ -970,7 +951,7 @@ } ], "carrierClauses": [ - "The date of shipment, the carrying vessel and theschedule are not guaranteed and are always subject tochanges.", + "The date of shipment, the carrying vessel and the schedule are not guaranteed and are always subject to changes.", "Operations such as lifting, stowage, drayage and customs declaration of containers are based on the description of the nature, quantity, measurement and weight declared by the Shipper. The Shipper shall be liable for any damage, loss, expense and fines incurred by Carrier XYZ or its agents due to incorrectness or incompleteness of such declaration.", "Warranted shipper must fulfill the requirements of SOLAS regulations and the IMO guidelines regarding the Verified Gross Mass (VGM) of container carrying cargo (msc.1/circ.1474, 9 June 2014).", "In accordance with SOLAS regulations and IMO guidelines regarding the VGM (verified gross mass), any expenses incurred because the VGM was submitted late or was not submitted at all will be charged back to the customer with an additional administration fee." @@ -990,7 +971,7 @@ } }, "404": { - "description": "In case the consumer is requesting the `Amended Booking` by calling:\n\n GET /v2/bookings/{bookingReference}?amendedContent=true\n \nbut:\n- the `Booking` has not yet been confirmed\n- the `Booking` has been confirmed but no amendment has yet been provided by the consumer\n- the provider has requested for a new amendment (**UseCase 6: Request to amend confirmed Booking**) in which case the \"old update\" is no longer accessable.\n\na `404` (Not Found) is returned.\n\nA `404` (Not Found) can also be sent in case the provider does not know of the `bookingReference` used in the request (the resource does not exist)\n", + "description": "In case the consumer is requesting the `Amended Booking` by calling:\n\n GET /v2/bookings/{bookingReference}?amendedContent=true\n\nbut:\n- the `Booking` has not yet been confirmed\n- the `Booking` has been confirmed but no amendment has yet been provided by the consumer\n- the provider has requested for a new amendment (**UseCase 6: Request to amend confirmed Booking**) in which case the \"old update\" is no longer accessible.\n\na `404` (Not Found) is returned.\n\nA `404` (Not Found) can also be sent in case the provider does not know of the `bookingReference` used in the request (the resource does not exist)\n", "headers": { "API-Version": { "$ref": "#/components/headers/API-Version" @@ -1012,7 +993,7 @@ "statusCodeText": "Not Found", "statusCodeMessage": "bookingReference not found\n", "providerCorrelationReference": "4426d965-0dd8-4005-8c63-dc68b01c4962", - "errorDateTime": "2023-04-13T07:41:00+08:30", + "errorDateTime": "2024-09-04T09:41:00Z", "errors": [ { "errorCode": 7003, @@ -1032,7 +1013,7 @@ "statusCodeText": "Not Found", "statusCodeMessage": "No amended booking exists", "providerCorrelationReference": "4426d965-0dd8-4005-8c63-dc68b01c4962", - "errorDateTime": "2023-04-13T07:41:00+08:30", + "errorDateTime": "2024-09-04T09:41:00Z", "errors": [ { "errorCode": 7003, @@ -1047,7 +1028,7 @@ } }, "409": { - "description": "In case the provider is processing the `Booking request` - it is possible for the provider to reject new incomming requests by returning a `409` (Conflict)\n", + "description": "In case the provider is processing the `Booking request` - it is possible for the provider to reject new incoming requests by returning a `409` (Conflict)\n", "headers": { "API-Version": { "$ref": "#/components/headers/API-Version" @@ -1069,7 +1050,7 @@ "statusCodeText": "Conflict", "statusCodeMessage": "Previous request is being processed. Please try again\nlater\n", "providerCorrelationReference": "4426d965-0dd8-4005-8c63-dc68b01c4962", - "errorDateTime": "2023-04-13T07:41:00+08:30", + "errorDateTime": "2024-09-04T09:41:00Z", "errors": [ { "errorCode": 7003, @@ -1106,7 +1087,7 @@ "statusCodeText": "Internal Server Error", "statusCodeMessage": "Internal Server Error occurred while processing Booking request\n", "providerCorrelationReference": "4426d965-0dd8-4005-8c63-dc68b01c4962", - "errorDateTime": "2023-04-13T07:41:00+08:30", + "errorDateTime": "2024-09-04T09:41:00Z", "errors": [ { "errorCode": 7003, @@ -1135,7 +1116,7 @@ "examples": { "getError": { "summary": "GET non-existing Booking Request\n", - "description": "Calling\n\n GET /v2/bookings/cbrr-123\n \nresults in an error as booking `cbrr-123` does not exist.\n\n**NB**: `errorCode` not yet standardized by DCSA. Value `7003` is just a \"random example\"\n", + "description": "Calling\n\n GET /v2/bookings/cbrr-123\n\nresults in an error as booking `cbrr-123` does not exist.\n\n**NB**: `errorCode` not yet standardized by DCSA. Value `7003` is just a \"random example\"\n", "value": { "httpMethod": "GET", "requestUri": "/v2/bookings/cbrr-123", @@ -1143,7 +1124,7 @@ "statusCodeText": "Not Found", "statusCodeMessage": "The requested carrierBookingRequestReference does not exist\n", "providerCorrelationReference": "4426d965-0dd8-4005-8c63-dc68b01c4962", - "errorDateTime": "2023-04-13T07:41:00+08:30", + "errorDateTime": "2024-09-04T09:41:00Z", "errors": [ { "errorCode": 7003, @@ -1164,7 +1145,7 @@ "Booking" ], "summary": "Updates the Booking\n", - "description": "Updates the `Booking Request` with the `bookingReference`. The path can contain either a `carrierBookingRequestReference` or a `carrierBookingReference`. Once a Booking has been `CONFIRMED` the `carrierBookingReference` **MUST** always be used. This endPoint corresponds with either\n- **UseCase 3 - Submit updated Booking request**\n- **UseCase 7 - Request amendments to confirmed Booking**\n\nThis endPoint is to be used in response to\n- **UseCase 2 - Request to update Booking request**\n- **UseCase 6 - Request to amend confirmed Booking**\n\nthe endPoint can also be used in case `bookingStatus='RECEIVED'` and the consumer has an update to the `Booking Request`.\n\n## Precondition\nIn order to update a `Booking Request`, the status of the `Booking Request` needs to be in state\n- `RECEIVED` in case the consumer has updated information for the `Booking Request`\n- `PENDING UPDATE` in case the provider has requested the consumer to update the `Booking Request` (a result of **UseCase 2 - Request to update Booking request**)\n- `UPDATE RECEIVED` in case the consumer has additional changes to an already sent update\n- `PENDING AMENDMENT` in case the provider has requested the consumer to amend the `Booking Request` (a result of **UseCase 6 - Request to amend confirmed Booking**)\n- `CONFIRMED` in case the consumer has an amendment to the `Booking Request`\n\n## Postcondition\nThe provider has received an update (**UseCase 3 - Submit updated Booking request**) or an amendment (**UseCase 7 - Request amendments to confirmed Booking**) to the `Booking Request`.\n\nIn case an amendment was received to the `Booking Request` (**UseCase 7 - Request to amend confirmed Booking**) - the amendment will be called `Amended Booking`. The `Amended Booking` and the \"original\" `Booking Request` will **co-exist** until a new amendment is submitted by the consumer (via **UseCase 7: Request amendments to confirmed Booking**) or until the provider requests an update (sets the `bookingStatus='PENDING AMENDMENT'` via **UseCase 6: Request to amend confirmed Booking**). If the `amendedBookingStatus` is present it always represents the latest version of an amendment received by the provider.\n\nThe consumer will receive a `200` (OK) or a `202` (Accepted) if the payload schema-validates or a `400` (Bad Request) if it does not.\n\n## Flow for a `200` (OK) response\nThe following occurs when a provider receives an **update** (or an **amendment**) to a `Booking Request`\n1. The payload (`Booking Request`) is schema-validated. In case the payload **is invalid** a `400` (Bad Request) is returned.\n\n **The process stops here!**\n2. The payload is schema-valid which means\n - all required properties are provided\n - all values provided have correct data type\n \n **For the rest of this description and in all examples the value `cbrr-123` will be used as `carrierBookingRequestReference` in case the Booking has not yet been `CONFIRMED` and the value `cbr-987` will be used as `carrierBookingReference` in case the Booking has been `CONFIRMED`.**\n3. The response depends on which useCase is the reason for calling this endPoint (what the `bookingStatus` is):\n - If `bookingStatus` **is** `RECEIVED` then this endPoint is being used in addition to **UseCase 1 - Submit booking request**. In this case the consumer would like to make an update to an already sent `Booking Request` - this is done via **UseCase 3 - Submit updated Booking Request**. The `bookingStatus` now changes to `UPDATE RECEIVED`.\n \n A `200` (OK) response is returned with the following payload:\n ```\n {\n carrierBookingRequestReference: 'cbrr-123',\n bookingStatus: 'UPDATE RECEIVED'\n }\n ```\n - If `bookingStatus` is `PENDING UPDATE` then this endPoint is being used as a reponse to **UseCase 2 - Request to update Booking request** in this case the provider has requested an update to a `Booking Request`. The `bookingStatus` now changes to `UPDATE RECEIVED`.\n\n A `200` (OK) response is returned with the following payload:\n ```\n {\n carrierBookingRequestReference: 'cbrr-123',\n bookingStatus: 'UPDATE RECEIVED'\n }\n ```\n - If `bookingStatus` is `UPDATE RECEIVED` then this endPoint is being used to update an already sent update. The `bookingStatus` stays as `UPDATE RECEIVED`.\n\n A `200` (OK) response is returned with the following payload:\n ```\n {\n carrierBookingRequestReference: 'cbrr-123',\n bookingStatus: 'UPDATE RECEIVED'\n }\n ```\n - If `bookingStatus` is `PENDING AMENDMENT` then this endPoint is being used as a response to **UseCase 6 - Request to amend Confirmed Booking**, in this case the provider has requested an amendment to a `Confirmed Booking`. The `bookingStatus` stays `PENDING AMENDMENT` and `amendedBookingStatus` is set to `AMENDMENT RECEVIED`.\n \n A `200` (OK) response is returned with the following payload:\n ```\n {\n carrierBookingReference: 'cbr-987',\n carrierBookingRequestReference: 'cbrr-123',\n bookingStatus: 'PENDING AMENDMENT',\n amendedBookingStatus: 'AMENDMENT RECEIVED'\n }\n ```\n - If `bookingStatus` is `CONFIRMED` then this endPoint is being used in order to request an amendment to a `Confirmed Booking`. This is done via **UseCase 7 - Request Amendments to Confirmed Booking**. The `bookingStatus` stays `CONFIRMED` and `amendedBookingStatus` is set to `AMENDMENT RECEIVED`.\n \n A `200` (OK) response is returned with the following payload:\n ```\n {\n carrierBookingReference: 'cbr-987',\n carrierBookingRequestReference: 'cbrr-123',\n bookingStatus: 'CONFIRMED',\n amendedBookingStatus: 'AMENDMENT RECEIVED'\n }\n ```\n4. All '_relevant_' subscribers will be notified via a [Booking Notification](#/BookingNotification).\n\nFor `PUT` `Booking Request` responding with `200` (OK) the process ends here. The updated `Booking Request`:\n - is now stored in the provider system\n - a `200` (OK) response is sent to the consumer with the status of the `Booking` (and possibly also with the `amendedBookingStatus`) with one of the following values (depending on the useCase):\n - `bookingStatus='UPDATE RECEIVED'` (if endPoint used before a `Booking`has been confirmed)\n - `bookingStatus='PENDING AMENDMENT'` and `amendedBookingStatus='AMENDMENT RECEIVED'` (if endPoint used as a response to **UseCase 6 - Request to amend Confirmed Booking**)\n - `bookingStatus='CONFIRMED'` and `amendedBookingStatus='AMENDMENT RECEIVED'` (if consumer is requesting an amendment to a `Confirmed Booking`)\n\n A subsequent `GET` request to the `Booking Request` will fetch the status along with the `Booking Request`\n - awaits further processing by the provider\n - '_relevant_' subscribers have been notified.\n\nThe provider will now start asynchronous processing. Once processed, the new status of the `Booking` and `Amended Booking Request` will be communicated via a [Booking Notification](#/BookingNotification). In case the consumer does not subscribe to notifications it is necessary for the consumer to poll on the\n\n GET /v2/bookings/{bookingReference}\n\nendPoint to check if the `bookingStatus` and `amendedBookingStatus` of the `Booking` has changed.\n \nIf the consumer wants to get the content of the `Amended Booking` provided via this `PUT` endPoint, the `GET` endPoint needs to be used in combination with the `?amendedContent=true` queryParameter:\n\n GET /v2/bookings/{bookingReference}?amendedContent=true\n\nIt is possible to `GET` the content of the `Amended Booking` via the example above until either:\n\n- the provider requests for a new amendment (**UseCase 6: Request to amend confirmed Booking**) in which case the \"old update\" is no longer accessible\n- the consumer submits a new update (**UseCase 7: Request amendment to confirmed Booking**) in which case the \"new amendment\" provided **replaces** the \"old amendment\".\n- the provider re-confirms the `Booking` (**UseCase 5: Confirm booking request**) in which case the \"old update\" is no longer accessable.\n\n## Flow for a `202` (Accepted) response\nThe following occurs when a provider receives an **update** (or an **amendment**) to a `Booking Request`\n1. The payload (`Booking Request`) is schema-validated. In case the payload **is invalid** a `400` (Bad Request) is returned.\n\n **The process stops here!**\n2. The payload is schema-valid which means\n - all required properties are provided\n - all values provided have correct data type\n3. An empty response is returned and the consumer now awaits further processing by the provider.\n\nFor `POST` `Booking Request` responding with `202` (Accepted) the process ends here. The Booking Request:\n - is now accepted by the provider system\n - the status of the `Booking Request` is unchanged.\n - a 202 (Accepted) response is sent with an empty payload\n - awaits further processing by the provider\n\nThe provider will now start asynchronous processing. Once processed, the state will change to one of the following values depending on the UseCase for calling the `PUT` endPoint:\n - `UPDATE RECEIVED` in case this endPoint has been used to:\n - send an update to a newly created Booking (precondition: `bookingStatus='RECEIVED'`)\n - send an update to a Booking because of a request from provider via **UseCase 2 - Request to update Booking request** (precondition: `bookingStatus='PENDING UPDATE'`)\n - send an additional update to a Booking that has already received an update (precondition: `bookingStatus='UPDATE RECEIVED'`)\n - `bookingStatus` will stay as `PENDING AMENDMENT` but `amendedBookingStatus` will change to `AMENDMENT RECEVIED` in case this endPoint is being used in response to a request from provider via **UseCase 6 - Request to amend Confirmed Booking** (precondition: `bookingStatus='PENDING AMENDMENT'`)\n - `bookingStatus` will stay as `CONFIRMED` but `amendedBookingStatus` will change to `AMENDMENT RECEVIED` in case this endPoint is being used to update an already confirmed Booking via **UseCase 7 - Request Amendments to Confirmed Booking** (precondition: `bookingStatus='CONFIRMED'`)\n\nThe new state will be communicated via a [Booking Notification](#/BookingNotification). In case the consumer does not subscribe to notifications it is necessary for the consumer to poll on the \n\n GET /v2/bookings/{bookingReference}\n \nendPoint to check if the `bookingStatus` and `amendedBookingStatus` of the `Booking` has changed.\n\nIf the consumer wants to get the content of the `Amended Booking` provided via this `PUT` endPoint, the `GET` endPoint needs to be used in combination with the `?amendedContent=true` queryParameter:\n\n GET /v2/bookings/{bookingReference}?amendedContent=true\n\nIt is possible to `GET` the content of the `Amended Booking` via the example above until either:\n\n- the provider requests for a new amendment (**UseCase 6: Request to amend confirmed Booking**) in which case the \"old update\" is no longer accessible\n- the consumer submits a new update (**UseCase 7: Request amendment to confirmed Booking**) in which case the \"new amendment\" provided **replaces** the \"old amendment\".\n- the provider re-confirms the `Booking` (**UseCase 5: Confirm booking request**) in which case the \"old update\" is no longer accessable.\n", + "description": "Updates the `Booking Request` with the `bookingReference`. The path can contain either a `carrierBookingRequestReference` or a `carrierBookingReference`. Once a Booking has been `CONFIRMED` the `carrierBookingReference` **MUST** always be used. This endPoint corresponds with either\n- **UseCase 3 - Submit updated Booking request**\n- **UseCase 7 - Request amendments to confirmed Booking**\n\nThis endPoint is to be used in response to\n- **UseCase 2 - Request to update Booking request**\n- **UseCase 6 - Request to amend confirmed Booking**\n\nthe endPoint can also be used in case `bookingStatus='RECEIVED'` and the consumer has an update to the `Booking Request`.\n\n## Precondition\nIn order to update a `Booking Request`, the status of the `Booking Request` needs to be in state\n- `RECEIVED` in case the consumer has updated information for the `Booking Request`\n- `PENDING_UPDATE` in case the provider has requested the consumer to update the `Booking Request` (a result of **UseCase 2 - Request to update Booking request**)\n- `UPDATE_RECEIVED` in case the consumer has additional changes to an already sent update\n- `PENDING_AMENDMENT` in case the provider has requested the consumer to amend the `Booking Request` (a result of **UseCase 6 - Request to amend confirmed Booking**)\n- `CONFIRMED` in case the consumer has an amendment to the `Booking Request`\n\n## Postcondition\nThe provider has received an update (**UseCase 3 - Submit updated Booking request**) or an amendment (**UseCase 7 - Request amendments to confirmed Booking**) to the `Booking Request`.\n\nIn case an amendment was received to the `Booking Request` (**UseCase 7 - Request to amend confirmed Booking**) - the amendment will be called `Amended Booking`. The `Amended Booking` and the \"original\" `Booking Request` will **co-exist** until a new amendment is submitted by the consumer (via **UseCase 7: Request amendments to confirmed Booking**) or until the provider requests an update (sets the `bookingStatus='PENDING_AMENDMENT'` via **UseCase 6: Request to amend confirmed Booking**). If the `amendedBookingStatus` is present it always represents the latest version of an amendment received by the provider.\n\nThe consumer will receive a `202` (Accepted) if the payload schema-validates or a `400` (Bad Request) if it does not.\n\n## Flow for the `202` (Accepted) response\nThe following occurs when a provider receives an **update** (or an **amendment**) to a `Booking Request`\n1. The payload (`Booking Request`) is schema-validated. In case the payload **is invalid** a `400` (Bad Request) is returned.\n\n **The process stops here!**\n2. The payload is schema-valid which means\n - all required properties are provided\n - all values provided have correct data type\n3. An empty response along with `202` (Accepted) is returned and the consumer now awaits further processing by the provider.\n\nFor `PUT` `Booking Request` the process ends here. The Booking Request:\n - is now accepted by the provider system\n - the status of the `Booking Request` is unchanged.\n - a `202` (Accepted) response is sent with an empty payload\n - awaits further processing by the provider\n\nThe provider will now start asynchronous processing. Once processed, the state will change to one of the following values depending on the use case for calling the `PUT` endPoint:\n - `UPDATE_RECEIVED` in case this endPoint has been used to:\n - send an update to a newly created Booking (precondition: `bookingStatus='RECEIVED'`)\n - send an update to a Booking because of a request from provider via **UseCase 2 - Request to update Booking request** (precondition: `bookingStatus='PENDING_UPDATE'`)\n - send an additional update to a Booking that has already received an update (precondition: `bookingStatus='UPDATE_RECEIVED'`)\n - `bookingStatus` will stay as `PENDING_AMENDMENT` but `amendedBookingStatus` will change to `AMENDMENT_RECEIVED` in case this endPoint is being used in response to a request from provider via **UseCase 6 - Request to amend Confirmed Booking** (precondition: `bookingStatus='PENDING_AMENDMENT'`)\n - `bookingStatus` will stay as `CONFIRMED` but `amendedBookingStatus` will change to `AMENDMENT_RECEIVED` in case this endPoint is being used to update an already confirmed Booking via **UseCase 7 - Request Amendments to Confirmed Booking** (precondition: `bookingStatus='CONFIRMED'`)\n\nOnce processed, the new state will be communicated via a [Booking Notification](#/BookingNotification). In case the consumer does not subscribe to notifications it is necessary for the consumer to poll on the \n\n GET /v2/bookings/{bookingReference}\n\nendPoint to check if the `bookingStatus` and `amendedBookingStatus` of the `Booking` has changed.\n\nIf the consumer wants to get the content of the `Amended Booking` provided via this `PUT` endPoint, the `GET` endPoint needs to be used in combination with the `?amendedContent=true` queryParameter:\n\n GET /v2/bookings/{bookingReference}?amendedContent=true\n\nIt is possible to `GET` the content of the `Amended Booking` via the example above until either:\n\n- the provider requests for a new amendment (**UseCase 6: Request to amend confirmed Booking**) in which case the \"old update\" is no longer accessible\n- the consumer submits a new update (**UseCase 7: Request amendment to confirmed Booking**) in which case the \"new amendment\" provided **replaces** the \"old amendment\".\n- the provider re-confirms the `Booking` (**UseCase 5: Confirm booking request**) in which case the \"old update\" is no longer accessible.\n", "operationId": "update-bookings", "parameters": [ { @@ -1234,7 +1215,6 @@ "isImportLicenseRequired": false, "expectedDepartureDate": "2024-01-20", "incoTerms": "EXW", - "communicationChannelCode": "AO", "isEquipmentSubstitutionAllowed": false, "references": [ { @@ -1285,13 +1265,15 @@ "requestedEquipments": [ { "isShipperOwned": false, - "ISOEquipmentCode": "42GP", + "ISOEquipmentCode": "42G1", "units": 3, "commodities": [ { "commodityType": "Dry cargo, Freight all kinds", - "cargoGrossWeight": 36000, - "cargoGrossWeightUnit": "KGM" + "cargoGrossWeight": { + "value": 36000, + "unit": "KGM" + } } ] } @@ -1300,7 +1282,7 @@ }, "reeferExample": { "summary": "Reefer cargo Booking (Apple Juice)\n", - "description": "Updating a `Booking Request` with reefer requirements (2° celcius with vents and drain holes open and genset required) sent from Bremerhaven, Germany to Norfolk, US\n", + "description": "Updating a `Booking Request` with reefer requirements (2° celsius with vents and drain holes open and genset required) sent from Bremerhaven, Germany to Norfolk, US\n", "value": { "carrierBookingRequestReference": "cbrr-123", "receiptTypeAtOrigin": "CY", @@ -1331,7 +1313,6 @@ "isImportLicenseRequired": false, "expectedDepartureDate": "2024-01-20", "incoTerms": "EXW", - "communicationChannelCode": "AO", "isEquipmentSubstitutionAllowed": false, "references": [ { @@ -1398,8 +1379,10 @@ "HSCodes": [ "20097919" ], - "cargoGrossWeight": 36000, - "cargoGrossWeightUnit": "KGM" + "cargoGrossWeight": { + "value": 36000, + "unit": "KGM" + } } ] } @@ -1437,7 +1420,6 @@ "isImportLicenseRequired": false, "expectedDepartureDate": "2024-01-20", "incoTerms": "EXW", - "communicationChannelCode": "AO", "isEquipmentSubstitutionAllowed": false, "references": [ { @@ -1494,8 +1476,10 @@ "commodities": [ { "commodityType": "Dry cargo, Freight all kinds", - "cargoGrossWeight": 36000, - "cargoGrossWeightUnit": "KGM" + "cargoGrossWeight": { + "value": 36000, + "unit": "KGM" + } } ] } @@ -1535,7 +1519,6 @@ "isImportLicenseRequired": false, "expectedDepartureDate": "2024-01-20", "incoTerms": "EXW", - "communicationChannelCode": "AO", "isEquipmentSubstitutionAllowed": false, "references": [ { @@ -1586,7 +1569,7 @@ "requestedEquipments": [ { "isShipperOwned": false, - "ISOEquipmentCode": "42GP", + "ISOEquipmentCode": "42G1", "units": 3, "commodities": [ { @@ -1594,8 +1577,10 @@ "HSCodes": [ "293499" ], - "cargoGrossWeight": 36000, - "cargoGrossWeightUnit": "KGM", + "cargoGrossWeight": { + "value": 36000, + "unit": "KGM" + }, "outerPackaging": { "imoPackagingCode": "3A1", "numberOfPackages": 100, @@ -1639,51 +1624,6 @@ "required": true }, "responses": { - "200": { - "description": "The `Booking request` has been successfully updated in the provider system with one of the following combinations (depending on the use case):\n- `bookingStatus='PENDING UPDATE'` in case the consumer has provided an update to a `Booking request` and is awaiting the provider to take action\n- `bookingStatus='PENDING AMENDMENT'` and `amendedBookingStatus='AMENDMENT RECEIVED'` in case the provider has requested an amendment and the consumer has provided an amendment to a `Confirmed Booking` and is awaiting the provider to take action\n- `bookingStatus='CONFIRMED'` and `amendedBookingStatus='AMENDMENT RECEIVED'` in case the consumer has provided an amendment to a `Confirmed Booking` and is awaiting the provider to take action\n\nThe status of the `Booking` can be monitored on the\n\n GET /v2/bookings/{bookingReference}\n\nendPoint by the consumer. If the consumer wants to get the content of the `Amended Booking` the `GET` endPoint needs to be used in combination with the `?amendedContent=true` queryParameter:\n\n GET /v2/bookings/{bookingReference}?amendedContent=true\n", - "headers": { - "API-Version": { - "$ref": "#/components/headers/API-Version" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BookingRefStatus" - }, - "examples": { - "updateReceivedExample": { - "summary": "Booking request updated\n", - "description": "An updated `Booking request` received, schema validated and stored in provider system - the `Booking` now awaits provider action\n `bookingStatus='UPDATE RECEIVED'`\n", - "value": { - "carrierBookingRequestReference": "cbrr-123", - "bookingStatus": "UPDATE RECEIVED" - } - }, - "pendingAmendmentApprovalExample": { - "summary": "Confirmed Booking amendment\n", - "description": "An amendment to a `Confirmed Booking` received, schema validated and stored in provider system - the `Booking` now awaits provider action\n `bookingStatus='CONFIRMED'`\n `amendedBookingStatus: 'AMENDMENT RECEIVED'`\n", - "value": { - "carrierBookingRequestReference": "cbrr-123", - "carrierBookingReference": "cbr-987", - "bookingStatus": "CONFIRMED", - "amendedBookingStatus": "AMENDMENT RECEIVED" - } - }, - "pendingAmendmentExample": { - "summary": "Confirm requested Booking amendment\n", - "description": "A requested amendment to a `Confirmed Booking` by the provider has been received, schema validated and stored in provider system. The `Booking` now awaits provider action\n `bookingStatus='PENDING AMENDMENT'`\n `amendedBookingStatus: 'AMENDMENT RECEIVED'`\n", - "value": { - "carrierBookingRequestReference": "cbrr-123", - "carrierBookingReference": "cbr-987", - "bookingStatus": "PENDING AMENDMENT", - "amendedBookingStatus": "AMENDMENT RECEIVED" - } - } - } - } - } - }, "202": { "description": "The `Booking request` update has been successfully accepted by the provider. `bookingStatus` does not change and response payload is empty. Further processing will be done by provider.\n", "headers": { @@ -1696,7 +1636,7 @@ "examples": { "noContentExample": { "summary": "Booking request updated with no content\n", - "description": "An updated `Booking request` received, schema validated and accepted by provider - the `Booking` now awaits provider action, `bookingStatus` does not change\n" + "description": "An updated `Booking request` received, schema validated and accepted by provider - the `Booking` now awaits provider action, `bookingStatus` does not change.\n" } } } @@ -1717,7 +1657,7 @@ "examples": { "badRequestExample": { "summary": "Booking missing receiptTypeAtOrigin\n", - "description": "`receiptTypeAtOrigin` is a mandatory property in the `Booking request`. This is an example of how the error object would look in case this property is missing\n\n**NB**: `errorCode` not yet standardized by DCSA. Value `7003` is just a \"random example\"\n", + "description": "`receiptTypeAtOrigin` is a mandatory property in the `Booking request`. This is an example of how the error object would look in case this property is missing.\n\n**NB**: `errorCode` not yet standardized by DCSA. Value `7003` is just a \"random example\"\n", "value": { "httpMethod": "PUT", "requestUri": "/v2/bookings/cbrr-123", @@ -1725,7 +1665,7 @@ "statusCodeText": "Bad Request", "statusCodeMessage": "receiptTypeAtOrigin not found - it is a mandatory property in Booking request\n", "providerCorrelationReference": "4426d965-0dd8-4005-8c63-dc68b01c4962", - "errorDateTime": "2023-04-13T07:41:00+08:30", + "errorDateTime": "2024-09-04T09:41:00Z", "errors": [ { "errorCode": 7003, @@ -1741,7 +1681,7 @@ } }, "404": { - "description": "In case the provider does not know of the `bookingReference` used in the request (this could be because of a `POST` request that has not finished processing or simply because the resource does not exist) - it is possible for the provider to reject the requests by returning a `404` (Not Found)\n", + "description": "In case the provider does not know of the `bookingReference` used in the request (this could be because of a `POST` request that has not finished processing or simply because the resource does not exist) - it is possible for the provider to reject the requests by returning a `404` (Not Found).\n", "headers": { "API-Version": { "$ref": "#/components/headers/API-Version" @@ -1763,7 +1703,7 @@ "statusCodeText": "Not Found", "statusCodeMessage": "bookingReference not found\n", "providerCorrelationReference": "4426d965-0dd8-4005-8c63-dc68b01c4962", - "errorDateTime": "2023-04-13T07:41:00+08:30", + "errorDateTime": "2024-09-04T09:41:00Z", "errors": [ { "errorCode": 7003, @@ -1778,7 +1718,7 @@ } }, "409": { - "description": "In case the provider is processing the `Booking request` - it is possible for the provider to reject new incomming requests by returning a `409` (Conflict)\n", + "description": "In case the provider is processing the `Booking request` - it is possible for the provider to reject new incoming requests by returning a `409` (Conflict)\n", "headers": { "API-Version": { "$ref": "#/components/headers/API-Version" @@ -1800,7 +1740,7 @@ "statusCodeText": "Conflict", "statusCodeMessage": "Previous request is being processed. Please try again\nlater\n", "providerCorrelationReference": "4426d965-0dd8-4005-8c63-dc68b01c4962", - "errorDateTime": "2023-04-13T07:41:00+08:30", + "errorDateTime": "2024-09-04T09:41:00Z", "errors": [ { "errorCode": 7003, @@ -1837,7 +1777,7 @@ "statusCodeText": "Internal Server Error", "statusCodeMessage": "Internal Server Error occurred while processing Booking request\n", "providerCorrelationReference": "4426d965-0dd8-4005-8c63-dc68b01c4962", - "errorDateTime": "2023-04-13T07:41:00+08:30", + "errorDateTime": "2024-09-04T09:41:00Z", "errors": [ { "errorCode": 7003, @@ -1866,7 +1806,7 @@ "examples": { "tooManyRequestsExample": { "summary": "Updating too many Bookings requests\n", - "description": "Calling the endPoint\n\n GET /v2/bookings/cbrr-123\n \ntoo many times within a timeperiod.\n\n**NB**: `errorCode` not yet standardized by DCSA. Value `7003` is just a \"random example\"\n", + "description": "Calling the endPoint\n\n GET /v2/bookings/cbrr-123\n\ntoo many times within a time period.\n\n**NB**: `errorCode` not yet standardized by DCSA. Value `7003` is just a \"random example\"\n", "value": { "httpMethod": "PUT", "requestUri": "/v2/bookings/cbrr-123", @@ -1874,7 +1814,7 @@ "statusCodeText": "Too Many Requests", "statusCodeMessage": "Too many request to update a booking has been requested. Please try again in 1 hour\n", "providerCorrelationReference": "4426d965-0dd8-4005-8c63-dc68b01c4962", - "errorDateTime": "2023-04-13T07:41:00+08:30", + "errorDateTime": "2024-09-04T09:41:00Z", "errors": [ { "errorCode": 7003, @@ -1895,7 +1835,7 @@ "Booking" ], "summary": "Cancels the Booking or cancels an Amendment\n", - "description": "A shipper initiated cancellation of the `Booking` or `Booking Amendment` with the `bookingReference`. The path can contain a `carrierBookingRequestReference` or a `carrierBookingReference`. Once the `Booking` is confirmed - it is **only** possible to use the `carrierBookingReference`.\n\nThis endPoint corresponds with **UseCase 11 - Cancel Booking Request by shipper**, **UseCase 9 - Cancel amendment to confirmed Booking** or **UseCase 13 - Cancel confirmed Booking by shipper**.\n\n## Precondition\nIn order to cancel a `Booking`, the `bookingStatus` must be either\n- `RECEIVED`\n- `PENDING UPDATE`\n- `UPDATE RECEIVED`\n- `CONFIRMED`\n- `PENDING AMENDMENT`\n\nIn order to cancel a `Booking Amendment`, the status of the `Booking Amendment` must be\n- `AMENDMENT RECEIVED`\n\n## Postcondition\nThe provider has received a cancellation from the consumer for a `Booking` or for a `Booking Amendment`.\n\nThe consumer will receive a `200` (OK) or a `202` (Accepted) if the payload schema-validates or a `400` (Bad Request) if it does not.\n\n## Flow for a `200` (OK) response\nThe following occurs when a provider receives a cancellation request:\n1. The payload is schema-validated. In case the payload **is invalid** a `400` (Bad Request) is returned.\n\n **The process stops here!**\n2. The payload is schema-valid which means:\n - all required properties are provided.\n - all values provided have correct data type.\n3. Depending on the paylod of the request - either:\n - the `Booking Request` is cancelled. This is the case when the payload contains `bookingStatus='CANCELLED'`. It is only possible to use this payload in combination with `carrierBookingRequestReference` being used in the path (as the `bookingReference`)\n \n A `200` (OK) response is returned with the following payload:\n ```\n {\n carrierBookingRequestReference: 'cbrr-123',\n bookingStatus: 'CANCELLED'\n }\n ```\n\n **If** the `Booking` is confirmed a `409` (Conflict) should be used as a response\n\n - only the amendment to the `Booking` is cancelled (in this case the `Booking` continues and `bookingStatus` stays unchanged). This is the case when the payload contains `amendedBookingStatus='AMENDMENT CANCELLED'`.\n \n **If** no amendment is being requested prior to this call (`amendedBookingStatus` is **not** `AMENDMENT RECEIVED`) then a `404` (Not Found) is returned\n\n A `200` (OK) response is returned with the following payload:\n ```\n {\n carrierBookingReference: 'cbr-987',\n carrierBookingRequestReference: 'cbrr-123',\n bookingStatus: 'PENDING AMENDMENT',\n amendedBookingStatus: 'AMENDMENT CANCELLED'\n }\n ```\n or\n ```\n {\n carrierBookingReference: 'cbr-987',\n carrierBookingRequestReference: 'cbrr-123',\n bookingStatus: 'CONFIRMED',\n amendedBookingStatus: 'AMENDMENT CANCELLED'\n }\n ```\n if the amendment was not requested by the provider.\n - the confirmed `Booking` is requesting to be cancelled. This is the case when the payload contains `bookingCancellationStatus='CANCELLATION RECEIVED'`. It is only possible to use this payload in combination with `carrierBookingReference` being used in the path (as the `bookingReference`)\n \n A `200` (OK) response is returned with the following payload:\n ```\n {\n carrierBookingReference: 'cbr-987',\n carrierBookingRequestReference: 'cbrr-123',\n bookingStatus: 'CONFIRMED',\n bookingCancellationStatus: 'CANCELLATION RECEIVED'\n }\n ```\n or\n ```\n {\n carrierBookingReference: 'cbr-987',\n carrierBookingRequestReference: 'cbrr-123',\n bookingStatus: 'CONFIRMED',\n amendedBookingStatus: 'AMENDMENT RECEIVED',\n bookingCancellationStatus: 'CANCELLATION RECEIVED'\n }\n ```\n in case an ongoing amendment is being processed.\n\n When cancelling a Confirmed Booking - the amendment will also be Cancelled in case the cancellation is confirmed.\n\n **If** the `Booking` is **not** yet confirmed a `409` (Conflict) should be used as a response\n\n4. All '_relevant_' subscribers will be notified via a [Booking Notification](#/BookingNotification).\n\n## Flow for a `202` (Accepted) response\nThe following occurs when a provider receives a cancellation request:\n1. The payload is schema-validated. In case the payload **is invalid** a `400` (Bad Request) is returned.\n\n **The process stops here!**\n2. The payload is schema-valid which means:\n - all required properties are provided.\n - all values provided have correct data type.\n3. An empty response is returned and the consumer now awaits further processing by the provider.\n\nOnce processed, the `Booking` or `Amended Booking` is cancelled and a [Booking Notification](#/BookingNotification) is sent. In case of a Confirmed Booking - the provider has the opportunity to decline the Cancellation of the Booking (in which case the `bookingCancellationStatus='CANCELLATION DECLINED'`).\n", + "description": "A shipper initiated cancellation of the `Booking` or `Booking Amendment` with the `bookingReference`. The path can contain a `carrierBookingRequestReference` or a `carrierBookingReference`. Once the `Booking` is confirmed - it is **only** possible to use the `carrierBookingReference`.\n\nThis endPoint corresponds with **UseCase 11 - Cancel Booking Request by shipper**, **UseCase 9 - Cancel amendment to confirmed Booking** or **UseCase 13 - Cancel confirmed Booking by shipper**.\n\n## Precondition\nIn order to cancel a `Booking`, the `bookingStatus` must be either\n- `RECEIVED`\n- `PENDING_UPDATE`\n- `UPDATE_RECEIVED`\n- `CONFIRMED`\n- `PENDING_AMENDMENT`\n\nIn order to cancel a `Booking Amendment`, the status of the `Booking Amendment` must be\n- `AMENDMENT_RECEIVED`\n\n## Postcondition\nThe provider has received a cancellation from the consumer for a `Booking` or for a `Booking Amendment`.\n\nThe consumer will receive a `202` (Accepted) if the payload schema-validates or a `400` (Bad Request) if it does not.\n\n## Flow for the `202` (Accepted) response\nThe following occurs when a provider receives a cancellation request:\n1. The payload is schema-validated. In case the payload **is invalid** a `400` (Bad Request) is returned.\n\n **The process stops here!**\n2. The payload is schema-valid which means:\n - all required properties are provided.\n - all values provided have correct data type.\n3. An empty response is returned and the consumer now awaits further processing by the provider.\n\nOnce processed, the `Booking` or `Amended Booking` is cancelled and a [Booking Notification](#/BookingNotification) is sent. In case of a Confirmed Booking - the provider has the opportunity to decline the Cancellation of the Booking (in which case the `bookingCancellationStatus='CANCELLATION_DECLINED'`).\n", "operationId": "cancel-booking", "parameters": [ { @@ -1937,22 +1877,22 @@ "description": "The consumer wants to cancel the `Booking Request`. This is done by setting the `bookingStatus` to `CANCELLED` and provide an optional `reason`.\n", "value": { "bookingStatus": "CANCELLED", - "reason": "Customer cancelled order" + "reason": "Cancelling due to strike" } }, "amendmentCancelledExample": { "summary": "Amendment cancelled\n", - "description": "The consumer wants to **only** cancel the amendment (and keep the confirmed `Booking`). This is done by setting the `amendedBookingStatus` to `AMENDMENT CANCELLED`.\n", + "description": "The consumer wants to **only** cancel the amendment (and keep the confirmed `Booking`). This is done by setting the `amendedBookingStatus` to `AMENDMENT_CANCELLED`.\n", "value": { - "amendedBookingStatus": "AMENDMENT CANCELLED" + "amendedBookingStatus": "AMENDMENT_CANCELLED" } }, "requestConfirmedBookingCancelledExample": { "summary": "Request to cancel a Confirmed Booking\n", - "description": "The consumer requests to cancel a `Confirmed Booking`. This is done by setting the `bookingCancellationStatus` to `CANCELLATION RECEIVED` and provide an optional `reason`.\n", + "description": "The consumer requests to cancel a `Confirmed Booking`. This is done by setting the `bookingCancellationStatus` to `CANCELLATION_RECEIVED` and provide an optional `reason`.\n", "value": { - "bookingCancellationStatus": "CANCELLATION RECEIVED", - "reason": "Customer cancelled order" + "bookingCancellationStatus": "CANCELLATION_RECEIVED", + "reason": "Cancelling due to internal issues" } } } @@ -1960,64 +1900,8 @@ } }, "responses": { - "200": { - "description": "Booking has been cancelled\n", - "headers": { - "API-Version": { - "$ref": "#/components/headers/API-Version" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BookingRefStatus" - }, - "examples": { - "bookingRequestCancelledExample": { - "summary": "Entire Booking cancelled\n", - "description": "The consumer has requested that the `Booking Request` should be cancelled. `bookingStatus` is set to `CANCELLED`.\n", - "value": { - "carrierBookingRequestReference": "cbrr-123", - "bookingStatus": "CANCELLED" - } - }, - "amendmentCancelled1Example": { - "summary": "Amendment cancelled on a confirmed Booking\n", - "description": "The consumer has requested that the amendment to a confirmed `Booking` is to be cancelled. The status of the `Booking` stays as `CONFIRMED`. The `amendedBookingStatus` is set to `AMENDMENT CANCELLED`.\n", - "value": { - "carrierBookingRequestReference": "cbrr-123", - "carrierBookingReference": "cbr-987", - "bookingStatus": "CONFIRMED", - "amendedBookingStatus": "AMENDMENT CANCELLED" - } - }, - "amendmentCancelled2Example": { - "summary": "Amendment requested by provider cancelled by consumer\n", - "description": "The consumer has requested that the amendment to a confirmed `Booking` is to be cancelled. The status of the `Booking` stays as `PENDING AMENDMENT`. The `amendedBookingStatus` is set to `AMENDMENT CANCELLED`.\n", - "value": { - "carrierBookingRequestReference": "cbrr-123", - "carrierBookingReference": "cbr-987", - "bookingStatus": "PENDING AMENDMENT", - "amendedBookingStatus": "AMENDMENT CANCELLED" - } - }, - "requestConfirmedBookingCancellationExample": { - "summary": "Request to Cancel a Confirmed Booking\n", - "description": "The consumer has requested that a confirmed `Booking` is to be cancelled. The status of the `Booking` stays as is (in the below payload this is `PENDING AMENDMENT`. The `amendedBookingStatus` stays as is (in the below payload this is `AMENDMENT CONFIRMED`.\n", - "value": { - "carrierBookingRequestReference": "cbrr-123", - "carrierBookingReference": "cbr-987", - "bookingStatus": "PENDING AMENDMENT", - "amendedBookingStatus": "AMENDMENT CONFIRMED", - "bookingCancellationStatus": "CANCELLATION RECEIVED" - } - } - } - } - } - }, "202": { - "description": "Booking cancellation has been accepted\n", + "description": "Booking cancellation has been accepted.\n", "headers": { "API-Version": { "$ref": "#/components/headers/API-Version" @@ -2065,14 +1949,14 @@ "statusCodeText": "Bad Request", "statusCodeMessage": "APPROVE is not a valid status to set", "providerCorrelationReference": "4426d965-0dd8-4005-8c63-dc68b01c4962", - "errorDateTime": "2023-10-03T07:41:00+08:30", + "errorDateTime": "2024-09-04T09:41:00Z", "errors": [ { "errorCode": 7003, "property": "amendedBookingStatus", "value": "APPROVE", "errorCodeText": "incorrect value", - "errorCodeMessage": "Only AMENDMENT CANCELLED is an allowed value: APPROVE was inserted" + "errorCodeMessage": "Only AMENDMENT_CANCELLED is an allowed value: APPROVE was inserted" } ] } @@ -2082,7 +1966,7 @@ } }, "404": { - "description": "In case the consumer is cancelling the `Amended Booking` by setting:\n\n `amendedBookingStatus='AMENDMENT CANCELLED'`\n \nbut:\n- the `Booking` has not yet been confirmed\n- the `Booking` has been confirmed but no amendment has yet been provided by the consumer\n- the provider has requested for a new amendment (**UseCase 6: Request to amend confirmed Booking**) in which case the \"old update\" is no longer accessable.\n\na `404` (Not Found) is returned.\n\nA `404` (Not Found) can also be sent in case the provider does not know of the `bookingReference` used in the request (the resource does not exist)\n", + "description": "In case the consumer is cancelling the `Amended Booking` by setting:\n\n `amendedBookingStatus='AMENDMENT_CANCELLED'`\n\nbut:\n- the `Booking` has not yet been confirmed\n- the `Booking` has been confirmed but no amendment has yet been provided by the consumer\n- the provider has requested for a new amendment (**UseCase 6: Request to amend confirmed Booking**) in which case the \"old update\" is no longer accessible.\n\na `404` (Not Found) is returned.\n\nA `404` (Not Found) can also be sent in case the provider does not know of the `bookingReference` used in the request (the resource does not exist)\n", "headers": { "API-Version": { "$ref": "#/components/headers/API-Version" @@ -2104,7 +1988,7 @@ "statusCodeText": "Not Found", "statusCodeMessage": "bookingReference not found\n", "providerCorrelationReference": "4426d965-0dd8-4005-8c63-dc68b01c4962", - "errorDateTime": "2023-04-13T07:41:00+08:30", + "errorDateTime": "2024-09-04T09:41:00Z", "errors": [ { "errorCode": 7003, @@ -2124,7 +2008,7 @@ "statusCodeText": "Not Found", "statusCodeMessage": "No amended booking exists", "providerCorrelationReference": "4426d965-0dd8-4005-8c63-dc68b01c4962", - "errorDateTime": "2023-04-13T07:41:00+08:30", + "errorDateTime": "2024-09-04T09:41:00Z", "errors": [ { "errorCode": 7003, @@ -2161,7 +2045,7 @@ "statusCodeText": "Conflict", "statusCodeMessage": "Previous request is being processed. Please try again later\n", "providerCorrelationReference": "4426d965-0dd8-4005-8c63-dc68b01c4962", - "errorDateTime": "2023-04-13T07:41:00+08:30", + "errorDateTime": "2024-09-04T09:41:00Z", "errors": [ { "errorCode": 7003, @@ -2198,7 +2082,7 @@ "statusCodeText": "Internal Server Error", "statusCodeMessage": "Internal Server Error occurred while processing Booking request\n", "providerCorrelationReference": "4426d965-0dd8-4005-8c63-dc68b01c4962", - "errorDateTime": "2023-04-13T07:41:00+08:30", + "errorDateTime": "2024-09-04T09:41:00Z", "errors": [ { "errorCode": 7003, @@ -2227,7 +2111,7 @@ "examples": { "tooManyRequestsExample": { "summary": "Updating too many Bookings requests\n", - "description": "Calling the endPoint\n\n PATCH /v2/bookings/cbrr-123\n\ntoo many times within a timeperiod.\n\n**NB**: `errorCode` not yet standardized by DCSA. Value `7003` is just a \"random example\"\n", + "description": "Calling the endPoint\n\n PATCH /v2/bookings/cbrr-123\n\ntoo many times within a time period.\n\n**NB**: `errorCode` not yet standardized by DCSA. Value `7003` is just a \"random example\"\n", "value": { "httpMethod": "PATCH", "requestUri": "/v2/bookings/cbrr-123", @@ -2235,7 +2119,7 @@ "statusCodeText": "Too Many Requests", "statusCodeMessage": "Too many request to cancel a booking has been requested. Please try again in 1 hour\n", "providerCorrelationReference": "4426d965-0dd8-4005-8c63-dc68b01c4962", - "errorDateTime": "2023-04-13T07:41:00+08:30", + "errorDateTime": "2024-09-04T09:41:00Z", "errors": [ { "errorCode": 7003, @@ -2343,7 +2227,6 @@ "isImportLicenseRequired": false, "expectedDepartureDate": "2024-01-20", "incoTerms": "EXW", - "communicationChannelCode": "AO", "isEquipmentSubstitutionAllowed": false, "references": [ { @@ -2394,13 +2277,15 @@ "requestedEquipments": [ { "isShipperOwned": false, - "ISOEquipmentCode": "42GP", + "ISOEquipmentCode": "42G1", "units": 3, "commodities": [ { "commodityType": "Dry cargo, Freight all kinds", - "cargoGrossWeight": 36000, - "cargoGrossWeightUnit": "KGM" + "cargoGrossWeight": { + "value": 36000, + "unit": "KGM" + } } ] } @@ -2411,7 +2296,7 @@ }, "declinedLightweightExample": { "summary": "Booking amendment declined (Lightweight)\n", - "description": "A lightweight notification explaining that an amendment to a `Booking` has been declined (`amendedBookingStatus='AMENDMENT DECLINED'`)\n", + "description": "A lightweight notification explaining that an amendment to a `Booking` has been declined (`amendedBookingStatus='AMENDMENT_DECLINED'`)\n", "value": { "specversion": "1.0", "id": "3cecb101-7a1a-43a4-9d62-e88a131651e2", @@ -2422,7 +2307,7 @@ "subscriptionReference": "BKG001", "data": { "bookingStatus": "CONFIRMED", - "amendedBookingStatus": "AMENDMENT DECLINED", + "amendedBookingStatus": "AMENDMENT_DECLINED", "carrierBookingRequestReference": "24595eb0-5cfc-4381-9c3a-cedc1975e9aa", "carrierBookingReference": "ABC709951", "feedbacks": [ @@ -2437,7 +2322,7 @@ }, "declinedFullStateTransferExample": { "summary": "Booking amendment declined (Full State Transfer)\n", - "description": "A full state transfer notification explaining that an amendment to a `Booking` has been declined (`amendedBookingStatus='AMENDMENT DECLINED'`). The notification both contains the Booking from before the amendment (in the `booking` property) it also contains the amended booking (in the `amendedBooking` property).\n", + "description": "A full state transfer notification explaining that an amendment to a `Booking` has been declined (`amendedBookingStatus='AMENDMENT_DECLINED'`). The notification both contains the Booking from before the amendment (in the `booking` property) it also contains the amended booking (in the `amendedBooking` property).\n", "value": { "specversion": "1.0", "id": "3cecb101-7a1a-43a4-9d62-e88a131651e2", @@ -2448,7 +2333,7 @@ "subscriptionReference": "BKG001", "data": { "bookingStatus": "CONFIRMED", - "amendedBookingStatus": "AMENDMENT DECLINED", + "amendedBookingStatus": "AMENDMENT_DECLINED", "carrierBookingRequestReference": "24595eb0-5cfc-4381-9c3a-cedc1975e9aa", "carrierBookingReference": "ABC709951", "feedbacks": [ @@ -2462,7 +2347,7 @@ "carrierBookingRequestReference": "24595eb0-5cfc-4381-9c3a-cedc1975e9aa", "carrierBookingReference": "ABC709951", "bookingStatus": "CONFIRMED", - "amendedBookingStatus": "AMENDMENT DECLINED", + "amendedBookingStatus": "AMENDMENT_DECLINED", "receiptTypeAtOrigin": "CY", "deliveryTypeAtDestination": "CY", "cargoMovementTypeAtOrigin": "FCL", @@ -2491,7 +2376,6 @@ "isImportLicenseRequired": false, "expectedDepartureDate": "2024-01-20", "incoTerms": "EXW", - "communicationChannelCode": "AO", "isEquipmentSubstitutionAllowed": false, "references": [ { @@ -2542,20 +2426,22 @@ "requestedEquipments": [ { "isShipperOwned": false, - "ISOEquipmentCode": "42GP", + "ISOEquipmentCode": "42G1", "units": 3, "commodities": [ { "commodityType": "Dry cargo, Freight all kinds", - "cargoGrossWeight": 36000, - "cargoGrossWeightUnit": "KGM" + "cargoGrossWeight": { + "value": 36000, + "unit": "KGM" + } } ] } ], "confirmedEquipments": [ { - "ISOEquipmentCode": "42GP", + "ISOEquipmentCode": "42G1", "units": 3 } ], @@ -2583,15 +2469,15 @@ "shipmentCutOffTimes": [ { "cutOffDateTimeCode": "DCO", - "cutOffDateTime": "2024-01-17T22:30:00.000" + "cutOffDateTime": "2024-01-17T22:30:00Z" }, { "cutOffDateTimeCode": "VCO", - "cutOffDateTime": "2024-01-18T22:30:00.000" + "cutOffDateTime": "2024-01-18T22:30:00Z" }, { "cutOffDateTimeCode": "FCO", - "cutOffDateTime": "2024-01-19T13:30:00.000" + "cutOffDateTime": "2024-01-19T13:30:00Z" } ], "advanceManifestFilings": [ @@ -2601,7 +2487,7 @@ } ], "carrierClauses": [ - "The date of shipment, the carrying vessel and theschedule are not guaranteed and are always subject tochanges.", + "The date of shipment, the carrying vessel and the schedule are not guaranteed and are always subject to changes.", "Operations such as lifting, stowage, drayage and customs declaration of containers are based on the description of the nature, quantity, measurement and weight declared by the Shipper. The Shipper shall be liable for any damage, loss, expense and fines incurred by Carrier XYZ or its agents due to incorrectness or incompleteness of such declaration.", "Warranted shipper must fulfill the requirements of SOLAS regulations and the IMO guidelines regarding the Verified Gross Mass (VGM) of container carrying cargo (msc.1/circ.1474, 9 June 2014).", "In accordance with SOLAS regulations and IMO guidelines regarding the VGM (verified gross mass), any expenses incurred because the VGM was submitted late or was not submitted at all will be charged back to the customer with an additional administration fee." @@ -2611,7 +2497,7 @@ "carrierBookingRequestReference": "24595eb0-5cfc-4381-9c3a-cedc1975e9aa", "carrierBookingReference": "ABC709951", "bookingStatus": "CONFIRMED", - "amendedBookingStatus": "AMENDMENT DECLINED", + "amendedBookingStatus": "AMENDMENT_DECLINED", "receiptTypeAtOrigin": "CY", "deliveryTypeAtDestination": "CY", "cargoMovementTypeAtOrigin": "FCL", @@ -2640,7 +2526,6 @@ "isImportLicenseRequired": false, "expectedDepartureDate": "2024-01-20", "incoTerms": "EXW", - "communicationChannelCode": "AO", "isEquipmentSubstitutionAllowed": false, "references": [ { @@ -2691,13 +2576,15 @@ "requestedEquipments": [ { "isShipperOwned": false, - "ISOEquipmentCode": "42GP", + "ISOEquipmentCode": "42G1", "units": 30, "commodities": [ { "commodityType": "Dry cargo, Freight all kinds", - "cargoGrossWeight": 36000, - "cargoGrossWeightUnit": "KGM" + "cargoGrossWeight": { + "value": 36000, + "unit": "KGM" + } } ] } @@ -2708,7 +2595,7 @@ }, "cancelConfirmedBookingLightweightExample": { "summary": "Confirmed Booking cancelled (Lightweight)\n", - "description": "A lightweight notification explaining that a confirmed `Booking` has been cancelled (`bookingCancellationStatus='CANCELLATION CONFIRMED'`)\n", + "description": "A lightweight notification explaining that a confirmed `Booking` has been cancelled (`bookingCancellationStatus='CANCELLATION_CONFIRMED'`)\n", "value": { "specversion": "1.0", "id": "3cecb101-7a1a-43a4-9d62-e88a131651e2", @@ -2719,8 +2606,8 @@ "subscriptionReference": "BKG001", "data": { "bookingStatus": "CANCELLED", - "amendedBookingStatus": "AMENDMENT CANCELLED", - "bookingCancellationStatus": "CANCELLATION CONFIRMED", + "amendedBookingStatus": "AMENDMENT_CANCELLED", + "bookingCancellationStatus": "CANCELLATION_CONFIRMED", "carrierBookingRequestReference": "24595eb0-5cfc-4381-9c3a-cedc1975e9aa", "carrierBookingReference": "ABC709951" } @@ -2754,7 +2641,7 @@ "examples": { "badRequestExample": { "summary": "Booking missing carrierBookingReference or carrierBookingRequestReference\n", - "description": "`carrierBookingReference` or `carrierBookingRequestReference` is a conditionary property in the `Notification` (at least one of them must be present). This is an example of how the error object would look in case this property is missing\n\n**NB**: `errorCode` not yet standardized by DCSA. Value `7003` is just a \"random example\"\n", + "description": "`carrierBookingReference` or `carrierBookingRequestReference` is a conditionally property in the `Notification` (at least one of them must be present). This is an example of how the error object would look in case this property is missing\n\n**NB**: `errorCode` not yet standardized by DCSA. Value `7003` is just a \"random example\"\n", "value": { "httpMethod": "POST", "requestUri": "/v2/booking-notifications", @@ -2762,7 +2649,7 @@ "statusCodeText": "Bad Request", "statusCodeMessage": "carrierBookingReference or carrierBookingRequestReference not found - one of them is a mandatory to provide in a Notification\n", "providerCorrelationReference": "4426d965-0dd8-4005-8c63-dc68b01c4962", - "errorDateTime": "2023-04-13T07:41:00+08:30", + "errorDateTime": "2024-09-04T09:41:00Z", "errors": [ { "errorCode": 7003, @@ -2800,7 +2687,7 @@ "statusCodeText": "Internal Server Error", "statusCodeMessage": "Internal Server Error occurred while processing Booking request\n", "providerCorrelationReference": "4426d965-0dd8-4005-8c63-dc68b01c4962", - "errorDateTime": "2023-04-13T07:41:00+08:30", + "errorDateTime": "2024-09-04T09:41:00Z", "errors": [ { "errorCode": 7003, @@ -2829,7 +2716,7 @@ "examples": { "tooManyRequestsExample": { "summary": "Making too many Notifications\n", - "description": "Calling the endPoint\n\n POST /v2/booking-notifications\n\ntoo many times within a timeperiod.\n\n**NB**: `errorCode` not yet standardized by DCSA. Value `7003` is just a \"random example\"\n", + "description": "Calling the endPoint\n\n POST /v2/booking-notifications\n\ntoo many times within a time period.\n\n**NB**: `errorCode` not yet standardized by DCSA. Value `7003` is just a \"random example\"\n", "value": { "httpMethod": "POST", "requestUri": "/v2/booking-notifications", @@ -2837,7 +2724,7 @@ "statusCodeText": "Too Many Requests", "statusCodeMessage": "Too many request to create a Notification has been requested. Please try again in 1 hour\n", "providerCorrelationReference": "4426d965-0dd8-4005-8c63-dc68b01c4962", - "errorDateTime": "2023-04-13T07:41:00+08:30", + "errorDateTime": "2024-09-04T09:41:00Z", "errors": [ { "errorCode": 7003, @@ -2921,7 +2808,7 @@ "example": "30675492-50ff-4e17-a7df-7a487a8ad343" }, "data": { - "$ref": "#/components/schemas/BookingNotification_data" + "$ref": "#/components/schemas/Data" } }, "description": "`CloudEvent` specific properties for the `Notification`.\n" @@ -3025,9 +2912,9 @@ }, "errorDateTime": { "type": "string", - "description": "The DateTime corresponding to the error occurring. Must be formatted using [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.\n", + "description": "The DateTime corresponding to the error occurring. Must be formatted using [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.\n", "format": "date-time", - "example": "2019-11-12T07:41:00+08:30" + "example": "2024-09-04T09:41:00Z" }, "errors": { "minItems": 1, @@ -3052,7 +2939,7 @@ "maximum": 9999, "minimum": 7000, "type": "integer", - "description": "The detailed error code returned.\n\n - `7000-7999` Technical error codes\n - `8000-8999` Functional error codes\n - `9000-9999` API provider-specific error codes \n\n[Error codes as specified by DCSA](https://dcsa.atlassian.net/wiki/spaces/DTG/pages/197132308/Standard+Error+Codes).\n", + "description": "The detailed error code returned.\n\n - `7000-7999` Technical error codes\n - `8000-8999` Functional error codes\n - `9000-9999` API provider-specific error codes \n\n[Error codes as specified by DCSA](https://developer.dcsa.org/standard-error-codes).\n", "format": "int32", "example": 7003 }, @@ -3101,29 +2988,29 @@ "street": { "maxLength": 70, "type": "string", - "description": "The name of the street of the party's address.", + "description": "The name of the street.", "example": "Ruijggoordweg" }, "streetNumber": { "maxLength": 50, "type": "string", - "description": "The number of the street of the party's address.", + "description": "The number of the street.", "example": "100" }, "floor": { "maxLength": 50, "pattern": "^\\S(?:.*\\S)?$", "type": "string", - "description": "The floor of the party's street number.\n", + "description": "The floor of the street number.\n", "example": "2nd" }, "postCode": { "maxLength": 10, "type": "string", - "description": "The post code of the party's address.", + "description": "The post code.", "example": "1047 HM" }, - "PObox": { + "POBox": { "maxLength": 20, "type": "string", "description": "A numbered box at a post office where a person or business can have mail or parcels delivered.", @@ -3133,13 +3020,13 @@ "maxLength": 35, "pattern": "^\\S(?:.*\\S)?$", "type": "string", - "description": "The city name of the party's address.\n", + "description": "The name of the city.\n", "example": "Amsterdam" }, "stateRegion": { "maxLength": 65, "type": "string", - "description": "The state/region of the party's address.", + "description": "The name of the state/region.", "example": "North Holland" }, "countryCode": { @@ -3165,7 +3052,7 @@ "maxLength": 6, "pattern": "^\\S(?:.*\\S)?$", "type": "string", - "description": "The code used for identifying the specific facility. This code does not include the UN Location Code.\n\nThe definition of the code depends on the `facilityCodeListProvider`. As code list providers maintain multiple codeLists the following codeList is used:\n\n- for `SMDG` - the codeList used is the [SMDG Terminal Code List](https://smdg.org/wp-content/uploads/Codelists/Terminals/SMDG-Terminal-Code-List-v20210401.xlsx) \n- for `BIC` - the codeList used is the [BIC Facility Codes](https://www.bic-code.org/facility-codes/)\n", + "description": "The code used for identifying the specific facility. This code does not include the UN Location Code.\n\nThe definition of the code depends on the `facilityCodeListProvider`. As code list providers maintain multiple codeLists the following codeList is used:\n\n- `SMDG` (the codeList used is the [SMDG Terminal Code List](https://smdg.org/documents/smdg-code-lists/))\n- `BIC` (the codeList used is the [BIC Facility Codes](https://www.bic-code.org/facility-codes/))\n", "example": "ADT" }, "facilityCodeListProvider": { @@ -3208,13 +3095,11 @@ "required": [ "cargoMovementTypeAtDestination", "cargoMovementTypeAtOrigin", - "communicationChannelCode", "deliveryTypeAtDestination", "documentParties", "isEquipmentSubstitutionAllowed", "isExportDeclarationRequired", "isImportLicenseRequired", - "isPartialLoadAllowed", "receiptTypeAtOrigin", "requestedEquipments", "shipmentLocations" @@ -3271,10 +3156,10 @@ ] }, "originChargesPaymentTerm": { - "$ref": "#/components/schemas/Origin Charges Payment Term" + "$ref": "#/components/schemas/OriginChargesPaymentTerm" }, "destinationChargesPaymentTerm": { - "$ref": "#/components/schemas/Destination Charges Payment Term" + "$ref": "#/components/schemas/DestinationChargesPaymentTerm" }, "contractQuotationReference": { "maxLength": 35, @@ -3335,19 +3220,19 @@ "minLength": 3, "pattern": "^[A-Z]{3}$", "type": "string", - "description": "The currency used for the declared value, using the 3-character code defined by [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).\n", + "description": "The currency used for the declared value, using the 3-character code defined by [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html).\n", "example": "DKK" }, "carrierCode": { "maxLength": 4, "pattern": "^\\S+$", "type": "string", - "description": "The `NMFTA` or `SMDG` code of the carrier the booking request is intended for.\n", + "description": "The `SCAC` code (provided by [NMFTA](https://nmfta.org/scac/)) or `SMDG` code (provided by [SMDG](https://smdg.org/documents/smdg-code-lists/smdg-liner-code-list/)) of the carrier the booking request is intended for. `carrierCodeListProvider` defines which list the `carrierCode` is based upon.\n", "example": "MMCU" }, "carrierCodeListProvider": { "type": "string", - "description": "The code list provider for the carrier code. Possible values are:\n- `SMDG` (Ship Message Design Group)\n- `NMFTA` (National Motor Freight Traffic Association)\n", + "description": "The code list provider for the `carrierCode`. Possible values are:\n- `SMDG` (Ship Message Design Group)\n- `NMFTA` (National Motor Freight Traffic Association)\n", "example": "NMFTA", "enum": [ "SMDG", @@ -3356,8 +3241,9 @@ }, "isPartialLoadAllowed": { "type": "boolean", - "description": "Indication whether the shipper agrees to load part of the shipment in case where not all of the cargo is delivered within cut-off.\n", - "example": true + "description": "Indication whether the shipper agrees to load part of the shipment in case where not all of the cargo is delivered within cut-off.\n\n**Note:** If this property is omitted it is considered that 'Partial Load **is** allowed' by default\n", + "example": true, + "default": true }, "isExportDeclarationRequired": { "type": "boolean", @@ -3427,15 +3313,9 @@ "incoTerms": { "maxLength": 3, "type": "string", - "description": "Transport obligations, costs and risks as agreed between buyer and seller as defined by [ICC](https://iccwbo.org/business-solutions/incoterms-rules/). A list of possible values:\n- `EXW` (Ex-Works)\n- `FCA` (Free Carrier)\n- `FAS` (Free Alongside Ship)\n- `FOB` (Free On Board)\n- `CFR` (Cost and Freight)\n- `CIF` (Cost, Insurance and Freight)\n- `CPT` (Carriage Paid To)\n- `CIP` (Carriage And Insurance Paid To)\n- `DAP` (Delivered At Place)\n- `DPU` (Delivered At Place Unloaded)\n- `DDP` (Delivered Duty Paid)\n", + "description": "Transport obligations, costs and risks as agreed between buyer and seller as defined by [Incoterms Rules](https://iccwbo.org/business-solutions/incoterms-rules/).\n", "example": "FCA" }, - "communicationChannelCode": { - "maxLength": 2, - "type": "string", - "description": "Specifying which communication channel is to be used for this booking e.g. Possible values are:\n- `EI` (EDI transmission)\n- `EM` (Email)\n- `AO` (API)\n", - "example": "AO" - }, "isEquipmentSubstitutionAllowed": { "type": "boolean", "description": "Indicates if an alternate equipment type can be provided by the carrier.\n", @@ -3494,13 +3374,11 @@ "required": [ "cargoMovementTypeAtDestination", "cargoMovementTypeAtOrigin", - "communicationChannelCode", "deliveryTypeAtDestination", "documentParties", "isEquipmentSubstitutionAllowed", "isExportDeclarationRequired", "isImportLicenseRequired", - "isPartialLoadAllowed", "receiptTypeAtOrigin", "requestedEquipments", "shipmentLocations" @@ -3571,10 +3449,10 @@ ] }, "originChargesPaymentTerm": { - "$ref": "#/components/schemas/Origin Charges Payment Term" + "$ref": "#/components/schemas/OriginChargesPaymentTerm" }, "destinationChargesPaymentTerm": { - "$ref": "#/components/schemas/Destination Charges Payment Term" + "$ref": "#/components/schemas/DestinationChargesPaymentTerm" }, "contractQuotationReference": { "maxLength": 35, @@ -3635,19 +3513,19 @@ "minLength": 3, "pattern": "^[A-Z]{3}$", "type": "string", - "description": "The currency used for the declared value, using the 3-character code defined by [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).\n", + "description": "The currency used for the declared value, using the 3-character code defined by [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html).\n", "example": "DKK" }, "carrierCode": { "maxLength": 4, "pattern": "^\\S+$", "type": "string", - "description": "The `NMFTA` or `SMDG` code of the carrier the booking request is intended for.\n", + "description": "The `SCAC` code (provided by [NMFTA](https://nmfta.org/scac/)) or `SMDG` code (provided by [SMDG](https://smdg.org/documents/smdg-code-lists/smdg-liner-code-list/)) of the carrier the booking request is intended for. `carrierCodeListProvider` defines which list the `carrierCode` is based upon.\n", "example": "MMCU" }, "carrierCodeListProvider": { "type": "string", - "description": "The code list provider for the carrier code. Possible values are:\n- `SMDG` (Ship Message Design Group)\n- `NMFTA` (National Motor Freight Traffic Association)\n", + "description": "The code list provider for the `carrierCode`. Possible values are:\n- `SMDG` (Ship Message Design Group)\n- `NMFTA` (National Motor Freight Traffic Association)\n", "example": "NMFTA", "enum": [ "SMDG", @@ -3656,8 +3534,9 @@ }, "isPartialLoadAllowed": { "type": "boolean", - "description": "Indication whether the shipper agrees to load part of the shipment in case where not all of the cargo is delivered within cut-off.\n", - "example": true + "description": "Indication whether the shipper agrees to load part of the shipment in case where not all of the cargo is delivered within cut-off.\n\n**Note:** If this property is omitted it is considered that 'Partial Load **is** allowed' by default\n", + "example": true, + "default": true }, "isExportDeclarationRequired": { "type": "boolean", @@ -3727,15 +3606,9 @@ "incoTerms": { "maxLength": 3, "type": "string", - "description": "Transport obligations, costs and risks as agreed between buyer and seller as defined by [ICC](https://iccwbo.org/business-solutions/incoterms-rules/). A list of possible values:\n- `EXW` (Ex-Works)\n- `FCA` (Free Carrier)\n- `FAS` (Free Alongside Ship)\n- `FOB` (Free On Board)\n- `CFR` (Cost and Freight)\n- `CIF` (Cost, Insurance and Freight)\n- `CPT` (Carriage Paid To)\n- `CIP` (Carriage And Insurance Paid To)\n- `DAP` (Delivered At Place)\n- `DPU` (Delivered At Place Unloaded)\n- `DDP` (Delivered Duty Paid)\n", + "description": "Transport obligations, costs and risks as agreed between buyer and seller as defined by [Incoterms Rules](https://iccwbo.org/business-solutions/incoterms-rules/).\n", "example": "FCA" }, - "communicationChannelCode": { - "maxLength": 2, - "type": "string", - "description": "Specifying which communication channel is to be used for this booking e.g. Possible values are:\n- `EI` (EDI transmission)\n- `EM` (Email)\n- `AO` (API)\n", - "example": "AO" - }, "isEquipmentSubstitutionAllowed": { "type": "boolean", "description": "Indicates if an alternate equipment type can be provided by the carrier.\n", @@ -3795,13 +3668,11 @@ "bookingStatus", "cargoMovementTypeAtDestination", "cargoMovementTypeAtOrigin", - "communicationChannelCode", "deliveryTypeAtDestination", "documentParties", "isEquipmentSubstitutionAllowed", "isExportDeclarationRequired", "isImportLicenseRequired", - "isPartialLoadAllowed", "receiptTypeAtOrigin", "requestedEquipments", "shipmentLocations" @@ -3825,20 +3696,20 @@ "bookingStatus": { "maxLength": 50, "type": "string", - "description": "The status of the `Booking`. Possible values are:\n- `RECEIVED` (Booking request has been received)\n- `PENDING UPDATE` (An update is required to the Booking)\n- `UPDATE RECEIVED` (An update has been received and is awaiting to be processed)\n- `CONFIRMED` (Booking has been Confirmed)\n- `PENDING AMENDMENT` (An amendment is required to the Booking)\n- `REJECTED` (Booking discontinued by carrier before it has been Confirmed)\n- `DECLINED` (Booking discontinued by carrier after it has been Confirmed)\n- `CANCELLED` (Booking discontinued by consumer)\n- `COMPLETED` (The Transport Document this Booking is connected to has been Surrendered for Delivery)\n", + "description": "The status of the `Booking`. Possible values are:\n- `RECEIVED` (Booking request has been received)\n- `PENDING_UPDATE` (An update is required to the Booking)\n- `UPDATE_RECEIVED` (An update has been received and is awaiting to be processed)\n- `CONFIRMED` (Booking has been Confirmed)\n- `PENDING_AMENDMENT` (An amendment is required to the Booking)\n- `REJECTED` (Booking discontinued by carrier before it has been Confirmed)\n- `DECLINED` (Booking discontinued by carrier after it has been Confirmed)\n- `CANCELLED` (Booking discontinued by consumer)\n- `COMPLETED` (The Transport Document this Booking is connected to has been Surrendered for Delivery)\n", "example": "RECEIVED" }, "amendedBookingStatus": { "maxLength": 50, "type": "string", - "description": "The status of latest amendment added to the `Booking`. If no amendment has been requested - then this field is empty. Possible values are:\n- `AMENDMENT RECEIVED` (An amendment has been received and is awaiting to be processed)\n- `AMENDMENT CONFIRMED` (Amendment is confirmed)\n- `AMENDMENT DECLINED` (Amendment discontinued by provider)\n- `AMENDMENT CANCELLED` (Amendment discontinued by consumer)\n", - "example": "AMENDMENT RECEIVED" + "description": "The status of latest amendment added to the `Booking`. If no amendment has been requested - then this field is empty. Possible values are:\n- `AMENDMENT_RECEIVED` (An amendment has been received and is awaiting to be processed)\n- `AMENDMENT_CONFIRMED` (Amendment is confirmed)\n- `AMENDMENT_DECLINED` (Amendment discontinued by provider)\n- `AMENDMENT_CANCELLED` (Amendment discontinued by consumer)\n", + "example": "AMENDMENT_RECEIVED" }, "bookingCancellationStatus": { "maxLength": 50, "type": "string", - "description": "The status of the latest booking cancellation. If no cancellation has been requested - then this property is empty. Possible values are:\n- `CANCELLATION RECEIVED` (A request to cancel a Confirmed Booking has been received and is awaiting to be processed)\n- `CANCELLATION DECLINED` (Cancellation of the Confirmed Booking has been declined by provider)\n- `CANCELLATION CONFIRMED` (Cancellation of the Confirmed Booking has been confirmed by provider)\n", - "example": "CANCELLATION RECEIVED" + "description": "The status of the latest booking cancellation. If no cancellation has been requested - then this property is empty. Possible values are:\n- `CANCELLATION_RECEIVED` (A request to cancel a Confirmed Booking has been received and is awaiting to be processed)\n- `CANCELLATION_DECLINED` (Cancellation of the Confirmed Booking has been declined by provider)\n- `CANCELLATION_CONFIRMED` (Cancellation of the Confirmed Booking has been confirmed by provider)\n", + "example": "CANCELLATION_RECEIVED" }, "receiptTypeAtOrigin": { "maxLength": 3, @@ -3890,10 +3761,10 @@ ] }, "originChargesPaymentTerm": { - "$ref": "#/components/schemas/Origin Charges Payment Term" + "$ref": "#/components/schemas/OriginChargesPaymentTerm" }, "destinationChargesPaymentTerm": { - "$ref": "#/components/schemas/Destination Charges Payment Term" + "$ref": "#/components/schemas/DestinationChargesPaymentTerm" }, "contractQuotationReference": { "maxLength": 35, @@ -3954,19 +3825,19 @@ "minLength": 3, "pattern": "^[A-Z]{3}$", "type": "string", - "description": "The currency used for the declared value, using the 3-character code defined by [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).\n", + "description": "The currency used for the declared value, using the 3-character code defined by [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html).\n", "example": "DKK" }, "carrierCode": { "maxLength": 4, "pattern": "^\\S+$", "type": "string", - "description": "The `NMFTA` or `SMDG` code of the carrier the booking request is intended for.\n", + "description": "The `SCAC` code (provided by [NMFTA](https://nmfta.org/scac/)) or `SMDG` code (provided by [SMDG](https://smdg.org/documents/smdg-code-lists/smdg-liner-code-list/)) of the carrier the booking request is intended for. `carrierCodeListProvider` defines which list the `carrierCode` is based upon.\n", "example": "MMCU" }, "carrierCodeListProvider": { "type": "string", - "description": "The code list provider for the carrier code. Possible values are:\n- `SMDG` (Ship Message Design Group)\n- `NMFTA` (National Motor Freight Traffic Association)\n", + "description": "The code list provider for the `carrierCode`. Possible values are:\n- `SMDG` (Ship Message Design Group)\n- `NMFTA` (National Motor Freight Traffic Association)\n", "example": "NMFTA", "enum": [ "SMDG", @@ -3975,8 +3846,9 @@ }, "isPartialLoadAllowed": { "type": "boolean", - "description": "Indication whether the shipper agrees to load part of the shipment in case where not all of the cargo is delivered within cut-off.\n", - "example": true + "description": "Indication whether the shipper agrees to load part of the shipment in case where not all of the cargo is delivered within cut-off.\n\n**Note:** If this property is omitted it is considered that 'Partial Load **is** allowed' by default\n", + "example": true, + "default": true }, "isExportDeclarationRequired": { "type": "boolean", @@ -4046,15 +3918,9 @@ "incoTerms": { "maxLength": 3, "type": "string", - "description": "Transport obligations, costs and risks as agreed between buyer and seller as defined by [ICC](https://iccwbo.org/business-solutions/incoterms-rules/). A list of possible values:\n- `EXW` (Ex-Works)\n- `FCA` (Free Carrier)\n- `FAS` (Free Alongside Ship)\n- `FOB` (Free On Board)\n- `CFR` (Cost and Freight)\n- `CIF` (Cost, Insurance and Freight)\n- `CPT` (Carriage Paid To)\n- `CIP` (Carriage And Insurance Paid To)\n- `DAP` (Delivered At Place)\n- `DPU` (Delivered At Place Unloaded)\n- `DDP` (Delivered Duty Paid)\n", + "description": "Transport obligations, costs and risks as agreed between buyer and seller as defined by [Incoterms Rules](https://iccwbo.org/business-solutions/incoterms-rules/).\n", "example": "FCA" }, - "communicationChannelCode": { - "maxLength": 2, - "type": "string", - "description": "Specifying which communication channel is to be used for this booking e.g. Possible values are:\n- `EI` (EDI transmission)\n- `EM` (Email)\n- `AO` (API)\n", - "example": "AO" - }, "isEquipmentSubstitutionAllowed": { "type": "boolean", "description": "Indicates if an alternate equipment type can be provided by the carrier.\n", @@ -4167,55 +4033,6 @@ } } }, - "BookingRefStatus": { - "title": "Booking Response", - "required": [ - "bookingStatus" - ], - "type": "object", - "properties": { - "carrierBookingRequestReference": { - "maxLength": 100, - "pattern": "^\\S(?:.*\\S)?$", - "type": "string", - "description": "A reference to the booking during the booking request phase.\n\n**Condition:** `carrierBookingRequestReference` and/or `carrierBookingReference` must be provided\n", - "example": "24595eb0-5cfc-4381-9c3a-cedc1975e9aa" - }, - "carrierBookingReference": { - "maxLength": 35, - "pattern": "^\\S(?:.*\\S)?$", - "type": "string", - "description": "The `carrierBookingReference` if know. Often this will not be known until the booking has been confirmed. Is available during a booking amendment.\n\n**Condition:** `carrierBookingRequestReference` and/or `carrierBookingReference` must be provided\n", - "example": "ABC709951" - }, - "bookingStatus": { - "maxLength": 50, - "type": "string", - "description": "The status of the `Booking`. Possible values are:\n- `RECEIVED` (Booking request has been received)\n- `PENDING UPDATE` (An update is required to the Booking)\n- `UPDATE RECEIVED` (An update has been received and is awaiting to be processed)\n- `CONFIRMED` (Booking has been Confirmed)\n- `PENDING AMENDMENT` (An amendment is required to the Booking)\n- `REJECTED` (Booking discontinued by carrier before it has been Confirmed)\n- `DECLINED` (Booking discontinued by carrier after it has been Confirmed)\n- `CANCELLED` (Booking discontinued by consumer)\n- `COMPLETED` (The Transport Document this Booking is connected to has been Surrendered for Delivery)\n", - "example": "RECEIVED" - }, - "amendedBookingStatus": { - "maxLength": 50, - "type": "string", - "description": "The status of latest amendment added to the `Booking`. If no amendment has been requested - then this field is empty. Possible values are:\n- `AMENDMENT RECEIVED` (An amendment has been received and is awaiting to be processed)\n- `AMENDMENT CONFIRMED` (Amendment is confirmed)\n- `AMENDMENT DECLINED` (Amendment discontinued by provider)\n- `AMENDMENT CANCELLED` (Amendment discontinued by consumer)\n", - "example": "AMENDMENT RECEIVED" - }, - "bookingCancellationStatus": { - "maxLength": 50, - "type": "string", - "description": "The status of the latest booking cancellation. If no cancellation has been requested - then this property is empty. Possible values are:\n- `CANCELLATION RECEIVED` (A request to cancel a Confirmed Booking has been received and is awaiting to be processed)\n- `CANCELLATION DECLINED` (Cancellation of the Confirmed Booking has been declined by provider)\n- `CANCELLATION CONFIRMED` (Cancellation of the Confirmed Booking has been confirmed by provider)\n", - "example": "CANCELLATION RECEIVED" - }, - "feedbacks": { - "type": "array", - "description": "Feedback that can be provided includes, but is not limited to:\n- unsupported properties\n- changed values\n- removed properties\n- general information\n", - "items": { - "$ref": "#/components/schemas/Feedback" - } - } - }, - "description": "The `carrierBookingReference` or `carrierBookingRequestReference` along with the statuses and a possible list of **Feedbacks**.\n\n**Condition:** `carrierBookingRequestReference` and/or `carrierBookingReference` must be provided\n" - }, "ActiveReeferSettings": { "title": "Active Reefer Settings", "required": [ @@ -4286,7 +4103,7 @@ }, "isDrainholesOpen": { "type": "boolean", - "description": "Is drainholes open on the container\n", + "description": "Is drain holes open on the container\n", "example": true }, "isBulbMode": { @@ -4351,7 +4168,7 @@ "description": "The post code of the party's address.", "example": "1047 HM" }, - "PObox": { + "POBox": { "maxLength": 20, "type": "string", "description": "A numbered box at a post office where a person or business can have mail or parcels delivered.", @@ -4502,12 +4319,16 @@ "description": "A reference linked to the `Shipper`.\n", "example": "HHL007" }, - "purchaseOrderReference": { - "maxLength": 35, - "pattern": "^\\S(?:.*\\S)?$", - "type": "string", - "description": "A purchase order reference linked to the `Shipper`.\n", - "example": "HHL007" + "purchaseOrderReferences": { + "type": "array", + "description": "A list of `Purchase Order Reference`s linked to the `Shipper`.\n", + "items": { + "maxLength": 35, + "pattern": "^\\S(?:.*\\S)?$", + "type": "string", + "description": "A purchase order reference linked to the `Shipper`.\n", + "example": "HHL007" + } } }, "description": "The party by whom or in whose name or on whose behalf a contract of carriage of goods by sea has been concluded with a carrier, or the party by whom or in whose name, or on whose behalf, the goods are actually delivered to the carrier in relation to the contract of carriage by sea.\n" @@ -4557,12 +4378,16 @@ "description": "A reference linked to the `Consignee`.\n", "example": "HHL007" }, - "purchaseOrderReference": { - "maxLength": 35, - "pattern": "^\\S(?:.*\\S)?$", - "type": "string", - "description": "A purchase order reference linked to the `Consignee`.\n", - "example": "HHL007" + "purchaseOrderReferences": { + "type": "array", + "description": "A list of `Purchase Order Reference`s linked to the `Consignee`.\n", + "items": { + "maxLength": 35, + "pattern": "^\\S(?:.*\\S)?$", + "type": "string", + "description": "A purchase order reference linked to the `Consignee`.\n", + "example": "HHL007" + } } }, "description": "The party to which goods are consigned in the Master Bill of Lading.\n" @@ -4732,7 +4557,7 @@ "maxLength": 30, "pattern": "^\\S(?:.*\\S)?$", "type": "string", - "description": "Phone number for the contact\n", + "description": "Phone number for the contact. Phone **must** include an international phone number format as defined in the [ITU-T recommendation E.123](https://www.itu.int/rec/T-REC-E.123/en).\n", "example": "+45 70262970" } }, @@ -4807,7 +4632,7 @@ "pattern": "^[A-Z]{2}$", "type": "string", "description": "The 2 characters for the country code using [ISO 3166-1 alpha-2](https://www.iso.org/obp/ui/#iso:pub:PUB500001:en)\n", - "example": "DK" + "example": "IN" }, "value": { "maxLength": 35, @@ -4817,7 +4642,7 @@ "example": "AAAAA0000A" } }, - "description": "Reference that uniquely identifies a party for tax and/or legal purposes in accordance with the relevant jurisdiction.\n\nA list of examples:\n\n| Type | Country | Description |\n|-------|:-------:|-------------|\n|PAN|IN|Goods and Services Tax Identification Number in India|\n|GSTIN|IN|Goods and Services Tax Identification Number in India|\n|IEC|IN|Importer-Exported Code in India|\n|RUC|EC|Registro Único del Contribuyente in Ecuador|\n|RUC|PE|Registro Único del Contribuyente in Peru|\n|NIF|MG|Numéro d'Identification Fiscal in Madagascar|\n|NIF|DZ|Numéro d'Identification Fiscal in Algeria|\n\nAllowed combinations of `type` and `country` are maintained in [GitHub](https://github.com/dcsaorg/DCSA-OpenAPI/blob/master/domain/documentation/reference-data/taxandlegalreferences-v300.csv).\n" + "description": "Reference that uniquely identifies a party for tax and/or legal purposes in accordance with the relevant jurisdiction.\n\nA small list of **potential** examples:\n\n| Type | Country | Description |\n|-------|:-------:|-------------|\n|PAN|IN|Goods and Services Tax Identification Number in India|\n|GSTIN|IN|Goods and Services Tax Identification Number in India|\n|IEC|IN|Importer-Exported Code in India|\n|RUC|EC|Registro Único del Contribuyente in Ecuador|\n|RUC|PE|Registro Único del Contribuyente in Peru|\n|NIF|MG|Numéro d'Identification Fiscal in Madagascar|\n|NIF|DZ|Numéro d'Identification Fiscal in Algeria|\n" }, "ReferenceShipper": { "title": "Reference (Shipper)", @@ -4889,7 +4714,7 @@ "pattern": "^[A-Z]{2}$", "type": "string", "description": "The 2 characters for the country code using [ISO 3166-1 alpha-2](https://www.iso.org/obp/ui/#iso:pub:PUB500001:en)\n", - "example": "NL" + "example": "EG" }, "values": { "minItems": 1, @@ -4903,7 +4728,7 @@ } } }, - "description": "Reference associated with customs and/or excise purposes required by the relevant authorities for the import, export, or transit of the goods.\n\nA (small) list of examples:\n\n| Type | Country | Description |\n|-------|:-------:|-------------|\n|ACID|EG|Advance Cargo Information Declaration in Egypt|\n|CERS|CA|Canadian Export Reporting System|\n|ITN|US|Internal Transaction Number in US|\n|PEB|ID|PEB reference number|\n|CSN|IN|Cargo Summary Notification (CSN)|\n\nAllowed combinations of `type` and `country` are maintained in [GitHub](https://github.com/dcsaorg/DCSA-OpenAPI/blob/master/domain/documentation/reference-data/customsreferences-v300.csv).\n" + "description": "Reference associated with customs and/or excise purposes required by the relevant authorities for the import, export, or transit of the goods.\n\nA small list of **potential** examples:\n\n| Type | Country | Description |\n|-------|:-------:|-------------|\n|ACID|EG|Advance Cargo Information Declaration in Egypt|\n|CERS|CA|Canadian Export Reporting System|\n|ITN|US|Internal Transaction Number in US|\n|PEB|ID|PEB reference number|\n|CSN|IN|Cargo Summary Notification (CSN)|\n" }, "ShipmentLocation": { "title": "Shipment Location", @@ -4954,7 +4779,7 @@ "$ref": "#/components/schemas/GeoCoordinate" } }, - "description": "The location can be specified using **any** of the nested structures:\n- `address` (used to specify the location via an Address)\n- `UNLocationCode`\n- `facility` (used to specify a location using a `facilityCode` and a `facilityCodeListProvider`)\n- `geoCoordinate` (used to specify a location using `latitude` and `longitude`)\n\nIt is expected that if a location is specified in multiple ways (both as an `Address` and as a `Facility`) that both ways point to the same location.\n", + "description": "The location can be specified using **any** of the nested structures:\n- `address` (used to specify the location via an Address)\n- `UNLocationCode`\n- `facility` (used to specify a location using a `facilityCode` and a `facilityCodeListProvider`)\n- `geoCoordinate` (used to specify a location using `latitude` and `longitude`)\n\n**Condition:** It is expected that if a location is specified in multiple ways (e.g. both as an `Address` and as a `Facility`) that both ways point to the same location.\n", "example": { "locationName": "CMP Container Terminal Copenhagen", "UNLocationCode": "DKCPH", @@ -4968,6 +4793,7 @@ "title": "Requested Equipment", "required": [ "ISOEquipmentCode", + "isShipperOwned", "units" ], "type": "object", @@ -4976,7 +4802,7 @@ "maxLength": 4, "pattern": "^\\S(?:.*\\S)?$", "type": "string", - "description": "Unique code for the different equipment size and type used to transport commodities. The code can refer to either the ISO size type (e.g. 22G1) or the ISO type group (e.g. 22GP) following the [ISO 6346](https://en.wikipedia.org/wiki/ISO_6346) standard.\n", + "description": "Unique code for the different equipment size and type used to transport commodities. The code can refer to either the ISO size type (e.g. 22G1) or the ISO type group (e.g. 22GP) following the [ISO 6346](https://www.iso.org/standard/83558.html) standard.\n", "example": "22RT" }, "units": { @@ -5003,10 +4829,18 @@ "maxLength": 11, "pattern": "^\\S(?:.*\\S)?$", "type": "string", - "description": "The unique identifier for the equipment, which should follow the BIC ISO Container Identification Number where possible.\n\nAccording to [ISO 6346](https://en.wikipedia.org/wiki/ISO_6346), a container identification code consists of a 4-letter prefix and a 7-digit number (composed of a 3-letter owner code, a category identifier, a serial number, and a check-digit).\n\nIf a container does not comply with [ISO 6346](https://en.wikipedia.org/wiki/ISO_6346), it is suggested to follow [Recommendation #2: Containers with non-ISO identification](https://smdg.org/documents/smdg-recommendations) from SMDG.\n", + "description": "The unique identifier for the equipment, which should follow the BIC ISO Container Identification Number where possible.\n\nAccording to [ISO 6346](https://www.iso.org/standard/83558.html), a container identification code consists of a 4-letter prefix and a 7-digit number (composed of a 3-letter owner code, a category identifier, a serial number, and a check-digit).\n\nIf a container does not comply with [ISO 6346](https://www.iso.org/standard/83558.html), it is suggested to follow [Recommendation #2: Containers with non-ISO identification](https://smdg.org/documents/smdg-recommendations) from SMDG.\n", "example": "APZU4812090" } }, + "tareWeight": { + "$ref": "#/components/schemas/Tare Weight" + }, + "isShipperOwned": { + "type": "boolean", + "description": "Indicates whether the container is shipper owned (`SOC`).\n", + "example": true + }, "isNonOperatingReefer": { "type": "boolean", "description": "If the equipment is a Reefer Container then setting this attribute will indicate that the container should be treated as a `DRY` container.\n\n**Condition:** Only applicable if `ISOEquipmentCode` shows a Reefer type.\n", @@ -5037,27 +4871,13 @@ } } }, - "description": "If needed - it is **only** possible to specify a single Reefer setting. If multiple settings are required for the same `equipmentSizeType` then multiple `requestedEquipment` should be specified (one for each Reefer setting).\n", - "discriminator": { - "propertyName": "isShipperOwned", - "mapping": { - "true": "#/components/schemas/SocEquipment", - "false": "#/components/schemas/CocEquipment" - } - }, - "oneOf": [ - { - "$ref": "#/components/schemas/SocEquipment" - }, - { - "$ref": "#/components/schemas/CocEquipment" - } - ] + "description": "If needed - it is **only** possible to specify a single Reefer setting. If multiple settings are required for the same `equipmentSizeType` then multiple `requestedEquipment` should be specified (one for each Reefer setting).\n" }, "RequestedEquipmentShipper": { "title": "Requested Equipment (Shipper)", "required": [ "ISOEquipmentCode", + "isShipperOwned", "units" ], "type": "object", @@ -5066,7 +4886,7 @@ "maxLength": 4, "pattern": "^\\S(?:.*\\S)?$", "type": "string", - "description": "Unique code for the different equipment size and type used to transport commodities. The code can refer to either the ISO size type (e.g. 22G1) or the ISO type group (e.g. 22GP) following the [ISO 6346](https://en.wikipedia.org/wiki/ISO_6346) standard.\n", + "description": "Unique code for the different equipment size and type used to transport commodities. The code can refer to either the ISO size type (e.g. 22G1) or the ISO type group (e.g. 22GP) following the [ISO 6346](https://www.iso.org/standard/83558.html) standard.\n", "example": "22RT" }, "units": { @@ -5093,10 +4913,18 @@ "maxLength": 11, "pattern": "^\\S(?:.*\\S)?$", "type": "string", - "description": "The unique identifier for the equipment, which should follow the BIC ISO Container Identification Number where possible.\n\nAccording to [ISO 6346](https://en.wikipedia.org/wiki/ISO_6346), a container identification code consists of a 4-letter prefix and a 7-digit number (composed of a 3-letter owner code, a category identifier, a serial number, and a check-digit).\n\nIf a container does not comply with [ISO 6346](https://en.wikipedia.org/wiki/ISO_6346), it is suggested to follow [Recommendation #2: Containers with non-ISO identification](https://smdg.org/documents/smdg-recommendations) from SMDG.\n", + "description": "The unique identifier for the equipment, which should follow the BIC ISO Container Identification Number where possible.\n\nAccording to [ISO 6346](https://www.iso.org/standard/83558.html), a container identification code consists of a 4-letter prefix and a 7-digit number (composed of a 3-letter owner code, a category identifier, a serial number, and a check-digit).\n\nIf a container does not comply with [ISO 6346](https://www.iso.org/standard/83558.html), it is suggested to follow [Recommendation #2: Containers with non-ISO identification](https://smdg.org/documents/smdg-recommendations) from SMDG.\n", "example": "APZU4812090" } }, + "tareWeight": { + "$ref": "#/components/schemas/Tare Weight_1" + }, + "isShipperOwned": { + "type": "boolean", + "description": "Indicates whether the container is shipper owned (`SOC`).\n", + "example": true + }, "isNonOperatingReefer": { "type": "boolean", "description": "If the equipment is a Reefer Container then setting this attribute will indicate that the container should be treated as a `DRY` container.\n\n**Condition:** Only applicable if `ISOEquipmentCode` shows a Reefer type.\n", @@ -5127,69 +4955,7 @@ } } }, - "description": "If needed - it is **only** possible to specify a single Reefer setting. If multiple settings are required for the same `equipmentSizeType` then multiple `requestedEquipment` should be specified (one for each Reefer setting).\n", - "discriminator": { - "propertyName": "isShipperOwned", - "mapping": { - "true": "#/components/schemas/SocEquipment", - "false": "#/components/schemas/CocEquipment" - } - }, - "oneOf": [ - { - "$ref": "#/components/schemas/SocEquipment" - }, - { - "$ref": "#/components/schemas/CocEquipment" - } - ] - }, - "SocEquipment": { - "title": "Shipper owned Equipment", - "required": [ - "isShipperOwned", - "tareWeight", - "tareWeightUnit" - ], - "type": "object", - "properties": { - "tareWeight": { - "minimum": 0, - "exclusiveMinimum": true, - "type": "number", - "description": "The weight of an empty container (gross container weight).\n", - "format": "float", - "example": 4800 - }, - "tareWeightUnit": { - "type": "string", - "description": "The unit of measure which can be expressed in imperial or metric terms\n- `KGM` (Kilograms)\n- `LBR` (Pounds)\n", - "example": "KGM", - "enum": [ - "KGM", - "LBR" - ] - }, - "isShipperOwned": { - "type": "boolean", - "description": "Indicates whether the container is shipper owned (`SOC`).\n", - "example": true - } - } - }, - "CocEquipment": { - "title": "Carrier owned Equipment", - "required": [ - "isShipperOwned" - ], - "type": "object", - "properties": { - "isShipperOwned": { - "type": "boolean", - "description": "Indicates whether the container is shipper owned (`SOC`).\n", - "example": false - } - } + "description": "If needed - it is **only** possible to specify a single Reefer setting. If multiple settings are required for the same `equipmentSizeType` then multiple `requestedEquipment` should be specified (one for each Reefer setting).\n" }, "ContainerPositioning": { "title": "Container Positioning", @@ -5202,7 +4968,7 @@ "type": "string", "description": "The date and time requested by the shipper for the positioning of the container(s) at the Container positioning location (`CPO`), if provided, or the Place of Receipt (`PRE`) if `CPO` location is not provided.\n", "format": "date-time", - "example": "2024-07-05T09:03:00-02:00" + "example": "2024-09-04T09:41:00Z" }, "location": { "$ref": "#/components/schemas/ContainerPositioningLocation" @@ -5221,7 +4987,7 @@ "type": "string", "description": "The estimated date and time for the positioning of the container(s) at the `Container Positioning Location` (CPO), if provided, or the `Place of Receipt` (PRE) if CPO location is not provided.\n\n**Conditional:** Only applicable to carrier haulage service at origin (`Receipt type at origin = 'SD'`).\n", "format": "date-time", - "example": "2024-07-05T09:03:00-02:00" + "example": "2024-09-04T09:41:00Z" }, "location": { "$ref": "#/components/schemas/ContainerPositioningLocation" @@ -5258,7 +5024,7 @@ "$ref": "#/components/schemas/GeoCoordinate" } }, - "description": "An object to capture the `Container Positioning Location`.\n\nThe location of the customer facility where the container(s) will be loaded.\n\n**Conditional:** Only applicable to carrier haulage service at origin (`Receipt type at origin = 'SD'`).\n\nThe location can be specified in **any** of the following ways: `Address`, `Facility`, `UN Location Code` or a `GeoCoordinate`.\n", + "description": "An object to capture the `Container Positioning Location`.\n\nThe location of the customer facility where the container(s) will be loaded.\n\n**Conditional:** Only applicable to carrier haulage service at origin (`Receipt type at origin = 'SD'`).\n\nThe location can be specified in **any** of the following ways: `Address`, `Facility`, `UN Location Code` or a `GeoCoordinate`.\n\n**Condition:** It is expected that if a location is specified in multiple ways (e.g. both as an `Address` and as a `Facility`) that both ways point to the same location.\n", "example": { "locationName": "Shanghai Shengdong International Container Terminal", "UNLocationCode": "CNSGH", @@ -5297,7 +5063,7 @@ "$ref": "#/components/schemas/GeoCoordinate" } }, - "description": "An object to capture the `Empty Container Depot Release Location`.\n\nThe location of the depot from which the empty container(s) will be released from\n\nThe location can be specified in **any** of the following ways: `Address`, `Facility`, `UN Location Code` or a `GeoCoordinate`.\n", + "description": "An object to capture the `Empty Container Depot Release Location`.\n\nThe location of the depot from which the empty container(s) will be released from\n\nThe location can be specified in **any** of the following ways: `Address`, `Facility`, `UN Location Code` or a `GeoCoordinate`.\n\n**Condition:** It is expected that if a location is specified in multiple ways (e.g. both as an `Address` and as a `Facility`) that both ways point to the same location.\n", "example": { "locationName": "Shanghai Shengdong International Container Terminal", "UNLocationCode": "CNSGH", @@ -5311,7 +5077,6 @@ "title": "Commodity (Shipper)", "required": [ "cargoGrossWeight", - "cargoGrossWeightUnit", "commodityType" ], "type": "object", @@ -5331,7 +5096,7 @@ "minLength": 6, "pattern": "^\\d{6,10}$", "type": "string", - "description": "Used by customs to classify the product being shipped. The type of HS code depends on country and customs requirements. The code must be at least 6 and at most 10 digits.\n\nMore information can be found here: [HS Nomenclature 2022 edition](https://www.wcoomd.org/en/topics/nomenclature/instrument-and-tools/hs-nomenclature-2022-edition/hs-nomenclature-2022-edition.aspx).\n\nThis standard is based on the 2022 revision.\n", + "description": "Used by customs to classify the product being shipped. The type of HS code depends on country and customs requirements. The code must be at least 6 and at most 10 digits.\n\nMore information can be found here: [HS Nomenclature](https://www.wcoomd.org/en/topics/nomenclature/instrument-and-tools).\n", "example": "851713" } }, @@ -5343,38 +5108,16 @@ } }, "cargoGrossWeight": { - "minimum": 0, - "exclusiveMinimum": true, - "type": "number", - "description": "The estimated grand total gross weight of the cargo, including packaging items being carried, which can be expressed in imperial or metric terms, as provided by the shipper.\n", - "format": "float", - "example": 36000 - }, - "cargoGrossWeightUnit": { - "type": "string", - "description": "The unit of measure which can be expressed in imperial or metric terms\n- `KGM` (Kilograms)\n- `LBR` (Pounds)\n", - "example": "KGM", - "enum": [ - "KGM", - "LBR" - ] + "$ref": "#/components/schemas/Cargo Gross Weight" }, "cargoGrossVolume": { - "minimum": 0, - "exclusiveMinimum": true, - "type": "number", - "description": "The grand total volume of the commodity\n", - "format": "float", - "example": 360 + "$ref": "#/components/schemas/Cargo Gross Volume" }, - "cargoGrossVolumeUnit": { - "type": "string", - "description": "The unit of measure which can be expressed in either imperial or metric terms\n\n- `FTQ` (Cubic foot)\n- `MTQ` (Cubic meter)\n\n**Condition:** If the `cargoGrossVolume` is populated then the `cargoGrossVolumeUnit` is required\n", - "example": "MTQ", - "enum": [ - "MTQ", - "FTQ" - ] + "cargoNetWeight": { + "$ref": "#/components/schemas/Cargo Net Weight" + }, + "cargoNetVolume": { + "$ref": "#/components/schemas/Cargo Net Volume" }, "exportLicenseIssueDate": { "type": "string", @@ -5412,7 +5155,6 @@ "title": "Commodity", "required": [ "cargoGrossWeight", - "cargoGrossWeightUnit", "commodityType" ], "type": "object", @@ -5439,7 +5181,7 @@ "minLength": 6, "pattern": "^\\d{6,10}$", "type": "string", - "description": "Used by customs to classify the product being shipped. The type of HS code depends on country and customs requirements. The code must be at least 6 and at most 10 digits.\n\nMore information can be found here: [HS Nomenclature 2022 edition](https://www.wcoomd.org/en/topics/nomenclature/instrument-and-tools/hs-nomenclature-2022-edition/hs-nomenclature-2022-edition.aspx).\n\nThis standard is based on the 2022 revision.\n", + "description": "Used by customs to classify the product being shipped. The type of HS code depends on country and customs requirements. The code must be at least 6 and at most 10 digits.\n\nMore information can be found here: [HS Nomenclature](https://www.wcoomd.org/en/topics/nomenclature/instrument-and-tools).\n", "example": "851713" } }, @@ -5451,38 +5193,16 @@ } }, "cargoGrossWeight": { - "minimum": 0, - "exclusiveMinimum": true, - "type": "number", - "description": "The estimated grand total gross weight of the cargo, including packaging items being carried, which can be expressed in imperial or metric terms, as provided by the shipper.\n", - "format": "float", - "example": 36000 - }, - "cargoGrossWeightUnit": { - "type": "string", - "description": "The unit of measure which can be expressed in imperial or metric terms\n- `KGM` (Kilograms)\n- `LBR` (Pounds)\n", - "example": "KGM", - "enum": [ - "KGM", - "LBR" - ] + "$ref": "#/components/schemas/Cargo Gross Weight" }, "cargoGrossVolume": { - "minimum": 0, - "exclusiveMinimum": true, - "type": "number", - "description": "The grand total volume of the commodity\n", - "format": "float", - "example": 360 + "$ref": "#/components/schemas/Cargo Gross Volume" }, - "cargoGrossVolumeUnit": { - "type": "string", - "description": "The unit of measure which can be expressed in either imperial or metric terms\n\n- `FTQ` (Cubic foot)\n- `MTQ` (Cubic meter)\n\n**Condition:** If the `cargoGrossVolume` is populated then the `cargoGrossVolumeUnit` is required\n", - "example": "MTQ", - "enum": [ - "MTQ", - "FTQ" - ] + "cargoNetWeight": { + "$ref": "#/components/schemas/Cargo Net Weight" + }, + "cargoNetVolume": { + "$ref": "#/components/schemas/Cargo Net Volume" }, "exportLicenseIssueDate": { "type": "string", @@ -5529,7 +5249,7 @@ "maxLength": 10, "pattern": "^\\S(?:.*\\S)?$", "type": "string", - "description": "The national commodity classification code, which can be one of the following values defined by DCSA:\n- `NCM` (Nomenclatura Comum do Mercosul)\n- `HTS` (Harmonized Tariff Schedule)\n- `SCHEDULE B` ( Schedule B)\n- `TARIC` (Integrated Tariff of the European Communities)\n- `CN` (Combined Nomenclature)\n- `CUS` (Customs Union and Statistics)\n", + "description": "The national commodity classification code, which can be one of the following values defined by DCSA:\n- `NCM` (Nomenclatura Comum do Mercosul)\n- `HTS` (Harmonized Tariff Schedule)\n- `SCHEDULE_B` ( Schedule B)\n- `TARIC` (Integrated Tariff of the European Communities)\n- `CN` (Combined Nomenclature)\n- `CUS` (Customs Union and Statistics)\n", "example": "NCM" }, "countryCode": { @@ -5570,7 +5290,7 @@ "minLength": 2, "pattern": "^[A-Z0-9]{2}$", "type": "string", - "description": "A code identifying the outer packaging/overpack. `PackageCode` must follow the codes specified in [Recommendation N°21 - Revision 12 Annexes V and VI](https://unece.org/sites/default/files/2021-06/rec21_Rev12e_Annex-V-VI_2021.xls)\n\n**Condition:** only applicable to dangerous goods if the `IMO packaging code` is not available.\n", + "description": "A code identifying the outer packaging/overpack. `PackageCode` must follow the codes specified in [Recommendation N°21](https://unece.org/trade/uncefact/cl-recommendations)\n\n**Condition:** only applicable to dangerous goods if the `IMO packaging code` is not available.\n", "example": "5H" }, "imoPackagingCode": { @@ -5578,10 +5298,11 @@ "minLength": 1, "pattern": "^[A-Z0-9]{1,5}$", "type": "string", - "description": "The code of the packaging as per IMO.\n\n**Condition:** only applicable to dangerous goods if specified in the IMO IMDG code amendment version 41-22. If not available, the `packageCode` as per UN recommendation 21 should be used.\n", + "description": "The code of the packaging as per IMO.\n\n**Condition:** only applicable to dangerous goods if specified in the [IMO IMDG code](https://www.imo.org/en/publications/Pages/IMDG%20Code.aspx). If not available, the `packageCode` as per UN recommendation 21 should be used.\n", "example": "1A2" }, "numberOfPackages": { + "maximum": 99999999, "minimum": 1, "type": "integer", "description": "Specifies the number of outer packagings/overpacks associated with this `Commodity`.\n\n**Condition:** In case this `OuterPackaging` includes `Dangerous Goods` the `numberOfPackages` is mandatory to provide\n", @@ -5646,7 +5367,7 @@ "imoClass": { "maxLength": 4, "type": "string", - "description": "The hazard class code of the referenced dangerous goods according to the specified regulation. Examples of possible values are:\n- `1.1A` (Substances and articles which have a mass explosion hazard)\n- `1.6N` (Extremely insensitive articles which do not have a mass explosion hazard)\n- `2.1` (Flammable gases)\n- `8` (Corrosive substances)\n\nThe value must comply with one of the values in the [DG IMO Class value table](https://github.com/dcsaorg/DCSA-OpenAPI/blob/master/domain/dcsa/reference-data/imoclasses-v3.1.0.csv)\n", + "description": "The hazard class code of the referenced dangerous goods according to the specified regulation. Examples of possible values are:\n- `1.1A` (Substances and articles which have a mass explosion hazard)\n- `1.6N` (Extremely insensitive articles which do not have a mass explosion hazard)\n- `2.1` (Flammable gases)\n- `8` (Corrosive substances)\n", "example": "1.4S" }, "subsidiaryRisk1": { @@ -5756,7 +5477,7 @@ "type": "string", "description": "Date & time when the container was fumigated\n", "format": "date-time", - "example": "2021-09-03T09:03:00-02:00" + "example": "2024-09-04T09:41:00Z" }, "isReportableQuantity": { "type": "boolean", @@ -5767,7 +5488,7 @@ "maxLength": 1, "minLength": 1, "type": "string", - "description": "The zone classification of the toxicity of the inhalant. Possible values are:\n- `A` (Hazard Zone A) can be asigned to specific gases and liquids\n- `B` (Hazard Zone B) can be asigned to specific gases and liquids\n- `C` (Hazard Zone C) can **only** be asigned to specific gases\n- `D` (Hazard Zone D) can **only** be asigned to specific gases\n", + "description": "The zone classification of the toxicity of the inhalant. Possible values are:\n- `A` (Hazard Zone A) can be assigned to specific gases and liquids\n- `B` (Hazard Zone B) can be assigned to specific gases and liquids\n- `C` (Hazard Zone C) can **only** be assigned to specific gases\n- `D` (Hazard Zone D) can **only** be assigned to specific gases\n", "example": "A" }, "grossWeight": { @@ -5779,8 +5500,8 @@ "netExplosiveContent": { "$ref": "#/components/schemas/Net Explosive Content" }, - "volume": { - "$ref": "#/components/schemas/Volume" + "netVolume": { + "$ref": "#/components/schemas/Net Volume" }, "limits": { "$ref": "#/components/schemas/Limits" @@ -5788,7 +5509,7 @@ "specialCertificateNumber": { "maxLength": 255, "type": "string", - "description": "Text field to indicate certificate number & segment for specific stowage requirements overulling IMDG code\n", + "description": "Text field to indicate certificate number & segment for specific stowage requirements overruling IMDG code\n", "example": "22663:3" }, "additionalContainerCargoHandling": { @@ -5861,7 +5582,7 @@ "maxLength": 100, "type": "string", "description": "Description of the packaging.\n", - "example": "Wowen plastic water resistant Bag" + "example": "Woven plastic water resistant Bag" } }, "description": "Object for inner packaging specification\n" @@ -5890,7 +5611,7 @@ "maxLength": 30, "pattern": "^\\S(?:.*\\S)?$", "type": "string", - "description": "Phone number for the contact\n", + "description": "Phone number for the contact. Phone **must** include an international phone number format as defined in the [ITU-T recommendation E.123](https://www.itu.int/rec/T-REC-E.123/en).\n", "example": "+45 70262970" }, "referenceNumber": { @@ -5920,7 +5641,7 @@ }, "flashPoint": { "type": "number", - "description": "Lowest temperature at which a chemical can vaporize to form an ignitable mixture in air.\n\n**Condition:** only applicable to specific hazardous goods according to the IMO IMDG Code amendment version 41-22.\n", + "description": "Lowest temperature at which a chemical can vaporize to form an ignitable mixture in air.\n\n**Condition:** only applicable to specific hazardous goods according to the IMO IMDG Code.\n", "format": "float", "example": 42 }, @@ -5963,8 +5684,8 @@ "maxLength": 4, "pattern": "^\\S(?:.*\\S)?$", "type": "string", - "description": "Unique code for the different equipment size and type used to transport commodities. The code can refer to either the ISO size type (e.g. 22G1) or the ISO type group (e.g. 22GP) following the [ISO 6346](https://en.wikipedia.org/wiki/ISO_6346) standard.\n", - "example": "22GP" + "description": "Unique code for the different equipment size and type used to transport commodities. The code can refer to either the ISO size type (e.g. 22G1) or the ISO type group (e.g. 22GP) following the [ISO 6346](https://www.iso.org/standard/83558.html) standard.\n", + "example": "22G1" }, "units": { "minimum": 1, @@ -6127,7 +5848,7 @@ "example": "NLAMS" } }, - "description": "An object to capture the `Load Location`.\n\nThe location can be specified in **any** of the following ways: `UN Location Code`, `Facility` or an `Address`.\n", + "description": "An object to capture the `Load Location`.\n\nThe location can be specified in **any** of the following ways: `UN Location Code`, `Facility` or an `Address`.\n\n**Condition:** It is expected that if a location is specified in multiple ways (e.g. both as an `Address` and as a `Facility`) that both ways point to the same location.\n", "example": { "locationName": "Shanghai Shengdong International Container Terminal", "UNLocationCode": "CNSGH", @@ -6163,7 +5884,7 @@ "example": "NLAMS" } }, - "description": "An object to capture the `Discharge Location`.\n\nThe location can be specified in **any** of the following ways: `UN Location Code`, `Facility` or an `Address`.\n", + "description": "An object to capture the `Discharge Location`.\n\nThe location can be specified in **any** of the following ways: `UN Location Code`, `Facility` or an `Address`.\n\n**Condition:** It is expected that if a location is specified in multiple ways (e.g. both as an `Address` and as a `Facility`) that both ways point to the same location.\n", "example": { "locationName": "Transnet Port Terminals Cape Town", "UNLocationCode": "ZACPT", @@ -6191,7 +5912,7 @@ "type": "string", "description": "Actual cut-off time\n", "format": "date-time", - "example": "2019-11-12T07:41:00-08:30" + "example": "2024-09-04T09:41:00Z" } }, "description": "`Cut off times` defined by the carrier\n" @@ -6208,7 +5929,7 @@ "maxLength": 50, "pattern": "^\\S(?:.*\\S)?$", "type": "string", - "description": "The Manifest type code as defined by the provider. A list of `manifestTypeCodes` together with `countryCode` is maintained in [GitHub](https://github.com/dcsaorg/DCSA-OpenAPI/blob/master/domain/documentation/reference-data/advancemanifestfilings-v300.csv)\n", + "description": "The Manifest type code as defined by the provider.\n", "example": "ACE" }, "countryCode": { @@ -6217,10 +5938,10 @@ "pattern": "^[A-Z]{2}$", "type": "string", "description": "The 2 characters for the country code using [ISO 3166-1 alpha-2](https://www.iso.org/obp/ui/#iso:pub:PUB500001:en)\n", - "example": "DK" + "example": "US" } }, - "description": "An Advance Maifest Filing defined by a Manifest type code in combination with a country code.\n\nA list of `manifestTypeCodes` together with `countryCode` is maintained in [GitHub](https://github.com/dcsaorg/DCSA-OpenAPI/blob/master/domain/documentation/reference-data/advancemanifestfilings-v300.csv). A (small) subset can be seen here:\n\n| manifestTypeCode | countryCode | Description |\n|-----------------------|:-------------:|-------------|\n|ACI|EG|Advance Cargo Information in Egypt|\n|ACE|US|Automated Commercial Environment in the United States|\n|AFR|JP|Cargo Summary Notification (CSN)|\n", + "description": "An Advance Manifest Filing defined by a Manifest type code in combination with a country code.\n\nA small list of **potential** examples:\n\n| manifestTypeCode | countryCode | Description |\n|-----------------------|:-------------:|-------------|\n|ACI|EG|Advance Cargo Information in Egypt|\n|ACE|US|Automated Commercial Environment in the United States|\n|AFR|JP|Cargo Summary Notification (CSN)|\n", "example": { "manifestTypeCode": "ACE", "countryCode": "US" @@ -6258,7 +5979,7 @@ "minLength": 3, "pattern": "^[A-Z]{3}$", "type": "string", - "description": "The currency for the charge, using a 3-character code ([ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)).\n", + "description": "The currency for the charge, using a 3-character code according to [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html).\n", "example": "DKK" }, "paymentTermCode": { @@ -6294,111 +6015,7 @@ }, "description": "Addresses the monetary value of freight and other service charges for a `Booking`.\n" }, - "inline_response_201": { - "required": [ - "bookingStatus", - "carrierBookingRequestReference" - ], - "type": "object", - "properties": { - "carrierBookingRequestReference": { - "maxLength": 100, - "pattern": "^\\S(?:.*\\S)?$", - "type": "string", - "description": "A reference to the booking during the booking request phase.\n", - "example": "24595eb0-5cfc-4381-9c3a-cedc1975e9aa" - }, - "bookingStatus": { - "maxLength": 50, - "type": "string", - "description": "The status of the `Booking`. Possible values are:\n- `RECEIVED` (Booking request has been received)\n", - "example": "RECEIVED" - }, - "feedbacks": { - "type": "array", - "description": "Feedback that can be provided includes, but is not limited to:\n- unsupported properties\n- changed values\n- removed properties\n- general information\n", - "items": { - "$ref": "#/components/schemas/Feedback" - } - } - }, - "description": "The `carrierBookingRequestReference` along with the `bookingStatus` and an optional `feedbacks` is returned.\n" - }, - "inline_response_202": { - "required": [ - "carrierBookingRequestReference" - ], - "type": "object", - "properties": { - "carrierBookingRequestReference": { - "maxLength": 100, - "pattern": "^\\S(?:.*\\S)?$", - "type": "string", - "description": "A reference to the booking during the booking request phase.\n", - "example": "24595eb0-5cfc-4381-9c3a-cedc1975e9aa" - } - }, - "description": "**Only** the `carrierBookingRequestReference` is returned.\n" - }, - "bookings_bookingReference_body": { - "type": "object", - "properties": { - "reason": { - "maxLength": 5000, - "type": "string", - "description": "An optional property where a reason for cancelling the booking or the amendment can be given.\n", - "example": "Booking cancelled due to internal problems" - } - }, - "oneOf": [ - { - "title": "Cancel Booking Request (prior to Booking Confirmation)", - "required": [ - "bookingStatus" - ], - "type": "object", - "properties": { - "bookingStatus": { - "maxLength": 50, - "type": "string", - "description": "Setting the `bookingStatus` to `CANCELLED` cancels the `Booking Request` (only possible **before** it is `CONFIRMED` and using this property is only possible in combination with the `bookingReference` path-property being the `carrierBookingRequestReference`). The `Booking Request` will discontinue if the request is accepted by the provider.\n\n**Conditional:** It is a precondition that the `bookingStatus` **is NOT** `CONFIRMED` or `PENDING AMENDMENT` in order to cancel it. If this is not the case a `409` (Conflict) error response should be returned.\n\nOnly possible value to set is `CANCELLED`.\n", - "example": "CANCELLED" - } - } - }, - { - "title": "Only cancel the amendment to a Confirmed Booking", - "required": [ - "amendedBookingStatus" - ], - "type": "object", - "properties": { - "amendedBookingStatus": { - "maxLength": 50, - "type": "string", - "description": "Setting the `amendedBookingStatus` to `AMENDMENT CANCELLED` **only** cancels the amendment to a confirmed `Booking`. This is only possible in combination with the `bookingReference` path-property being the `carrierBookingReference`.\n\n**Conditional:** It is a precondition that the `amendedBookingStatus` **is** `AMENDMENT RECEIVED` in order to cancel it. If this is not the case a `404` (Not Found) error response should be returned.\n\nOnly possible value to set is `AMENDMENT CANCELLED`.\n", - "example": "AMENDMENT CANCELLED" - } - } - }, - { - "title": "Request to cancel a Confirmed Booking", - "required": [ - "bookingCancellationStatus" - ], - "type": "object", - "properties": { - "bookingCancellationStatus": { - "maxLength": 50, - "type": "string", - "description": "Setting the `bookingCancellationStatus` to `CANCELLATION RECEIVED` is a request to cancel a confirmed Booking (only possible **after** it is `CONFIRMED` and using this property is only possible in combination with the `bookingReference` path-property being the `carrierBookingReference`). Upon recieving this request the provider will check if it is possible to cancel the confirmed booking. Further processing is needed by the provider.\n\n**Conditional:** It is a precondition that the `bookingStatus` **is** `CONFIRMED` or `PENDING AMENDMENT` in order to cancel it. If this is not the case a `409` (Conflict) error response should be returned.\n\nOnly possible value to set is `CANCELLATION RECEIVED`.\n", - "example": "CANCELLATION RECEIVED" - } - } - } - ] - }, - "Origin Charges Payment Term": { + "OriginChargesPaymentTerm": { "title": "Origin Charges Payment Term", "type": "object", "properties": { @@ -6432,7 +6049,7 @@ }, "description": "An indicator of whether origin charges are prepaid (`PRE`) or collect (`COL`). When prepaid, the charges are the responsibility of the shipper or the Invoice payer on behalf of the shipper (if provided). When collect, the charges are the responsibility of the consignee or the Invoice payer on behalf of the consignee (if provided).\n" }, - "Destination Charges Payment Term": { + "DestinationChargesPaymentTerm": { "title": "Destination Charges Payment Term", "type": "object", "properties": { @@ -6491,6 +6108,80 @@ }, "description": "Vessels related to this booking request.\n\n**Condition:** Mandatory if `carrierExportVoyageNumber` is provided and `carrierServiceCode` or `carrierServiceName` are blank.\n" }, + "inline_response_202": { + "required": [ + "carrierBookingRequestReference" + ], + "type": "object", + "properties": { + "carrierBookingRequestReference": { + "maxLength": 100, + "pattern": "^\\S(?:.*\\S)?$", + "type": "string", + "description": "A reference to the booking during the booking request phase.\n", + "example": "24595eb0-5cfc-4381-9c3a-cedc1975e9aa" + } + }, + "description": "**Only** the `carrierBookingRequestReference` is returned.\n" + }, + "bookings_bookingReference_body": { + "type": "object", + "properties": { + "reason": { + "maxLength": 5000, + "type": "string", + "description": "An optional property where a reason for cancelling the booking or the amendment can be given.\n", + "example": "Booking cancelled due to internal problems" + } + }, + "oneOf": [ + { + "title": "Cancel Booking Request (prior to Booking Confirmation)", + "required": [ + "bookingStatus" + ], + "type": "object", + "properties": { + "bookingStatus": { + "maxLength": 50, + "type": "string", + "description": "Setting the `bookingStatus` to `CANCELLED` cancels the `Booking Request` (only possible **before** it is `CONFIRMED` and using this property is only possible in combination with the `bookingReference` path-property being the `carrierBookingRequestReference`). The `Booking Request` will discontinue if the request is accepted by the provider.\n\n**Conditional:** It is a precondition that the `bookingStatus` **is NOT** `CONFIRMED` or `PENDING_AMENDMENT` in order to cancel it. If this is not the case a `409` (Conflict) error response should be returned.\n\nOnly possible value to set is `CANCELLED`.\n", + "example": "CANCELLED" + } + } + }, + { + "title": "Only cancel the amendment to a Confirmed Booking", + "required": [ + "amendedBookingStatus" + ], + "type": "object", + "properties": { + "amendedBookingStatus": { + "maxLength": 50, + "type": "string", + "description": "Setting the `amendedBookingStatus` to `AMENDMENT_CANCELLED` **only** cancels the amendment to a confirmed `Booking`. This is only possible in combination with the `bookingReference` path-property being the `carrierBookingReference`.\n\n**Conditional:** It is a precondition that the `amendedBookingStatus` **is** `AMENDMENT_RECEIVED` in order to cancel it. If this is not the case a `404` (Not Found) error response should be returned.\n\nOnly possible value to set is `AMENDMENT_CANCELLED`.\n", + "example": "AMENDMENT_CANCELLED" + } + } + }, + { + "title": "Request to cancel a Confirmed Booking", + "required": [ + "bookingCancellationStatus" + ], + "type": "object", + "properties": { + "bookingCancellationStatus": { + "maxLength": 50, + "type": "string", + "description": "Setting the `bookingCancellationStatus` to `CANCELLATION_RECEIVED` is a request to cancel a confirmed Booking (only possible **after** it is `CONFIRMED` and using this property is only possible in combination with the `bookingReference` path-property being the `carrierBookingReference`). Upon receiving this request the provider will check if it is possible to cancel the confirmed booking. Further processing is needed by the provider.\n\n**Conditional:** It is a precondition that the `bookingStatus` **is** `CONFIRMED` or `PENDING_AMENDMENT` in order to cancel it. If this is not the case a `409` (Conflict) error response should be returned.\n\nOnly possible value to set is `CANCELLATION_RECEIVED`.\n", + "example": "CANCELLATION_RECEIVED" + } + } + } + ] + }, "Invoice Payable At": { "title": "Invoice Payable At", "required": [ @@ -6594,13 +6285,11 @@ "bookingStatus", "cargoMovementTypeAtDestination", "cargoMovementTypeAtOrigin", - "communicationChannelCode", "deliveryTypeAtDestination", "documentParties", "isEquipmentSubstitutionAllowed", "isExportDeclarationRequired", "isImportLicenseRequired", - "isPartialLoadAllowed", "receiptTypeAtOrigin", "requestedEquipments", "shipmentLocations" @@ -6624,20 +6313,20 @@ "bookingStatus": { "maxLength": 50, "type": "string", - "description": "The status of the `Booking`. Possible values are:\n- `RECEIVED` (Booking request has been received)\n- `PENDING UPDATE` (An update is required to the Booking)\n- `UPDATE RECEIVED` (An update has been received and is awaiting to be processed)\n- `CONFIRMED` (Booking has been Confirmed)\n- `PENDING AMENDMENT` (An amendment is required to the Booking)\n- `REJECTED` (Booking discontinued by carrier before it has been Confirmed)\n- `DECLINED` (Booking discontinued by carrier after it has been Confirmed)\n- `CANCELLED` (Booking discontinued by consumer)\n- `COMPLETED` (The Transport Document this Booking is connected to has been Surrendered for Delivery)\n", + "description": "The status of the `Booking`. Possible values are:\n- `RECEIVED` (Booking request has been received)\n- `PENDING_UPDATE` (An update is required to the Booking)\n- `UPDATE_RECEIVED` (An update has been received and is awaiting to be processed)\n- `CONFIRMED` (Booking has been Confirmed)\n- `PENDING_AMENDMENT` (An amendment is required to the Booking)\n- `REJECTED` (Booking discontinued by carrier before it has been Confirmed)\n- `DECLINED` (Booking discontinued by carrier after it has been Confirmed)\n- `CANCELLED` (Booking discontinued by consumer)\n- `COMPLETED` (The Transport Document this Booking is connected to has been Surrendered for Delivery)\n", "example": "RECEIVED" }, "amendedBookingStatus": { "maxLength": 50, "type": "string", - "description": "The status of latest amendment added to the `Booking`. If no amendment has been requested - then this field is empty. Possible values are:\n- `AMENDMENT RECEIVED` (An amendment has been received and is awaiting to be processed)\n- `AMENDMENT CONFIRMED` (Amendment is confirmed)\n- `AMENDMENT DECLINED` (Amendment discontinued by provider)\n- `AMENDMENT CANCELLED` (Amendment discontinued by consumer)\n", - "example": "AMENDMENT RECEIVED" + "description": "The status of latest amendment added to the `Booking`. If no amendment has been requested - then this field is empty. Possible values are:\n- `AMENDMENT_RECEIVED` (An amendment has been received and is awaiting to be processed)\n- `AMENDMENT_CONFIRMED` (Amendment is confirmed)\n- `AMENDMENT_DECLINED` (Amendment discontinued by provider)\n- `AMENDMENT_CANCELLED` (Amendment discontinued by consumer)\n", + "example": "AMENDMENT_RECEIVED" }, "bookingCancellationStatus": { "maxLength": 50, "type": "string", - "description": "The status of the latest booking cancellation. If no cancellation has been requested - then this property is empty. Possible values are:\n- `CANCELLATION RECEIVED` (A request to cancel a Confirmed Booking has been received and is awaiting to be processed)\n- `CANCELLATION DECLINED` (Cancellation of the Confirmed Booking has been declined by provider)\n- `CANCELLATION CONFIRMED` (Cancellation of the Confirmed Booking has been confirmed by provider)\n", - "example": "CANCELLATION RECEIVED" + "description": "The status of the latest booking cancellation. If no cancellation has been requested - then this property is empty. Possible values are:\n- `CANCELLATION_RECEIVED` (A request to cancel a Confirmed Booking has been received and is awaiting to be processed)\n- `CANCELLATION_DECLINED` (Cancellation of the Confirmed Booking has been declined by provider)\n- `CANCELLATION_CONFIRMED` (Cancellation of the Confirmed Booking has been confirmed by provider)\n", + "example": "CANCELLATION_RECEIVED" }, "receiptTypeAtOrigin": { "maxLength": 3, @@ -6689,10 +6378,10 @@ ] }, "originChargesPaymentTerm": { - "$ref": "#/components/schemas/Origin Charges Payment Term" + "$ref": "#/components/schemas/OriginChargesPaymentTerm" }, "destinationChargesPaymentTerm": { - "$ref": "#/components/schemas/Destination Charges Payment Term" + "$ref": "#/components/schemas/DestinationChargesPaymentTerm" }, "contractQuotationReference": { "maxLength": 35, @@ -6753,19 +6442,19 @@ "minLength": 3, "pattern": "^[A-Z]{3}$", "type": "string", - "description": "The currency used for the declared value, using the 3-character code defined by [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).\n", + "description": "The currency used for the declared value, using the 3-character code defined by [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html).\n", "example": "DKK" }, "carrierCode": { "maxLength": 4, "pattern": "^\\S+$", "type": "string", - "description": "The `NMFTA` or `SMDG` code of the carrier the booking request is intended for.\n", + "description": "The `SCAC` code (provided by [NMFTA](https://nmfta.org/scac/)) or `SMDG` code (provided by [SMDG](https://smdg.org/documents/smdg-code-lists/smdg-liner-code-list/)) of the carrier the booking request is intended for. `carrierCodeListProvider` defines which list the `carrierCode` is based upon.\n", "example": "MMCU" }, "carrierCodeListProvider": { "type": "string", - "description": "The code list provider for the carrier code. Possible values are:\n- `SMDG` (Ship Message Design Group)\n- `NMFTA` (National Motor Freight Traffic Association)\n", + "description": "The code list provider for the `carrierCode`. Possible values are:\n- `SMDG` (Ship Message Design Group)\n- `NMFTA` (National Motor Freight Traffic Association)\n", "example": "NMFTA", "enum": [ "SMDG", @@ -6774,8 +6463,9 @@ }, "isPartialLoadAllowed": { "type": "boolean", - "description": "Indication whether the shipper agrees to load part of the shipment in case where not all of the cargo is delivered within cut-off.\n", - "example": true + "description": "Indication whether the shipper agrees to load part of the shipment in case where not all of the cargo is delivered within cut-off.\n\n**Note:** If this property is omitted it is considered that 'Partial Load **is** allowed' by default\n", + "example": true, + "default": true }, "isExportDeclarationRequired": { "type": "boolean", @@ -6845,15 +6535,9 @@ "incoTerms": { "maxLength": 3, "type": "string", - "description": "Transport obligations, costs and risks as agreed between buyer and seller as defined by [ICC](https://iccwbo.org/business-solutions/incoterms-rules/). A list of possible values:\n- `EXW` (Ex-Works)\n- `FCA` (Free Carrier)\n- `FAS` (Free Alongside Ship)\n- `FOB` (Free On Board)\n- `CFR` (Cost and Freight)\n- `CIF` (Cost, Insurance and Freight)\n- `CPT` (Carriage Paid To)\n- `CIP` (Carriage And Insurance Paid To)\n- `DAP` (Delivered At Place)\n- `DPU` (Delivered At Place Unloaded)\n- `DDP` (Delivered Duty Paid)\n", + "description": "Transport obligations, costs and risks as agreed between buyer and seller as defined by [Incoterms Rules](https://iccwbo.org/business-solutions/incoterms-rules/).\n", "example": "FCA" }, - "communicationChannelCode": { - "maxLength": 2, - "type": "string", - "description": "Specifying which communication channel is to be used for this booking e.g. Possible values are:\n- `EI` (EDI transmission)\n- `EM` (Email)\n- `AO` (API)\n", - "example": "AO" - }, "isEquipmentSubstitutionAllowed": { "type": "boolean", "description": "Indicates if an alternate equipment type can be provided by the carrier.\n", @@ -6973,13 +6657,11 @@ "bookingStatus", "cargoMovementTypeAtDestination", "cargoMovementTypeAtOrigin", - "communicationChannelCode", "deliveryTypeAtDestination", "documentParties", "isEquipmentSubstitutionAllowed", "isExportDeclarationRequired", "isImportLicenseRequired", - "isPartialLoadAllowed", "receiptTypeAtOrigin", "requestedEquipments", "shipmentLocations" @@ -7003,20 +6685,20 @@ "bookingStatus": { "maxLength": 50, "type": "string", - "description": "The status of the `Booking`. Possible values are:\n- `RECEIVED` (Booking request has been received)\n- `PENDING UPDATE` (An update is required to the Booking)\n- `UPDATE RECEIVED` (An update has been received and is awaiting to be processed)\n- `CONFIRMED` (Booking has been Confirmed)\n- `PENDING AMENDMENT` (An amendment is required to the Booking)\n- `REJECTED` (Booking discontinued by carrier before it has been Confirmed)\n- `DECLINED` (Booking discontinued by carrier after it has been Confirmed)\n- `CANCELLED` (Booking discontinued by consumer)\n- `COMPLETED` (The Transport Document this Booking is connected to has been Surrendered for Delivery)\n", + "description": "The status of the `Booking`. Possible values are:\n- `RECEIVED` (Booking request has been received)\n- `PENDING_UPDATE` (An update is required to the Booking)\n- `UPDATE_RECEIVED` (An update has been received and is awaiting to be processed)\n- `CONFIRMED` (Booking has been Confirmed)\n- `PENDING_AMENDMENT` (An amendment is required to the Booking)\n- `REJECTED` (Booking discontinued by carrier before it has been Confirmed)\n- `DECLINED` (Booking discontinued by carrier after it has been Confirmed)\n- `CANCELLED` (Booking discontinued by consumer)\n- `COMPLETED` (The Transport Document this Booking is connected to has been Surrendered for Delivery)\n", "example": "RECEIVED" }, "amendedBookingStatus": { "maxLength": 50, "type": "string", - "description": "The status of latest amendment added to the `Booking`. If no amendment has been requested - then this field is empty. Possible values are:\n- `AMENDMENT RECEIVED` (An amendment has been received and is awaiting to be processed)\n- `AMENDMENT CONFIRMED` (Amendment is confirmed)\n- `AMENDMENT DECLINED` (Amendment discontinued by provider)\n- `AMENDMENT CANCELLED` (Amendment discontinued by consumer)\n", - "example": "AMENDMENT RECEIVED" + "description": "The status of latest amendment added to the `Booking`. If no amendment has been requested - then this field is empty. Possible values are:\n- `AMENDMENT_RECEIVED` (An amendment has been received and is awaiting to be processed)\n- `AMENDMENT_CONFIRMED` (Amendment is confirmed)\n- `AMENDMENT_DECLINED` (Amendment discontinued by provider)\n- `AMENDMENT_CANCELLED` (Amendment discontinued by consumer)\n", + "example": "AMENDMENT_RECEIVED" }, "bookingCancellationStatus": { "maxLength": 50, "type": "string", - "description": "The status of the latest booking cancellation. If no cancellation has been requested - then this property is empty. Possible values are:\n- `CANCELLATION RECEIVED` (A request to cancel a Confirmed Booking has been received and is awaiting to be processed)\n- `CANCELLATION DECLINED` (Cancellation of the Confirmed Booking has been declined by provider)\n- `CANCELLATION CONFIRMED` (Cancellation of the Confirmed Booking has been confirmed by provider)\n", - "example": "CANCELLATION RECEIVED" + "description": "The status of the latest booking cancellation. If no cancellation has been requested - then this property is empty. Possible values are:\n- `CANCELLATION_RECEIVED` (A request to cancel a Confirmed Booking has been received and is awaiting to be processed)\n- `CANCELLATION_DECLINED` (Cancellation of the Confirmed Booking has been declined by provider)\n- `CANCELLATION_CONFIRMED` (Cancellation of the Confirmed Booking has been confirmed by provider)\n", + "example": "CANCELLATION_RECEIVED" }, "receiptTypeAtOrigin": { "maxLength": 3, @@ -7068,10 +6750,10 @@ ] }, "originChargesPaymentTerm": { - "$ref": "#/components/schemas/Origin Charges Payment Term" + "$ref": "#/components/schemas/OriginChargesPaymentTerm" }, "destinationChargesPaymentTerm": { - "$ref": "#/components/schemas/Destination Charges Payment Term" + "$ref": "#/components/schemas/DestinationChargesPaymentTerm" }, "contractQuotationReference": { "maxLength": 35, @@ -7132,19 +6814,19 @@ "minLength": 3, "pattern": "^[A-Z]{3}$", "type": "string", - "description": "The currency used for the declared value, using the 3-character code defined by [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).\n", + "description": "The currency used for the declared value, using the 3-character code defined by [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html).\n", "example": "DKK" }, "carrierCode": { "maxLength": 4, "pattern": "^\\S+$", "type": "string", - "description": "The `NMFTA` or `SMDG` code of the carrier the booking request is intended for.\n", + "description": "The `SCAC` code (provided by [NMFTA](https://nmfta.org/scac/)) or `SMDG` code (provided by [SMDG](https://smdg.org/documents/smdg-code-lists/smdg-liner-code-list/)) of the carrier the booking request is intended for. `carrierCodeListProvider` defines which list the `carrierCode` is based upon.\n", "example": "MMCU" }, "carrierCodeListProvider": { "type": "string", - "description": "The code list provider for the carrier code. Possible values are:\n- `SMDG` (Ship Message Design Group)\n- `NMFTA` (National Motor Freight Traffic Association)\n", + "description": "The code list provider for the `carrierCode`. Possible values are:\n- `SMDG` (Ship Message Design Group)\n- `NMFTA` (National Motor Freight Traffic Association)\n", "example": "NMFTA", "enum": [ "SMDG", @@ -7153,8 +6835,9 @@ }, "isPartialLoadAllowed": { "type": "boolean", - "description": "Indication whether the shipper agrees to load part of the shipment in case where not all of the cargo is delivered within cut-off.\n", - "example": true + "description": "Indication whether the shipper agrees to load part of the shipment in case where not all of the cargo is delivered within cut-off.\n\n**Note:** If this property is omitted it is considered that 'Partial Load **is** allowed' by default\n", + "example": true, + "default": true }, "isExportDeclarationRequired": { "type": "boolean", @@ -7224,15 +6907,9 @@ "incoTerms": { "maxLength": 3, "type": "string", - "description": "Transport obligations, costs and risks as agreed between buyer and seller as defined by [ICC](https://iccwbo.org/business-solutions/incoterms-rules/). A list of possible values:\n- `EXW` (Ex-Works)\n- `FCA` (Free Carrier)\n- `FAS` (Free Alongside Ship)\n- `FOB` (Free On Board)\n- `CFR` (Cost and Freight)\n- `CIF` (Cost, Insurance and Freight)\n- `CPT` (Carriage Paid To)\n- `CIP` (Carriage And Insurance Paid To)\n- `DAP` (Delivered At Place)\n- `DPU` (Delivered At Place Unloaded)\n- `DDP` (Delivered Duty Paid)\n", + "description": "Transport obligations, costs and risks as agreed between buyer and seller as defined by [Incoterms Rules](https://iccwbo.org/business-solutions/incoterms-rules/).\n", "example": "FCA" }, - "communicationChannelCode": { - "maxLength": 2, - "type": "string", - "description": "Specifying which communication channel is to be used for this booking e.g. Possible values are:\n- `EI` (EDI transmission)\n- `EM` (Email)\n- `AO` (API)\n", - "example": "AO" - }, "isEquipmentSubstitutionAllowed": { "type": "boolean", "description": "Indicates if an alternate equipment type can be provided by the carrier.\n", @@ -7346,7 +7023,8 @@ }, "description": "This property contains the amended booking in case:\n - an amendment is currently active\n - the subscriber is subscribing to the `Full State Transfer` of the Booking\n\nIn case the subscriber does not subscribe to the `Full State Transfer` of the Booking or no amendment is active - then the content in this property can be ignored.\n" }, - "BookingNotification_data": { + "Data": { + "title": "Data", "required": [ "bookingStatus" ], @@ -7355,20 +7033,20 @@ "bookingStatus": { "maxLength": 50, "type": "string", - "description": "The status of the `Booking`. Possible values are:\n\n- `RECEIVED` (Booking request has been received)\n- `PENDING UPDATE` (An update is required to the Booking)\n- `UPDATE RECEIVED` (An update has been received and is awaiting to be processed)\n- `CONFIRMED` (Booking has been Confirmed)\n- `PENDING AMENDMENT` (An amendment is required to the Booking)\n- `REJECTED` (Booking discontinued by carrier before it has been Confirmed)\n- `DECLINED` (Booking discontinued by carrier after it has been Confirmed)\n- `CANCELLED` (Booking discontinued by consumer)\n- `COMPLETED` (The Transport Document this Booking is connected to has been Surrendered for Delivery)\n\nMore details can be found on [GitHub](https://github.com/dcsaorg/DCSA-Edocumentation/blob/master/edocumentation-domain/src/main/resources/validations/bookingstatuses.csv).\n", + "description": "The status of the `Booking`. Possible values are:\n\n- `RECEIVED` (Booking request has been received)\n- `PENDING_UPDATE` (An update is required to the Booking)\n- `UPDATE_RECEIVED` (An update has been received and is awaiting to be processed)\n- `CONFIRMED` (Booking has been Confirmed)\n- `PENDING_AMENDMENT` (An amendment is required to the Booking)\n- `REJECTED` (Booking discontinued by carrier before it has been Confirmed)\n- `DECLINED` (Booking discontinued by carrier after it has been Confirmed)\n- `CANCELLED` (Booking discontinued by consumer)\n- `COMPLETED` (The Transport Document this Booking is connected to has been Surrendered for Delivery)\n", "example": "RECEIVED" }, "amendedBookingStatus": { "maxLength": 50, "type": "string", - "description": "The status of latest amendment added to the `Booking`. If no amendment has been requested - then this property is empty. Possible values are:\n\n- `AMENDMENT RECEIVED` (An amendment has been received and is awaiting to be processed)\n- `AMENDMENT CONFIRMED` (Amendment is confirmed)\n- `AMENDMENT DECLINED` (Amendment discontinued by provider)\n- `AMENDMENT CANCELLED` (Amendment discontinued by consumer)\n\nMore details can be found on [GitHub](https://github.com/dcsaorg/DCSA-Edocumentation/blob/master/edocumentation-domain/src/main/resources/validations/bookingstatuses.csv).\n", - "example": "AMENDMENT RECEIVED" + "description": "The status of latest amendment added to the `Booking`. If no amendment has been requested - then this property is empty. Possible values are:\n\n- `AMENDMENT_RECEIVED` (An amendment has been received and is awaiting to be processed)\n- `AMENDMENT_CONFIRMED` (Amendment is confirmed)\n- `AMENDMENT_DECLINED` (Amendment discontinued by provider)\n- `AMENDMENT_CANCELLED` (Amendment discontinued by consumer)\n", + "example": "AMENDMENT_RECEIVED" }, "bookingCancellationStatus": { "maxLength": 50, "type": "string", - "description": "The status of the latest booking cancellation. If no cancellation has been requested - then this property is empty. Possible values are:\n- `CANCELLATION RECEIVED` (A request to cancel a Confirmed Booking has been received and is awaiting to be processed)\n- `CANCELLATION DECLINED` (Cancellation of the Confirmed Booking has been declined by provider)\n- `CANCELLATION CONFIRMED` (Cancellation of the Confirmed Booking has been confirmed by provider)\n", - "example": "CANCELLATION RECEIVED" + "description": "The status of the latest booking cancellation. If no cancellation has been requested - then this property is empty. Possible values are:\n- `CANCELLATION_RECEIVED` (A request to cancel a Confirmed Booking has been received and is awaiting to be processed)\n- `CANCELLATION_DECLINED` (Cancellation of the Confirmed Booking has been declined by provider)\n- `CANCELLATION_CONFIRMED` (Cancellation of the Confirmed Booking has been confirmed by provider)\n", + "example": "CANCELLATION_RECEIVED" }, "carrierBookingRequestReference": { "maxLength": 100, @@ -7440,13 +7118,181 @@ "type": "string", "description": "The date and time for the pick-up of the empty container(s) at the Empty container depot release location, if provided.\n", "format": "date-time", - "example": "2024-07-05T09:03:00-02:00" + "example": "2024-09-04T09:41:00Z" }, "depotReleaseLocation": { "$ref": "#/components/schemas/EmptyContainerDepotReleaseLocation" } }, - "description": "The date and time and location for the empty container pick-up.\n\n**Condition:** Only applicable to merchange haulage service at origin (`Receipt type at origin = 'CY'`).\n" + "description": "The date and time and location for the empty container pick-up.\n\n**Condition:** Only applicable to merchant haulage service at origin (`Receipt type at origin = 'CY'`).\n" + }, + "Tare Weight": { + "title": "Tare Weight", + "required": [ + "unit", + "value" + ], + "type": "object", + "properties": { + "value": { + "minimum": 0, + "exclusiveMinimum": true, + "type": "number", + "description": "The weight of an empty container (gross container weight).\n", + "format": "float", + "example": 4000 + }, + "unit": { + "type": "string", + "description": "The unit of measure which can be expressed in imperial or metric terms\n- `KGM` (Kilograms)\n- `LBR` (Pounds)\n", + "example": "KGM", + "enum": [ + "KGM", + "LBR" + ] + } + }, + "description": "The weight of an empty container (gross container weight).\n\n**Conditional:** In case of Shipper Owned Containers (`SOC`) this is a required property\n" + }, + "Tare Weight_1": { + "title": "Tare Weight", + "required": [ + "unit", + "value" + ], + "type": "object", + "properties": { + "value": { + "minimum": 0, + "exclusiveMinimum": true, + "type": "number", + "description": "The weight of an empty container (gross container weight).\n", + "format": "float", + "example": 4800 + }, + "unit": { + "type": "string", + "description": "The unit of measure which can be expressed in imperial or metric terms\n- `KGM` (Kilograms)\n- `LBR` (Pounds)\n", + "example": "KGM", + "enum": [ + "KGM", + "LBR" + ] + } + }, + "description": "The weight of an empty container (gross container weight).\n\n**Conditional:** In case of Shipper Owned Containers (`SOC`) this is a required property\n" + }, + "Cargo Gross Weight": { + "title": "Cargo Gross Weight", + "required": [ + "unit", + "value" + ], + "type": "object", + "properties": { + "value": { + "minimum": 0, + "exclusiveMinimum": true, + "type": "number", + "description": "The estimated grand total gross weight of the cargo, including packaging items being carried, which can be expressed in imperial or metric terms, as provided by the shipper.\n", + "format": "float", + "example": 36000 + }, + "unit": { + "type": "string", + "description": "The unit of measure which can be expressed in imperial or metric terms\n- `KGM` (Kilograms)\n- `LBR` (Pounds)\n", + "example": "KGM", + "enum": [ + "KGM", + "LBR" + ] + } + }, + "description": "The estimated grand total gross weight of the cargo, including packaging items being carried, which can be expressed in imperial or metric terms, as provided by the shipper.\n" + }, + "Cargo Gross Volume": { + "title": "Cargo Gross Volume", + "required": [ + "unit", + "value" + ], + "type": "object", + "properties": { + "value": { + "minimum": 0, + "exclusiveMinimum": true, + "type": "number", + "description": "The estimated grand total volume of the cargo.\n", + "format": "float", + "example": 360 + }, + "unit": { + "type": "string", + "description": "The unit of measure which can be expressed in either imperial or metric terms\n\n- `FTQ` (Cubic foot)\n- `MTQ` (Cubic meter)\n", + "example": "MTQ", + "enum": [ + "MTQ", + "FTQ" + ] + } + }, + "description": "The estimated grand total volume of the cargo.\n" + }, + "Cargo Net Weight": { + "title": "Cargo Net Weight", + "required": [ + "unit", + "value" + ], + "type": "object", + "properties": { + "value": { + "minimum": 0, + "exclusiveMinimum": true, + "type": "number", + "description": "The estimated grand total net weight of the cargo, excluding packaging items being carried, which can be expressed in imperial or metric terms, as provided by the shipper.\n", + "format": "float", + "example": 36000 + }, + "unit": { + "type": "string", + "description": "The unit of measure which can be expressed in imperial or metric terms\n- `KGM` (Kilograms)\n- `LBR` (Pounds)\n", + "example": "KGM", + "enum": [ + "KGM", + "LBR" + ] + } + }, + "description": "The estimated grand total net weight of the cargo, excluding packaging items being carried, which can be expressed in imperial or metric terms, as provided by the shipper.\n" + }, + "Cargo Net Volume": { + "title": "Cargo Net Volume", + "required": [ + "unit", + "value" + ], + "type": "object", + "properties": { + "value": { + "minimum": 0, + "exclusiveMinimum": true, + "type": "number", + "description": "The estimated net total volume of the cargo.\n", + "format": "float", + "example": 360 + }, + "unit": { + "type": "string", + "description": "The unit of measure which can be expressed in either imperial or metric terms\n\n- `FTQ` (Cubic foot)\n- `MTQ` (Cubic meter)\n", + "example": "MTQ", + "enum": [ + "MTQ", + "FTQ" + ] + } + }, + "description": "The estimated net total volume of the cargo.\n" }, "Gross Weight": { "title": "Gross Weight", @@ -7534,8 +7380,8 @@ }, "description": "The total weight of the explosive substances, without the packaging's, casings, etc.\n" }, - "Volume": { - "title": "Volume", + "Net Volume": { + "title": "Net Volume", "required": [ "unit", "value" @@ -7580,7 +7426,7 @@ "amendedContent": { "name": "amendedContent", "in": "query", - "description": "Controls wether the content of this payload is the amendmended Booking (`amendedContent=true`) or the confirmed Booking (`amendedContent=false`).\n\nIf `amendedContent=true` and no amendment has been requested or if the provider is not able to send the amendment - the response will be a `404` Not Found\n", + "description": "Controls whether the content of this payload is the amended Booking (`amendedContent=true`) or the confirmed Booking (`amendedContent=false`).\n\nIf `amendedContent=true` and no amendment has been requested or if the provider is not able to send the amendment - the response will be a `404` Not Found\n", "required": false, "style": "form", "explode": true, From 32da0583b20dbbaac56c25a59a8984127a5b59db Mon Sep 17 00:00:00 2001 From: preetamnpr <128618622+preetamnpr@users.noreply.github.com> Date: Thu, 26 Sep 2024 10:02:38 +0200 Subject: [PATCH 2/5] DT-1708 CargoGrossWeight and Volume. --- .../booking/checks/BookingChecks.java | 14 ++++++++--- .../booking/party/BookingCarrier.java | 12 ---------- .../messages/booking-api-2.0.0-dg.json | 6 +++-- .../booking-api-2.0.0-reefer-temp-change.json | 6 +++-- .../messages/booking-api-2.0.0-reefer.json | 6 +++-- .../booking-api-2.0.0-regular-2re1c.json | 12 ++++++---- .../booking-api-2.0.0-regular-2re2c.json | 24 ++++++++++++------- .../booking-api-2.0.0-regular-cho-dest.json | 6 +++-- .../booking-api-2.0.0-regular-cho-orig.json | 6 +++-- ...pi-2.0.0-regular-non-operating-reefer.json | 6 +++-- ...oking-api-2.0.0-regular-shipper-owned.json | 6 +++-- .../messages/booking-api-2.0.0-regular.json | 12 ++++++---- 12 files changed, 71 insertions(+), 45 deletions(-) diff --git a/booking/src/main/java/org/dcsa/conformance/standards/booking/checks/BookingChecks.java b/booking/src/main/java/org/dcsa/conformance/standards/booking/checks/BookingChecks.java index 7d5c955e..feacc598 100644 --- a/booking/src/main/java/org/dcsa/conformance/standards/booking/checks/BookingChecks.java +++ b/booking/src/main/java/org/dcsa/conformance/standards/booking/checks/BookingChecks.java @@ -659,10 +659,18 @@ private static void generateScenarioRelatedChecks(List checks, JsonAttribute.mustBeDatasetKeywordIfPresent(JsonPointer.compile("/incoTerms"), BookingDataSets.INCO_TERMS_VALUES), JsonAttribute.allIndividualMatchesMustBeValid( "The 'cargoGrossVolume' implies 'cargoGrossVolumeUnit'", - mav -> mav.submitAllMatching("requestedEquipments.*.commodities.*"), + mav -> mav.submitAllMatching("requestedEquipments.*.commodities.*.cargoGrossVolume"), JsonAttribute.presenceImpliesOtherField( - "cargoGrossVolume", - "cargoGrossVolumeUnit" + "value", + "unit" + ) + ), + JsonAttribute.allIndividualMatchesMustBeValid( + "The 'cargoGrossWeight' implies 'cargoGrossWeightUnit'", + mav -> mav.submitAllMatching("requestedEquipments.*.commodities.*.cargoGrossWeight"), + JsonAttribute.presenceImpliesOtherField( + "value", + "unit" ) ), VALIDATE_ALL_BOOKING_UN_LOCATION_CODES, diff --git a/booking/src/main/java/org/dcsa/conformance/standards/booking/party/BookingCarrier.java b/booking/src/main/java/org/dcsa/conformance/standards/booking/party/BookingCarrier.java index 1eb30605..7ff3bf6f 100644 --- a/booking/src/main/java/org/dcsa/conformance/standards/booking/party/BookingCarrier.java +++ b/booking/src/main/java/org/dcsa/conformance/standards/booking/party/BookingCarrier.java @@ -81,18 +81,6 @@ protected Map, Consumer> getActionP Map.entry(UC12_Carrier_ConfirmBookingCompletedAction.class, this::confirmBookingCompleted)); } - private char computeVesselIMONumberCheckDigit(String vesselIMONumberSansCheckDigit) { - int sum = 0; - assert vesselIMONumberSansCheckDigit.length() == 6; - for (int i = 0; i < 6; i++) { - char c = vesselIMONumberSansCheckDigit.charAt(i); - assert c >= '0' && c <= '9'; - sum += (7 - i) * Character.getNumericValue(c); - } - String s = String.valueOf(sum); - return s.charAt(s.length() - 1); - } - private void supplyScenarioParameters(JsonNode actionPrompt) { log.info("Carrier.supplyScenarioParameters(%s)".formatted(actionPrompt.toPrettyString())); var scenarioType = ScenarioType.valueOf(actionPrompt.required("scenarioType").asText()); diff --git a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-dg.json b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-dg.json index 82b4f34a..0b9c525c 100644 --- a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-dg.json +++ b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-dg.json @@ -24,8 +24,10 @@ { "HSCodes": ["COMMODITY_HS_CODE_1"], "commodityType": "COMMODITY_TYPE_1_PLACEHOLDER", - "cargoGrossWeight": 12000, - "cargoGrossWeightUnit": "KGM", + "cargoGrossWeight": { + "value": 12000, + "unit": "KGM" + }, "outerPackaging": { "packageCode" : "5H", "imoPackagingCode": "3A1", diff --git a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-reefer-temp-change.json b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-reefer-temp-change.json index 9fa40bda..ae84399c 100644 --- a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-reefer-temp-change.json +++ b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-reefer-temp-change.json @@ -24,8 +24,10 @@ { "HSCodes": ["COMMODITY_HS_CODE_1"], "commodityType": "COMMODITY_TYPE_1_PLACEHOLDER", - "cargoGrossWeight": 323.32, - "cargoGrossWeightUnit": "KGM" + "cargoGrossWeight": { + "value": 323.32, + "unit": "KGM" + } } ], "isNonOperatingReefer": false, diff --git a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-reefer.json b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-reefer.json index 557f024e..84b0a9a4 100644 --- a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-reefer.json +++ b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-reefer.json @@ -23,8 +23,10 @@ { "HSCodes": ["COMMODITY_HS_CODE_1"], "commodityType": "COMMODITY_TYPE_1_PLACEHOLDER", - "cargoGrossWeight": 323.32, - "cargoGrossWeightUnit": "KGM" + "cargoGrossWeight": { + "value": 323.32, + "unit": "KGM" + } } ], "isNonOperatingReefer": false, diff --git a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-2re1c.json b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-2re1c.json index 42015e09..2a45d72c 100644 --- a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-2re1c.json +++ b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-2re1c.json @@ -24,8 +24,10 @@ { "HSCodes": ["COMMODITY_HS_CODE_1"], "commodityType": "COMMODITY_TYPE_1_PLACEHOLDER", - "cargoGrossWeight": 15000, - "cargoGrossWeightUnit": "KGM" + "cargoGrossWeight": { + "value": 15000, + "unit": "KGM" + } } ] }, @@ -37,8 +39,10 @@ { "HSCodes": ["COMMODITY_HS_CODE_2"], "commodityType": "COMMODITY_TYPE_2_PLACEHOLDER", - "cargoGrossWeight": 20000, - "cargoGrossWeightUnit": "KGM" + "cargoGrossWeight": { + "value": 20000, + "unit": "KGM" + } } ] } diff --git a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-2re2c.json b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-2re2c.json index 43a436cf..e0d5ddc4 100644 --- a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-2re2c.json +++ b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-2re2c.json @@ -24,14 +24,18 @@ { "HSCodes": ["COMMODITY_HS_CODE_1"], "commodityType": "COMMODITY_TYPE_1_PLACEHOLDER", - "cargoGrossWeight": 5000, - "cargoGrossWeightUnit": "KGM" + "cargoGrossWeight": { + "value": 5000, + "unit": "KGM" + } }, { "HSCodes": ["COMMODITY_HS_CODE_2"], "commodityType": "COMMODITY_TYPE_2_PLACEHOLDER", - "cargoGrossWeight": 10000 , - "cargoGrossWeightUnit": "KGM" + "cargoGrossWeight": { + "value": 10000, + "unit": "KGM" + } } ] }, @@ -43,14 +47,18 @@ { "HSCodes": ["COMMODITY_HS_CODE_1"], "commodityType": "COMMODITY_TYPE_1_PLACEHOLDER", - "cargoGrossWeight": 5000, - "cargoGrossWeightUnit": "KGM" + "cargoGrossWeight": { + "value": 5000, + "unit": "KGM" + } }, { "HSCodes": ["COMMODITY_HS_CODE_2"], "commodityType": "COMMODITY_TYPE_2_PLACEHOLDER", - "cargoGrossWeight": 10000, - "cargoGrossWeightUnit": "KGM" + "cargoGrossWeight": { + "value": 20000, + "unit": "KGM" + } } ] } diff --git a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-cho-dest.json b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-cho-dest.json index 0b730693..be19cd8c 100644 --- a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-cho-dest.json +++ b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-cho-dest.json @@ -30,8 +30,10 @@ { "HSCodes": ["COMMODITY_HS_CODE_1"], "commodityType": "COMMODITY_TYPE_1_PLACEHOLDER", - "cargoGrossWeight": 323.32, - "cargoGrossWeightUnit": "KGM" + "cargoGrossWeight": { + "value": 323.32, + "unit": "KGM" + } } ] } diff --git a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-cho-orig.json b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-cho-orig.json index bccb20ab..4da400b1 100644 --- a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-cho-orig.json +++ b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-cho-orig.json @@ -30,8 +30,10 @@ { "HSCodes": ["COMMODITY_HS_CODE_1"], "commodityType": "COMMODITY_TYPE_1_PLACEHOLDER", - "cargoGrossWeight": 323.32, - "cargoGrossWeightUnit": "KGM" + "cargoGrossWeight": { + "value": 323.32, + "unit": "KGM" + } } ] } diff --git a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-non-operating-reefer.json b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-non-operating-reefer.json index 62ef1654..45e6bbb0 100644 --- a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-non-operating-reefer.json +++ b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-non-operating-reefer.json @@ -24,8 +24,10 @@ { "HSCodes": ["COMMODITY_HS_CODE_1"], "commodityType": "COMMODITY_TYPE_1_PLACEHOLDER", - "cargoGrossWeight": 15000, - "cargoGrossWeightUnit": "KGM" + "cargoGrossWeight": { + "value": 15000, + "unit": "KGM" + } } ], "isNonOperatingReefer": true diff --git a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-shipper-owned.json b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-shipper-owned.json index bc82a581..c3c7ee0a 100644 --- a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-shipper-owned.json +++ b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular-shipper-owned.json @@ -24,8 +24,10 @@ { "HSCodes": ["COMMODITY_HS_CODE"], "commodityType": "COMMODITY_TYPE_PLACEHOLDER", - "cargoGrossWeight": 3750, - "cargoGrossWeightUnit": "KGM" + "cargoGrossWeight": { + "value": 3750, + "unit": "KGM" + } } ] } diff --git a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular.json b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular.json index 520d550b..8445a9e1 100644 --- a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular.json +++ b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-regular.json @@ -159,10 +159,14 @@ { "HSCodes": ["COMMODITY_HS_CODE_1"], "commodityType": "COMMODITY_TYPE_1_PLACEHOLDER", - "cargoGrossWeight": 323.32, - "cargoGrossWeightUnit": "KGM", - "cargoGrossVolume": 14, - "cargoGrossVolumeUnit": "MTQ", + "cargoGrossWeight": { + "value": 323.32, + "unit": "KGM" + }, + "cargoGrossVolume": { + "value": 14, + "unit": "MTQ" + }, "exportLicenseIssueDate": "2021-10-10", "exportLicenseExpiryDate": "2030-10-10", "references": [ From fd9ee4ab5aefe435282058d0912ec3e2db20a19f Mon Sep 17 00:00:00 2001 From: preetamnpr <128618622+preetamnpr@users.noreply.github.com> Date: Thu, 26 Sep 2024 10:41:49 +0200 Subject: [PATCH 3/5] DT-1708, DT-1622 CargoGrossWeight and Volume and DG netVolume --- .../standards/booking/checks/BookingChecks.java | 16 ---------------- .../booking/messages/booking-api-2.0.0-dg.json | 4 ++-- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/booking/src/main/java/org/dcsa/conformance/standards/booking/checks/BookingChecks.java b/booking/src/main/java/org/dcsa/conformance/standards/booking/checks/BookingChecks.java index feacc598..e271f9ad 100644 --- a/booking/src/main/java/org/dcsa/conformance/standards/booking/checks/BookingChecks.java +++ b/booking/src/main/java/org/dcsa/conformance/standards/booking/checks/BookingChecks.java @@ -657,22 +657,6 @@ private static void generateScenarioRelatedChecks(List checks, JsonAttribute.mustBeDatasetKeywordIfPresent(JsonPointer.compile("/communicationChannelCode"), BookingDataSets.COMMUNICATION_CHANNEL_CODES), JsonAttribute.mustBeDatasetKeywordIfPresent(JsonPointer.compile("/declaredValueCurrency"), BookingDataSets.ISO_4217_CURRENCY_CODES), JsonAttribute.mustBeDatasetKeywordIfPresent(JsonPointer.compile("/incoTerms"), BookingDataSets.INCO_TERMS_VALUES), - JsonAttribute.allIndividualMatchesMustBeValid( - "The 'cargoGrossVolume' implies 'cargoGrossVolumeUnit'", - mav -> mav.submitAllMatching("requestedEquipments.*.commodities.*.cargoGrossVolume"), - JsonAttribute.presenceImpliesOtherField( - "value", - "unit" - ) - ), - JsonAttribute.allIndividualMatchesMustBeValid( - "The 'cargoGrossWeight' implies 'cargoGrossWeightUnit'", - mav -> mav.submitAllMatching("requestedEquipments.*.commodities.*.cargoGrossWeight"), - JsonAttribute.presenceImpliesOtherField( - "value", - "unit" - ) - ), VALIDATE_ALL_BOOKING_UN_LOCATION_CODES, CHECK_EXPECTED_DEPARTURE_DATE, CHECK_EXPECTED_ARRIVAL_POD, diff --git a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-dg.json b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-dg.json index 0b9c525c..50718643 100644 --- a/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-dg.json +++ b/booking/src/main/resources/standards/booking/messages/booking-api-2.0.0-dg.json @@ -74,7 +74,7 @@ "value": 104.5, "unit": "KGM" }, - "volume": { + "netVolume": { "value": 10.5, "unit": "MTQ" }, @@ -142,7 +142,7 @@ "value": 104.5, "unit": "KGM" }, - "volume": { + "netVolume": { "value": 10.5, "unit": "MTQ" }, From faa49cf3a6e3e25818b909e77c5bb19bce5fd1f2 Mon Sep 17 00:00:00 2001 From: preetamnpr <128618622+preetamnpr@users.noreply.github.com> Date: Fri, 27 Sep 2024 16:48:23 +0200 Subject: [PATCH 4/5] DT-1504 202 changes added. --- .../booking/BookingComponentFactory.java | 1 - .../booking/BookingScenarioListBuilder.java | 146 ++++++++++-------- .../booking/action/BookingAction.java | 8 +- .../UC10_Carrier_DeclineBookingAction.java | 5 +- ...11_Shipper_CancelBookingRequestAction.java | 17 +- ...13ShipperCancelConfirmedBookingAction.java | 29 ++-- ...rrierProcessBookingCancellationAction.java | 20 ++- ...C1_Shipper_SubmitBookingRequestAction.java | 14 +- ...per_SubmitUpdatedBookingRequestAction.java | 12 +- .../UC7_Shipper_SubmitBookingAmendment.java | 24 ++- .../UC8_Carrier_ProcessAmendmentAction.java | 14 +- .../UC9_Shipper_CancelBookingAmendment.java | 23 ++- .../booking/party/BookingCarrier.java | 57 ++++--- .../party/DynamicScenarioParameters.java | 15 -- 14 files changed, 183 insertions(+), 202 deletions(-) diff --git a/booking/src/main/java/org/dcsa/conformance/standards/booking/BookingComponentFactory.java b/booking/src/main/java/org/dcsa/conformance/standards/booking/BookingComponentFactory.java index 3a207f04..d0eac45b 100644 --- a/booking/src/main/java/org/dcsa/conformance/standards/booking/BookingComponentFactory.java +++ b/booking/src/main/java/org/dcsa/conformance/standards/booking/BookingComponentFactory.java @@ -100,7 +100,6 @@ public Set getReportRoleNames( public JsonSchemaValidator getMessageSchemaValidator(String apiName, String jsonSchema) { String schemaFilePath = "/standards/booking/schemas/booking-%s-v%s0.json" .formatted(apiName, standardVersion.charAt(0)); - return JsonSchemaValidator.getInstance(schemaFilePath, jsonSchema); } } diff --git a/booking/src/main/java/org/dcsa/conformance/standards/booking/BookingScenarioListBuilder.java b/booking/src/main/java/org/dcsa/conformance/standards/booking/BookingScenarioListBuilder.java index cb4aa064..f2462f47 100644 --- a/booking/src/main/java/org/dcsa/conformance/standards/booking/BookingScenarioListBuilder.java +++ b/booking/src/main/java/org/dcsa/conformance/standards/booking/BookingScenarioListBuilder.java @@ -34,7 +34,7 @@ class BookingScenarioListBuilder extends ScenarioListBuilder createConforman .then( shipperGetBooking(PENDING_UPDATE) .then( - uc3_shipper_submitUpdatedBookingRequest() + uc3_shipper_submitUpdatedBookingRequest(UPDATE_RECEIVED) .then( shipperGetBooking(UPDATE_RECEIVED) .then( @@ -81,7 +81,7 @@ private static LinkedHashMap createConforman .then( shipperGetBooking( COMPLETED)))))))), - uc3_shipper_submitUpdatedBookingRequest() + uc3_shipper_submitUpdatedBookingRequest(UPDATE_RECEIVED) .then( shipperGetBooking(UPDATE_RECEIVED) .then( @@ -107,13 +107,13 @@ private static LinkedHashMap createConforman .then( shipperGetBooking( COMPLETED)))), - uc7_shipper_submitBookingAmendment() + uc7_shipper_submitBookingAmendment(CONFIRMED,AMENDMENT_RECEIVED) .then( shipperGetBooking( CONFIRMED, AMENDMENT_RECEIVED,null, true) .thenEither( - uc8a_carrier_approveBookingAmendment() + uc8a_carrier_approveBookingAmendment(CONFIRMED, AMENDMENT_CONFIRMED) .then( shipperGetBooking( CONFIRMED, @@ -123,7 +123,7 @@ private static LinkedHashMap createConforman .then( shipperGetBooking( COMPLETED)))), - uc8b_carrier_declineBookingAmendment() + uc8b_carrier_declineBookingAmendment(CONFIRMED, AMENDMENT_DECLINED) .then( shipperGetBooking( CONFIRMED, @@ -133,7 +133,7 @@ private static LinkedHashMap createConforman .then( shipperGetBooking( COMPLETED)))), - uc9_shipper_cancelBookingAmendment() + uc9_shipper_cancelBookingAmendment(CONFIRMED, AMENDMENT_CANCELLED) .then( shipperGetBooking( CONFIRMED, @@ -143,11 +143,11 @@ private static LinkedHashMap createConforman .then( shipperGetBooking( COMPLETED)))))), - uc10_carrier_declineBooking() + uc10_carrier_declineBooking(AMENDMENT_DECLINED) .then(shipperGetBooking(DECLINED)), uc12_carrier_confirmBookingCompleted() .then(shipperGetBooking(COMPLETED)))), - uc11_shipper_cancelBooking() + uc11_shipper_cancelBooking(CANCELLED) .then(shipperGetBooking(CANCELLED)))))), Map.entry( "Dangerous goods", @@ -157,7 +157,7 @@ private static LinkedHashMap createConforman .then( shipperGetBooking(RECEIVED) .thenEither( - uc3_shipper_submitUpdatedBookingRequest() + uc3_shipper_submitUpdatedBookingRequest(UPDATE_RECEIVED) .then( shipperGetBooking(UPDATE_RECEIVED) .then( @@ -185,7 +185,7 @@ private static LinkedHashMap createConforman .then( shipperGetBooking(RECEIVED) .thenEither( - uc3_shipper_submitUpdatedBookingRequest() + uc3_shipper_submitUpdatedBookingRequest(UPDATE_RECEIVED) .then( shipperGetBooking(UPDATE_RECEIVED) .then( @@ -277,38 +277,39 @@ private BookingScenarioListBuilder thenAllPathsFrom( .thenEither( uc5_carrier_confirmBookingRequest().thenHappyPathFrom(CONFIRMED), uc6_carrier_requestToAmendConfirmedBooking().thenAllPathsFrom(PENDING_AMENDMENT), - uc7_shipper_submitBookingAmendment() + uc7_shipper_submitBookingAmendment(CONFIRMED, AMENDMENT_RECEIVED) .thenAllPathsFrom(AMENDMENT_RECEIVED, CONFIRMED), - uc10_carrier_declineBooking().thenAllPathsFrom(DECLINED), + uc10_carrier_declineBooking(null).thenAllPathsFrom(DECLINED), uc12_carrier_confirmBookingCompleted().thenAllPathsFrom(COMPLETED), - uc13ShipperCancelConfirmedBooking().thenAllPathsFrom(CANCELLATION_RECEIVED, CONFIRMED, null))); + uc13ShipperCancelConfirmedBooking(CONFIRMED,null, CANCELLATION_RECEIVED) + .thenAllPathsFrom(CANCELLATION_RECEIVED, CONFIRMED, null))); case PENDING_UPDATE -> then( shipperGetBooking(bookingState) .thenEither( uc2_carrier_requestUpdateToBookingRequest().thenHappyPathFrom(PENDING_UPDATE), - uc3_shipper_submitUpdatedBookingRequest() + uc3_shipper_submitUpdatedBookingRequest(UPDATE_RECEIVED) .thenHappyPathFrom(UPDATE_RECEIVED), uc4_carrier_rejectBookingRequest().thenHappyPathFrom(REJECTED), - uc11_shipper_cancelBooking().thenHappyPathFrom(CANCELLED))); + uc11_shipper_cancelBooking(CANCELLED).thenHappyPathFrom(CANCELLED))); case UPDATE_RECEIVED -> then( shipperGetBooking(bookingState) .thenEither( uc2_carrier_requestUpdateToBookingRequest().thenHappyPathFrom(PENDING_UPDATE), - uc3_shipper_submitUpdatedBookingRequest() + uc3_shipper_submitUpdatedBookingRequest(UPDATE_RECEIVED) .thenHappyPathFrom(UPDATE_RECEIVED), uc4_carrier_rejectBookingRequest().thenHappyPathFrom(REJECTED), uc5_carrier_confirmBookingRequest().thenHappyPathFrom(CONFIRMED), - uc11_shipper_cancelBooking().thenHappyPathFrom(CANCELLED))); + uc11_shipper_cancelBooking(CANCELLED).thenHappyPathFrom(CANCELLED))); case RECEIVED -> then( shipperGetBooking(bookingState) .thenEither( auc_shipper_sendInvalidBookingAction(CANCEL_BOOKING_AMENDMENT).then(shipperGetBooking(bookingState)), uc2_carrier_requestUpdateToBookingRequest().thenAllPathsFrom(PENDING_UPDATE), - uc3_shipper_submitUpdatedBookingRequest() + uc3_shipper_submitUpdatedBookingRequest(UPDATE_RECEIVED) .thenAllPathsFrom(UPDATE_RECEIVED), uc4_carrier_rejectBookingRequest().thenAllPathsFrom(REJECTED), uc5_carrier_confirmBookingRequest().thenAllPathsFrom(CONFIRMED), - uc11_shipper_cancelBooking().thenAllPathsFrom(CANCELLED) + uc11_shipper_cancelBooking(CANCELLED).thenAllPathsFrom(CANCELLED) )); case START -> thenEither( uc1_shipper_SubmitBookingRequest().thenAllPathsFrom(RECEIVED)); @@ -316,21 +317,30 @@ private BookingScenarioListBuilder thenAllPathsFrom( shipperGetBooking(bookingState) .thenEither( uc6_carrier_requestToAmendConfirmedBooking().thenHappyPathFrom(PENDING_AMENDMENT), - uc7_shipper_submitBookingAmendment() - .thenAllPathsFrom(AMENDMENT_RECEIVED, PENDING_AMENDMENT), - uc10_carrier_declineBooking().thenHappyPathFrom(DECLINED), - uc11_shipper_cancelBooking().thenHappyPathFrom(CANCELLED), - uc13ShipperCancelConfirmedBooking().thenAllPathsFrom(CANCELLATION_RECEIVED, PENDING_AMENDMENT,null))); + uc10_carrier_declineBooking(null).thenHappyPathFrom(DECLINED), + uc11_shipper_cancelBooking(CANCELLED).thenHappyPathFrom(CANCELLED), + uc13ShipperCancelConfirmedBooking(PENDING_AMENDMENT, null, CANCELLATION_RECEIVED).thenAllPathsFrom(CANCELLATION_RECEIVED, PENDING_AMENDMENT,null))); case AMENDMENT_RECEIVED -> then( - shipperGetBooking(originalBookingState, AMENDMENT_RECEIVED,null,true) + originalBookingState.equals(PENDING_AMENDMENT) ? + shipperGetBooking(PENDING_AMENDMENT, AMENDMENT_RECEIVED,null,true) .thenEither( - uc6_carrier_requestToAmendConfirmedBooking().thenHappyPathFrom(PENDING_AMENDMENT), - uc8a_carrier_approveBookingAmendment().thenAllPathsFrom(AMENDMENT_CONFIRMED, CONFIRMED), - uc8b_carrier_declineBookingAmendment().thenAllPathsFrom(AMENDMENT_DECLINED, originalBookingState), - uc9_shipper_cancelBookingAmendment().thenAllPathsFrom(AMENDMENT_CANCELLED, originalBookingState), - uc10_carrier_declineBooking().thenHappyPathFrom(DECLINED), - uc13ShipperCancelConfirmedBooking().thenAllPathsFrom(CANCELLATION_RECEIVED, originalBookingState, AMENDMENT_RECEIVED ) - ) + uc7_shipper_submitBookingAmendment(CONFIRMED, AMENDMENT_RECEIVED) + .thenAllPathsFrom(AMENDMENT_RECEIVED, CONFIRMED), + uc8a_carrier_approveBookingAmendment(PENDING_AMENDMENT, AMENDMENT_CONFIRMED ).thenAllPathsFrom(AMENDMENT_CONFIRMED, PENDING_AMENDMENT), + uc8b_carrier_declineBookingAmendment(PENDING_AMENDMENT, AMENDMENT_DECLINED ).thenAllPathsFrom(AMENDMENT_DECLINED, PENDING_AMENDMENT), + uc9_shipper_cancelBookingAmendment(originalBookingState, AMENDMENT_CANCELLED).thenAllPathsFrom(AMENDMENT_CANCELLED, PENDING_AMENDMENT), + uc10_carrier_declineBooking(AMENDMENT_DECLINED).thenHappyPathFrom(DECLINED), + uc13ShipperCancelConfirmedBooking(originalBookingState, AMENDMENT_RECEIVED, CANCELLATION_RECEIVED).thenAllPathsFrom(CANCELLATION_RECEIVED, PENDING_AMENDMENT, AMENDMENT_RECEIVED ) + ) : + shipperGetBooking(CONFIRMED, AMENDMENT_RECEIVED,null,true) + .thenEither( + uc6_carrier_requestToAmendConfirmedBooking().thenHappyPathFrom(PENDING_AMENDMENT), + uc8a_carrier_approveBookingAmendment(CONFIRMED, AMENDMENT_CONFIRMED).thenAllPathsFrom(AMENDMENT_CONFIRMED, CONFIRMED), + uc8b_carrier_declineBookingAmendment(CONFIRMED, AMENDMENT_DECLINED).thenAllPathsFrom(AMENDMENT_DECLINED, CONFIRMED), + uc9_shipper_cancelBookingAmendment(CONFIRMED, AMENDMENT_CANCELLED), + uc10_carrier_declineBooking(AMENDMENT_DECLINED).thenHappyPathFrom(DECLINED), + uc13ShipperCancelConfirmedBooking(CONFIRMED, AMENDMENT_RECEIVED, CANCELLATION_RECEIVED).thenAllPathsFrom(CANCELLATION_RECEIVED, CONFIRMED, AMENDMENT_RECEIVED ) + ) ); case AMENDMENT_CONFIRMED -> then( shipperGetBooking(CONFIRMED,bookingState) @@ -339,7 +349,7 @@ private BookingScenarioListBuilder thenAllPathsFrom( .then(shipperGetBooking(CONFIRMED,bookingState)), uc5_carrier_confirmBookingRequest().thenHappyPathFrom(CONFIRMED), uc12_carrier_confirmBookingCompleted().then(shipperGetBooking(COMPLETED)), - uc13ShipperCancelConfirmedBooking().thenAllPathsFrom(CANCELLATION_RECEIVED, originalBookingState, AMENDMENT_CONFIRMED ) + uc13ShipperCancelConfirmedBooking(CONFIRMED, AMENDMENT_CONFIRMED, CANCELLATION_RECEIVED).thenAllPathsFrom(CANCELLATION_RECEIVED, originalBookingState, AMENDMENT_CONFIRMED ) ) ); case AMENDMENT_CANCELLED, AMENDMENT_DECLINED -> then( @@ -349,14 +359,14 @@ private BookingScenarioListBuilder thenAllPathsFrom( uc6_carrier_requestToAmendConfirmedBooking().thenHappyPathFrom(originalBookingState), auc_shipper_sendInvalidBookingAction(CANCEL_BOOKING_AMENDMENT) .then(shipperGetBooking(PENDING_AMENDMENT,bookingState)), - uc13ShipperCancelConfirmedBooking().thenAllPathsFrom(CANCELLATION_RECEIVED, PENDING_AMENDMENT, bookingState ) + uc13ShipperCancelConfirmedBooking(PENDING_AMENDMENT, bookingState, CANCELLATION_RECEIVED).thenAllPathsFrom(CANCELLATION_RECEIVED, PENDING_AMENDMENT, bookingState ) ): shipperGetBooking(CONFIRMED,bookingState).thenEither( noAction().thenHappyPathFrom(originalBookingState), uc5_carrier_confirmBookingRequest().thenHappyPathFrom(CONFIRMED), auc_shipper_sendInvalidBookingAction(CANCEL_BOOKING_AMENDMENT) .then(shipperGetBooking(CONFIRMED,bookingState)), - uc13ShipperCancelConfirmedBooking().thenAllPathsFrom(CANCELLATION_RECEIVED, CONFIRMED, bookingState ) + uc13ShipperCancelConfirmedBooking(CONFIRMED, bookingState, CANCELLATION_RECEIVED).thenAllPathsFrom(CANCELLATION_RECEIVED, CONFIRMED, bookingState ) ) ); }; @@ -366,8 +376,8 @@ private BookingScenarioListBuilder thenAllPathsFrom(BookingCancellationState can return switch (cancellationStatus) { case CANCELLATION_RECEIVED -> then ( shipperGetBooking(bookingStatus, amendedBookingStatus, CANCELLATION_RECEIVED).thenEither( - uc14CarrierBookingCancellationConfirmed().thenAllPathsFrom(CANCELLATION_CONFIRMED,bookingStatus,amendedBookingStatus), - uc14CarrierBookingCancellationDeclined().thenAllPathsFrom(CANCELLATION_DECLINED,bookingStatus,amendedBookingStatus)) + uc14CarrierBookingCancellationConfirmed(bookingStatus, amendedBookingStatus).thenAllPathsFrom(CANCELLATION_CONFIRMED, bookingStatus, amendedBookingStatus), + uc14CarrierBookingCancellationDeclined(bookingStatus, amendedBookingStatus).thenAllPathsFrom(CANCELLATION_DECLINED, bookingStatus, amendedBookingStatus)) ); case CANCELLATION_CONFIRMED -> then ( shipperGetBooking(bookingStatus, amendedBookingStatus, CANCELLATION_CONFIRMED)); @@ -396,13 +406,13 @@ private BookingScenarioListBuilder thenHappyPathFrom(BookingState bookingState, uc12_carrier_confirmBookingCompleted().thenHappyPathFrom(COMPLETED))); case PENDING_AMENDMENT -> then( shipperGetBooking(PENDING_AMENDMENT).then( - uc7_shipper_submitBookingAmendment().thenHappyPathFrom(AMENDMENT_RECEIVED,PENDING_AMENDMENT,scenarioType))); + uc7_shipper_submitBookingAmendment(PENDING_AMENDMENT, AMENDMENT_RECEIVED).thenHappyPathFrom(AMENDMENT_RECEIVED,PENDING_AMENDMENT,scenarioType))); case AMENDMENT_RECEIVED -> then( shipperGetBooking(originalBookingState,AMENDMENT_RECEIVED).then( - uc8a_carrier_approveBookingAmendment().thenHappyPathFrom(AMENDMENT_CONFIRMED,CONFIRMED,scenarioType))); + uc8a_carrier_approveBookingAmendment(CONFIRMED, AMENDMENT_CONFIRMED ).thenHappyPathFrom(AMENDMENT_CONFIRMED,CONFIRMED,scenarioType))); case PENDING_UPDATE -> then( shipperGetBooking(PENDING_UPDATE).then( - uc3_shipper_submitUpdatedBookingRequest().thenHappyPathFrom(UPDATE_RECEIVED, scenarioType))); + uc3_shipper_submitUpdatedBookingRequest(UPDATE_RECEIVED).thenHappyPathFrom(UPDATE_RECEIVED, scenarioType))); case UPDATE_RECEIVED -> then( shipperGetBooking(bookingState).thenEither( uc5_carrier_confirmBookingRequest().thenHappyPathFrom(CONFIRMED, scenarioType))); @@ -451,6 +461,8 @@ private static BookingScenarioListBuilder shipperGetBooking( return shipperGetBooking(expectedBookingStatus, expectedAmendedBookingStatus,null, false); } + + //TODO:: private static BookingScenarioListBuilder shipperGetBooking( BookingState expectedBookingStatus, BookingState expectedAmendedBookingStatus, BookingCancellationState bookingCancellationStatus) { return shipperGetBooking(expectedBookingStatus, expectedAmendedBookingStatus,null, false); @@ -485,7 +497,7 @@ private static BookingScenarioListBuilder uc1_shipper_SubmitBookingRequest() { shipperPartyName, (BookingAction) previousAction, componentFactory.getMessageSchemaValidator(BOOKING_API, CREATE_BOOKING_SCHEMA_NAME), - componentFactory.getMessageSchemaValidator(BOOKING_API, BOOKING_REF_STATUS_SCHEMA), + componentFactory.getMessageSchemaValidator(BOOKING_API, BOOKING_202_RESPONSE_SCHEMA), componentFactory.getMessageSchemaValidator( BOOKING_NOTIFICATIONS_API, BOOKING_NOTIFICATION_SCHEMA_NAME))); } @@ -509,7 +521,7 @@ private static BookingScenarioListBuilder uc2_carrier_requestUpdateToBookingRequ return carrierStateChange(UC2_Carrier_RequestUpdateToBookingRequestAction::new); } - private static BookingScenarioListBuilder uc3_shipper_submitUpdatedBookingRequest() { + private static BookingScenarioListBuilder uc3_shipper_submitUpdatedBookingRequest(BookingState expectedBookingState) { BookingComponentFactory componentFactory = threadLocalComponentFactory.get(); String carrierPartyName = threadLocalCarrierPartyName.get(); String shipperPartyName = threadLocalShipperPartyName.get(); @@ -519,8 +531,9 @@ private static BookingScenarioListBuilder uc3_shipper_submitUpdatedBookingReques carrierPartyName, shipperPartyName, (BookingAction) previousAction, + expectedBookingState, componentFactory.getMessageSchemaValidator(BOOKING_API, UPDATE_BOOKING_SCHEMA_NAME), - componentFactory.getMessageSchemaValidator(BOOKING_API, BOOKING_REF_STATUS_SCHEMA), + componentFactory.getMessageSchemaValidator(BOOKING_API, BOOKING_202_RESPONSE_SCHEMA), componentFactory.getMessageSchemaValidator( BOOKING_NOTIFICATIONS_API, BOOKING_NOTIFICATION_SCHEMA_NAME))); } @@ -537,7 +550,7 @@ private static BookingScenarioListBuilder uc6_carrier_requestToAmendConfirmedBoo return carrierStateChange(UC6_Carrier_RequestToAmendConfirmedBookingAction::new); } - private static BookingScenarioListBuilder uc7_shipper_submitBookingAmendment() { + private static BookingScenarioListBuilder uc7_shipper_submitBookingAmendment(BookingState bookingState, BookingState amendedBookingState) { BookingComponentFactory componentFactory = threadLocalComponentFactory.get(); String carrierPartyName = threadLocalCarrierPartyName.get(); String shipperPartyName = threadLocalShipperPartyName.get(); @@ -547,23 +560,25 @@ private static BookingScenarioListBuilder uc7_shipper_submitBookingAmendment() { carrierPartyName, shipperPartyName, (BookingAction) previousAction, + bookingState, + amendedBookingState, componentFactory.getMessageSchemaValidator(BOOKING_API, UPDATE_BOOKING_SCHEMA_NAME), - componentFactory.getMessageSchemaValidator(BOOKING_API, BOOKING_REF_STATUS_SCHEMA), + componentFactory.getMessageSchemaValidator(BOOKING_API, BOOKING_202_RESPONSE_SCHEMA), componentFactory.getMessageSchemaValidator( BOOKING_NOTIFICATIONS_API, BOOKING_NOTIFICATION_SCHEMA_NAME))); } - private static BookingScenarioListBuilder uc8a_carrier_approveBookingAmendment() { + private static BookingScenarioListBuilder uc8a_carrier_approveBookingAmendment(BookingState bookingStatus, BookingState amendedBookingStatus) { return carrierStateChange((carrierPartyName, shipperPartyName, previousAction, requestSchemaValidator) -> - new UC8_Carrier_ProcessAmendmentAction(carrierPartyName, shipperPartyName, previousAction, requestSchemaValidator, true)); + new UC8_Carrier_ProcessAmendmentAction(carrierPartyName, shipperPartyName, previousAction, bookingStatus, amendedBookingStatus, requestSchemaValidator, true)); } - private static BookingScenarioListBuilder uc8b_carrier_declineBookingAmendment() { + private static BookingScenarioListBuilder uc8b_carrier_declineBookingAmendment(BookingState bookingStatus, BookingState amendedBookingStatus) { return carrierStateChange((carrierPartyName, shipperPartyName, previousAction, requestSchemaValidator) -> - new UC8_Carrier_ProcessAmendmentAction(carrierPartyName, shipperPartyName, previousAction, requestSchemaValidator, false)); + new UC8_Carrier_ProcessAmendmentAction(carrierPartyName, shipperPartyName, previousAction, bookingStatus, amendedBookingStatus, requestSchemaValidator, false)); } - private static BookingScenarioListBuilder uc9_shipper_cancelBookingAmendment() { + private static BookingScenarioListBuilder uc9_shipper_cancelBookingAmendment(BookingState bookingStatus, BookingState amendedBookingStatus) { BookingComponentFactory componentFactory = threadLocalComponentFactory.get(); String carrierPartyName = threadLocalCarrierPartyName.get(); String shipperPartyName = threadLocalShipperPartyName.get(); @@ -573,23 +588,26 @@ private static BookingScenarioListBuilder uc9_shipper_cancelBookingAmendment() { carrierPartyName, shipperPartyName, (BookingAction) previousAction, + bookingStatus, + amendedBookingStatus, componentFactory.getMessageSchemaValidator(BOOKING_API, CANCEL_SCHEMA_NAME), componentFactory.getMessageSchemaValidator( - BOOKING_API, BOOKING_REF_STATUS_SCHEMA), + BOOKING_API, BOOKING_202_RESPONSE_SCHEMA), componentFactory.getMessageSchemaValidator( BOOKING_NOTIFICATIONS_API, BOOKING_NOTIFICATION_SCHEMA_NAME)) ); } - private static BookingScenarioListBuilder uc10_carrier_declineBooking() { - return carrierStateChange(UC10_Carrier_DeclineBookingAction::new); + private static BookingScenarioListBuilder uc10_carrier_declineBooking(BookingState amendedBookingStatus) { + return carrierStateChange((carrierPartyName, shipperPartyName, previousAction, requestSchemaValidator) -> + new UC10_Carrier_DeclineBookingAction(carrierPartyName, shipperPartyName, previousAction, amendedBookingStatus, requestSchemaValidator)); } private static BookingScenarioListBuilder uc12_carrier_confirmBookingCompleted() { return carrierStateChange(UC12_Carrier_ConfirmBookingCompletedAction::new); } - private static BookingScenarioListBuilder uc11_shipper_cancelBooking() { + private static BookingScenarioListBuilder uc11_shipper_cancelBooking(BookingState expectedBookingStatus) { BookingComponentFactory componentFactory = threadLocalComponentFactory.get(); String carrierPartyName = threadLocalCarrierPartyName.get(); String shipperPartyName = threadLocalShipperPartyName.get(); @@ -599,14 +617,15 @@ private static BookingScenarioListBuilder uc11_shipper_cancelBooking() { carrierPartyName, shipperPartyName, (BookingAction) previousAction, + expectedBookingStatus, componentFactory.getMessageSchemaValidator(BOOKING_API, CANCEL_SCHEMA_NAME), componentFactory.getMessageSchemaValidator( - BOOKING_API, BOOKING_REF_STATUS_SCHEMA), + BOOKING_API, BOOKING_202_RESPONSE_SCHEMA), componentFactory.getMessageSchemaValidator( BOOKING_NOTIFICATIONS_API, BOOKING_NOTIFICATION_SCHEMA_NAME))); } - private static BookingScenarioListBuilder uc13ShipperCancelConfirmedBooking() { + private static BookingScenarioListBuilder uc13ShipperCancelConfirmedBooking(BookingState bookingStatus, BookingState amendedBookingStatus, BookingCancellationState cancellationBookingStatus) { BookingComponentFactory componentFactory = threadLocalComponentFactory.get(); String carrierPartyName = threadLocalCarrierPartyName.get(); String shipperPartyName = threadLocalShipperPartyName.get(); @@ -616,21 +635,24 @@ private static BookingScenarioListBuilder uc13ShipperCancelConfirmedBooking() { carrierPartyName, shipperPartyName, (BookingAction) previousAction, + bookingStatus, + amendedBookingStatus, + cancellationBookingStatus, componentFactory.getMessageSchemaValidator(BOOKING_API, CANCEL_SCHEMA_NAME), componentFactory.getMessageSchemaValidator( - BOOKING_API, BOOKING_REF_STATUS_SCHEMA), + BOOKING_API, BOOKING_202_RESPONSE_SCHEMA), componentFactory.getMessageSchemaValidator( BOOKING_NOTIFICATIONS_API, BOOKING_NOTIFICATION_SCHEMA_NAME))); } - private static BookingScenarioListBuilder uc14CarrierBookingCancellationConfirmed() { + private static BookingScenarioListBuilder uc14CarrierBookingCancellationConfirmed(BookingState bookingStatus, BookingState amendedBookingStatus) { return carrierStateChange((carrierPartyName, shipperPartyName, previousAction, requestSchemaValidator) -> - new UC14CarrierProcessBookingCancellationAction(carrierPartyName, shipperPartyName, previousAction, requestSchemaValidator, true)); + new UC14CarrierProcessBookingCancellationAction(carrierPartyName, shipperPartyName, previousAction, bookingStatus, amendedBookingStatus, requestSchemaValidator, true)); } - private static BookingScenarioListBuilder uc14CarrierBookingCancellationDeclined() { + private static BookingScenarioListBuilder uc14CarrierBookingCancellationDeclined(BookingState bookingStatus, BookingState amendedBookingStatus) { return carrierStateChange((carrierPartyName, shipperPartyName, previousAction, requestSchemaValidator) -> - new UC14CarrierProcessBookingCancellationAction(carrierPartyName, shipperPartyName, previousAction, requestSchemaValidator, false)); + new UC14CarrierProcessBookingCancellationAction(carrierPartyName, shipperPartyName, previousAction, bookingStatus, amendedBookingStatus, requestSchemaValidator, false)); } private static BookingScenarioListBuilder auc_shipper_sendInvalidBookingAction(InvalidBookingMessageType invalidBookingMessageType) { diff --git a/booking/src/main/java/org/dcsa/conformance/standards/booking/action/BookingAction.java b/booking/src/main/java/org/dcsa/conformance/standards/booking/action/BookingAction.java index 85472527..155ac1c4 100644 --- a/booking/src/main/java/org/dcsa/conformance/standards/booking/action/BookingAction.java +++ b/booking/src/main/java/org/dcsa/conformance/standards/booking/action/BookingAction.java @@ -32,7 +32,7 @@ protected BookingAction( this.expectedStatus = expectedStatus; this.dspReference = previousAction == null - ? new OverwritingReference<>(null, new DynamicScenarioParameters(ScenarioType.REGULAR, null, null, null, null, null, null, null)) + ? new OverwritingReference<>(null, new DynamicScenarioParameters(ScenarioType.REGULAR, null, null, null, null)) : new OverwritingReference<>(previousAction.dspReference, null); } @@ -127,16 +127,10 @@ protected void updateDSPFromResponsePayload(ConformanceExchange exchange) { getCbrFromNotificationPayload(requestJsonNode) : responseJsonNode.path("carrierBookingReference").asText(null); var newCbrr = responseJsonNode.path("carrierBookingRequestReference").asText(null); - var newBookingStatus = parseBookingState(responseJsonNode.path("bookingStatus").asText(null)); - var newAmendedBookingStatus = parseBookingState(responseJsonNode.path("amendedBookingStatus").asText(null)); - var newBookingCancellationStatus = parseBookingCancellationState(responseJsonNode.path("bookingCancellationStatus").asText(null)); var updatedDsp = dsp; updatedDsp = updateIfNotNull(updatedDsp, newCbrr, updatedDsp::withCarrierBookingRequestReference); updatedDsp = updateIfNotNull(updatedDsp, newCbr, updatedDsp::withCarrierBookingReference); - updatedDsp = updateIfNotNull(updatedDsp, newBookingStatus, updatedDsp::withBookingStatus); - updatedDsp = updateIfNotNull(updatedDsp, newAmendedBookingStatus, updatedDsp::withAmendedBookingStatus); - updatedDsp = updateIfNotNull(updatedDsp, newBookingCancellationStatus, updatedDsp::withBookingCancellationStatus); updatedDsp = updateDSPFromBookingAction(exchange, updatedDsp); diff --git a/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC10_Carrier_DeclineBookingAction.java b/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC10_Carrier_DeclineBookingAction.java index 1ec8e8f8..5544267d 100644 --- a/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC10_Carrier_DeclineBookingAction.java +++ b/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC10_Carrier_DeclineBookingAction.java @@ -12,14 +12,17 @@ @Getter public class UC10_Carrier_DeclineBookingAction extends StateChangingBookingAction { private final JsonSchemaValidator requestSchemaValidator; + private final BookingState expectedAmendedBookingStatus; public UC10_Carrier_DeclineBookingAction( String carrierPartyName, String shipperPartyName, BookingAction previousAction, + BookingState expectedAmendedBookingStatus, JsonSchemaValidator requestSchemaValidator) { super(carrierPartyName, shipperPartyName, previousAction, "UC10", 204); this.requestSchemaValidator = requestSchemaValidator; + this.expectedAmendedBookingStatus = expectedAmendedBookingStatus; } @Override @@ -53,7 +56,7 @@ protected Stream createSubChecks() { new CarrierBookingNotificationDataPayloadRequestConformanceCheck( getMatchedExchangeUuid(), BookingState.DECLINED, - dsp.amendedBookingStatus() != null ? BookingState.AMENDMENT_DECLINED : null), + expectedAmendedBookingStatus), ApiHeaderCheck.createNotificationCheck( BookingRole::isCarrier, getMatchedExchangeUuid(), diff --git a/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC11_Shipper_CancelBookingRequestAction.java b/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC11_Shipper_CancelBookingRequestAction.java index 66d2a058..b5146523 100644 --- a/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC11_Shipper_CancelBookingRequestAction.java +++ b/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC11_Shipper_CancelBookingRequestAction.java @@ -18,18 +18,21 @@ public class UC11_Shipper_CancelBookingRequestAction extends StateChangingBookin private final JsonSchemaValidator requestSchemaValidator; private final JsonSchemaValidator responseSchemaValidator; private final JsonSchemaValidator notificationSchemaValidator; + private final BookingState expectedBookingStatus; public UC11_Shipper_CancelBookingRequestAction( String carrierPartyName, String shipperPartyName, BookingAction previousAction, + BookingState expectedBookingStatus, JsonSchemaValidator requestSchemaValidator, JsonSchemaValidator responseSchemaValidator, JsonSchemaValidator notificationSchemaValidator) { - super(shipperPartyName, carrierPartyName, previousAction, "UC11", 200); + super(shipperPartyName, carrierPartyName, previousAction, "UC11", 202); this.requestSchemaValidator = requestSchemaValidator; this.responseSchemaValidator = responseSchemaValidator; this.notificationSchemaValidator = notificationSchemaValidator; + this.expectedBookingStatus = expectedBookingStatus; } @Override @@ -63,15 +66,7 @@ protected Stream createSubChecks() { String cbrr = dsp.carrierBookingRequestReference(); return Stream.concat( Stream.concat(createPrimarySubChecks("PATCH", expectedApiVersion, "/v2/bookings/%s".formatted(cbrr)), - Stream.of(new CarrierBookingRefStatusPayloadResponseConformanceCheck( - getMatchedExchangeUuid(), - BookingState.CANCELLED - ), - new JsonSchemaCheck( - BookingRole::isCarrier, - getMatchedExchangeUuid(), - HttpMessageType.RESPONSE, - responseSchemaValidator), + Stream.of( new JsonSchemaCheck( BookingRole::isShipper, getMatchedExchangeUuid(), @@ -80,7 +75,7 @@ protected Stream createSubChecks() { getNotificationChecks( expectedApiVersion, notificationSchemaValidator, - BookingState.CANCELLED, + expectedBookingStatus, null)); } }; diff --git a/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC13ShipperCancelConfirmedBookingAction.java b/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC13ShipperCancelConfirmedBookingAction.java index 8e73a508..aecdc57b 100644 --- a/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC13ShipperCancelConfirmedBookingAction.java +++ b/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC13ShipperCancelConfirmedBookingAction.java @@ -8,7 +8,9 @@ import org.dcsa.conformance.core.traffic.ConformanceExchange; import org.dcsa.conformance.core.traffic.HttpMessageType; import org.dcsa.conformance.standards.booking.checks.CarrierBookingRefStatusPayloadResponseConformanceCheck; +import org.dcsa.conformance.standards.booking.party.BookingCancellationState; import org.dcsa.conformance.standards.booking.party.BookingRole; +import org.dcsa.conformance.standards.booking.party.BookingState; import org.dcsa.conformance.standards.booking.party.DynamicScenarioParameters; import java.util.Objects; @@ -20,18 +22,27 @@ public class UC13ShipperCancelConfirmedBookingAction extends StateChangingBookin private final JsonSchemaValidator requestSchemaValidator; private final JsonSchemaValidator responseSchemaValidator; private final JsonSchemaValidator notificationSchemaValidator; + private final BookingState expectedBookingStatus; + private final BookingState expectedAmendedBookingStatus; + private final BookingCancellationState expectedBookingCancellationStatus; public UC13ShipperCancelConfirmedBookingAction( String carrierPartyName, String shipperPartyName, BookingAction previousAction, + BookingState expectedBookingStatus, + BookingState expectedAmendedBookingStatus, + BookingCancellationState expectedBookingCancellationStatus, JsonSchemaValidator requestSchemaValidator, JsonSchemaValidator responseSchemaValidator, JsonSchemaValidator notificationSchemaValidator) { - super(shipperPartyName, carrierPartyName, previousAction, "UC13", 200); + super(shipperPartyName, carrierPartyName, previousAction, "UC13", 202); this.requestSchemaValidator = requestSchemaValidator; this.responseSchemaValidator = responseSchemaValidator; this.notificationSchemaValidator = notificationSchemaValidator; + this.expectedBookingStatus = expectedBookingStatus; + this.expectedAmendedBookingStatus = expectedAmendedBookingStatus; + this.expectedBookingCancellationStatus = expectedBookingCancellationStatus; } @Override @@ -69,28 +80,14 @@ public ConformanceCheck createCheck(String expectedApiVersion) { protected Stream createSubChecks() { var dsp = getDspSupplier().get(); String cbr = dsp.carrierBookingReference(); - var expectedBookingStatus = getDspSupplier().get().bookingStatus(); - var expectedAmendedBookingStatus = getDspSupplier().get().amendedBookingStatus(); - var expectedBookingCancellationStatus = getDspSupplier().get().bookingCancellationStatus(); return Stream.concat( Stream.concat(createPrimarySubChecks("PATCH",expectedApiVersion,"/v2/bookings/%s".formatted(cbr)), Stream.of( - expectedBookingStatus == null ? null: new CarrierBookingRefStatusPayloadResponseConformanceCheck( - getMatchedExchangeUuid(), - expectedBookingStatus, - expectedAmendedBookingStatus, - expectedBookingCancellationStatus - ), new JsonSchemaCheck( BookingRole::isShipper, getMatchedExchangeUuid(), HttpMessageType.REQUEST, - requestSchemaValidator), - new JsonSchemaCheck( - BookingRole::isCarrier, - getMatchedExchangeUuid(), - HttpMessageType.RESPONSE, - responseSchemaValidator)).filter(Objects::nonNull)), + requestSchemaValidator))), expectedBookingStatus != null ? getNotificationChecks( expectedApiVersion, notificationSchemaValidator, diff --git a/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC14CarrierProcessBookingCancellationAction.java b/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC14CarrierProcessBookingCancellationAction.java index a798bdba..fb662de8 100644 --- a/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC14CarrierProcessBookingCancellationAction.java +++ b/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC14CarrierProcessBookingCancellationAction.java @@ -7,6 +7,7 @@ import org.dcsa.conformance.standards.booking.checks.CarrierBookingNotificationDataPayloadRequestConformanceCheck; import org.dcsa.conformance.standards.booking.party.BookingCancellationState; import org.dcsa.conformance.standards.booking.party.BookingRole; +import org.dcsa.conformance.standards.booking.party.BookingState; import java.util.Objects; import java.util.stream.Stream; @@ -15,16 +16,22 @@ public class UC14CarrierProcessBookingCancellationAction extends StateChangingBookingAction { private final JsonSchemaValidator requestSchemaValidator; private final boolean isCancellationConfirmed; + private final BookingState expectedBookingStatus; + private final BookingState expectedAmendedBookingStatus; public UC14CarrierProcessBookingCancellationAction( String carrierPartyName, String shipperPartyName, BookingAction previousAction, + BookingState expectedBookingStatus, + BookingState expectedAmendedBookingStatus, JsonSchemaValidator requestSchemaValidator, boolean isCancellationConfirmed) { super(carrierPartyName, shipperPartyName, previousAction, "UC14", 204); this.requestSchemaValidator = requestSchemaValidator; this.isCancellationConfirmed = isCancellationConfirmed; + this.expectedBookingStatus = expectedBookingStatus; + this.expectedAmendedBookingStatus = expectedAmendedBookingStatus; } @Override @@ -48,21 +55,18 @@ public ConformanceCheck createCheck(String expectedApiVersion) { return new ConformanceCheck(getActionTitle()) { @Override protected Stream createSubChecks() { - var dsp = getDspSupplier().get(); - var bookingStatus = dsp.bookingStatus(); - var amendedBookingStatus = dsp.amendedBookingStatus(); - var isCancelled = isCancellationConfirmed ? + var cancelledStatus = isCancellationConfirmed ? BookingCancellationState.CANCELLATION_CONFIRMED : BookingCancellationState.CANCELLATION_DECLINED; return Stream.of( new UrlPathCheck( BookingRole::isCarrier, getMatchedExchangeUuid(), "/v2/booking-notifications"), new ResponseStatusCheck( BookingRole::isShipper, getMatchedExchangeUuid(), expectedStatus), - bookingStatus == null ? null: new CarrierBookingNotificationDataPayloadRequestConformanceCheck( + new CarrierBookingNotificationDataPayloadRequestConformanceCheck( getMatchedExchangeUuid(), - bookingStatus, - amendedBookingStatus, - isCancelled), + expectedBookingStatus, + expectedAmendedBookingStatus, + cancelledStatus), ApiHeaderCheck.createNotificationCheck( BookingRole::isCarrier, getMatchedExchangeUuid(), diff --git a/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC1_Shipper_SubmitBookingRequestAction.java b/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC1_Shipper_SubmitBookingRequestAction.java index 582d6234..d067a32b 100644 --- a/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC1_Shipper_SubmitBookingRequestAction.java +++ b/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC1_Shipper_SubmitBookingRequestAction.java @@ -28,7 +28,7 @@ public UC1_Shipper_SubmitBookingRequestAction( JsonSchemaValidator requestSchemaValidator, JsonSchemaValidator responseSchemaValidator, JsonSchemaValidator notificationSchemaValidator) { - super(shipperPartyName, carrierPartyName, previousAction, "UC1", 201); + super(shipperPartyName, carrierPartyName, previousAction, "UC1", 202); this.requestSchemaValidator = requestSchemaValidator; this.responseSchemaValidator = responseSchemaValidator; this.notificationSchemaValidator = notificationSchemaValidator; @@ -63,24 +63,14 @@ public ConformanceCheck createCheck(String expectedApiVersion) { return new ConformanceCheck(getActionTitle()) { @Override protected Stream createSubChecks() { - return Stream.concat( Stream.of( - new CarrierBookingRefStatusPayloadResponseConformanceCheck( - getMatchedExchangeUuid(), - BookingState.RECEIVED - ), BookingChecks.requestContentChecks(getMatchedExchangeUuid(), expectedApiVersion, getCspSupplier(), getDspSupplier()), new JsonSchemaCheck( BookingRole::isShipper, getMatchedExchangeUuid(), HttpMessageType.REQUEST, - requestSchemaValidator), - new JsonSchemaCheck( - BookingRole::isCarrier, - getMatchedExchangeUuid(), - HttpMessageType.RESPONSE, - responseSchemaValidator)), + requestSchemaValidator)), Stream.concat(createPrimarySubChecks("POST", expectedApiVersion, "/v2/bookings"), getNotificationChecks( expectedApiVersion, diff --git a/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC3_Shipper_SubmitUpdatedBookingRequestAction.java b/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC3_Shipper_SubmitUpdatedBookingRequestAction.java index bfb611b7..5b5b1897 100644 --- a/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC3_Shipper_SubmitUpdatedBookingRequestAction.java +++ b/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC3_Shipper_SubmitUpdatedBookingRequestAction.java @@ -18,18 +18,21 @@ public class UC3_Shipper_SubmitUpdatedBookingRequestAction extends StateChanging private final JsonSchemaValidator requestSchemaValidator; private final JsonSchemaValidator responseSchemaValidator; private final JsonSchemaValidator notificationSchemaValidator; + private final BookingState expectedBookingState; public UC3_Shipper_SubmitUpdatedBookingRequestAction( String carrierPartyName, String shipperPartyName, BookingAction previousAction, + BookingState expectedBookingState, JsonSchemaValidator requestSchemaValidator, JsonSchemaValidator responseSchemaValidator, JsonSchemaValidator notificationSchemaValidator) { - super(shipperPartyName, carrierPartyName, previousAction, "UC3", 200); + super(shipperPartyName, carrierPartyName, previousAction, "UC3", 202); this.requestSchemaValidator = requestSchemaValidator; this.responseSchemaValidator = responseSchemaValidator; this.notificationSchemaValidator = notificationSchemaValidator; + this.expectedBookingState = expectedBookingState; } @Override @@ -68,18 +71,13 @@ protected Stream createSubChecks() { getMatchedExchangeUuid(), HttpMessageType.REQUEST, requestSchemaValidator), - new JsonSchemaCheck( - BookingRole::isCarrier, - getMatchedExchangeUuid(), - HttpMessageType.RESPONSE, - responseSchemaValidator), BookingChecks.requestContentChecks(getMatchedExchangeUuid(),expectedApiVersion, getCspSupplier(), getDspSupplier())), Stream.concat( createPrimarySubChecks("PUT", expectedApiVersion, "/v2/bookings/%s".formatted(cbrr)), getNotificationChecks( expectedApiVersion, notificationSchemaValidator, - BookingState.UPDATE_RECEIVED, + expectedBookingState, null))); } }; diff --git a/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC7_Shipper_SubmitBookingAmendment.java b/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC7_Shipper_SubmitBookingAmendment.java index ffba5f2c..b02b91d0 100644 --- a/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC7_Shipper_SubmitBookingAmendment.java +++ b/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC7_Shipper_SubmitBookingAmendment.java @@ -20,18 +20,24 @@ public class UC7_Shipper_SubmitBookingAmendment extends StateChangingBookingActi private final JsonSchemaValidator requestSchemaValidator; private final JsonSchemaValidator responseSchemaValidator; private final JsonSchemaValidator notificationSchemaValidator; + private final BookingState expectedBookingStatus; + private final BookingState expectedAmendedBookingStatus; public UC7_Shipper_SubmitBookingAmendment( String carrierPartyName, String shipperPartyName, BookingAction previousAction, + BookingState expectedBookingStatus, + BookingState expectedAmendedBookingStatus, JsonSchemaValidator requestSchemaValidator, JsonSchemaValidator responseSchemaValidator, JsonSchemaValidator notificationSchemaValidator) { - super(shipperPartyName, carrierPartyName, previousAction, "UC7", 200); + super(shipperPartyName, carrierPartyName, previousAction, "UC7", 202); this.requestSchemaValidator = requestSchemaValidator; this.responseSchemaValidator = responseSchemaValidator; this.notificationSchemaValidator = notificationSchemaValidator; + this.expectedBookingStatus = expectedBookingStatus; + this.expectedAmendedBookingStatus = expectedAmendedBookingStatus; } @Override @@ -65,29 +71,19 @@ public ConformanceCheck createCheck(String expectedApiVersion) { protected Stream createSubChecks() { var dsp = getDspSupplier().get(); String reference = dsp.carrierBookingReference() != null ? dsp.carrierBookingReference() : dsp.carrierBookingRequestReference(); - var expectedBookingStatus = dsp.bookingStatus(); return Stream.concat( Stream.concat( createPrimarySubChecks("PUT", expectedApiVersion, "/v2/bookings/%s".formatted(reference)), - Stream.of(new CarrierBookingRefStatusPayloadResponseConformanceCheck( - getMatchedExchangeUuid(), - expectedBookingStatus, - BookingState.AMENDMENT_RECEIVED - ), + Stream.of( new JsonSchemaCheck( BookingRole::isShipper, getMatchedExchangeUuid(), HttpMessageType.REQUEST, - requestSchemaValidator), - new JsonSchemaCheck( - BookingRole::isCarrier, - getMatchedExchangeUuid(), - HttpMessageType.RESPONSE, - responseSchemaValidator))), + requestSchemaValidator))), getNotificationChecks( expectedApiVersion, notificationSchemaValidator, expectedBookingStatus, - BookingState.AMENDMENT_RECEIVED)); + expectedAmendedBookingStatus)); } }; } diff --git a/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC8_Carrier_ProcessAmendmentAction.java b/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC8_Carrier_ProcessAmendmentAction.java index 86a287c7..2713ed98 100644 --- a/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC8_Carrier_ProcessAmendmentAction.java +++ b/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC8_Carrier_ProcessAmendmentAction.java @@ -12,6 +12,8 @@ @Getter public class UC8_Carrier_ProcessAmendmentAction extends StateChangingBookingAction { private final JsonSchemaValidator requestSchemaValidator; + private final BookingState expectedBookingStatus; + private final BookingState expectedAmendedBookingStatus; private final boolean acceptAmendment; @@ -19,6 +21,8 @@ public UC8_Carrier_ProcessAmendmentAction( String carrierPartyName, String shipperPartyName, BookingAction previousAction, + BookingState expectedBookingStatus, + BookingState expectedAmendedBookingStatus, JsonSchemaValidator requestSchemaValidator, boolean acceptAmendment) { super( @@ -29,6 +33,8 @@ public UC8_Carrier_ProcessAmendmentAction( 204); this.requestSchemaValidator = requestSchemaValidator; this.acceptAmendment = acceptAmendment; + this.expectedBookingStatus = expectedBookingStatus; + this.expectedAmendedBookingStatus = expectedAmendedBookingStatus; } @Override @@ -54,8 +60,6 @@ public ConformanceCheck createCheck(String expectedApiVersion) { return new ConformanceCheck(getActionTitle()) { @Override protected Stream createSubChecks() { - var dsp = getDspSupplier().get(); - var bookingStatus = dsp.bookingStatus(); return Stream.of( new UrlPathCheck( BookingRole::isCarrier, getMatchedExchangeUuid(), "/v2/booking-notifications"), @@ -63,10 +67,8 @@ protected Stream createSubChecks() { BookingRole::isShipper, getMatchedExchangeUuid(), expectedStatus), new CarrierBookingNotificationDataPayloadRequestConformanceCheck( getMatchedExchangeUuid(), - acceptAmendment ? BookingState.CONFIRMED : bookingStatus, - acceptAmendment - ? BookingState.AMENDMENT_CONFIRMED - : BookingState.AMENDMENT_DECLINED), + expectedBookingStatus, + expectedAmendedBookingStatus), ApiHeaderCheck.createNotificationCheck( BookingRole::isCarrier, getMatchedExchangeUuid(), diff --git a/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC9_Shipper_CancelBookingAmendment.java b/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC9_Shipper_CancelBookingAmendment.java index 461771fa..187eb1ae 100644 --- a/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC9_Shipper_CancelBookingAmendment.java +++ b/booking/src/main/java/org/dcsa/conformance/standards/booking/action/UC9_Shipper_CancelBookingAmendment.java @@ -17,18 +17,24 @@ public class UC9_Shipper_CancelBookingAmendment extends StateChangingBookingActi private final JsonSchemaValidator requestSchemaValidator; private final JsonSchemaValidator responseSchemaValidator; private final JsonSchemaValidator notificationSchemaValidator; + private final BookingState expectedBookingStatus; + private final BookingState expectedAmendedBookingStatus; public UC9_Shipper_CancelBookingAmendment( String carrierPartyName, String shipperPartyName, BookingAction previousAction, + BookingState expectedBookingStatus, + BookingState expectedAmendedBookingStatus, JsonSchemaValidator requestSchemaValidator, JsonSchemaValidator responseSchemaValidator, JsonSchemaValidator notificationSchemaValidator) { - super(shipperPartyName, carrierPartyName, previousAction, "UC9", 200); + super(shipperPartyName, carrierPartyName, previousAction, "UC9", 202); this.requestSchemaValidator = requestSchemaValidator; this.responseSchemaValidator = responseSchemaValidator; this.notificationSchemaValidator = notificationSchemaValidator; + this.expectedBookingStatus = expectedBookingStatus; + this.expectedAmendedBookingStatus = expectedAmendedBookingStatus; } @Override @@ -56,28 +62,19 @@ public ConformanceCheck createCheck(String expectedApiVersion) { protected Stream createSubChecks() { var dsp = getDspSupplier().get(); String reference = dsp.carrierBookingReference() != null ? dsp.carrierBookingReference() : dsp.carrierBookingRequestReference(); - var expectedBookingStatus = getDspSupplier().get().bookingStatus(); return Stream.concat( Stream.concat(createPrimarySubChecks("PATCH", expectedApiVersion, "/v2/bookings/%s".formatted(reference)), - Stream.of(new CarrierBookingRefStatusPayloadResponseConformanceCheck( - getMatchedExchangeUuid(), - expectedBookingStatus, - BookingState.AMENDMENT_CANCELLED), + Stream.of( new JsonSchemaCheck( BookingRole::isShipper, getMatchedExchangeUuid(), HttpMessageType.REQUEST, - requestSchemaValidator), - new JsonSchemaCheck( - BookingRole::isCarrier, - getMatchedExchangeUuid(), - HttpMessageType.RESPONSE, - responseSchemaValidator))), + requestSchemaValidator))), getNotificationChecks( expectedApiVersion, notificationSchemaValidator, expectedBookingStatus, - BookingState.AMENDMENT_CANCELLED)); + expectedAmendedBookingStatus)); } }; } diff --git a/booking/src/main/java/org/dcsa/conformance/standards/booking/party/BookingCarrier.java b/booking/src/main/java/org/dcsa/conformance/standards/booking/party/BookingCarrier.java index ffa29f63..d7271e1c 100644 --- a/booking/src/main/java/org/dcsa/conformance/standards/booking/party/BookingCarrier.java +++ b/booking/src/main/java/org/dcsa/conformance/standards/booking/party/BookingCarrier.java @@ -504,7 +504,7 @@ private ConformanceResponse _handlePutBookingRequest(ConformanceRequest request) .subscriptionReference(persistableCarrierBooking.getSubscriptionReference()) .build() .asJsonNode()); - return returnBookingStatusResponse(200, request, booking, cbrr); + return returnEmpty202Response( request, booking, cbrr); } private ConformanceResponse _handlePatchBookingRequest(ConformanceRequest request) { @@ -551,46 +551,46 @@ private ConformanceResponse _handlePatchBookingRequest(ConformanceRequest reques .build() .asJsonNode()); - return returnBookingStatusResponse( - 200, request, persistableCarrierBooking.getBooking(), bookingReference); + return returnEmpty202Response( + request, persistableCarrierBooking.getBooking(), bookingReference); } - private ConformanceResponse returnBookingStatusResponse( - int responseCode, ConformanceRequest request, ObjectNode booking, String bookingReference) { + private ConformanceResponse returnBookingCBRRResponse(ConformanceRequest request, ObjectNode booking, String bookingReference) { var cbrr = booking.get(CARRIER_BOOKING_REQUEST_REFERENCE).asText(); var bookingStatus = booking.get("bookingStatus").asText(); var statusObject = - OBJECT_MAPPER - .createObjectNode() - .put("bookingStatus", bookingStatus) - .put(CARRIER_BOOKING_REQUEST_REFERENCE, cbrr); - var cbr = booking.get(CARRIER_BOOKING_REFERENCE); - var amendedBookingStatus = booking.get("amendedBookingStatus"); - var bookingCancellationStatus = booking.get(BOOKING_CANCELLATION_STATUS); + OBJECT_MAPPER + .createObjectNode() + .put(CARRIER_BOOKING_REQUEST_REFERENCE, cbrr); var reason = booking.get("reason"); - if (cbr != null) { - statusObject.set(CARRIER_BOOKING_REFERENCE, cbr); - } - if (amendedBookingStatus != null) { - statusObject.set("amendedBookingStatus", amendedBookingStatus); - } - if (bookingCancellationStatus != null) { - statusObject.set(BOOKING_CANCELLATION_STATUS, bookingCancellationStatus); - } if (reason != null) { statusObject.set("reason", reason); } ConformanceResponse response = - request.createResponse( - responseCode, - Map.of("Api-Version", List.of(apiVersion)), - new ConformanceMessageBody(statusObject)); + request.createResponse( + 202, + Map.of("Api-Version", List.of(apiVersion)), + new ConformanceMessageBody(statusObject)); + addOperatorLogEntry( + "Responded %d to %s booking '%s' (resulting state '%s')" + .formatted(202, request.method(), bookingReference, bookingStatus)); + return response; + } + + private ConformanceResponse returnEmpty202Response(ConformanceRequest request, ObjectNode booking, String bookingReference) { + var bookingStatus = booking.get("bookingStatus").asText(); + ConformanceResponse response = + request.createResponse( + 202, + Map.of("Api-Version", List.of(apiVersion)), + new ConformanceMessageBody("")); addOperatorLogEntry( - "Responded %d to %s booking '%s' (resulting state '%s')" - .formatted(responseCode, request.method(), bookingReference, bookingStatus)); + "Responded %d to %s booking '%s' (resulting state '%s')" + .formatted(202, request.method(), bookingReference, bookingStatus)); return response; } + private ConformanceResponse _handleGetBookingRequest(ConformanceRequest request) { var amendedContentRaw = readAmendedContent(request); boolean amendedContent; @@ -651,8 +651,7 @@ private ConformanceResponse _handlePostBookingRequest(ConformanceRequest request .build() .asJsonNode()); - return returnBookingStatusResponse( - 201, + return returnBookingCBRRResponse( request, bookingRequestPayload, persistableCarrierBooking.getCarrierBookingRequestReference()); diff --git a/booking/src/main/java/org/dcsa/conformance/standards/booking/party/DynamicScenarioParameters.java b/booking/src/main/java/org/dcsa/conformance/standards/booking/party/DynamicScenarioParameters.java index d38b9c51..924a6b03 100644 --- a/booking/src/main/java/org/dcsa/conformance/standards/booking/party/DynamicScenarioParameters.java +++ b/booking/src/main/java/org/dcsa/conformance/standards/booking/party/DynamicScenarioParameters.java @@ -15,9 +15,6 @@ public record DynamicScenarioParameters( ScenarioType scenarioType, String carrierBookingRequestReference, String carrierBookingReference, - BookingState bookingStatus, - BookingState amendedBookingStatus, - BookingCancellationState bookingCancellationStatus, JsonNode booking, JsonNode updatedBooking ) { @@ -30,15 +27,6 @@ public ObjectNode toJson() { if (carrierBookingReference != null) { dspNode.put("carrierBookingReference", carrierBookingReference); } - if (bookingStatus != null) { - dspNode.put("bookingStatus", bookingStatus.name()); - } - if (amendedBookingStatus != null) { - dspNode.put("amendedBookingStatus", amendedBookingStatus.name()); - } - if (bookingCancellationStatus != null) { - dspNode.put("bookingCancellationStatus", bookingCancellationStatus.name()); - } if (booking != null) { dspNode.replace("booking", booking); } @@ -75,9 +63,6 @@ public static DynamicScenarioParameters fromJson(JsonNode jsonNode) { readEnum(jsonNode.required("scenarioType").asText(), ScenarioType::valueOf), dspNode.path("carrierBookingRequestReference").asText(null), dspNode.path("carrierBookingReference").asText(null), - bookingState(dspNode.path("bookingStatus").asText(null)), - bookingState(dspNode.path("amendedBookingStatus").asText(null)), - bookingCancellationState(dspNode.path("bookingCancellationStatus").asText(null)), dspNode.path("booking"), dspNode.path("updatedBooking") ); From 8e81bf0d909fadbb8e8cd113da4554d8ec6adcb7 Mon Sep 17 00:00:00 2001 From: preetamnpr <128618622+preetamnpr@users.noreply.github.com> Date: Fri, 27 Sep 2024 17:22:51 +0200 Subject: [PATCH 5/5] DT-1504 fixed an error --- .../standards/booking/BookingScenarioListBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/booking/src/main/java/org/dcsa/conformance/standards/booking/BookingScenarioListBuilder.java b/booking/src/main/java/org/dcsa/conformance/standards/booking/BookingScenarioListBuilder.java index f2462f47..813f122f 100644 --- a/booking/src/main/java/org/dcsa/conformance/standards/booking/BookingScenarioListBuilder.java +++ b/booking/src/main/java/org/dcsa/conformance/standards/booking/BookingScenarioListBuilder.java @@ -143,7 +143,7 @@ private static LinkedHashMap createConforman .then( shipperGetBooking( COMPLETED)))))), - uc10_carrier_declineBooking(AMENDMENT_DECLINED) + uc10_carrier_declineBooking(null) .then(shipperGetBooking(DECLINED)), uc12_carrier_confirmBookingCompleted() .then(shipperGetBooking(COMPLETED)))),