Skip to content

Sd 2890 align on names#634

Open
HenrikHL wants to merge 6 commits into
masterfrom
SD-2890_Align-on-names
Open

Sd 2890 align on names#634
HenrikHL wants to merge 6 commits into
masterfrom
SD-2890_Align-on-names

Conversation

@HenrikHL
Copy link
Copy Markdown
Contributor

@HenrikHL HenrikHL commented May 21, 2026

SD-2890: Consider changing Shipper/Carrier to Consumer/Provider

  • In ISS, SUR and END don't use consumer and provider - use "carrier" and "eBL Solution Provider" explicitly
  • In all BKG and eBL endPoints refer to consumer and provider (and not *shipper and carrier)
  • In all properties refer to shipper and carrier (and not consumer and provider)
    • Keep provider in properties if referring to the implementation
  • make sure all references (in the middle of a sentence) to shipper and carrier (and consumer and provider) are with small start letter (not Shipper, Carrier, Consumer and Provider)

@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Align on consumer/provider terminology and add eBL Endorsement Chain API

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Align terminology: replace "carrier/shipper" with "consumer/provider" in BKG and eBL endpoints
• Add new eBL Endorsement Chain API (END) with full OpenAPI specification
• Add Transport Document Replacements metadata to correlate related documents
• Standardize capitalization: use lowercase for mid-sentence references to roles
• Update property descriptions for consistency and clarity
Diagram
flowchart LR
  A["Terminology Alignment"] --> B["Replace Shipper/Carrier<br/>with Consumer/Provider"]
  A --> C["Lowercase mid-sentence<br/>role references"]
  D["New eBL END API"] --> E["Endorsement Chain<br/>endpoints"]
  F["Transport Document<br/>Metadata"] --> G["Add Replacements<br/>object"]
  B --> H["BKG v2.0.5"]
  B --> I["EBL v3.0.4"]
  E --> J["EBL_END_v3.0.4"]
  G --> K["EBL_ISS_v3.0.4"]

Loading

File Changes

1. ebl/v3/endorsement/EBL_END_v3.0.4.yaml ✨ Enhancement +908/-0

New eBL Endorsement Chain API specification

• New file: Complete OpenAPI 3.0.3 specification for eBL Endorsement Chain API
• Defines GET endpoint for retrieving endorsement chains by transportDocumentReference
• Includes comprehensive schema definitions for endorsement chain links, actor/recipient parties,
 and error responses
• Provides detailed examples of surrendered B/L, on-behalf-of parties, and multiple endorsement
 chains

ebl/v3/endorsement/EBL_END_v3.0.4.yaml


2. ebl/v3/EBL_v3.0.4.yaml ✨ Enhancement +37/-37

Align terminology to consumer/provider and lowercase conventions

• Replace "carrier" with "provider" in API description and endpoint documentation
• Change "shipper" to "consumer" in preconditions and operation descriptions
• Update status descriptions: use lowercase "shipper" and "carrier" for mid-sentence references
• Standardize property descriptions: replace "Shipper/Carrier" with "shipper/carrier" in lowercase
• Fix example text: change "Carrier" to "carrier" in received-for-shipment clause

ebl/v3/EBL_v3.0.4.yaml


3. bkg/v2/BKG_v2.0.5.yaml ✨ Enhancement +20/-20

Align terminology to consumer/provider and lowercase conventions

• Replace "carrier" with "provider" in API description
• Change "shipper" to "consumer" in cancellation endpoint description
• Update status enum descriptions: use lowercase "shipper" and "carrier" for mid-sentence references
• Standardize property descriptions: replace "Shipper" with "shipper" in lowercase throughout
• Fix code list provider description formatting

bkg/v2/BKG_v2.0.5.yaml


View more (3)
4. ebl/v3/issuance/EBL_ISS_v3.0.4.yaml ✨ Enhancement +60/-4

Add Transport Document Replacements metadata and align terminology

• Add new TransportDocumentReplacements schema to track document relationships
• Add TransportDocumentRelation schema to link transport documents with optional sub-references
• Include new property in IssuanceManifest to reference TransportDocumentReplacements
• Update status descriptions: use lowercase "shipper" and "carrier" for mid-sentence references
• Fix example text: change "Carrier" to "carrier" in received-for-shipment clause
• Fix code list provider description formatting

ebl/v3/issuance/EBL_ISS_v3.0.4.yaml


5. pint/v3/EBL_PINT_v3.0.0.yaml ✨ Enhancement +4/-4

Align terminology to lowercase conventions and fix formatting

• Update status descriptions: use lowercase "shipper" and "carrier" for mid-sentence references
• Fix example text: change "Carrier" to "carrier" in received-for-shipment clause
• Fix code list provider description formatting with backticks

pint/v3/EBL_PINT_v3.0.0.yaml


6. .stoplight/styleguide.json Additional files +1/-1

...

.stoplight/styleguide.json


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review Bot commented May 21, 2026

Code Review by Qodo

🐞 Bugs (3) 📘 Rule violations (0) 📎 Requirement gaps (0)

Context used
✅ Tickets: SD-2890

Grey Divider


Action required

1. Empty replacements object allowed 🐞 Bug ≡ Correctness
Description
TransportDocumentReplacements allows an empty object or empty arrays even though its description
says it links the issued document to “one or more” transport documents, so meaningless payloads will
validate against the schema.
Code

