<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://dtd.riege.com/scope/webservices/quotation-v1"
            xmlns:cdt="http://dtd.riege.com/scope/webservices/commonDataTypes-v1"
            xmlns:codt="http://dtd.riege.com/scope/webservices/commonOrderDataTypes-v1"
            xmlns:cfdt="http://dtd.riege.com/scope/webservices/commonFinanceDataTypes-v1"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://dtd.riege.com/scope/webservices/quotation-v1"
            elementFormDefault="qualified"
            version="3.0">

    <xsd:annotation>
        <xsd:appinfo>
            <lastChangeDate>2026-08-07</lastChangeDate>
            <version>1.2.0</version>
        </xsd:appinfo>
    </xsd:annotation>

    <xsd:import namespace="http://dtd.riege.com/scope/webservices/commonDataTypes-v1"
                schemaLocation="commonDataTypes-v1.xsd"/>
    <xsd:import namespace="http://dtd.riege.com/scope/webservices/commonOrderDataTypes-v1"
                schemaLocation="commonOrderDataTypes-v1.xsd"/>
    <xsd:import namespace="http://dtd.riege.com/scope/webservices/commonFinanceDataTypes-v1"
                schemaLocation="commonFinanceDataTypes-v1.xsd"/>

    <xsd:element name="quotation" type="quotationType">
        <xsd:annotation>
            <xsd:documentation>Root element holding a single quotation</xsd:documentation>
        </xsd:annotation>
    </xsd:element>

    <xsd:element name="quotations">
        <xsd:annotation>
            <xsd:documentation>Root element holding a list of quotations</xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="quotation" type="quotationType" minOccurs="0"
                             maxOccurs="unbounded"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="quotationOption" type="quotationOptionDataType">
        <xsd:annotation>
            <xsd:documentation>Root element holding a single quotation option</xsd:documentation>
        </xsd:annotation>
    </xsd:element>

    <xsd:complexType name="quotationType">
        <xsd:annotation>
            <xsd:documentation>Type that represents a quotation</xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="identifier" type="cdt:identifierType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>A unique identifier (UID) generated by Scope
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="externalIdentifier" type="cdt:string128Type" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        An unique external identifier for this quotation within an organization.
                        This value is immutable after creation.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="lastModified" type="xsd:dateTime" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The last modification date of this quotation provided in the
                        branch's time zone (read-only)
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="createdAt" type="xsd:dateTime" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The creation date of this quotation provided in the branch's
                        time zone (read-only)
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="deleted" type="xsd:boolean" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>Indicates whether this quotation is deleted (read-only)
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="template" type="xsd:boolean" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Indicates whether this quotation is used as a template (read-only)
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="templateIdentifier" type="cdt:identifierType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Optional identifier of the quotation template.
                        For POST requests this defines the template to use.
                        For GET requests this references the template from which
                        the quotation was created.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element name="shipmentType" type="quotationShipmentType">
                <xsd:annotation>
                    <xsd:documentation>Specifies the shipment type. This value is immutable after
                        creation.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="owner" type="cdt:partnerRefType">
                <xsd:annotation>
                    <xsd:documentation>Scope branch partner owning this quotation. This value is
                        immutable after creation.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="date" type="xsd:date" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>Quotation date. This value is immutable after creation.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="number" type="cdt:referenceNumberType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The quotation number is assigned by Scope. External quotation
                        numbers can be provided as reference numbers.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="status" type="quotationStatusType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>Quotation status is read-only</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="type" type="internalExternalType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The internal-external type is read-only and typically has the
                        value 'external'
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="lastStatusChange" type="xsd:dateTime" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The last status change of this quotation provided in the
                        branch's time zone (read-only)
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="firstPrinted" type="xsd:dateTime" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The first print date of this quotation provided in the
                        branch's time zone (read-only)
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element name="costCenter" type="cdt:costCenterRefType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>Branch specific cost center in Scope. Should only be used
                        when explicitly required.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="clerk" type="cdt:personType" minOccurs="0"/>
            <xsd:element name="salesperson" type="cdt:personType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>Sales person responsible for this quotation. A sales person
                        will be copied to a booking/shipment created from a quotation.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="dealClosedOn" type="xsd:date" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The agreed contract start date, typically set by Scope
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element name="general" type="generalQuotationDataType">
                <xsd:annotation>
                    <xsd:documentation>General quotation data containing, among other details, the
                        prospect, shipper, consignee, departure, destination, and goods
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element name="calculation" minOccurs="0">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="currency" type="cdt:currencyCodeType" minOccurs="0">
                            <xsd:annotation>
                                <xsd:documentation>Quotation currency applicable to all quotation
                                    options
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>
                        <xsd:element name="shipmentScope" minOccurs="0">
                            <xsd:annotation>
                                <xsd:documentation>The shipment scope is determined by the order
                                    types included in, or intended to be included in, the quotation
                                    calculation
                                </xsd:documentation>
                            </xsd:annotation>
                            <xsd:complexType>
                                <xsd:sequence>
                                    <xsd:element name="orderType" type="codt:orderTypeType"
                                                 maxOccurs="unbounded"/>
                                </xsd:sequence>
                            </xsd:complexType>
                        </xsd:element>

                        <xsd:element name="options" minOccurs="0">
                            <xsd:annotation>
                                <xsd:documentation>Commercial options of a quotation (read-only).
                                    Each option represents a distinct offer, such as an offer from a
                                    specific airline or ocean carrier, or a particular routing. A
                                    quotation may contain multiple options, allowing customers to
                                    compare alternatives. Options must be created separately via a
                                    dedicated endpoint.
                                </xsd:documentation>
                            </xsd:annotation>
                            <xsd:complexType>
                                <xsd:sequence>
                                    <xsd:element name="option" type="quotationOptionDataType"
                                                 maxOccurs="unbounded"/>
                                </xsd:sequence>
                            </xsd:complexType>
                        </xsd:element>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

            <xsd:element name="remarks" type="cdt:string4000Type" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>Additional remarks intended to appear on the quotation
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element name="validFrom" type="xsd:date" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The valid from date (inclusive) for this quotation
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="validTo" type="xsd:date" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The valid to date (inclusive) for this quotation. This date
                        is mandatory to complete a quotation in Scope.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element name="internalNotes" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>Internal notes of this quotation</xsd:documentation>
                </xsd:annotation>
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="note" type="cdt:internalNoteType" maxOccurs="unbounded"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

            <xsd:element name="documents" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>Documents attached to this quotation (read only)
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="document" type="cdt:fileRefType" maxOccurs="unbounded"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="generalQuotationDataType">
        <xsd:annotation>
            <xsd:documentation>Type that holds the general data of the quotation</xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="prospect" type="cdt:documentAddressType">
                <xsd:annotation>
                    <xsd:documentation>The partner who requested the quotation and is expected to be
                        the customer for the associated shipment. With the appropriate permissions,
                        a document address can be entered on the quotation.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element name="shipper" type="cdt:documentAddressType" minOccurs="0"/>
            <xsd:element name="consignee" type="cdt:documentAddressType" minOccurs="0"/>

            <xsd:element name="placeOfReceipt" type="receiptDeliveryLocationType" minOccurs="0"/>
            <xsd:element name="departure" type="mainTransportLocationType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>Departure of the (first) main leg</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="destination" type="mainTransportLocationType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>Destination of the (last) main leg</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="placeOfDelivery" type="receiptDeliveryLocationType" minOccurs="0"/>

            <xsd:element name="incoTerms" type="codt:incoTermsCodeType" minOccurs="0"/>
            <xsd:element name="incotermPlace" type="cdt:string128Type" minOccurs="0"/>
            <xsd:element name="movementScope" type="codt:movementScopeType" minOccurs="0"/>

            <xsd:choice>
                <xsd:element name="packageType" type="codt:packageTypeCode" minOccurs="0">
                    <xsd:annotation>
                        <xsd:documentation>Specifies the package type when all packages belong to a
                            customer specific Scope package type
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                <xsd:element name="packages" type="packageDetailsType" minOccurs="0">
                    <xsd:annotation>
                        <xsd:documentation>Package detail information for package‑based quotations
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                <xsd:element name="seaContainers" type="seaContainerDetailsType" minOccurs="0">
                    <xsd:annotation>
                        <xsd:documentation>Sea freight container information for FCL quotations
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
            </xsd:choice>

            <xsd:element name="totalPieces" type="xsd:nonNegativeInteger" minOccurs="0"/>
            <xsd:element name="totalGrossWeight" type="cdt:weightType" minOccurs="0"/>
            <xsd:element name="totalVolume" type="cdt:volumeType" minOccurs="0"/>
            <xsd:element name="totalChargeableWeight" type="cdt:weightType" minOccurs="0"/>
            <xsd:element name="loadingMetres" type="xsd:decimal" minOccurs="0"/>
            <xsd:element name="volumeFactor" type="xsd:decimal" minOccurs="0"/>

            <xsd:element name="natureOfGoods" type="cdt:string4000Type" minOccurs="0"/>
            <xsd:element name="insuranceAmount" type="cdt:monetaryAmountType" minOccurs="0"/>

            <xsd:element name="latestShippingDate" type="xsd:date" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The latest date by which the shipment must depart. This date
                        is also used to determine applicable tariffs.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="sentQuoteBefore" type="xsd:date" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>Date by which the quotation must be sent to the customer
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element name="references" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>Additional reference numbers related to this quotation
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="reference" type="cdt:referenceType"
                                     maxOccurs="unbounded"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="quotationOptionDataType">
        <xsd:annotation>
            <xsd:documentation>
                Type that represents one commercial option of a quotation, for example one
                airline or ocean-carrier offer, or one specific routing.
                A quotation can contain multiple options so customers can compare alternatives
                such as carriers, transit times, and routings.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="identifier" type="cdt:identifierType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>A unique identifier (UID) generated by Scope
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="createdAt" type="xsd:dateTime" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The creation date of this option provided in the branch's
                        time zone (read-only)
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="label" type="cdt:string128Type">
                <xsd:annotation>
                    <xsd:documentation>
                        Unique label that identifies this option within the quotation.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element name="transitTime" type="cdt:string35Type" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Transit-time information presented to the customer for this option.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="description" type="cdt:string1000Type" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Free-text details describing the option for example with the proposed flight or routing, including
                        assumptions and service characteristics.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="sellingProduct" type="cdt:productRefType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Scope selling product used to calculate this option
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element name="pickup" type="quotationTransportOrderType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>Pickup transport order details, if applicable</xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element name="mainCarriage">
                <xsd:complexType>
                    <xsd:annotation>
                        <xsd:documentation>Main carriage details</xsd:documentation>
                    </xsd:annotation>
                    <xsd:sequence>
                        <xsd:element name="carrier" type="quotationCarrierRefType" minOccurs="0">
                            <xsd:annotation>
                                <xsd:documentation>Main carriage carrier</xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>
                        <xsd:element name="carrierAgent" type="cdt:partnerRefType" minOccurs="0">
                            <xsd:annotation>
                                <xsd:documentation>Agent partner representing the main carriage
                                    carrier (sea freight only). Optional, may be defaulted by Scope
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>
                        <xsd:element name="buyingProduct" type="cdt:productRefType" minOccurs="0">
                            <xsd:annotation>
                                <xsd:documentation>Main carriage buying product</xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

            <xsd:element name="delivery" type="quotationTransportOrderType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>Pickup transport order details, if applicable</xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element name="incomeTotalNet" type="cdt:monetaryAmountType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Total net income generated by this quotation option (read-only)
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="incomeTotalTax" type="cdt:monetaryAmountType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Total tax income generated by this quotation option (read-only)
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="incomeTotalGross" type="cdt:monetaryAmountType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Total gross income generated by this quotation option (net plus tax, read-only)
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="costTotalNet" type="cdt:monetaryAmountType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Total net cost generated by this quotation option (read-only)
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="profit" type="cdt:monetaryAmountType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Expected profit of this quotation option, usually calculated as income
                        total minus cost total (read-only)
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="margin" type="xsd:decimal" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Margin of this quotation option expressed as a percentage (read-only)
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element name="jobcostingEntries" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        List with income and cost details for the calculation of this quotation option.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="jobcostingEntry" type="quotationJobcostingEntryType"
                                     maxOccurs="unbounded" />
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

            <xsd:element name="carbonFootprintCalculations" type="codt:carbonFootprintCalculationsType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        CO2 calculations for this quotation option (read-only)
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="quotationJobcostingEntryType">
        <xsd:annotation>
            <xsd:documentation>
                Data type representing one commercial jobcosting line of a quotation option,
                including charge type, optional operational classification, and related income and
                cost details.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="activityType" type="cdt:identifierType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Optional identifier of the related activity type used for the calculation.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="orderType" type="codt:orderTypeType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Optional order type classification of this entry
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="chargeType" type="cdt:chargeTypeRefType">
                <xsd:annotation>
                    <xsd:documentation>
                        Charge type that defines the service of this entry
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element name="customer" type="cdt:partnerRefType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Customer partner for the income side of this entry
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="incomeConstructions" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        List with income constructions. Currently only one construction is supported.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="incomeConstruction" type="cfdt:chargeConstructionType"
                                     maxOccurs="unbounded" />
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="incomeAmount" type="cdt:monetaryAmountType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Income amount for this entry
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="incomeExchangeRate" type="cdt:exchangeRateType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Exchange rate used for income amount conversion into quotation currency
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="incomeInternalNotes" type="cdt:string255Type" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Internal note for the income side of this entry
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="incomeTax" type="cdt:taxRefType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Tax applied to the income amount
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="incomeWithholdingTax" type="cdt:taxRefType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Withholding tax applied on the income side
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element name="vendor" type="cdt:partnerRefType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Vendor or supplier partner for the cost side of this entry
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="costConstructions" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        List with cost constructions. Currently only one construction is supported.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="costConstruction" type="cfdt:chargeConstructionType"
                                     maxOccurs="unbounded" />
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="costAmount" type="cdt:monetaryAmountType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Cost amount for this entry
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="costExchangeRate" type="cdt:exchangeRateType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Exchange rate used for cost amount conversion into quotation currency
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="costInternalNotes" type="cdt:string255Type" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Internal note for the cost side of this entry
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="costFromBookingPortal" type="xsd:boolean" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Indicates whether the cost was sourced from a booking portal integration
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="packageDetailsType">
        <xsd:annotation>
            <xsd:documentation>Type holding package details for quotations that are not
                sea‑container‑based
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="package" type="codt:packageDetailType" maxOccurs="unbounded"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="seaContainerDetailsType">
        <xsd:annotation>
            <xsd:documentation>Type holding sea container details</xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="container" type="seaContainerDetailType" maxOccurs="unbounded"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="seaContainerDetailType">
        <xsd:annotation>
            <xsd:documentation>Represents detailed information for a single sea container
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="containerCount" type="xsd:positiveInteger">
                <xsd:annotation>
                    <xsd:documentation>The number of containers</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="typeCode" type="codt:seaContainerTypeCode"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="quotationTransportOrderType">
        <xsd:annotation>
            <xsd:documentation>Data type containing the transport order information required for
                calculations, including carrier, buying product, conveyance type, and container
                depot
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="carrier" type="quotationCarrierRefType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>Carrier selected for the transport order
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="buyingProduct" type="cdt:productRefType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        The carrier buying product used for the transport order.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="conveyanceType" type="codt:conveyanceType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>Conveyance type of the transport order. May only be
                        used for FCL pickup transport orders.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="containerDepot" type="cdt:partnerRefType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>Container depot of the transport order. May only be
                        used for FCL pickup transport orders.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="quotationCarrierRefType">
        <xsd:annotation>
            <xsd:documentation>ªData type holding a reference to an air, ocean or road carrier
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:choice>
                <xsd:element name="air">
                    <xsd:complexType>
                        <xsd:annotation>
                            <xsd:documentation>Carrier identification details for an airline</xsd:documentation>
                        </xsd:annotation>
                        <xsd:sequence>
                            <xsd:element name="iataCode" type="cdt:iataAirlineCodeType" minOccurs="0"/>
                            <xsd:element name="awbPrefix" type="cdt:awbAirlinePrefixType" minOccurs="0"/>
                            <xsd:element name="identifier" type="cdt:identifierType" minOccurs="0"/>
                            <xsd:element name="name" type="cdt:string255Type" minOccurs="0"/>
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element name="sea">
                    <xsd:complexType>
                        <xsd:annotation>
                            <xsd:documentation>Identification details for an ocean carrier</xsd:documentation>
                        </xsd:annotation>
                        <xsd:sequence>
                            <xsd:element name="scac" type="cdt:carrierScacType"/>
                            <xsd:element name="identifier" type="cdt:identifierType" minOccurs="0"/>
                            <xsd:element name="name" type="cdt:string255Type" minOccurs="0"/>
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element name="road" type="cdt:partnerRefType">
                <xsd:annotation>
                    <xsd:documentation>Identification details for a road carrier that is a Scope partner with the road carrier role
                    </xsd:documentation>
                </xsd:annotation>
                </xsd:element>
            </xsd:choice>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="mainTransportLocationType">
        <xsd:annotation>
            <xsd:documentation>Data type representing the main transport location. At creation time,
                only one code must be provided.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="unlocode" type="cdt:unLocodeType" minOccurs="0"/>
            <xsd:element name="iataCode" type="cdt:iataAirportCodeType" minOccurs="0"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="receiptDeliveryLocationType">
        <xsd:annotation>
            <xsd:documentation>Data type representing a location in a quotation. It may include
                multiple identifiers such as UN/Locode, name, ZIP code, or state. The UN/Locode is
                mandatory when ZIP‑based tariffs apply.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="unlocode" type="cdt:unLocodeType" minOccurs="0"/>
            <xsd:element name="name" type="cdt:string255Type" minOccurs="0"/>
            <xsd:element name="zip" type="cdt:string35Type" minOccurs="0"/>
            <xsd:element name="state" type="cdt:stateCodeType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>Optional in most countries. Required only in certain
                        countries, such as the United States.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:simpleType name="quotationStatusType">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="initial">
                <xsd:annotation>
                    <xsd:documentation>Status for new quotations that have not yet been edited by
                        users
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="inProgress">
                <xsd:annotation>
                    <xsd:documentation>Work on the quotation is currently in progress
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="waitingFor">
                <xsd:annotation>
                    <xsd:documentation>Work on the quotation is blocked</xsd:documentation>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="reopened">
                <xsd:annotation>
                    <xsd:documentation>The quotation has been reopened</xsd:documentation>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="completed">
                <xsd:annotation>
                    <xsd:documentation>The quotation has been completed in Scope</xsd:documentation>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="accepted">
                <xsd:annotation>
                    <xsd:documentation>The quotation has been accepted by the prospect
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="rejected">
                <xsd:annotation>
                    <xsd:documentation>The quotation has been rejected by the prospect
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="shipmentCreated">
                <xsd:annotation>
                    <xsd:documentation>The quotation has been converted into a booking or shipment
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:enumeration>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="quotationShipmentType">
        <xsd:annotation>
            <xsd:documentation>Supported shipment types depend on the Scope shipment modules
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="airExport"/>
            <xsd:enumeration value="airImport"/>
            <xsd:enumeration value="seaExport"/>
            <xsd:enumeration value="seaExportFCL"/>
            <xsd:enumeration value="seaImport"/>
            <xsd:enumeration value="seaImportFCL"/>
            <xsd:enumeration value="simpleShipmentAir"/>
            <xsd:enumeration value="simpleShipmentRoad"/>
            <xsd:enumeration value="simpleShipmentSea"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="internalExternalType">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="external"/>
            <xsd:enumeration value="internal"/>
        </xsd:restriction>
    </xsd:simpleType>

</xsd:schema>
