{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amadeus/refs/heads/main/json-schema/transfer-search-extra-service-schema.json",
  "title": "ExtraService",
  "description": "ExtraService schema from Transfer Search",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "extra service code, which can take following values\n\ncode   | name                                 \n------ | ---------------------------- \nDSL    | Driver language specified\nEWT    | Extra waiting time\nMAG    | Meet & Greet\nFLM    | Flight monitoring\nNWS    | Newspaper\nCAI    | Cancellation insurance\nWNR    | Wait and Return. Driver waits at destination and brings back the customer to pick-up point\n",
      "enum": [
        "DSL",
        "EWT",
        "MAG",
        "FLM",
        "NWS",
        "CAI",
        "WNR"
      ],
      "example": "DSL"
    },
    "itemId": {
      "type": "string",
      "description": "extra service identifier",
      "example": "12345"
    },
    "description": {
      "type": "string",
      "description": "extra service description",
      "example": "Sample description text."
    },
    "metricType": {
      "type": "string",
      "description": "extra service time metric type",
      "enum": [
        "YEARS",
        "DAYS",
        "HOURS",
        "MINUTES"
      ],
      "example": "YEARS"
    },
    "metricValue": {
      "type": "string",
      "description": "extra service metric value",
      "example": "string-value"
    },
    "quotation": {
      "description": "quotation representing a price valuation and its components. The monetaryAmount at the root are the sum of base and all the taxes/fees/discounts",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "monetaryAmount": {
              "type": "string",
              "example": "10.5"
            }
          }
        },
        {
          "type": "object",
          "properties": {
            "currencyCode": {
              "type": "string",
              "example": "USD"
            },
            "isEstimated": {
              "type": "boolean",
              "description": "indicates if the price is pre-estimated prior to ride. Becomes mandatory for transferType = TAXI"
            },
            "base": {
              "description": "base price",
              "allOf": [
                {
                  "$ref": "#/definitions/PointsAndCash"
                }
              ]
            },
            "discount": {
              "description": "discount amount of base price",
              "allOf": [
                {
                  "$ref": "#/definitions/PointsAndCash"
                }
              ]
            },
            "taxes": {
              "description": "Taxes breakdown",
              "type": "array",
              "items": {
                "$ref": "#/definitions/Tax"
              }
            },
            "fees": {
              "description": "Fees breakdown",
              "type": "array",
              "items": {
                "$ref": "#/definitions/Fee"
              }
            },
            "totalTaxes": {
              "$ref": "#/definitions/PointsAndCash"
            },
            "totalFees": {
              "$ref": "#/definitions/PointsAndCash"
            }
          }
        }
      ]
    },
    "converted": {
      "description": "quotation representing a price valuation and its components. The monetaryAmount at the root are the sum of base and all the taxes/fees/discounts",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "monetaryAmount": {
              "type": "string",
              "example": "10.5"
            }
          }
        },
        {
          "type": "object",
          "properties": {
            "currencyCode": {
              "type": "string",
              "example": "USD"
            },
            "isEstimated": {
              "type": "boolean",
              "description": "indicates if the price is pre-estimated prior to ride. Becomes mandatory for transferType = TAXI"
            },
            "base": {
              "description": "base price",
              "allOf": [
                {
                  "$ref": "#/definitions/PointsAndCash"
                }
              ]
            },
            "discount": {
              "description": "discount amount of base price",
              "allOf": [
                {
                  "$ref": "#/definitions/PointsAndCash"
                }
              ]
            },
            "taxes": {
              "description": "Taxes breakdown",
              "type": "array",
              "items": {
                "$ref": "#/definitions/Tax"
              }
            },
            "fees": {
              "description": "Fees breakdown",
              "type": "array",
              "items": {
                "$ref": "#/definitions/Fee"
              }
            },
            "totalTaxes": {
              "$ref": "#/definitions/PointsAndCash"
            },
            "totalFees": {
              "$ref": "#/definitions/PointsAndCash"
            }
          }
        }
      ]
    },
    "isBookable": {
      "type": "boolean",
      "description": "true if extra service is available for booking",
      "example": true
    },
    "taxIncluded": {
      "type": "boolean",
      "description": "true if tax included in extra service price",
      "example": true
    },
    "includedInTotal": {
      "type": "boolean",
      "description": "true if extra service price is included in total transfer amount",
      "example": "199.50"
    }
  },
  "required": [
    "code"
  ]
}