ebl/v3/issuance/EBL_ISS_v3.0.4.yaml[R495-523]

Evidence
The schema text explicitly states “one or more”, but the added schema defines arrays without
minItems and does not require either array, allowing {} or empty lists. The same file
demonstrates the established pattern of using minItems: 1 when an array must be non-empty.

ebl/v3/issuance/EBL_ISS_v3.0.4.yaml[495-523]
ebl/v3/issuance/EBL_ISS_v3.0.4.yaml[498-505]
ebl/v3/issuance/EBL_ISS_v3.0.4.yaml[405-411]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The new `TransportDocumentReplacements` schema describes linking an issued Transport Document to **one or more** other Transport Documents, but the schema permits `{}` and/or empty arrays because there are no `minItems` constraints and no requirement that at least one of the two arrays is present.

### Issue Context
This repo already uses `minItems: 1` on arrays when empty arrays should not be allowed (e.g., `ErrorResponse.errors`). `TransportDocumentReplacements` should similarly prevent semantically-empty payloads.

### Fix Focus Areas
- ebl/v3/issuance/EBL_ISS_v3.0.4.yaml[495-524]

### What to change
- Add `minItems: 1` to `oldTransportDocumentReferences` and `newTransportDocumentReferences` (at least where applicable).
- Add a schema-level constraint requiring at least one of the two properties to be present (e.g., `anyOf` with `required: [oldTransportDocumentReferences]` and `required: [newTransportDocumentReferences]`).
- Optionally add examples showing a valid “amendment replacement” (old only), “combine” (old list with multiple), and “split” (both old and new).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. END version metadata wrong ✓ Resolved 🐞 Bug ≡ Correctness
Description
ebl/v3/endorsement/EBL_END_v3.0.4.yaml declares info.version: 3.0.3 and uses API-Version
header examples of 3.0.3, conflicting with the v3.0.4 file version and likely causing
consumers/tools to treat the spec as the wrong contract version.
Code

ebl/v3/endorsement/EBL_END_v3.0.4.yaml[R4-73]

Evidence
The new END v3.0.4 file currently identifies itself and its API-Version examples as 3.0.3, while
other v3.0.4 eBL module specs use 3.0.4 for both info.version and API-Version header examples,
indicating a repo convention that the internal metadata/examples match the spec version.

ebl/v3/endorsement/EBL_END_v3.0.4.yaml[1-12]
ebl/v3/endorsement/EBL_END_v3.0.4.yaml[66-73]
ebl/v3/endorsement/EBL_END_v3.0.4.yaml[415-423]
ebl/v3/endorsement/EBL_END_v3.0.3.yaml[1-4]
ebl/v3/issuance/EBL_ISS_v3.0.4.yaml[1-4]
ebl/v3/issuance/EBL_ISS_v3.0.4.yaml[333-340]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The END v3.0.4 specification file is internally labeled as v3.0.3 (both `info.version` and `API-Version` header examples). This creates a contract/version mismatch between the filename/versioned path and the spec metadata/examples.

### Issue Context
Other v3.0.4 eBL module specs in this repo use `info.version: 3.0.4` and `API-Version` header examples set to `3.0.4`, so the END module should follow the same convention.

### Fix Focus Areas
- ebl/v3/endorsement/EBL_END_v3.0.4.yaml[1-12]
- ebl/v3/endorsement/EBL_END_v3.0.4.yaml[66-73]
- ebl/v3/endorsement/EBL_END_v3.0.4.yaml[415-423]

### What to change
- Update `info.version` from `3.0.3` to `3.0.4`.
- Update request `API-Version` header example(s) to `3.0.4`.
- Update response `components.headers.API-Version` example to `3.0.4`.
- If the changelog anchor/link is intended to be version-specific, update `#v303` to `#v304` (or align with how other v3.0.4 specs link their changelog).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

3. API-Version header mismatch 🐞 Bug ≡ Correctness ⭐ New
Description
EBL_END_v3.0.4.yaml defines the request header API-Version as a full SemVer “of the carrier”
(example 3.0.4), but the eBL v3.0.4 convention for the same header name is MAJOR-only (example
'3'), creating inconsistent guidance across the eBL API surface. This also makes the header’s
meaning ambiguous in this spec because the response API-Version header is described as the
contract version returned, not a carrier version.
Code

ebl/v3/endorsement/EBL_END_v3.0.4.yaml[R64-71]

Evidence
The END v3.0.4 request header API-Version is described as a SemVer of the carrier, while the END
v3.0.4 response header API-Version is described as the returned contract version, and other eBL
v3.0.4 specs define the request API-Version header (same header name) as MAJOR-only.

ebl/v3/endorsement/EBL_END_v3.0.4.yaml[64-71]
ebl/v3/endorsement/EBL_END_v3.0.4.yaml[413-418]
ebl/v3/EBL_v3.0.4.yaml[3721-3729]
ebl/v3/issuance/EBL_ISS_v3.0.4.yaml[341-350]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`ebl/v3/endorsement/EBL_END_v3.0.4.yaml` documents the **request** header parameter named `API-Version` as a full SemVer “of the carrier” (and uses example `3.0.4`). In the rest of the eBL v3.0.4 specs, the request `API-Version` header is defined as **MAJOR-only** (example `'3'`).

This inconsistency will lead implementers and generated clients to treat the same header name differently depending on endpoint/spec.

