{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/parcelone/json-schema/parcelone-profile-schema.json",
  "title": "Profile",
  "description": "Profile - contains whole mandator,consigners,ceps,products and services hierarchy for a customer or set filters",
  "x-generated": "2026-10-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/parcelone-shipping-openapi.json#/components/schemas/Profile",
  "properties": {
    "MandatorID": {
      "description": "- Mandator ID - MaxLen 20",
      "type": "string"
    },
    "MandatorShortname": {
      "description": "- Mandator Shortname - MaxLen 20",
      "type": "string"
    },
    "Default": {
      "description": "- if Default mandator - bool",
      "type": "integer",
      "default": 0,
      "enum": [
        0,
        1
      ]
    },
    "Consigners": {
      "description": "- List of Consigners for this Mandator",
      "type": "array",
      "items": {
        "$ref": "#/$defs/Consigner"
      }
    },
    "CEPs": {
      "description": "- List of CEPs for this Mandator",
      "type": "array",
      "items": {
        "$ref": "#/$defs/CEP"
      }
    }
  },
  "type": "object",
  "$defs": {
    "CEP": {
      "description": "Carrier information with products array",
      "properties": {
        "CEPID": {
          "description": "- CEP ID - MaxLen 20",
          "type": "string"
        },
        "CEPLongname": {
          "description": "- CEP Description - no Maxlimit",
          "type": "string"
        },
        "Default": {
          "description": "- if default CEP for this Mandator - bool",
          "type": "integer"
        },
        "Products": {
          "description": "- List of Products for this CEP",
          "type": "array",
          "items": {
            "$ref": "#/$defs/Product"
          }
        }
      },
      "type": "object"
    },
    "Consigner": {
      "description": "Consigner / Sender Information",
      "required": [
        "Currency",
        "Value"
      ],
      "properties": {
        "ConsignerID": {
          "description": "- Consigner ID - MaxLen 50",
          "type": "string"
        },
        "Shortname": {
          "description": "- Consigner Shortname - MaxLen 30",
          "type": "string"
        },
        "Default": {
          "description": "- if default Consigner for this Mandator - bool",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "Product": {
      "description": "Product Information",
      "properties": {
        "ProductID": {
          "description": "- Produkt ID - MaxLen 20",
          "type": "string"
        },
        "ProductName": {
          "description": "Produkt Description - MaxLen 20"
        },
        "Default": {
          "description": "if Default Product for CEP - bool",
          "default": 0,
          "enum": [
            0,
            1
          ]
        },
        "Services": {
          "$ref": "#/$defs/Service"
        }
      },
      "type": "object"
    },
    "Service": {
      "description": "Service Information",
      "properties": {
        "ServiceID": {
          "description": "- Service ID - MaxLen 20",
          "type": "string"
        },
        "ServiceName": {
          "description": "- Service Description - MaxLen 30",
          "type": "string"
        },
        "Default": {
          "description": "- Service Default - bool",
          "type": "integer"
        },
        "AmountNeeded": {
          "description": "- if Amount is required for this Service (e.g. for COD-Service)- bool",
          "type": "integer"
        },
        "CurrencyNeeded": {
          "description": "- if Currency is required for this Service (e.g. for COD-Service)- bool",
          "type": "integer"
        }
      },
      "type": "object"
    }
  }
}