{
  "$defs": {
    "__schema0": {
      "additionalProperties": false,
      "description": "A canonical purchase order, commonly mapped from X12 850",
      "properties": {
        "allowanceCharges": {
          "$ref": "#/$defs/__schema93"
        },
        "currency": {
          "$ref": "#/$defs/__schema22"
        },
        "documentType": {
          "$ref": "#/$defs/__schema15"
        },
        "extensions": {
          "$ref": "#/$defs/__schema14"
        },
        "lines": {
          "$ref": "#/$defs/__schema65"
        },
        "notes": {
          "$ref": "#/$defs/__schema12"
        },
        "orderedAt": {
          "$ref": "#/$defs/__schema19"
        },
        "parties": {
          "$ref": "#/$defs/__schema24"
        },
        "paymentTerms": {
          "$ref": "#/$defs/__schema56"
        },
        "purchaseOrderNumber": {
          "$ref": "#/$defs/__schema16"
        },
        "purpose": {
          "$ref": "#/$defs/__schema17"
        },
        "references": {
          "$ref": "#/$defs/__schema2"
        },
        "requestedDelivery": {
          "$ref": "#/$defs/__schema52"
        },
        "revision": {
          "$ref": "#/$defs/__schema18"
        },
        "schemaVersion": {
          "$ref": "#/$defs/__schema1"
        },
        "taxes": {
          "$ref": "#/$defs/__schema94"
        },
        "totals": {
          "$ref": "#/$defs/__schema101"
        }
      },
      "required": [
        "schemaVersion",
        "documentType",
        "purchaseOrderNumber",
        "purpose",
        "orderedAt",
        "parties",
        "lines"
      ],
      "type": "object"
    },
    "__schema1": {
      "const": "1.0",
      "type": "string"
    },
    "__schema10": {
      "pattern": "^[a-z][a-z0-9]*(?:[.-][a-z0-9]+)*:[A-Za-z][A-Za-z0-9_.-]*$",
      "type": "string"
    },
    "__schema100": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema101": {
      "additionalProperties": false,
      "description": "Purchase-order control and monetary totals",
      "properties": {
        "allowanceAmount": {
          "$ref": "#/$defs/__schema104"
        },
        "chargeAmount": {
          "$ref": "#/$defs/__schema105"
        },
        "lineItemCount": {
          "$ref": "#/$defs/__schema102"
        },
        "merchandiseAmount": {
          "$ref": "#/$defs/__schema103"
        },
        "taxAmount": {
          "$ref": "#/$defs/__schema106"
        },
        "totalAmount": {
          "$ref": "#/$defs/__schema107"
        }
      },
      "required": [
        "lineItemCount"
      ],
      "type": "object"
    },
    "__schema102": {
      "maximum": 9007199254740991,
      "minimum": 0,
      "type": "integer"
    },
    "__schema103": {
      "$ref": "#/$defs/__schema78"
    },
    "__schema104": {
      "$ref": "#/$defs/__schema78"
    },
    "__schema105": {
      "$ref": "#/$defs/__schema78"
    },
    "__schema106": {
      "$ref": "#/$defs/__schema78"
    },
    "__schema107": {
      "$ref": "#/$defs/__schema78"
    },
    "__schema108": {
      "additionalProperties": false,
      "description": "A canonical purchase-order change, commonly mapped from X12 860",
      "properties": {
        "changedAt": {
          "$ref": "#/$defs/__schema19"
        },
        "changeNumber": {
          "$ref": "#/$defs/__schema111"
        },
        "changes": {
          "$ref": "#/$defs/__schema115"
        },
        "changeType": {
          "$ref": "#/$defs/__schema112"
        },
        "documentType": {
          "$ref": "#/$defs/__schema109"
        },
        "effectiveAt": {
          "$ref": "#/$defs/__schema113"
        },
        "extensions": {
          "$ref": "#/$defs/__schema14"
        },
        "notes": {
          "$ref": "#/$defs/__schema12"
        },
        "parties": {
          "$ref": "#/$defs/__schema114"
        },
        "purchaseOrderNumber": {
          "$ref": "#/$defs/__schema110"
        },
        "references": {
          "$ref": "#/$defs/__schema2"
        },
        "schemaVersion": {
          "$ref": "#/$defs/__schema1"
        }
      },
      "required": [
        "schemaVersion",
        "documentType",
        "purchaseOrderNumber",
        "changeNumber",
        "changeType",
        "changedAt",
        "parties"
      ],
      "type": "object"
    },
    "__schema109": {
      "const": "purchase_order_change",
      "type": "string"
    },
    "__schema11": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "items": {
            "$ref": "#/$defs/__schema11"
          },
          "type": "array"
        },
        {
          "additionalProperties": {
            "$ref": "#/$defs/__schema11"
          },
          "propertyNames": {
            "type": "string"
          },
          "type": "object"
        }
      ]
    },
    "__schema110": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema111": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema112": {
      "enum": [
        "change",
        "cancel"
      ],
      "type": "string"
    },
    "__schema113": {
      "$ref": "#/$defs/__schema19"
    },
    "__schema114": {
      "items": {
        "$ref": "#/$defs/__schema25"
      },
      "maxItems": 100,
      "minItems": 1,
      "type": "array"
    },
    "__schema115": {
      "items": {
        "$ref": "#/$defs/__schema116"
      },
      "maxItems": 50000,
      "type": "array"
    },
    "__schema116": {
      "description": "A discriminated purchase-order line change",
      "oneOf": [
        {
          "$ref": "#/$defs/__schema117"
        },
        {
          "$ref": "#/$defs/__schema126"
        },
        {
          "$ref": "#/$defs/__schema132"
        }
      ]
    },
    "__schema117": {
      "additionalProperties": false,
      "description": "A line added by a purchase-order change",
      "properties": {
        "action": {
          "$ref": "#/$defs/__schema123"
        },
        "extensions": {
          "$ref": "#/$defs/__schema122"
        },
        "lineNumber": {
          "$ref": "#/$defs/__schema118"
        },
        "orderedQuantity": {
          "$ref": "#/$defs/__schema73"
        },
        "product": {
          "$ref": "#/$defs/__schema68"
        },
        "reason": {
          "$ref": "#/$defs/__schema120"
        },
        "reasonCode": {
          "$ref": "#/$defs/__schema119"
        },
        "references": {
          "$ref": "#/$defs/__schema121"
        },
        "requestedDelivery": {
          "$ref": "#/$defs/__schema125"
        },
        "unitPrice": {
          "$ref": "#/$defs/__schema124"
        }
      },
      "required": [
        "lineNumber",
        "action",
        "product",
        "orderedQuantity"
      ],
      "type": "object"
    },
    "__schema118": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema119": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema12": {
      "items": {
        "$ref": "#/$defs/__schema13"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "__schema120": {
      "maxLength": 500,
      "minLength": 1,
      "type": "string"
    },
    "__schema121": {
      "items": {
        "$ref": "#/$defs/__schema3"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "__schema122": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema123": {
      "const": "add",
      "type": "string"
    },
    "__schema124": {
      "$ref": "#/$defs/__schema78"
    },
    "__schema125": {
      "$ref": "#/$defs/__schema53"
    },
    "__schema126": {
      "additionalProperties": false,
      "description": "A line updated by a purchase-order change",
      "properties": {
        "action": {
          "$ref": "#/$defs/__schema127"
        },
        "extensions": {
          "$ref": "#/$defs/__schema122"
        },
        "lineNumber": {
          "$ref": "#/$defs/__schema118"
        },
        "orderedQuantity": {
          "$ref": "#/$defs/__schema129"
        },
        "product": {
          "$ref": "#/$defs/__schema128"
        },
        "reason": {
          "$ref": "#/$defs/__schema120"
        },
        "reasonCode": {
          "$ref": "#/$defs/__schema119"
        },
        "references": {
          "$ref": "#/$defs/__schema121"
        },
        "requestedDelivery": {
          "$ref": "#/$defs/__schema131"
        },
        "unitPrice": {
          "$ref": "#/$defs/__schema130"
        }
      },
      "required": [
        "lineNumber",
        "action"
      ],
      "type": "object"
    },
    "__schema127": {
      "const": "update",
      "type": "string"
    },
    "__schema128": {
      "$ref": "#/$defs/__schema68"
    },
    "__schema129": {
      "$ref": "#/$defs/__schema73"
    },
    "__schema13": {
      "maxLength": 5000,
      "minLength": 1,
      "type": "string"
    },
    "__schema130": {
      "$ref": "#/$defs/__schema78"
    },
    "__schema131": {
      "$ref": "#/$defs/__schema53"
    },
    "__schema132": {
      "additionalProperties": false,
      "description": "A line cancelled by a purchase-order change",
      "properties": {
        "action": {
          "$ref": "#/$defs/__schema133"
        },
        "extensions": {
          "$ref": "#/$defs/__schema122"
        },
        "lineNumber": {
          "$ref": "#/$defs/__schema118"
        },
        "reason": {
          "$ref": "#/$defs/__schema120"
        },
        "reasonCode": {
          "$ref": "#/$defs/__schema119"
        },
        "references": {
          "$ref": "#/$defs/__schema121"
        }
      },
      "required": [
        "lineNumber",
        "action"
      ],
      "type": "object"
    },
    "__schema133": {
      "const": "cancel",
      "type": "string"
    },
    "__schema134": {
      "additionalProperties": false,
      "description": "A canonical order acknowledgment, commonly mapped to X12 855 or 865",
      "properties": {
        "acknowledgedAt": {
          "$ref": "#/$defs/__schema21"
        },
        "acknowledgmentFor": {
          "$ref": "#/$defs/__schema137"
        },
        "acknowledgmentNumber": {
          "$ref": "#/$defs/__schema136"
        },
        "documentType": {
          "$ref": "#/$defs/__schema135"
        },
        "extensions": {
          "$ref": "#/$defs/__schema14"
        },
        "lines": {
          "$ref": "#/$defs/__schema142"
        },
        "notes": {
          "$ref": "#/$defs/__schema12"
        },
        "parties": {
          "$ref": "#/$defs/__schema141"
        },
        "purchaseOrderChangeNumber": {
          "$ref": "#/$defs/__schema139"
        },
        "purchaseOrderNumber": {
          "$ref": "#/$defs/__schema138"
        },
        "reason": {
          "$ref": "#/$defs/__schema156"
        },
        "reasonCode": {
          "$ref": "#/$defs/__schema155"
        },
        "references": {
          "$ref": "#/$defs/__schema2"
        },
        "schemaVersion": {
          "$ref": "#/$defs/__schema1"
        },
        "status": {
          "$ref": "#/$defs/__schema140"
        }
      },
      "required": [
        "schemaVersion",
        "documentType",
        "acknowledgmentNumber",
        "acknowledgmentFor",
        "purchaseOrderNumber",
        "acknowledgedAt",
        "status",
        "parties"
      ],
      "type": "object"
    },
    "__schema135": {
      "const": "order_acknowledgment",
      "type": "string"
    },
    "__schema136": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema137": {
      "enum": [
        "purchase_order",
        "purchase_order_change"
      ],
      "type": "string"
    },
    "__schema138": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema139": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema14": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema140": {
      "enum": [
        "accepted",
        "accepted_with_changes",
        "rejected"
      ],
      "type": "string"
    },
    "__schema141": {
      "items": {
        "$ref": "#/$defs/__schema25"
      },
      "maxItems": 100,
      "minItems": 1,
      "type": "array"
    },
    "__schema142": {
      "items": {
        "$ref": "#/$defs/__schema143"
      },
      "maxItems": 50000,
      "type": "array"
    },
    "__schema143": {
      "additionalProperties": false,
      "description": "A line-level business response to an order",
      "properties": {
        "acceptedQuantity": {
          "$ref": "#/$defs/__schema148"
        },
        "backorderedQuantity": {
          "$ref": "#/$defs/__schema149"
        },
        "expectedShipDate": {
          "$ref": "#/$defs/__schema150"
        },
        "extensions": {
          "$ref": "#/$defs/__schema154"
        },
        "lineNumber": {
          "$ref": "#/$defs/__schema144"
        },
        "orderedQuantity": {
          "$ref": "#/$defs/__schema147"
        },
        "product": {
          "$ref": "#/$defs/__schema146"
        },
        "reason": {
          "$ref": "#/$defs/__schema152"
        },
        "reasonCode": {
          "$ref": "#/$defs/__schema151"
        },
        "references": {
          "$ref": "#/$defs/__schema153"
        },
        "status": {
          "$ref": "#/$defs/__schema145"
        }
      },
      "required": [
        "lineNumber",
        "status"
      ],
      "type": "object"
    },
    "__schema144": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema145": {
      "enum": [
        "accepted",
        "accepted_with_changes",
        "rejected",
        "backordered",
        "substituted",
        "cancelled"
      ],
      "type": "string"
    },
    "__schema146": {
      "$ref": "#/$defs/__schema68"
    },
    "__schema147": {
      "$ref": "#/$defs/__schema73"
    },
    "__schema148": {
      "$ref": "#/$defs/__schema73"
    },
    "__schema149": {
      "$ref": "#/$defs/__schema73"
    },
    "__schema15": {
      "const": "purchase_order",
      "type": "string"
    },
    "__schema150": {
      "$ref": "#/$defs/__schema20"
    },
    "__schema151": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema152": {
      "maxLength": 500,
      "minLength": 1,
      "type": "string"
    },
    "__schema153": {
      "items": {
        "$ref": "#/$defs/__schema3"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "__schema154": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema155": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema156": {
      "maxLength": 1000,
      "minLength": 1,
      "type": "string"
    },
    "__schema157": {
      "additionalProperties": false,
      "description": "A canonical hierarchical shipment notice, commonly mapped to X12 856",
      "properties": {
        "carrier": {
          "$ref": "#/$defs/__schema165"
        },
        "documentType": {
          "$ref": "#/$defs/__schema158"
        },
        "equipmentIdentifiers": {
          "$ref": "#/$defs/__schema167"
        },
        "estimatedDeliveryAt": {
          "$ref": "#/$defs/__schema161"
        },
        "extensions": {
          "$ref": "#/$defs/__schema14"
        },
        "notes": {
          "$ref": "#/$defs/__schema12"
        },
        "packages": {
          "$ref": "#/$defs/__schema168"
        },
        "parties": {
          "$ref": "#/$defs/__schema164"
        },
        "purchaseOrderNumbers": {
          "$ref": "#/$defs/__schema162"
        },
        "purpose": {
          "$ref": "#/$defs/__schema160"
        },
        "references": {
          "$ref": "#/$defs/__schema2"
        },
        "schemaVersion": {
          "$ref": "#/$defs/__schema1"
        },
        "shipmentNoticeNumber": {
          "$ref": "#/$defs/__schema159"
        },
        "shippedAt": {
          "$ref": "#/$defs/__schema21"
        },
        "totals": {
          "$ref": "#/$defs/__schema193"
        },
        "transportMethodCode": {
          "$ref": "#/$defs/__schema166"
        }
      },
      "required": [
        "schemaVersion",
        "documentType",
        "shipmentNoticeNumber",
        "purpose",
        "shippedAt",
        "purchaseOrderNumbers",
        "parties",
        "packages"
      ],
      "type": "object"
    },
    "__schema158": {
      "const": "shipment_notice",
      "type": "string"
    },
    "__schema159": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema16": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema160": {
      "enum": [
        "original",
        "replacement",
        "cancel"
      ],
      "type": "string"
    },
    "__schema161": {
      "$ref": "#/$defs/__schema19"
    },
    "__schema162": {
      "items": {
        "$ref": "#/$defs/__schema163"
      },
      "maxItems": 10000,
      "minItems": 1,
      "type": "array"
    },
    "__schema163": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema164": {
      "items": {
        "$ref": "#/$defs/__schema25"
      },
      "maxItems": 100,
      "minItems": 1,
      "type": "array"
    },
    "__schema165": {
      "$ref": "#/$defs/__schema25"
    },
    "__schema166": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema167": {
      "items": {
        "$ref": "#/$defs/__schema28"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "__schema168": {
      "items": {
        "$ref": "#/$defs/__schema169"
      },
      "maxItems": 100000,
      "minItems": 1,
      "type": "array"
    },
    "__schema169": {
      "$ref": "#/$defs/__schema170",
      "description": "A recursively nested shipment, pallet, carton, or inner package"
    },
    "__schema17": {
      "enum": [
        "original",
        "replacement",
        "duplicate"
      ],
      "type": "string"
    },
    "__schema170": {
      "additionalProperties": false,
      "properties": {
        "children": {
          "items": {
            "$ref": "#/$defs/__schema169"
          },
          "maxItems": 100000,
          "type": "array"
        },
        "contents": {
          "items": {
            "$ref": "#/$defs/__schema176"
          },
          "maxItems": 100000,
          "type": "array"
        },
        "declaredValue": {
          "$ref": "#/$defs/__schema78"
        },
        "dimensions": {
          "additionalProperties": false,
          "description": "Physical package dimensions",
          "properties": {
            "height": {
              "$ref": "#/$defs/__schema175"
            },
            "length": {
              "$ref": "#/$defs/__schema171"
            },
            "width": {
              "$ref": "#/$defs/__schema174"
            }
          },
          "type": "object"
        },
        "extensions": {
          "$ref": "#/$defs/__schema9"
        },
        "level": {
          "enum": [
            "shipment",
            "pallet",
            "carton",
            "inner_pack",
            "other"
          ],
          "type": "string"
        },
        "packageId": {
          "maxLength": 200,
          "minLength": 1,
          "type": "string"
        },
        "packageTypeCode": {
          "maxLength": 100,
          "minLength": 1,
          "type": "string"
        },
        "sscc": {
          "description": "GS1 SSCC-18, including its check digit",
          "pattern": "^\\d{18}$",
          "type": "string"
        },
        "trackingIdentifiers": {
          "items": {
            "$ref": "#/$defs/__schema28"
          },
          "maxItems": 1000,
          "type": "array"
        },
        "weight": {
          "$ref": "#/$defs/__schema73"
        }
      },
      "required": [
        "packageId",
        "level"
      ],
      "type": "object"
    },
    "__schema171": {
      "$ref": "#/$defs/__schema172"
    },
    "__schema172": {
      "additionalProperties": false,
      "description": "A non-negative physical dimension",
      "properties": {
        "unitCode": {
          "$ref": "#/$defs/__schema74"
        },
        "value": {
          "$ref": "#/$defs/__schema173"
        }
      },
      "required": [
        "value",
        "unitCode"
      ],
      "type": "object"
    },
    "__schema173": {
      "description": "A non-negative base-10 decimal value without exponent notation",
      "maxLength": 100,
      "pattern": "^(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
      "type": "string"
    },
    "__schema174": {
      "$ref": "#/$defs/__schema172"
    },
    "__schema175": {
      "$ref": "#/$defs/__schema172"
    },
    "__schema176": {
      "additionalProperties": false,
      "description": "An item contained in a shipment package",
      "properties": {
        "extensions": {
          "$ref": "#/$defs/__schema192"
        },
        "lineNumber": {
          "$ref": "#/$defs/__schema177"
        },
        "lots": {
          "$ref": "#/$defs/__schema180"
        },
        "product": {
          "$ref": "#/$defs/__schema68"
        },
        "purchaseOrderLineNumber": {
          "$ref": "#/$defs/__schema179"
        },
        "purchaseOrderNumber": {
          "$ref": "#/$defs/__schema178"
        },
        "references": {
          "$ref": "#/$defs/__schema191"
        },
        "serials": {
          "$ref": "#/$defs/__schema187"
        },
        "shippedQuantity": {
          "$ref": "#/$defs/__schema73"
        }
      },
      "required": [
        "lineNumber",
        "product",
        "shippedQuantity"
      ],
      "type": "object"
    },
    "__schema177": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema178": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema179": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema18": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema180": {
      "items": {
        "$ref": "#/$defs/__schema181"
      },
      "maxItems": 10000,
      "type": "array"
    },
    "__schema181": {
      "additionalProperties": false,
      "description": "Lot or batch traceability data",
      "properties": {
        "expiresOn": {
          "$ref": "#/$defs/__schema185"
        },
        "extensions": {
          "$ref": "#/$defs/__schema186"
        },
        "lotNumber": {
          "$ref": "#/$defs/__schema182"
        },
        "manufacturedOn": {
          "$ref": "#/$defs/__schema184"
        },
        "quantity": {
          "$ref": "#/$defs/__schema183"
        }
      },
      "required": [
        "lotNumber"
      ],
      "type": "object"
    },
    "__schema182": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema183": {
      "$ref": "#/$defs/__schema73"
    },
    "__schema184": {
      "$ref": "#/$defs/__schema20"
    },
    "__schema185": {
      "$ref": "#/$defs/__schema20"
    },
    "__schema186": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema187": {
      "items": {
        "$ref": "#/$defs/__schema188"
      },
      "maxItems": 100000,
      "type": "array"
    },
    "__schema188": {
      "additionalProperties": false,
      "description": "Serialized-item traceability data",
      "properties": {
        "extensions": {
          "$ref": "#/$defs/__schema190"
        },
        "serialNumber": {
          "$ref": "#/$defs/__schema189"
        }
      },
      "required": [
        "serialNumber"
      ],
      "type": "object"
    },
    "__schema189": {
      "maxLength": 500,
      "minLength": 1,
      "type": "string"
    },
    "__schema19": {
      "anyOf": [
        {
          "$ref": "#/$defs/__schema20"
        },
        {
          "$ref": "#/$defs/__schema21"
        }
      ],
      "description": "An ISO 8601 date or timestamp"
    },
    "__schema190": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema191": {
      "items": {
        "$ref": "#/$defs/__schema3"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "__schema192": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema193": {
      "additionalProperties": false,
      "description": "Shipment control totals",
      "properties": {
        "itemQuantity": {
          "$ref": "#/$defs/__schema195"
        },
        "packageCount": {
          "$ref": "#/$defs/__schema194"
        },
        "weight": {
          "$ref": "#/$defs/__schema196"
        }
      },
      "type": "object"
    },
    "__schema194": {
      "maximum": 9007199254740991,
      "minimum": 0,
      "type": "integer"
    },
    "__schema195": {
      "$ref": "#/$defs/__schema73"
    },
    "__schema196": {
      "$ref": "#/$defs/__schema73"
    },
    "__schema197": {
      "additionalProperties": false,
      "description": "A canonical invoice, commonly mapped to X12 810",
      "properties": {
        "allowanceCharges": {
          "$ref": "#/$defs/__schema217"
        },
        "documentType": {
          "$ref": "#/$defs/__schema198"
        },
        "dueDate": {
          "$ref": "#/$defs/__schema201"
        },
        "extensions": {
          "$ref": "#/$defs/__schema14"
        },
        "invoiceDate": {
          "$ref": "#/$defs/__schema20"
        },
        "invoiceNumber": {
          "$ref": "#/$defs/__schema199"
        },
        "invoiceType": {
          "$ref": "#/$defs/__schema200"
        },
        "lines": {
          "$ref": "#/$defs/__schema208"
        },
        "notes": {
          "$ref": "#/$defs/__schema12"
        },
        "parties": {
          "$ref": "#/$defs/__schema206"
        },
        "paymentTerms": {
          "$ref": "#/$defs/__schema207"
        },
        "purchaseOrderNumbers": {
          "$ref": "#/$defs/__schema202"
        },
        "references": {
          "$ref": "#/$defs/__schema2"
        },
        "schemaVersion": {
          "$ref": "#/$defs/__schema1"
        },
        "shipmentNoticeNumbers": {
          "$ref": "#/$defs/__schema204"
        },
        "taxes": {
          "$ref": "#/$defs/__schema218"
        },
        "totals": {
          "$ref": "#/$defs/__schema219"
        }
      },
      "required": [
        "schemaVersion",
        "documentType",
        "invoiceNumber",
        "invoiceType",
        "invoiceDate",
        "parties",
        "lines",
        "totals"
      ],
      "type": "object"
    },
    "__schema198": {
      "const": "invoice",
      "type": "string"
    },
    "__schema199": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema2": {
      "items": {
        "$ref": "#/$defs/__schema3"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "__schema20": {
      "description": "An ISO 8601 calendar date",
      "format": "date",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
      "type": "string"
    },
    "__schema200": {
      "enum": [
        "invoice",
        "credit_memo",
        "debit_memo",
        "corrected_invoice"
      ],
      "type": "string"
    },
    "__schema201": {
      "$ref": "#/$defs/__schema20"
    },
    "__schema202": {
      "items": {
        "$ref": "#/$defs/__schema203"
      },
      "maxItems": 10000,
      "type": "array"
    },
    "__schema203": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema204": {
      "items": {
        "$ref": "#/$defs/__schema205"
      },
      "maxItems": 10000,
      "type": "array"
    },
    "__schema205": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema206": {
      "items": {
        "$ref": "#/$defs/__schema25"
      },
      "maxItems": 100,
      "minItems": 1,
      "type": "array"
    },
    "__schema207": {
      "$ref": "#/$defs/__schema57"
    },
    "__schema208": {
      "items": {
        "$ref": "#/$defs/__schema209"
      },
      "maxItems": 50000,
      "minItems": 1,
      "type": "array"
    },
    "__schema209": {
      "additionalProperties": false,
      "description": "An invoice line",
      "properties": {
        "allowanceCharges": {
          "$ref": "#/$defs/__schema213"
        },
        "extensions": {
          "$ref": "#/$defs/__schema216"
        },
        "invoicedQuantity": {
          "$ref": "#/$defs/__schema73"
        },
        "lineAmount": {
          "$ref": "#/$defs/__schema78"
        },
        "lineNumber": {
          "$ref": "#/$defs/__schema210"
        },
        "product": {
          "$ref": "#/$defs/__schema68"
        },
        "purchaseOrderLineNumber": {
          "$ref": "#/$defs/__schema211"
        },
        "references": {
          "$ref": "#/$defs/__schema215"
        },
        "shipmentNoticeLineNumber": {
          "$ref": "#/$defs/__schema212"
        },
        "taxes": {
          "$ref": "#/$defs/__schema214"
        },
        "unitPrice": {
          "$ref": "#/$defs/__schema78"
        }
      },
      "required": [
        "lineNumber",
        "product",
        "invoicedQuantity",
        "unitPrice",
        "lineAmount"
      ],
      "type": "object"
    },
    "__schema21": {
      "description": "An ISO 8601 timestamp with a UTC offset",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      "type": "string"
    },
    "__schema210": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema211": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema212": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema213": {
      "items": {
        "$ref": "#/$defs/__schema84"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "__schema214": {
      "items": {
        "$ref": "#/$defs/__schema95"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "__schema215": {
      "items": {
        "$ref": "#/$defs/__schema3"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "__schema216": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema217": {
      "items": {
        "$ref": "#/$defs/__schema84"
      },
      "maxItems": 10000,
      "type": "array"
    },
    "__schema218": {
      "items": {
        "$ref": "#/$defs/__schema95"
      },
      "maxItems": 10000,
      "type": "array"
    },
    "__schema219": {
      "additionalProperties": false,
      "description": "Invoice control and monetary totals",
      "properties": {
        "allowanceAmount": {
          "$ref": "#/$defs/__schema221"
        },
        "chargeAmount": {
          "$ref": "#/$defs/__schema222"
        },
        "invoiceTotal": {
          "$ref": "#/$defs/__schema78"
        },
        "lineItemCount": {
          "$ref": "#/$defs/__schema220"
        },
        "subtotal": {
          "$ref": "#/$defs/__schema78"
        },
        "taxAmount": {
          "$ref": "#/$defs/__schema223"
        }
      },
      "required": [
        "lineItemCount",
        "subtotal",
        "invoiceTotal"
      ],
      "type": "object"
    },
    "__schema22": {
      "$ref": "#/$defs/__schema23"
    },
    "__schema220": {
      "maximum": 9007199254740991,
      "minimum": 0,
      "type": "integer"
    },
    "__schema221": {
      "$ref": "#/$defs/__schema78"
    },
    "__schema222": {
      "$ref": "#/$defs/__schema78"
    },
    "__schema223": {
      "$ref": "#/$defs/__schema78"
    },
    "__schema224": {
      "additionalProperties": false,
      "description": "A canonical inventory advice, commonly mapped to X12 846",
      "properties": {
        "asOf": {
          "$ref": "#/$defs/__schema21"
        },
        "documentType": {
          "$ref": "#/$defs/__schema225"
        },
        "extensions": {
          "$ref": "#/$defs/__schema14"
        },
        "inventoryAdviceNumber": {
          "$ref": "#/$defs/__schema226"
        },
        "items": {
          "$ref": "#/$defs/__schema228"
        },
        "notes": {
          "$ref": "#/$defs/__schema12"
        },
        "parties": {
          "$ref": "#/$defs/__schema227"
        },
        "references": {
          "$ref": "#/$defs/__schema2"
        },
        "schemaVersion": {
          "$ref": "#/$defs/__schema1"
        }
      },
      "required": [
        "schemaVersion",
        "documentType",
        "asOf",
        "parties",
        "items"
      ],
      "type": "object"
    },
    "__schema225": {
      "const": "inventory_advice",
      "type": "string"
    },
    "__schema226": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema227": {
      "items": {
        "$ref": "#/$defs/__schema25"
      },
      "maxItems": 100,
      "minItems": 1,
      "type": "array"
    },
    "__schema228": {
      "items": {
        "$ref": "#/$defs/__schema229"
      },
      "maxItems": 100000,
      "minItems": 1,
      "type": "array"
    },
    "__schema229": {
      "additionalProperties": false,
      "description": "Inventory balances for one product and optional location",
      "properties": {
        "extensions": {
          "$ref": "#/$defs/__schema239"
        },
        "location": {
          "$ref": "#/$defs/__schema230"
        },
        "lots": {
          "$ref": "#/$defs/__schema236"
        },
        "product": {
          "$ref": "#/$defs/__schema68"
        },
        "quantities": {
          "$ref": "#/$defs/__schema231"
        },
        "references": {
          "$ref": "#/$defs/__schema238"
        },
        "serials": {
          "$ref": "#/$defs/__schema237"
        }
      },
      "required": [
        "product",
        "quantities"
      ],
      "type": "object"
    },
    "__schema23": {
      "description": "ISO 4217 currency code",
      "pattern": "^[A-Z]{3}$",
      "type": "string"
    },
    "__schema230": {
      "$ref": "#/$defs/__schema25"
    },
    "__schema231": {
      "items": {
        "$ref": "#/$defs/__schema232"
      },
      "maxItems": 1000,
      "minItems": 1,
      "type": "array"
    },
    "__schema232": {
      "additionalProperties": false,
      "description": "A qualified inventory quantity",
      "properties": {
        "availableAt": {
          "$ref": "#/$defs/__schema234"
        },
        "extensions": {
          "$ref": "#/$defs/__schema235"
        },
        "quantity": {
          "$ref": "#/$defs/__schema73"
        },
        "status": {
          "$ref": "#/$defs/__schema233"
        }
      },
      "required": [
        "status",
        "quantity"
      ],
      "type": "object"
    },
    "__schema233": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema234": {
      "$ref": "#/$defs/__schema21"
    },
    "__schema235": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema236": {
      "items": {
        "$ref": "#/$defs/__schema181"
      },
      "maxItems": 10000,
      "type": "array"
    },
    "__schema237": {
      "items": {
        "$ref": "#/$defs/__schema188"
      },
      "maxItems": 100000,
      "type": "array"
    },
    "__schema238": {
      "items": {
        "$ref": "#/$defs/__schema3"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "__schema239": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema24": {
      "items": {
        "$ref": "#/$defs/__schema25"
      },
      "maxItems": 100,
      "minItems": 1,
      "type": "array"
    },
    "__schema240": {
      "additionalProperties": false,
      "description": "Data-only remittance advice, commonly mapped from X12 820",
      "properties": {
        "adviceDate": {
          "$ref": "#/$defs/__schema20"
        },
        "allocations": {
          "$ref": "#/$defs/__schema245"
        },
        "documentType": {
          "$ref": "#/$defs/__schema241"
        },
        "extensions": {
          "$ref": "#/$defs/__schema14"
        },
        "notes": {
          "$ref": "#/$defs/__schema12"
        },
        "payee": {
          "$ref": "#/$defs/__schema25"
        },
        "payer": {
          "$ref": "#/$defs/__schema25"
        },
        "references": {
          "$ref": "#/$defs/__schema2"
        },
        "remittanceAdviceNumber": {
          "$ref": "#/$defs/__schema242"
        },
        "remittedAmount": {
          "$ref": "#/$defs/__schema78"
        },
        "schemaVersion": {
          "$ref": "#/$defs/__schema1"
        },
        "settlementDate": {
          "$ref": "#/$defs/__schema243"
        },
        "settlementReference": {
          "$ref": "#/$defs/__schema244"
        }
      },
      "required": [
        "schemaVersion",
        "documentType",
        "remittanceAdviceNumber",
        "adviceDate",
        "payer",
        "payee",
        "remittedAmount",
        "allocations"
      ],
      "type": "object"
    },
    "__schema241": {
      "const": "remittance_advice",
      "type": "string"
    },
    "__schema242": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema243": {
      "$ref": "#/$defs/__schema20"
    },
    "__schema244": {
      "$ref": "#/$defs/__schema28"
    },
    "__schema245": {
      "items": {
        "$ref": "#/$defs/__schema246"
      },
      "maxItems": 100000,
      "minItems": 1,
      "type": "array"
    },
    "__schema246": {
      "additionalProperties": false,
      "description": "An informational allocation of remittance data to an invoice",
      "properties": {
        "adjustments": {
          "$ref": "#/$defs/__schema252"
        },
        "discountAmount": {
          "$ref": "#/$defs/__schema250"
        },
        "extensions": {
          "$ref": "#/$defs/__schema259"
        },
        "invoiceDate": {
          "$ref": "#/$defs/__schema248"
        },
        "invoiceNumber": {
          "$ref": "#/$defs/__schema247"
        },
        "originalAmount": {
          "$ref": "#/$defs/__schema249"
        },
        "paidAmount": {
          "$ref": "#/$defs/__schema78"
        },
        "references": {
          "$ref": "#/$defs/__schema258"
        },
        "remainingAmount": {
          "$ref": "#/$defs/__schema251"
        }
      },
      "required": [
        "invoiceNumber",
        "paidAmount"
      ],
      "type": "object"
    },
    "__schema247": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema248": {
      "$ref": "#/$defs/__schema20"
    },
    "__schema249": {
      "$ref": "#/$defs/__schema78"
    },
    "__schema25": {
      "additionalProperties": false,
      "description": "A business party participating in a document",
      "properties": {
        "address": {
          "$ref": "#/$defs/__schema35"
        },
        "contacts": {
          "$ref": "#/$defs/__schema43"
        },
        "extensions": {
          "$ref": "#/$defs/__schema51"
        },
        "identifiers": {
          "$ref": "#/$defs/__schema27"
        },
        "name": {
          "$ref": "#/$defs/__schema34"
        },
        "role": {
          "$ref": "#/$defs/__schema26"
        }
      },
      "required": [
        "role",
        "identifiers"
      ],
      "type": "object"
    },
    "__schema250": {
      "$ref": "#/$defs/__schema78"
    },
    "__schema251": {
      "$ref": "#/$defs/__schema78"
    },
    "__schema252": {
      "items": {
        "$ref": "#/$defs/__schema253"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "__schema253": {
      "additionalProperties": false,
      "description": "An informational remittance allocation adjustment",
      "properties": {
        "amount": {
          "$ref": "#/$defs/__schema78"
        },
        "code": {
          "$ref": "#/$defs/__schema255"
        },
        "description": {
          "$ref": "#/$defs/__schema256"
        },
        "extensions": {
          "$ref": "#/$defs/__schema257"
        },
        "kind": {
          "$ref": "#/$defs/__schema254"
        }
      },
      "required": [
        "kind",
        "amount"
      ],
      "type": "object"
    },
    "__schema254": {
      "enum": [
        "allowance",
        "charge",
        "discount",
        "correction",
        "other"
      ],
      "type": "string"
    },
    "__schema255": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema256": {
      "maxLength": 500,
      "minLength": 1,
      "type": "string"
    },
    "__schema257": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema258": {
      "items": {
        "$ref": "#/$defs/__schema3"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "__schema259": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema26": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema260": {
      "additionalProperties": false,
      "description": "A canonical X12 TA1, 997, or 999 technical acknowledgment",
      "properties": {
        "acknowledgmentNumber": {
          "$ref": "#/$defs/__schema262"
        },
        "acknowledgmentType": {
          "$ref": "#/$defs/__schema263"
        },
        "documentType": {
          "$ref": "#/$defs/__schema261"
        },
        "errors": {
          "$ref": "#/$defs/__schema289"
        },
        "extensions": {
          "$ref": "#/$defs/__schema14"
        },
        "generatedAt": {
          "$ref": "#/$defs/__schema21"
        },
        "groups": {
          "$ref": "#/$defs/__schema267"
        },
        "notes": {
          "$ref": "#/$defs/__schema12"
        },
        "receiver": {
          "$ref": "#/$defs/__schema28"
        },
        "referencedInterchangeControlNumber": {
          "$ref": "#/$defs/__schema264"
        },
        "referencedInterchangeDateTime": {
          "$ref": "#/$defs/__schema265"
        },
        "references": {
          "$ref": "#/$defs/__schema2"
        },
        "schemaVersion": {
          "$ref": "#/$defs/__schema1"
        },
        "sender": {
          "$ref": "#/$defs/__schema28"
        },
        "status": {
          "$ref": "#/$defs/__schema266"
        }
      },
      "required": [
        "schemaVersion",
        "documentType",
        "acknowledgmentNumber",
        "acknowledgmentType",
        "generatedAt",
        "sender",
        "receiver",
        "referencedInterchangeControlNumber",
        "status"
      ],
      "type": "object"
    },
    "__schema261": {
      "const": "functional_acknowledgment",
      "type": "string"
    },
    "__schema262": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema263": {
      "enum": [
        "997",
        "999",
        "ta1"
      ],
      "type": "string"
    },
    "__schema264": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema265": {
      "$ref": "#/$defs/__schema21"
    },
    "__schema266": {
      "enum": [
        "accepted",
        "accepted_with_errors",
        "partially_accepted",
        "rejected"
      ],
      "type": "string"
    },
    "__schema267": {
      "items": {
        "$ref": "#/$defs/__schema268"
      },
      "maxItems": 100000,
      "type": "array"
    },
    "__schema268": {
      "additionalProperties": false,
      "description": "Acknowledgment outcome for one functional group",
      "properties": {
        "controlNumber": {
          "$ref": "#/$defs/__schema270"
        },
        "errors": {
          "$ref": "#/$defs/__schema287"
        },
        "extensions": {
          "$ref": "#/$defs/__schema288"
        },
        "functionalIdentifierCode": {
          "$ref": "#/$defs/__schema269"
        },
        "status": {
          "$ref": "#/$defs/__schema266"
        },
        "transactionSets": {
          "$ref": "#/$defs/__schema271"
        }
      },
      "required": [
        "controlNumber",
        "status"
      ],
      "type": "object"
    },
    "__schema269": {
      "maxLength": 20,
      "minLength": 1,
      "type": "string"
    },
    "__schema27": {
      "items": {
        "$ref": "#/$defs/__schema28"
      },
      "maxItems": 100,
      "minItems": 1,
      "type": "array"
    },
    "__schema270": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema271": {
      "items": {
        "$ref": "#/$defs/__schema272"
      },
      "maxItems": 100000,
      "type": "array"
    },
    "__schema272": {
      "additionalProperties": false,
      "description": "Acknowledgment outcome for one transaction set",
      "properties": {
        "controlNumber": {
          "$ref": "#/$defs/__schema274"
        },
        "errors": {
          "$ref": "#/$defs/__schema276"
        },
        "extensions": {
          "$ref": "#/$defs/__schema286"
        },
        "implementationConventionReference": {
          "$ref": "#/$defs/__schema275"
        },
        "status": {
          "$ref": "#/$defs/__schema266"
        },
        "transactionSetCode": {
          "$ref": "#/$defs/__schema273"
        }
      },
      "required": [
        "transactionSetCode",
        "controlNumber",
        "status"
      ],
      "type": "object"
    },
    "__schema273": {
      "maxLength": 20,
      "minLength": 1,
      "type": "string"
    },
    "__schema274": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema275": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema276": {
      "items": {
        "$ref": "#/$defs/__schema277"
      },
      "maxItems": 100000,
      "type": "array"
    },
    "__schema277": {
      "additionalProperties": false,
      "description": "A structured syntax or envelope error reported by an acknowledgment",
      "properties": {
        "badData": {
          "$ref": "#/$defs/__schema284"
        },
        "code": {
          "$ref": "#/$defs/__schema279"
        },
        "elementPosition": {
          "$ref": "#/$defs/__schema283"
        },
        "extensions": {
          "$ref": "#/$defs/__schema285"
        },
        "level": {
          "$ref": "#/$defs/__schema278"
        },
        "message": {
          "$ref": "#/$defs/__schema280"
        },
        "segmentId": {
          "$ref": "#/$defs/__schema281"
        },
        "segmentPosition": {
          "$ref": "#/$defs/__schema282"
        }
      },
      "required": [
        "level",
        "code"
      ],
      "type": "object"
    },
    "__schema278": {
      "enum": [
        "interchange",
        "functional_group",
        "transaction_set",
        "segment",
        "element"
      ],
      "type": "string"
    },
    "__schema279": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema28": {
      "additionalProperties": false,
      "description": "A value qualified by an identifier scheme",
      "properties": {
        "agency": {
          "$ref": "#/$defs/__schema31"
        },
        "description": {
          "$ref": "#/$defs/__schema32"
        },
        "extensions": {
          "$ref": "#/$defs/__schema33"
        },
        "scheme": {
          "$ref": "#/$defs/__schema29"
        },
        "value": {
          "$ref": "#/$defs/__schema30"
        }
      },
      "required": [
        "scheme",
        "value"
      ],
      "type": "object"
    },
    "__schema280": {
      "maxLength": 1000,
      "minLength": 1,
      "type": "string"
    },
    "__schema281": {
      "maxLength": 20,
      "minLength": 1,
      "type": "string"
    },
    "__schema282": {
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "type": "integer"
    },
    "__schema283": {
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "type": "integer"
    },
    "__schema284": {
      "maxLength": 1000,
      "type": "string"
    },
    "__schema285": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema286": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema287": {
      "items": {
        "$ref": "#/$defs/__schema277"
      },
      "maxItems": 100000,
      "type": "array"
    },
    "__schema288": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema289": {
      "items": {
        "$ref": "#/$defs/__schema277"
      },
      "maxItems": 100000,
      "type": "array"
    },
    "__schema29": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema3": {
      "additionalProperties": false,
      "description": "A typed business reference",
      "properties": {
        "description": {
          "$ref": "#/$defs/__schema7"
        },
        "extensions": {
          "$ref": "#/$defs/__schema8"
        },
        "issuer": {
          "$ref": "#/$defs/__schema6"
        },
        "type": {
          "$ref": "#/$defs/__schema4"
        },
        "value": {
          "$ref": "#/$defs/__schema5"
        }
      },
      "required": [
        "type",
        "value"
      ],
      "type": "object"
    },
    "__schema30": {
      "maxLength": 500,
      "minLength": 1,
      "type": "string"
    },
    "__schema31": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema32": {
      "maxLength": 500,
      "minLength": 1,
      "type": "string"
    },
    "__schema33": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema34": {
      "maxLength": 300,
      "minLength": 1,
      "type": "string"
    },
    "__schema35": {
      "additionalProperties": false,
      "description": "A postal address with country-neutral field names",
      "properties": {
        "administrativeArea": {
          "$ref": "#/$defs/__schema39"
        },
        "countryCode": {
          "$ref": "#/$defs/__schema41"
        },
        "extensions": {
          "$ref": "#/$defs/__schema42"
        },
        "lines": {
          "$ref": "#/$defs/__schema36"
        },
        "locality": {
          "$ref": "#/$defs/__schema38"
        },
        "postalCode": {
          "$ref": "#/$defs/__schema40"
        }
      },
      "required": [
        "lines",
        "countryCode"
      ],
      "type": "object"
    },
    "__schema36": {
      "items": {
        "$ref": "#/$defs/__schema37"
      },
      "maxItems": 5,
      "minItems": 1,
      "type": "array"
    },
    "__schema37": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema38": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema39": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema4": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema40": {
      "maxLength": 40,
      "minLength": 1,
      "type": "string"
    },
    "__schema41": {
      "description": "ISO 3166-1 alpha-2 country code",
      "pattern": "^[A-Z]{2}$",
      "type": "string"
    },
    "__schema42": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema43": {
      "items": {
        "$ref": "#/$defs/__schema44"
      },
      "maxItems": 100,
      "type": "array"
    },
    "__schema44": {
      "additionalProperties": false,
      "description": "Contact information associated with a party",
      "properties": {
        "department": {
          "$ref": "#/$defs/__schema47"
        },
        "email": {
          "$ref": "#/$defs/__schema48"
        },
        "extensions": {
          "$ref": "#/$defs/__schema50"
        },
        "name": {
          "$ref": "#/$defs/__schema46"
        },
        "phone": {
          "$ref": "#/$defs/__schema49"
        },
        "role": {
          "$ref": "#/$defs/__schema45"
        }
      },
      "type": "object"
    },
    "__schema45": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema46": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema47": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema48": {
      "format": "email",
      "maxLength": 320,
      "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
      "type": "string"
    },
    "__schema49": {
      "maxLength": 50,
      "minLength": 1,
      "type": "string"
    },
    "__schema5": {
      "maxLength": 500,
      "minLength": 1,
      "type": "string"
    },
    "__schema50": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema51": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema52": {
      "$ref": "#/$defs/__schema53"
    },
    "__schema53": {
      "additionalProperties": false,
      "description": "An inclusive business date or timestamp range",
      "properties": {
        "end": {
          "$ref": "#/$defs/__schema55"
        },
        "start": {
          "$ref": "#/$defs/__schema54"
        }
      },
      "type": "object"
    },
    "__schema54": {
      "$ref": "#/$defs/__schema19"
    },
    "__schema55": {
      "$ref": "#/$defs/__schema19"
    },
    "__schema56": {
      "$ref": "#/$defs/__schema57"
    },
    "__schema57": {
      "additionalProperties": false,
      "description": "Informational commercial payment terms",
      "properties": {
        "code": {
          "$ref": "#/$defs/__schema58"
        },
        "description": {
          "$ref": "#/$defs/__schema59"
        },
        "discountDate": {
          "$ref": "#/$defs/__schema61"
        },
        "discountPercentage": {
          "$ref": "#/$defs/__schema62"
        },
        "dueDate": {
          "$ref": "#/$defs/__schema60"
        },
        "extensions": {
          "$ref": "#/$defs/__schema64"
        }
      },
      "type": "object"
    },
    "__schema58": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema59": {
      "maxLength": 500,
      "minLength": 1,
      "type": "string"
    },
    "__schema6": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema60": {
      "$ref": "#/$defs/__schema20"
    },
    "__schema61": {
      "$ref": "#/$defs/__schema20"
    },
    "__schema62": {
      "$ref": "#/$defs/__schema63"
    },
    "__schema63": {
      "description": "A base-10 decimal value without exponent notation",
      "maxLength": 100,
      "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
      "type": "string"
    },
    "__schema64": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema65": {
      "items": {
        "$ref": "#/$defs/__schema66"
      },
      "maxItems": 50000,
      "minItems": 1,
      "type": "array"
    },
    "__schema66": {
      "additionalProperties": false,
      "description": "A purchase-order line",
      "properties": {
        "allowanceCharges": {
          "$ref": "#/$defs/__schema83"
        },
        "extensions": {
          "$ref": "#/$defs/__schema92"
        },
        "lineNumber": {
          "$ref": "#/$defs/__schema67"
        },
        "orderedQuantity": {
          "$ref": "#/$defs/__schema73"
        },
        "product": {
          "$ref": "#/$defs/__schema68"
        },
        "references": {
          "$ref": "#/$defs/__schema82"
        },
        "requestedDelivery": {
          "$ref": "#/$defs/__schema80"
        },
        "shipTo": {
          "$ref": "#/$defs/__schema81"
        },
        "unitPrice": {
          "$ref": "#/$defs/__schema77"
        }
      },
      "required": [
        "lineNumber",
        "product",
        "orderedQuantity"
      ],
      "type": "object"
    },
    "__schema67": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema68": {
      "additionalProperties": false,
      "description": "A product identified independently of any one industry",
      "properties": {
        "classifications": {
          "$ref": "#/$defs/__schema71"
        },
        "description": {
          "$ref": "#/$defs/__schema70"
        },
        "extensions": {
          "$ref": "#/$defs/__schema72"
        },
        "identifiers": {
          "$ref": "#/$defs/__schema69"
        }
      },
      "required": [
        "identifiers"
      ],
      "type": "object"
    },
    "__schema69": {
      "items": {
        "$ref": "#/$defs/__schema28"
      },
      "maxItems": 100,
      "minItems": 1,
      "type": "array"
    },
    "__schema7": {
      "maxLength": 500,
      "minLength": 1,
      "type": "string"
    },
    "__schema70": {
      "maxLength": 1000,
      "minLength": 1,
      "type": "string"
    },
    "__schema71": {
      "items": {
        "$ref": "#/$defs/__schema28"
      },
      "maxItems": 100,
      "type": "array"
    },
    "__schema72": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema73": {
      "additionalProperties": false,
      "description": "A precision-safe quantity and unit",
      "properties": {
        "extensions": {
          "$ref": "#/$defs/__schema76"
        },
        "qualifier": {
          "$ref": "#/$defs/__schema75"
        },
        "unitCode": {
          "$ref": "#/$defs/__schema74"
        },
        "value": {
          "$ref": "#/$defs/__schema63"
        }
      },
      "required": [
        "value",
        "unitCode"
      ],
      "type": "object"
    },
    "__schema74": {
      "description": "A mutually agreed unit-of-measure code",
      "maxLength": 20,
      "minLength": 1,
      "type": "string"
    },
    "__schema75": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema76": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema77": {
      "$ref": "#/$defs/__schema78"
    },
    "__schema78": {
      "additionalProperties": false,
      "description": "A precision-safe monetary amount",
      "properties": {
        "amount": {
          "$ref": "#/$defs/__schema63"
        },
        "currency": {
          "$ref": "#/$defs/__schema23"
        },
        "extensions": {
          "$ref": "#/$defs/__schema79"
        }
      },
      "required": [
        "amount",
        "currency"
      ],
      "type": "object"
    },
    "__schema79": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema8": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema80": {
      "$ref": "#/$defs/__schema53"
    },
    "__schema81": {
      "$ref": "#/$defs/__schema25"
    },
    "__schema82": {
      "items": {
        "$ref": "#/$defs/__schema3"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "__schema83": {
      "items": {
        "$ref": "#/$defs/__schema84"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "__schema84": {
      "additionalProperties": false,
      "description": "A monetary allowance or charge",
      "properties": {
        "amount": {
          "$ref": "#/$defs/__schema88"
        },
        "basisAmount": {
          "$ref": "#/$defs/__schema90"
        },
        "code": {
          "$ref": "#/$defs/__schema86"
        },
        "description": {
          "$ref": "#/$defs/__schema87"
        },
        "extensions": {
          "$ref": "#/$defs/__schema91"
        },
        "kind": {
          "$ref": "#/$defs/__schema85"
        },
        "percentage": {
          "$ref": "#/$defs/__schema89"
        }
      },
      "required": [
        "kind"
      ],
      "type": "object"
    },
    "__schema85": {
      "enum": [
        "allowance",
        "charge"
      ],
      "type": "string"
    },
    "__schema86": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema87": {
      "maxLength": 500,
      "minLength": 1,
      "type": "string"
    },
    "__schema88": {
      "$ref": "#/$defs/__schema78"
    },
    "__schema89": {
      "$ref": "#/$defs/__schema63"
    },
    "__schema9": {
      "additionalProperties": {
        "$ref": "#/$defs/__schema11"
      },
      "description": "Namespaced, JSON-compatible extension values",
      "propertyNames": {
        "$ref": "#/$defs/__schema10"
      },
      "type": "object"
    },
    "__schema90": {
      "$ref": "#/$defs/__schema78"
    },
    "__schema91": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema92": {
      "$ref": "#/$defs/__schema9"
    },
    "__schema93": {
      "items": {
        "$ref": "#/$defs/__schema84"
      },
      "maxItems": 10000,
      "type": "array"
    },
    "__schema94": {
      "items": {
        "$ref": "#/$defs/__schema95"
      },
      "maxItems": 10000,
      "type": "array"
    },
    "__schema95": {
      "additionalProperties": false,
      "description": "A tax amount and its optional calculation basis",
      "properties": {
        "amount": {
          "$ref": "#/$defs/__schema78"
        },
        "extensions": {
          "$ref": "#/$defs/__schema100"
        },
        "jurisdiction": {
          "$ref": "#/$defs/__schema97"
        },
        "rate": {
          "$ref": "#/$defs/__schema98"
        },
        "taxableAmount": {
          "$ref": "#/$defs/__schema99"
        },
        "type": {
          "$ref": "#/$defs/__schema96"
        }
      },
      "required": [
        "type",
        "amount"
      ],
      "type": "object"
    },
    "__schema96": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "__schema97": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "__schema98": {
      "$ref": "#/$defs/__schema63"
    },
    "__schema99": {
      "$ref": "#/$defs/__schema78"
    }
  },
  "$id": "urn:loomedi:canonical:v1:canonical-document",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Any LoomEDI canonical v1 document",
  "oneOf": [
    {
      "$ref": "#/$defs/__schema0"
    },
    {
      "$ref": "#/$defs/__schema108"
    },
    {
      "$ref": "#/$defs/__schema134"
    },
    {
      "$ref": "#/$defs/__schema157"
    },
    {
      "$ref": "#/$defs/__schema197"
    },
    {
      "$ref": "#/$defs/__schema224"
    },
    {
      "$ref": "#/$defs/__schema240"
    },
    {
      "$ref": "#/$defs/__schema260"
    }
  ],
  "title": "CanonicalDocument"
}