### Issue Context
Within END v3.0.4, the **response** header `API-Version` is described as the SemVer of the contract returned, which further conflicts with the request header being described as a “carrier SemVer”.

### Fix Focus Areas
- ebl/v3/endorsement/EBL_END_v3.0.4.yaml[64-71]
- ebl/v3/endorsement/EBL_END_v3.0.4.yaml[413-418]

### Suggested fix
Update the request header parameter description and example to match the repo convention used in other eBL v3.0.4 specs:
- Make request `API-Version` **MAJOR-only** (example `'3'`)
- Remove/replace “SemVer of the carrier” wording
- (Optional) mirror the exact wording used by other v3.0.4 specs for the request header parameter

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Advisory comments

4. Mixed consumer/shipper wording 🐞 Bug ⚙ Maintainability
Description
The BKG cancel-booking endpoint description now says “consumer initiated cancellation” but
immediately references use cases “by shipper”, leaving inconsistent actor terminology in the same
description block.
Code

bkg/v2/BKG_v2.0.5.yaml[R1506-1508]

Evidence
The endpoint description contains both “consumer initiated” and “by shipper” phrases in the same
description block, demonstrating the inconsistency.

bkg/v2/BKG_v2.0.5.yaml[1503-1509]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The cancel-booking description mixes actor terms (“consumer” vs “shipper”) in adjacent sentences, which is confusing for readers and implementers.

### Issue Context
This is within the same endpoint description block, so readers will see conflicting terminology without any indication they are synonyms.

### Fix Focus Areas
- bkg/v2/BKG_v2.0.5.yaml[1503-1509]

### What to change
- Pick a single term for the actor in this block.
 - Either revert the first sentence back to “shipper initiated cancellation”, or
 - update the use case references to use “consumer” consistently, or
 - explicitly clarify once (e.g., “consumer (shipper)”) and keep it consistent thereafter.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Previous review results

Review updated until commit aaca233

Results up to commit db7c025


🐞 Bugs (2) 📘 Rule violations (0) 📎 Requirement gaps (0)


Action required
1. Empty replacements object allowed 🐞 Bug ≡ Correctness
Description
TransportDocumentReplacements allows an empty object or empty arrays even though its description
says it links the issued document to “one or more” transport documents, so meaningless payloads will
validate against the schema.
Code

ebl/v3/issuance/EBL_ISS_v3.0.4.yaml[R495-523]

Evidence
The schema text explicitly states “one or more”, but the added schema defines arrays without
minItems and does not require either array, allowing {} or empty lists. The same file
demonstrates the established pattern of using minItems: 1 when an array must be non-empty.

ebl/v3/issuance/EBL_ISS_v3.0.4.yaml[495-523]
ebl/v3/issuance/EBL_ISS_v3.0.4.yaml[498-505]
ebl/v3/issuance/EBL_ISS_v3.0.4.yaml[405-411]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The new `TransportDocumentReplacements` schema describes linking an issued Transport Document to **one or more** other Transport Documents, but the schema permits `{}` and/or empty arrays because there are no `minItems` constraints and no requirement that at least one of the two arrays is present.

### Issue Context
This repo already uses `minItems: 1` on arrays when empty arrays should not be allowed (e.g., `ErrorResponse.errors`). `TransportDocumentReplacements` should similarly prevent semantically-empty payloads.

### Fix Focus Areas
- ebl/v3/issuance/EBL_ISS_v3.0.4.yaml[495-524]

### What to change
- Add `minItems: 1` to `oldTransportDocumentReferences` and `newTransportDocumentReferences` (at least where applicable).
- Add a schema-level constraint requiring at least one of the two properties to be present (e.g., `anyOf` with `required: [oldTransportDocumentReferences]` and `required: [newTransportDocumentReferences]`).
- Optionally add examples showing a valid “amendment replacement” (old only), “combine” (old list with multiple), and “split” (both old and new).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. END version metadata wrong ✓ Resolved 🐞 Bug ≡ Correctness
Description
ebl/v3/endorsement/EBL_END_v3.0.4.yaml declares info.version: 3.0.3 and uses API-Version
header examples of 3.0.3, conflicting with the v3.0.4 file version and likely causing
consumers/tools to treat the spec as the wrong contract version.
Code

ebl/v3/endorsement/EBL_END_v3.0.4.yaml[R4-73]

Evidence
The new END v3.0.4 file currently identifies itself and its API-Version examples as 3.0.3, while
other v3.0.4 eBL module specs use 3.0.4 for both info.version and API-Version header examples,
indicating a repo convention that the internal metadata/examples match the spec version.

ebl/v3/endorsement/EBL_END_v3.0.4.yaml[1-12]
ebl/v3/endorsement/EBL_END_v3.0.4.yaml[66-73]
ebl/v3/endorsement/EBL_END_v3.0.4.yaml[415-423]
ebl/v3/endorsement/EBL_END_v3.0.3.yaml[1-4]
ebl/v3/issuance/EBL_ISS_v3.0.4.yaml[1-4]
ebl/v3/issuance/EBL_ISS_v3.0.4.yaml[333-340]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The END v3.0.4 specification file is internally labeled as v3.0.3 (both `info.version` and `API-Version` header examples). This creates a contract/version mismatch between the filename/versioned path and the spec metadata/examples.

### Issue Context
Other v3.0.4 eBL module specs in this repo use `info.version: 3.0.4` and `API-Version` header examples set to `3.0.4`, so the END module should follow the same convention.

