{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"title": "Opter transport event schema",
	"description": "Schema for exporting and importing transport events",
	"type": "array",
	"items": {
		"type": "object",
		"additionalProperties": false,
		"required": [
			"schema",
			"version",
			"eventCreatedDateTime",
			"opterOrderReference"
		],
		"oneOf": [
			{
				"required": [
					"response"
				]
			},
			{
				"required": [
					"revoke"
				]
			},
			{
				"required": [
					"packagescan"
				]
			},
			{
				"required": [
					"freightbillscan"
				]
			},
			{
				"required": [
					"deviation"
				]
			},
			{
				"required": [
					"status"
				]
			},
			{
				"required": [
					"pod"
				]
			},
			{
				"required": [
					"priceitem"
				]
			},
			{
				"required": [
					"attachment"
				]
			}
		],
		"properties": {
			"schema": {
				"type": "string",
				"format": "uri",
				"maxLength": 2048,
				"description": "Schema URI defining the structure"
			},
			"version": {
				"type": "string",
				"maxLength": 10,
				"description": "Version of the schema."
			},
			"eventCreatedDateTime": {
				"type": "string",
				"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
				"description": "Date and time when the event was created in local time, formatted as 'YYYY-MM-DDTHH:MM:SS'."
			},
			"eventSender": {
				"type": "string",
				"maxLength": 50,
				"description": "Identifier of the message sender. Can usually be generated by the counterpart."
			},
			"eventReceiver": {
				"type": "string",
				"maxLength": 50,
				"description": "Identifier of the message receiver. Can usually be generated by the counterpart."
			},
			"customerOrderReference": {
				"type": "string",
				"maxLength": 100,
				"description": "Order reference from the customer. Often the same as freight bill number."
			},
			"opterOrderReference": {
				"type": [
					"string",
					"null"
				],
				"description": "Unique Opter identifier for order-shipment-resource. Needed when sending to Opter"
			},
			"freightBillNumber": {
				"type": [
					"string",
					"null"
				],
				"maxLength": 50,
				"description": "Freight bill number."
			},
			"estimatedTransportCost": {
				"type": [
					"number",
					"null"
				],
				"description": "Current transport cost estimate, usually in local currency; can be null."
			},
			"estimatedTransportCo2Emission": {
				"type": [
					"number",
					"null"
				],
				"description": "Current co2 emission estimate for the transport in Grams; can be null."
			},
			"response": {
				"type": "object",
				"additionalProperties": false,
				"description": "Response on a request",
				"properties": {
					"eventDateTime": {
						"type": "string",
						"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
						"description": "Date and time in local time the event was created, formatted as 'YYYY-MM-DDTHH:MM:SS'"
					},
					"eventMappingCode": {
						"type": "string",
						"maxLength": 50,
						"description": "Mapping code for the event",
						"enum": [
							"imported",
							"failed",
							"accepted",
							"rejected"
						]
					},
					"eventDescription": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 50,
						"description": "Description of the event"
					},
					"errors": {
						"type": [
							"array",
							"null"
						],
						"description": "List of errors associated with the event",
						"items": {
							"type": "object",
							"additionalProperties": false,
							"properties": {
								"type": {
									"type": "integer",
									"description": "Error type code"
								},
								"description": {
									"type": "string",
									"maxLength": 50,
									"description": "Error description"
								}
							}
						}
					},
					"warnings": {
						"type": [
							"array",
							"null"
						],
						"description": "List of warnings associated with the event",
						"items": {
							"type": "object",
							"additionalProperties": false,
							"properties": {
								"type": {
									"type": "integer",
									"description": "Warning type code"
								},
								"description": {
									"type": "string",
									"maxLength": 100,
									"description": "Warning description"
								}
							}
						}
					},
					"packages": {
						"type": "array",
						"description": "List of packages included in the event",
						"items": {
							"type": "object",
							"additionalProperties": false,
							"properties": {
								"opterId": {
									"type": [
										"number",
										"null"
									],
									"maxLength": 50,
									"description": "Opter ID for the package, can be null"
								},
								"customerReference": {
									"type": "string",
									"maxLength": 50,
									"description": "Customer reference for the package"
								},
								"barcode": {
									"type": "string",
									"maxLength": 50,
									"description": "Barcode for the package"
								}
							}
						}
					},
					"freightBillBase64encoded": {
						"type": [
							"string",
							"null"
						],
						"description": "Base64-encoded freight bill, if available"
					},
					"packageLabelBase64encoded": {
						"type": [
							"string",
							"null"
						],
						"description": "Base64-encoded package label, if available"
					}
				},
				"required": [
					"eventDateTime",
					"eventMappingCode"
				]
			},
			"revoke": {
				"type": "object",
				"additionalProperties": false,
				"description": "Revoke of an order",
				"properties": {
					"eventDateTime": {
						"type": "string",
						"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
						"description": "Date and time in local time the event was created, formatted as 'YYYY-MM-DDTHH:MM:SS'"
					},
					"eventMappingCode": {
						"type": [
							"string"
						],
						"maxLength": 50,
						"description": "mapping code of event"
					},
					"eventDescription": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 50,
						"description": "Description of the event"
					},
					"packages": {
						"type": "array",
						"description": "List of packages included in the event",
						"items": {
							"type": "object",
							"additionalProperties": false,
							"properties": {
								"opterId": {
									"type": [
										"number",
										"null"
									],
									"maxLength": 50,
									"description": "Opter ID for the package, can be null"
								},
								"customerReference": {
									"type": "string",
									"maxLength": 50,
									"description": "Customer reference for the package"
								},
								"barcode": {
									"type": "string",
									"maxLength": 50,
									"description": "Barcode for the package"
								}
							}
						}
					}
				},
				"required": [
					"eventDateTime"
				]
			},
			"status": {
				"type": "object",
				"additionalProperties": false,
				"description": "Response on a request",
				"properties": {
					"eventDateTime": {
						"type": "string",
						"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
						"description": "Date and time in local time the event was created, formatted as 'YYYY-MM-DDTHH:MM:SS'"
					},
					"eventMappingCode": {
						"type": "string",
						"maxLength": 50,
						"description": "Mapping code for the event",
						"enum": [
							"departure",
							"arrivalTerminal",
							"departureTerminal",
							"arrivalDistributionTerminal",
							"departureDistributionTerminal",
							"arrival"
						]
					},
					"eventDescription": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 50,
						"description": "Description of the event"
					},
					"eventLocation": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 50,
						"description": "Location of event, if aplicable"
					},
					"eventLatitude": {
						"type": [
							"number",
							"null"
						],
						"minimum": -90,
						"maximum": 90,
						"description": "Latitude position of the event"
					},
					"eventLongitude": {
						"type": [
							"number",
							"null"
						],
						"minimum": -180,
						"maximum": 180,
						"description": "Longitude position of the event; "
					},
					"transporterResource": {
						"type": [
							"string"
						],
						"maxLength": 50,
						"description": "Resource at the transporter handling the transport "
					},
					"packages": {
						"type": "array",
						"description": "List of packages included in the event",
						"items": {
							"type": "object",
							"additionalProperties": false,
							"properties": {
								"opterId": {
									"type": [
										"number",
										"null"
									],
									"maxLength": 50,
									"description": "Opter ID for the package, can be null"
								},
								"customerReference": {
									"type": "string",
									"maxLength": 50,
									"description": "Customer reference for the package"
								},
								"barcode": {
									"type": "string",
									"maxLength": 50,
									"description": "Barcode for the package"
								}
							}
						}
					},
					"podSigneeName": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 50,
						"description": "Printed name on pod"
					},
					"podComment": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 50,
						"description": "Comment on pod"
					},
					"podSignatureUrl": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 255,
						"description": "Url to pod signature"
					},
					"podSignatureImageBase64encoded": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 10000000,
						"description": "Signature on pod"
					}
				},
				"required": [
					"eventDateTime",
					"eventMappingCode"
				],
				"if": {
					"properties": {
						"eventMappingCode": {
							"const": "arrival"
						}
					},
					"required": [
						"eventMappingCode"
					]
				},
				"then": true,
				"else": {
					"not": {
						"anyOf": [
							{
								"required": [
									"podSigneeName"
								]
							},
							{
								"required": [
									"podComment"
								]
							},
							{
								"required": [
									"podSignatureUrl"
								]
							},
							{
								"required": [
									"podSignatureImageBase64encoded"
								]
							}
						]
					}
				}
			},
			"packagescan": {
				"type": "object",
				"additionalProperties": false,
				"description": "scan on a package barcode",
				"properties": {
					"eventDateTime": {
						"type": "string",
						"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
						"description": "Date and time in local time the event was created, formatted as 'YYYY-MM-DDTHH:MM:SS'"
					},
					"eventMappingCode": {
						"type": "string",
						"maxLength": 50,
						"description": "Mapping code for the event",
						"enum": [
							"departure",
							"arrivalTerminal",
							"departureTerminal",
							"arrivalDistributionTerminal",
							"departureDistributionTerminal",
							"arrival",
							"undoDeparture",
							"undoArrivalTerminal",
							"undoDepartureTerminal",
							"undoArrivalDistributionTerminal",
							"undoDepartureDistributionTerminal",
							"undoArrivalExternalTerminal",
							"undoDepartureExternalTerminal",
							"undoArrival",
							"arrivalExternalTerminal",
							"departureExternalTerminal",
							"floorcheck",
							"undoFloorcheck"
						]
					},
					"eventDescription": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 50,
						"description": "Description of the event"
					},
					"eventLocation": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 50,
						"description": "Location of event, if aplicable.  On import of events: pickup/delivery will use eventLocation as a comment. Departure/ArrivalTerminal will use eventLocation as a mapped hubCode in Opter. These codes need to be agrreed with Opter otherwise the import will fail. departureExternalTerminal/arrivalExternalTerminal will use eventLocation as a free text field in transporters Track and trace. "
					},
					"eventLatitude": {
						"type": [
							"number",
							"null"
						],
						"minimum": -90,
						"maximum": 90,
						"description": "Latitude position of the event"
					},
					"eventLongitude": {
						"type": [
							"number",
							"null"
						],
						"minimum": -180,
						"maximum": 180,
						"description": "Longitude position of the event"
					},
					"package": {
						"type": "object",
						"additionalProperties": false,
						"properties": {
							"opterId": {
								"type": [
									"integer",
									"null"
								],
								"minimum": 0,
								"description": "Opter ID for the package, can be null"
							},
							"customerReference": {
								"type": "string",
								"maxLength": 50,
								"description": "Customer reference for the package"
							},
							"barcode": {
								"type": "string",
								"maxLength": 50,
								"description": "Barcode for the package"
							}
						}
					}
				},
				"required": [
					"eventDateTime",
					"eventMappingCode"
				]
			},
			"freightbillscan": {
				"type": "object",
				"additionalProperties": false,
				"description": "scan on a freightbill barcode",
				"properties": {
					"eventDateTime": {
						"type": "string",
						"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
						"description": "Date and time in local time the event was created, formatted as 'YYYY-MM-DDTHH:MM:SS'"
					},
					"eventMappingCode": {
						"type": "string",
						"maxLength": 50,
						"description": "Mapping code for the event. Same as packagescan",
						"enum": [
							"departure",
							"arrivalTerminal",
							"departureTerminal",
							"arrivalDistributionTerminal",
							"departureDistributionTerminal",
							"arrivalExternalTerminal",
							"departureExternalTerminal",
							"arrival",
							"undoDeparture",
							"undoArrivalTerminal",
							"undoDepartureTerminal",
							"undoArrivalDistributionTerminal",
							"undoDepartureDistributionTerminal",
							"undoArrivalExternalTerminal",
							"undoDepartureExternalTerminal",
							"undoArrival",
							"floorcheck",
							"undoFloorcheck"
						]
					},
					"eventDescription": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 50,
						"description": "Description of the event"
					},
					"eventLocation": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 50,
						"description": "Location of event, if aplicable.  On import of events: eventMappingCode pickup/delivery will use eventLocation as a comment (city name in exports). Departure/ArrivalTerminal will use eventLocation as a mapped hubCode in Opter (same for exports). These codes need to be agrreed with Opter otherwise the import will fail. departureExternalTerminal/arrivalExternalTerminal will use eventLocation as a free text field in transporters Track and trace."
					},
					"eventLatitude": {
						"type": [
							"number",
							"null"
						],
						"minimum": -90,
						"maximum": 90,
						"description": "Latitude position of the event"
					},
					"eventLongitude": {
						"type": [
							"number",
							"null"
						],
						"minimum": -180,
						"maximum": 180,
						"description": "Longitude position of the event"
					},
					"packages": {
						"type": "array",
						"description": "List of packages included in the event",
						"items": {
							"type": "object",
							"additionalProperties": false,
							"properties": {
								"opterId": {
									"type": [
										"number",
										"null"
									],
									"maxLength": 50,
									"description": "Opter ID for the package, can be null"
								},
								"customerReference": {
									"type": "string",
									"maxLength": 50,
									"description": "Customer reference for the package"
								},
								"barcode": {
									"type": "string",
									"maxLength": 50,
									"description": "Barcode for the package"
								}
							}
						}
					}
				},
				"required": [
					"eventDateTime",
					"eventMappingCode"
				]
			},
			"deviation": {
				"type": "object",
				"additionalProperties": false,
				"description": "information on a deviation",
				"properties": {
					"eventDateTime": {
						"type": "string",
						"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
						"description": "Date and time in local time the event was created, formatted as 'YYYY-MM-DDTHH:MM:SS'"
					},
					"eventMappingCode": {
						"type": "string",
						"maxLength": 50,
						"description": "Mapping code for the event"
					},
					"eventDescription": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 50,
						"description": "Description of the event"
					},
					"eventLatitude": {
						"type": [
							"number",
							"null"
						],
						"minimum": -90,
						"maximum": 90,
						"description": "Latitude position of the event"
					},
					"eventLongitude": {
						"type": [
							"number",
							"null"
						],
						"minimum": -180,
						"maximum": 180,
						"description": "Longitude position of the event"
					},
					"packages": {
						"type": "array",
						"description": "List of packages included in the event",
						"items": {
							"type": "object",
							"additionalProperties": false,
							"properties": {
								"opterId": {
									"type": [
										"number",
										"null"
									],
									"maxLength": 50,
									"description": "Opter ID for the package, can be null"
								},
								"customerReference": {
									"type": "string",
									"maxLength": 50,
									"description": "Customer reference for the package"
								},
								"barcode": {
									"type": "string",
									"maxLength": 50,
									"description": "Barcode for the package"
								}
							}
						}
					},
					"deviationEvent": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 50,
						"description": "Sub event to eventMappingCode"
					},
					"deviationReason": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 50,
						"description": "Sub event to deviationEvent"
					},
					"deviationComment": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 50,
						"description": "Comment to the event"
					},
					"deviationUrl": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 255,
						"description": ""
					},
					"deviationImageBase64encoded": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 10000000,
						"description": ""
					}
				},
				"required": [
					"eventDateTime",
					"eventMappingCode"
				]
			},
			"pod": {
				"type": "object",
				"additionalProperties": false,
				"description": "Response on a request",
				"properties": {
					"eventDateTime": {
						"type": "string",
						"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
						"description": "Date and time in local time the event was created, formatted as 'YYYY-MM-DDTHH:MM:SS'"
					},
					"eventMappingCode": {
						"type": "string",
						"maxLength": 50,
						"description": "Mapping code for the event. Lower case will be translated to upper case at Opter."
					},
					"eventDescription": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 50,
						"description": "Description of the event"
					},
					"eventLatitude": {
						"type": [
							"number",
							"null"
						],
						"minimum": -90,
						"maximum": 90,
						"description": "Latitude position of the event"
					},
					"eventLongitude": {
						"type": [
							"number",
							"null"
						],
						"minimum": -180,
						"maximum": 180,
						"description": "Longitude position of the event"
					},
					"packages": {
						"type": "array",
						"description": "List of packages included in the event",
						"items": {
							"type": "object",
							"additionalProperties": false,
							"properties": {
								"opterId": {
									"type": [
										"number",
										"null"
									],
									"maxLength": 50,
									"description": "Opter ID for the package, can be null"
								},
								"customerReference": {
									"type": "string",
									"maxLength": 50,
									"description": "Customer reference for the package"
								},
								"barcode": {
									"type": "string",
									"maxLength": 50,
									"description": "Barcode for the package"
								}
							}
						}
					},
					"podSigneeName": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 50,
						"description": "Printed name on pod"
					},
					"podComment": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 50,
						"description": "Comment on pod"
					},
					"podSignatureUrl": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 255,
						"description": "Url to pod signature"
					},
					"podSignatureImageBase64encoded": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 10000000,
						"description": "Signature on pod"
					}
				},
				"required": [
					"eventDateTime",
					"eventMappingCode"
				]
			},
			"priceitem": {
				"type": "object",
				"additionalProperties": false,
				"description": "Price item",
				"properties": {
					"eventDateTime": {
						"type": "string",
						"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
						"description": "Date and time in local time the event was created, formatted as 'YYYY-MM-DDTHH:MM:SS'"
					},
					"eventMappingCode": {
						"type": "string",
						"maxLength": 50,
						"description": "Mapping code for the event. Lower case will be translated to upper case when importing in Opter."
					},
					"eventDescription": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 1024,
						"description": "Description of the event"
					},
					"opterId": {
						"type": [
							"integer"
						],
						"description": "opterId"
					},
					"customerReference": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 50,
						"description": "customerReference"
					},
					"state": {
						"type": [
							"string"
						],
						"enum": [
							"new",
							"update"
						],
						"description": "state"
					},
					"quantity": {
						"type": [
							"number",
							"null"
						],
						"multipleOf": 0.000001,
						"minimum": -9999999999999999,
						"maximum": 9999999999999999,
						"description": "A number with up to 18 digits and 6 decimals, or null."
					},
					"unit1quantity": {
						"type": [
							"number",
							"null"
						],
						"multipleOf": 0.000001,
						"minimum": -9999999999999999,
						"maximum": 9999999999999999,
						"description": "A number with up to 18 digits and 6 decimals, or null."
					},
					"unit1name": {
						"type": "string",
						"maxLength": 50,
						"description": "unit1name"
					},
					"unit2quantity": {
						"type": [
							"number",
							"null"
						],
						"multipleOf": 0.000001,
						"minimum": -9999999999999999,
						"maximum": 9999999999999999,
						"description": "A number with up to 18 digits and 6 decimals, or null."
					},
					"unit2name": {
						"type": [
							"string"
						],
						"maxLength": 50,
						"description": "Unit2name"
					},
					"unitPrice": {
						"type": [
							"number",
							"null"
						],
						"multipleOf": 0.000001,
						"minimum": -9999999999999999,
						"maximum": 9999999999999999,
						"description": "A number with up to 18 digits and 6 decimals, or null."
					},
					"unitPriceResource": {
						"type": [
							"number",
							"null"
						],
						"multipleOf": 0.000001,
						"minimum": -9999999999999999,
						"maximum": 9999999999999999,
						"description": "A number with up to 18 digits and 6 decimals, or null."
					},
					"fixedPrice": {
						"type": [
							"number",
							"null"
						],
						"multipleOf": 0.000001,
						"minimum": -9999999999999999,
						"maximum": 9999999999999999,
						"description": "A number with up to 18 digits and 6 decimals, or null."
					},
					"fixedPriceResource": {
						"type": [
							"number",
							"null"
						],
						"multipleOf": 0.000001,
						"minimum": -9999999999999999,
						"maximum": 9999999999999999,
						"description": "A number with up to 18 digits and 6 decimals, or null."
					},
					"resourceCode": {
						"type": [
							"string"
						],
						"maxLength": 50,
						"description": "resourceCode"
					},
					"contractorExpectedCost": {
						"type": [
							"number",
							"null"
						],
						"multipleOf": 0.000001,
						"minimum": -9999999999999999,
						"maximum": 9999999999999999,
						"description": "A number with up to 18 digits and 6 decimals, or null."
					},
					"contractorInvoiceNo": {
						"type": "string",
						"maxLength": 50,
						"description": "Customer reference for the package"
					},
					"contractorInvoiceDate": {
						"type": "string",
						"format": "date",
						"description": "contractorInvoiceDate, formatted as 'YYYY-MM-DD'"
					},
					"contractorInvoiceDone": {
						"type": [
							"boolean"
						],
						"description": "contractorInvoiceDone"
					},
					"extraId1": {
						"type": [
							"string"
						],
						"maxLength": 50,
						"description": "extraId1"
					},
					"extraId2": {
						"type": [
							"string"
						],
						"maxLength": 50,
						"description": "extraId2"
					},
					"extraId3": {
						"type": [
							"string"
						],
						"maxLength": 50,
						"description": "extraId3"
					},
					"extraId4": {
						"type": [
							"string"
						],
						"maxLength": 50,
						"description": "extraId4"
					},
					"extraId5": {
						"type": [
							"string"
						],
						"maxLength": 50,
						"description": "extraId5"
					},
					"extraId6": {
						"type": [
							"string"
						],
						"maxLength": 50,
						"description": "extraId6"
					},
					"extraId7": {
						"type": [
							"string"
						],
						"maxLength": 50,
						"description": "extraId7"
					},
					"extraId8": {
						"type": [
							"string"
						],
						"maxLength": 50,
						"description": "extraId8"
					}
				},
				"required": [
					"eventDateTime",
					"eventMappingCode"
				]
			},
			"attachment": {
				"type": "object",
				"additionalProperties": false,
				"description": "Response on a request",
				"properties": {
					"eventDateTime": {
						"type": "string",
						"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
						"description": "Date and time in local time the event was created, formatted as 'YYYY-MM-DDTHH:MM:SS'"
					},
					"eventMappingCode": {
						"type": "string",
						"enum": [
							"cmr",
							"freightbill",
							"awb",
							"pod",
							"deviation",
							"image",
							"customsdocument",
							"edi",
							"packagelabel"
						],
						"maxLength": 50,
						"description": "Mapping code for the event. Lower case will be translated to upper case at Opter."
					},
					"eventDescription": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 255,
						"description": "Description of the event"
					},
					"attachmentComment": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 255,
						"description": ""
					},
					"attachmentFileName": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 50,
						"description": ""
					},
					"attachmentUrl": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 255,
						"description": ""
					},
					"attachmentBase64encoded": {
						"type": [
							"string",
							"null"
						],
						"maxLength": 10000000,
						"description": ""
					}
				},
				"required": [
					"eventDateTime",
					"eventMappingCode"
				]
			}
		},
		"allOf": [
			{
				"if": {
					"required": [
						"freightbillscan"
					]
				},
				"then": {
					"required": [
						"freightBillNumber"
					]
				}
			}
		]
	}
}