{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/entur/main/json-schema/entur-order-note-request-schema.json",
  "title": "OrderNoteRequest",
  "x-generated": "2026-10-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/entur-order-note-partner-openapi.yml#/components/schemas/OrderNoteRequest",
  "required": [
    "orderId",
    "text",
    "type"
  ],
  "type": "object",
  "properties": {
    "orderId": {
      "maxLength": 8,
      "minLength": 8,
      "type": "string",
      "description": "Id of order the note refers to. Unique in combination with `type`."
    },
    "orderLineIds": {
      "type": "array",
      "description": "Specify if the order note should only be part of specific order lines. If left empty, the note will belong to the whole order.",
      "items": {
        "type": "string"
      }
    },
    "text": {
      "type": "string",
      "description": "Contents of order-note. Usage is specific to `type`"
    },
    "type": {
      "$ref": "#/$defs/OrderNoteType"
    },
    "createdBy": {
      "type": "string",
      "description": "Identifying information about who created the note. Should adhere to the pattern 'system:identifer'. Due to this standard, the character ':' is not available for use in either system or identifier. See examples."
    },
    "updatedBy": {
      "type": "string",
      "description": "Identifying information about who most recently updated the note. Should adhere to the pattern 'system:identifer'. Due to this standard, the character ':' is not available for use in either system or identifier. See examples."
    }
  },
  "$defs": {
    "OrderNoteType": {
      "type": "string",
      "description": "Type of Order Note. \n\nPENALTY_FARE - info used to generate penalty fare invoice \n\nZERO_TICKET - info regarding why zero ticket issued \n\nVENDOR_CONTACT_INFO_OVERRIDE - updated contact info for vendor eg. for group travel offer\n\nDEADLINE - deadline for changes to order eg. for group travel offer\n\nCUSTOMER_COMMUNICATION - note sent to customer, either manually or automated \n\nTERMS_AND_CONDITIONS - note relating to terms and conditions\n\nREFUND - note created as a part of refund process, either manually or automated \n\nGENERIC - note with additional order info \n\nUNKNOWN - untagged info ",
      "default": "UNKNOWN",
      "enum": [
        "PENALTY_FARE",
        "ZERO_TICKET",
        "VENDOR_CONTACT_INFO_OVERRIDE",
        "DEADLINE",
        "CUSTOMER_COMMUNICATION",
        "TERMS_AND_CONDITIONS",
        "REFUND",
        "GENERIC",
        "UNKNOWN"
      ]
    }
  }
}