### Fix Focus Areas
- ebl/v3/endorsement/EBL_END_v3.0.4.yaml[1-12]
- ebl/v3/endorsement/EBL_END_v3.0.4.yaml[66-73]
- ebl/v3/endorsement/EBL_END_v3.0.4.yaml[415-423]

### What to change
- Update `info.version` from `3.0.3` to `3.0.4`.
- Update request `API-Version` header example(s) to `3.0.4`.
- Update response `components.headers.API-Version` example to `3.0.4`.
- If the changelog anchor/link is intended to be version-specific, update `#v303` to `#v304` (or align with how other v3.0.4 specs link their changelog).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Advisory comments
3. Mixed consumer/shipper wording 🐞 Bug ⚙ Maintainability
Description
The BKG cancel-booking endpoint description now says “consumer initiated cancellation” but
immediately references use cases “by shipper”, leaving inconsistent actor terminology in the same
description block.
Code

bkg/v2/BKG_v2.0.5.yaml[R1506-1508]

Evidence
The endpoint description contains both “consumer initiated” and “by shipper” phrases in the same
description block, demonstrating the inconsistency.

bkg/v2/BKG_v2.0.5.yaml[1503-1509]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The cancel-booking description mixes actor terms (“consumer” vs “shipper”) in adjacent sentences, which is confusing for readers and implementers.

### Issue Context
This is within the same endpoint description block, so readers will see conflicting terminology without any indication they are synonyms.

### Fix Focus Areas
- bkg/v2/BKG_v2.0.5.yaml[1503-1509]

### What to change
- Pick a single term for the actor in this block.
 - Either revert the first sentence back to “shipper initiated cancellation”, or
 - update the use case references to use “consumer” consistently, or
 - explicitly clarify once (e.g., “consumer (shipper)”) and keep it consistent thereafter.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Qodo Logo

Comment thread ebl/v3/endorsement/EBL_END_v3.0.4.yaml Outdated
Comment on lines +4 to +73
info:
version: 3.0.3
title: DCSA eBL Endorsement Chain API
description: |
<h1>DCSA OpenAPI specification for electronic Bill of Lading (eBL) Endorsement Chain (END)</h1>

