{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/CustomerOrder",
  "title": "CustomerOrder",
  "type": "object",
  "description": "Customer order attached to a customer, recorded in the POI system.  Allows the management of customer orders by the POI, for instance in a multi-channel or a click and collect sale transaction.",
  "properties": {
    "CustomerOrderID": {
      "type": "string",
      "pattern": "^.+$",
      "description": "Additional and optional identification of a customer order."
    },
    "SaleReferenceID": {
      "type": "string",
      "pattern": "^.+$"
    },
    "OpenOrderState": {
      "type": "boolean",
      "default": true
    },
    "StartDate": {
      "type": "string",
      "format": "date-time",
      "description": "Date time of the beginning of an operation."
    },
    "EndDate": {
      "type": "string",
      "format": "date-time",
      "description": "Date time of the end of an operation."
    },
    "ForecastedAmount": {
      "type": "number",
      "maximum": 99999999.999999,
      "minimum": 0
    },
    "CurrentAmount": {
      "type": "number",
      "maximum": 99999999.999999,
      "minimum": 0,
      "description": "Total amount of all completed transactions of a customer order."
    },
    "Currency": {
      "type": "string",
      "pattern": "^[A-Z]{3,3}$",
      "description": "Currency of a monetary amount."
    },
    "AccessedBy": {
      "type": "string",
      "pattern": "^.+$"
    },
    "AdditionalInformation": {
      "type": "string",
      "pattern": "^.+$",
      "description": "Unqualified information."
    }
  },
  "required": [
    "SaleReferenceID",
    "StartDate",
    "ForecastedAmount",
    "CurrentAmount"
  ]
}