### Changelog and GitHub
For a changelog please click [here](https://github.com/dcsaorg/DCSA-OpenAPI/tree/master/ebl/v3/endorsement#v303). If you have any questions, feel free to [Contact Us](https://dcsa.org/get-involved/contact-us).

API specification issued by [DCSA.org](https://dcsa.org/).
license:
name: Apache 2.0
url: 'https://www.apache.org/licenses/LICENSE-2.0.html'
contact:
name: Digital Container Shipping Association (DCSA)
url: 'https://dcsa.org'
email: info@dcsa.org
tags:
- name: Endorsement Chain
description: Endorsement Chain
paths:
'/endorsement-chains/{transportDocumentReference}':
get:
tags:
- Endorsement Chain
summary: Gets the Endorsement Chain
operationId: getEndorsementChain
description: |
Gets the Endorsement Chain by `transportDocumentReference`. It is possible to filter the result by carrier `SCAC` code and/or by `transportDocumentSubReference`. The result is a list of Endorsement Chains matching the filter.

**Note:** It is not possible to limit the result, this endPoint does not support pagination.
parameters:
- in: path
name: transportDocumentReference
description: |
The `transportDocumentReference` of the `Transport Document` to get the Endorsement Chain from
required: true
schema:
type: string
pattern: '^\S(?:.*\S)?$'
maxLength: 20
description: |
A unique number allocated by the shipping line to the `Transport Document` and the main number used for the tracking of the status of the shipment.
example: HHL71800000
- in: query
name: transportDocumentSubReference
description: |
Filter by Transport Document Sub-reference (or version). In case a specific version of the Endorsement Chain is requested - adding this filter narrows the result to 1 Endorsement Chain.
schema:
type: string
pattern: '^\S(?:.*\S)?$'
maxLength: 100
- in: query
name: carrierSCACCode
description: |
Filter by carrier `SCAC` code (provided by [NMFTA](https://nmfta.org/scac/)). Adding this will only match Transport Documents from the carrier matching the `carrierSCACCode` value.
required: false
schema:
type: string
pattern: ^\S+$
maxLength: 4
example: YMLU
- in: header
name: API-Version
required: false
schema:
type: string
example: 3.0.3
description: |
An API-Version header **MAY** be added to the request (optional); if added it **MUST** contain the SemVer of the consumer.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. End version metadata wrong 🐞 Bug ≡ Correctness

ebl/v3/endorsement/EBL_END_v3.0.4.yaml declares info.version: 3.0.3 and uses API-Version
header examples of 3.0.3, conflicting with the v3.0.4 file version and likely causing
consumers/tools to treat the spec as the wrong contract version.
Agent Prompt
### Issue description
The END v3.0.4 specification file is internally labeled as v3.0.3 (both `info.version` and `API-Version` header examples). This creates a contract/version mismatch between the filename/versioned path and the spec metadata/examples.

### Issue Context
Other v3.0.4 eBL module specs in this repo use `info.version: 3.0.4` and `API-Version` header examples set to `3.0.4`, so the END module should follow the same convention.

### Fix Focus Areas
- ebl/v3/endorsement/EBL_END_v3.0.4.yaml[1-12]
- ebl/v3/endorsement/EBL_END_v3.0.4.yaml[66-73]
- ebl/v3/endorsement/EBL_END_v3.0.4.yaml[415-423]

### What to change
- Update `info.version` from `3.0.3` to `3.0.4`.
- Update request `API-Version` header example(s) to `3.0.4`.
- Update response `components.headers.API-Version` example to `3.0.4`.
- If the changelog anchor/link is intended to be version-specific, update `#v303` to `#v304` (or align with how other v3.0.4 specs link their changelog).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@HenrikHL
Copy link
Copy Markdown
Contributor Author

/review

@qodo-code-review
Copy link
Copy Markdown

PR Reviewer Guide 🔍

Warning

/review is deprecated. Use /agentic_review instead (removal date not yet scheduled).

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Naming Consistency

The PR goal states that BKG/eBL endpoints should refer to consumer/provider, while properties should refer to shipper/carrier. In this file, some endpoint descriptions were updated to consumer, but status/value descriptions and other text were updated to shipper/carrier. Please re-check that endpoint-level descriptions consistently use consumer/provider and only schema/property descriptions use shipper/carrier.

A consumer initiated cancellation of the `Booking` or `Booking Amendment` with the `bookingReference`. The path can contain a `carrierBookingRequestReference` or a `carrierBookingReference`.

This 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**.

## Precondition
Spec Mismatch

The new Endorsement Chain API defines the path as /endorsement-chains/{transportDocumentReference}, but multiple examples use request URIs prefixed with /v3/.... Align the examples (and any narrative) with the actual path structure used in the spec to avoid client/server implementation confusion.

paths:
  '/endorsement-chains/{transportDocumentReference}':
    get:
      tags:
        - Endorsement Chain
      summary: Gets the Endorsement Chain
      operationId: getEndorsementChain
      description: |
        Gets the Endorsement Chain by `transportDocumentReference`. It is possible to filter the result by carrier `SCAC` code and/or by `transportDocumentSubReference`. The result is a list of Endorsement Chains matching the filter.

        **Note:** It is not possible to limit the result, this endPoint does not support pagination.
      parameters:
        - in: path
          name: transportDocumentReference
          description: |
            The `transportDocumentReference` of the `Transport Document` to get the Endorsement Chain from
          required: true
          schema:
            type: string
            pattern: '^\S(?:.*\S)?$'
            maxLength: 20
            description: |
              A unique number allocated by the shipping line to the `Transport Document` and the main number used for the tracking of the status of the shipment.
            example: HHL71800000
        - in: query
          name: transportDocumentSubReference
          description: |
            Filter by Transport Document Sub-reference (or version). In case a specific version of the Endorsement Chain is requested - adding this filter narrows the result to 1 Endorsement Chain.
          schema:
            type: string
            pattern: '^\S(?:.*\S)?$'
            maxLength: 100
        - in: query
          name: carrierSCACCode
          description: |
            Filter by carrier `SCAC` code (provided by [NMFTA](https://nmfta.org/scac/)). Adding this will only match Transport Documents from the carrier matching the `carrierSCACCode` value.
          required: false
          schema:
            type: string
            pattern: ^\S+$
            maxLength: 4
            example: YMLU
        - in: header
          name: API-Version
          required: false
          schema:
            type: string
            example: 3.0.4
          description: |
            An API-Version header **MAY** be added to the request (optional); if added it **MUST** contain the SemVer of the carrier.
      responses:
        '200':
          description: |
            All Endorsement Chains that match the filter criteria.
          headers:
            API-Version:
              $ref: '#/components/headers/API-Version'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EndorsementChain'
              examples:
                surrenderedStraightBLExample:
                  summary: |
                    Surrendered straight B/L
                  description: |
                    Endorsement Chain for a surrendered 'Straight Bill of Lading' issued by Yang Ming to Suzano Brazil (who is the shipper) on the Wave platform. Suzano China is the Consignee. The `Transport Document` contains this information:
                    -  **Shipper:** Suzano Brazil
                    -  **Consignee:** Suzano China

                    The Endorsement Chain consists of the follow 4 entries:
                    |Entry|Action Code|Actor|Recipient|
                    |:--:|:---------:|-----|----------|
                    |1|`SURRENDERED`|Yang Ming Marine Transport Corporation||
                    |2|`SURRENDER_FOR_DELIVERY`|Suzano China|Yang Ming Marine Transport Corporation|
                    |3|`TRANSFER`|Suzano Brazil|Suzano China|
                    |4|`ISSUE`|Yang Ming Marine Transport Corporation|Suzano Brazil|

                    Please note that the 4th entry in the example (`actionCode: 'ISSUE'`) is the first entry in the chain, on which further endorsements are made...
                  value:
                    - transportDocumentReference: 62CD536BA8D34C469AFD
                      transportDocumentSubReference: fc5009a7-25ad-4bb0-9892-4e2dea6bcdd9
                      carrierSCACCode: YMLU
                      endorsementChain:
                        - actionDateTime: '2025-09-12T17:23:12Z'
                          actionCode: SURRENDERED
                          actor:
                            partyName: Yang Ming Marine Transport Corporation
                            eblPlatform: WAVE
                            identifyingCodes:
                              - codeListProvider: WAVE
                                partyCode: 4bd196da-0d8b-436d-bad4-4cc88f04a035
                        - actionDateTime: '2025-09-12T17:23:12Z'
                          actionCode: SURRENDER_FOR_DELIVERY
                          actor:
                            partyName: Suzano China
                            eblPlatform: WAVE
                            identifyingCodes:
                              - codeListProvider: WAVE
                                partyCode: 0665fefb-7c3f-443b-8ccd-73ced178448f
                          recipient:
                            partyName: Yang Ming Marine Transport Corporation
                            eblPlatform: WAVE
                            identifyingCodes:
                              - codeListProvider: WAVE
                                partyCode: 4bd196da-0d8b-436d-bad4-4cc88f04a035
                        - actionDateTime: '2025-09-10T14:35:42Z'
                          actionCode: TRANSFER
                          actor:
                            partyName: Suzano Brazil
                            eblPlatform: WAVE
                            identifyingCodes:
                              - codeListProvider: WAVE
                                partyCode: ee92b6b7-ac27-4537-87df-019c69389346
                          recipient:
                            partyName: Suzano China
                            eblPlatform: WAVE
                            identifyingCodes:
                              - codeListProvider: WAVE
                                partyCode: 0665fefb-7c3f-443b-8ccd-73ced178448f
                        - actionDateTime: '2025-09-09T12:55:31Z'
                          actionCode: ISSUE
                          actor:
                            partyName: Yang Ming Marine Transport Corporation
                            eblPlatform: WAVE
                            identifyingCodes:
                              - codeListProvider: WAVE
                                partyCode: 4bd196da-0d8b-436d-bad4-4cc88f04a035
                          recipient:
                            partyName: Suzano Brazil
                            eblPlatform: WAVE
                            identifyingCodes:
                              - codeListProvider: WAVE
                                partyCode: ee92b6b7-ac27-4537-87df-019c69389346
                surrenderedStraightBLWithOnBehalfOfPartiesExample:
                  summary: |
                    Surrendered straight B/L (using 'On Behalf of Parties')
                  description: |
                    Endorsement Chain for a surrendered 'Straight Bill of Lading' issued by ZIM to a Brazilian local agent (the Issue to Party and mentioned as a `On Behalf of Shipper` on the eBL) on the Bolero platform. Suzano China is the Consignee using China local agent as a `On Behalf of Consignee`. The `Transport Document` contains this information:
                    -  **Shipper:** Suzano Brazil
                    -  **On behalf of Shipper:** Brazil local agent
                    -  **Consignee:** Suzano China
                    -  **On behalf of Consignee:** China local agent

                    The Endorsement Chain consists of the follow 4 entries:
                    |Entry|Action Code|Actor|Recipient|
                    |:--:|:---------:|-----|----------|
                    |1|`SURRENDERED`|Zim Integrated Shipping Services Ltd||
                    |2|`SURRENDER_FOR_DELIVERY`|China local agent **on Behalf of** Suzano China|Zim Integrated Shipping Services Ltd|
                    |3|`TRANSFER`|Brazil local agent **on Behalf of** Suzano Brazil|China local agent **on Behalf of** Suzano China|
                    |4|`ISSUE`|Zim Integrated Shipping Services Ltd|Brazil local agent **on Behalf of** Suzano Brazil|

                    Please note that the 4th entry in the example (`actionCode: 'ISSUE'`) is the first entry in the chain, on which further endorsements are made...
                  value:
                    - transportDocumentReference: '61572195130255734095'
                      transportDocumentSubReference: c5c6b4a8-3645-4209-96e2-453daebbb961
                      carrierSCACCode: ZIMU
                      endorsementChain:
                        - actionDateTime: '2025-09-12T17:23:12Z'
                          actionCode: SURRENDERED
                          actor:
                            partyName: Zim Integrated Shipping Services Ltd
                            eblPlatform: BOLE
                            identifyingCodes:
                              - codeListProvider: BOLE
                                partyCode: 0bbf18d8-ee73-40a0-baa2-7349fbfafcee
                        - actionDateTime: '2025-09-12T17:13:44Z'
                          actionCode: SURRENDER_FOR_DELIVERY
                          actor:
                            partyName: China local agent
                            eblPlatform: BOLE
                            identifyingCodes:
                              - codeListProvider: BOLE
                                partyCode: 61cb4944-1f36-428b-9d95-2f5539dea06b
                            representedParty:
                              partyName: Suzano China
                              identifyingCodes:
                                - codeListProvider: BOLE
                                  partyCode: d02751e3-2958-4c18-9e18-4e8ee341a93c
                          recipient:
                            partyName: Zim Integrated Shipping Services Ltd
                            eblPlatform: BOLE
                            identifyingCodes:
                              - codeListProvider: BOLE
                                partyCode: 0bbf18d8-ee73-40a0-baa2-7349fbfafcee
                        - actionDateTime: '2025-09-11T15:45:42Z'
                          actionCode: TRANSFER
                          actor:
                            partyName: Brazil local agent
                            eblPlatform: BOLE
                            identifyingCodes:
                              - codeListProvider: BOLE
                                partyCode: 4b502cf9-627b-4895-8b1f-df0c42e21e17
                            representedParty:
                              partyName: Suzano Brazil
                              identifyingCodes:
                                - codeListProvider: BOLE
                                  partyCode: c6880d2f-f0c6-4a59-87b3-9e9284084b60
                          recipient:
                            partyName: China local agent
                            eblPlatform: BOLE
                            identifyingCodes:
                              - codeListProvider: BOLE
                                partyCode: 61cb4944-1f36-428b-9d95-2f5539dea06b
                            representedParty:
                              partyName: Suzano China
                              identifyingCodes:
                                - codeListProvider: BOLE
                                  partyCode: d02751e3-2958-4c18-9e18-4e8ee341a93c
                        - actionDateTime: '2025-09-09T12:55:31Z'
                          actionCode: ISSUE
                          actor:
                            partyName: Zim Integrated Shipping Services Ltd
                            eblPlatform: BOLE
                            identifyingCodes:
                              - codeListProvider: BOLE
                                partyCode: 0bbf18d8-ee73-40a0-baa2-7349fbfafcee
                          recipient:
                            partyName: Brazil local agent
                            eblPlatform: BOLE
                            identifyingCodes:
                              - codeListProvider: BOLE
                                partyCode: 4b502cf9-627b-4895-8b1f-df0c42e21e17
                            representedParty:
                              partyName: Suzano Brazil
                              identifyingCodes:
                                - codeListProvider: BOLE
                                  partyCode: c6880d2f-f0c6-4a59-87b3-9e9284084b60
                twoTDSRExample:
                  summary: |
                    Multiple EndorsementChains for same B/L
                  description: |
                    2 endorsement chains for the same `transportDocumentReference`. First entry (`transportDocumentSubReference='v2'`) has only been re-issued. Second entry (`transportDocumentSubReference='v1'`) is the endorsement chain that has been issued and then surrendered for amendments.
                  value:
                    - transportDocumentReference: 62CD536BA8D34C469AFD
                      transportDocumentSubReference: v2
                      carrierSCACCode: YMLU
                      endorsementChain:
                        - actionDateTime: '2025-09-09T13:55:31Z'
                          actionCode: ISSUE
                          actor:
                            partyName: Yang Ming Marine Transport Corporation
                            eblPlatform: WAVE
                            identifyingCodes:
                              - codeListProvider: WAVE
                                partyCode: 4bd196da-0d8b-436d-bad4-4cc88f04a035
                          recipient:
                            partyName: Suzano Brazil
                            eblPlatform: WAVE
                            identifyingCodes:
                              - codeListProvider: WAVE
                                partyCode: ee92b6b7-ac27-4537-87df-019c69389346
                    - transportDocumentReference: 62CD536BA8D34C469AFD
                      transportDocumentSubReference: v1
                      carrierSCACCode: YMLU
                      endorsementChain:
                        - actionDateTime: '2025-09-12T17:23:12Z'
                          actionCode: SURRENDERED
                          actor:
                            partyName: Yang Ming Marine Transport Corporation
                            eblPlatform: WAVE
                            identifyingCodes:
                              - codeListProvider: WAVE
                                partyCode: 4bd196da-0d8b-436d-bad4-4cc88f04a035
                        - actionDateTime: '2025-09-12T17:23:12Z'
                          actionCode: SURRENDER_FOR_AMENDMENT
                          actor:
                            partyName: Suzano Brazil
                            eblPlatform: WAVE
                            identifyingCodes:
                              - codeListProvider: WAVE
                                partyCode: ee92b6b7-ac27-4537-87df-019c69389346
                          recipient:
                            partyName: Yang Ming Marine Transport Corporation
                            eblPlatform: WAVE
                            identifyingCodes:
                              - codeListProvider: WAVE
                                partyCode: 4bd196da-0d8b-436d-bad4-4cc88f04a035
                        - actionDateTime: '2025-09-09T12:55:31Z'
                          actionCode: ISSUE
                          actor:
                            partyName: Yang Ming Marine Transport Corporation
                            eblPlatform: WAVE
                            identifyingCodes:
                              - codeListProvider: WAVE
                                partyCode: 4bd196da-0d8b-436d-bad4-4cc88f04a035
                          recipient:
                            partyName: Suzano Brazil
                            eblPlatform: WAVE
                            identifyingCodes:
                              - codeListProvider: WAVE
                                partyCode: ee92b6b7-ac27-4537-87df-019c69389346
        '404':
          description: |
            In case the carrier is requesting a `transportDocumentReference` that does not exist.
          headers:
            API-Version:
              $ref: '#/components/headers/API-Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFoundExample:
                  summary: |
                    transportDocumentReference not found
                  description: |
                    The `transportDocumentReference` does not exist.

                    **NB**: The `errorCode` is not yet standardized by DCSA. The value `7003` is just a "random example".
                  value:
                    httpMethod: GET
                    requestUri: /v3/endorsement-chains/td-987
                    statusCode: 404
                    statusCodeText: Not Found
                    statusCodeMessage: transportDocumentReference not found
                    providerCorrelationReference: 4426d965-0dd8-4005-8c63-dc68b01c4962
                    errorDateTime: '2024-09-04T09:41:00Z'
                    errors:
                      - errorCode: 7003
                        errorCodeText: transportDocumentReference not found
                        errorCodeMessage: The requested Endorsement Chain does not exist
        '500':
          description: |
            In case a server error occurs in eBL Solution Provider system a `500` (Internal Server Error) is returned
          headers:
            API-Version:
              $ref: '#/components/headers/API-Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                internalServerErrorExample:
                  summary: |
                    Internal Server Error while fetching the Transport Document
                  description: |
                    An Internal Server Error has occurred - the carrier should contact {eBL Solution Provider-support} and provide the `providerCorrelationReference` (in the example this is `4426d965-0dd8-4005-8c63-dc68b01c4962`)

                    **NB**: The `errorCode` is not yet standardized by DCSA. The value `7003` is just a "random example".
                  value:
                    httpMethod: GET
                    requestUri: /v3/endorsement-chains/td-987
                    statusCode: 500
                    statusCodeText: Internal Server Error
                    statusCodeMessage: Internal Server Error occurred while fetching the Endorsement Chain
                    providerCorrelationReference: 4426d965-0dd8-4005-8c63-dc68b01c4962
                    errorDateTime: '2024-09-04T09:41:00Z'
                    errors:
                      - errorCode: 7003
                        errorCodeText: Internal Error occurred
                        errorCodeMessage: Internal Error occurred
        default:
          description: |
            For other errors the error object should be populated with relevant information
          headers:
            API-Version:
              $ref: '#/components/headers/API-Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                tooManyRequestsExample:
                  summary: |
                    Fetching too many `Endorsement Chain` requests
                  description: |
                    Calling the endPoint

                        GET /v3/endorsement-chains/td-987

                    too many times within a time period.

                    **NB**: `errorCode` not yet standardized by DCSA. Value `7003` is just a "random example"
                  value:
                    httpMethod: GET
                    requestUri: /v3/endorsement-chains/td-987
                    statusCode: 429
                    statusCodeText: Too Many Requests
                    statusCodeMessage: |
                      Too many requests to fetch an Endorsement Chain have been made. Please try again in 1 hour
                    providerCorrelationReference: 4426d965-0dd8-4005-8c63-dc68b01c4962
                    errorDateTime: '2024-09-04T09:41:00Z'
                    errors:
                      - errorCode: 7003
                        errorCodeText: Max Endorsement Chain requests reached
                        errorCodeMessage: A maximum of 10 Endorsement Chains can be requested per hour
Schema Requirements

EndorsementChain only requires transportDocumentReference, while other fields like endorsementChain appear essential for the object’s meaning. Validate whether endorsementChain (and possibly carrierSCACCode / transportDocumentSubReference) should be required, or document clearly when they may be absent.

EndorsementChain:
  type: object
  title: Endorsement Chain
  description: |
    An endorsement Chain linked to a particular `transportDocumentReference` and potentially a `transportDocumentSubReference`.
  properties:
    transportDocumentReference:
      type: string
      pattern: '^\S(?:.*\S)?$'
      maxLength: 20
      description: |
        A unique number allocated by the shipping line to the `Transport Document` and the main number used for the tracking of the status of the shipment.
      example: HHL71800000
    transportDocumentSubReference:
      type: string
      pattern: '^\S(?:.*\S)?$'
      maxLength: 100
      description: |
        Additional reference that can be optionally used alongside the `transportDocumentReference` in order to distinguish between versions of the same `Transport Document`.
      example: Version_1
    carrierSCACCode:
      type: string
      maxLength: 4
      pattern: ^\S+$
      description: |
        The carrier code, based on SCAC code (provided by [NMFTA](https://nmfta.org/scac/)), that Issued the `transportDocumentReference`.
      example: MAEU
    endorsementChain:
      type: array
      description: |
        A list of one or more actions that affect an eBL, starting from its issuance onward. It is equivalent to the "back side" of a physical Bill of Lading. The type of actions recorded in the endorsement chain as defined by the DCSA standard are listed below:

        - **Issue:** The act of issuing an eBL to the `Issue to` party, meaning the designated recipient of the action (typically the shipper or their on behalf of party).
        - **Endorse:** The act of transferring the rights and obligations associated with the eBL to a new endorsee, meaning the designated recipient of the action, allowing them to claim or deal with the goods. Only applicable to negotiable eBL (`isToOrder=true`).
        - **Sign:** The act of visibly marking the actor's possession of the eBL within the chain. This action has no designated recipient and can only be performed while the actor is the current possessor of the eBL, similar to how a party may sign a physical Bill of Lading while in their possession.
        - **Request Surrender for Amendment:** The act of surrendering an eBL so that the carrier can issue an amended version. If the request is accepted, the original eBL is voided, and the amended eBL must be reissued with a new endorsement chain. This action is also used when switching the eBL to a physical document (“switch to paper”), which is treated as part of the amendment process in the DCSA standard.
        - **Request Surrender for Delivery:** The act of surrendering an eBL to the carrier to request delivery of the goods.
        - **Blank Endorse:** The act of transferring the rights and obligations associated with the eBL in blank, meaning that the endorsement does not specify a recipient. A party in possession of a blank endorsed eBL is allowed to claim or deal with the goods. Only applicable to negotiable eBL (`isToOrder=true`).
        - **Endorse to Order:** The act of transferring the rights and obligations associated with the eBL to a new endorsee, meaning the designated recipient of the action, allowing them to claim or deal with the goods. The newly appointed endorsee can further endorse the eBL to another party. Only applicable to negotiable eBL (`isToOrder=true`).
        - **Transfer:** The act of transferring the possession of the eBL to the recipient.
        - **Surrendered:** The act of confirming that the eBL has been surrendered, meaning that its lifecycle is completed.
      items:
        $ref: '#/components/schemas/EndorsementChainLink'
  required:
    - transportDocumentReference

EndorsementChainLink:

@HenrikHL
Copy link
Copy Markdown
Contributor Author

/agentic_review

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review Bot commented May 21, 2026

Persistent review updated to latest commit aaca233

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant