-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmcc_skr_mapping.schema.json
More file actions
111 lines (111 loc) · 3.13 KB
/
Copy pathmcc_skr_mapping.schema.json
File metadata and controls
111 lines (111 loc) · 3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/german-accounting/mcc_skr_mapping.schema.json",
"title": "MCC to SKR Mapping",
"description": "ISO 18245 MCC codes mapped to SKR03/SKR04 account suggestions with confidence levels",
"type": "object",
"required": ["meta", "mappings"],
"additionalProperties": false,
"properties": {
"meta": {
"type": "object",
"required": ["version", "last_updated", "sources", "source_checked"],
"properties": {
"version": { "type": "string" },
"last_updated": { "type": "string" },
"source_checked": { "type": "string", "format": "date" },
"description": { "type": "string" },
"total_mappings": { "type": "integer" },
"sources": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": ["title", "url", "scope"],
"properties": {
"title": { "type": "string", "minLength": 1 },
"url": { "type": "string", "format": "uri" },
"published": { "type": "string", "format": "date" },
"scope": { "type": "string", "minLength": 1 }
}
}
}
}
},
"mappings": {
"type": "array",
"items": { "$ref": "#/$defs/MCCMapping" }
}
},
"$defs": {
"MCCMapping": {
"type": "object",
"required": [
"mcc",
"mcc_name",
"category",
"skr03",
"skr04_primary",
"alternatives",
"needs_beleg",
"ust_abzug"
],
"additionalProperties": false,
"properties": {
"mcc": {
"type": "string",
"pattern": "^(\\d{4}|\\d{4}-\\d{4})$",
"description": "4-digit MCC code, or a range in the form START-END (e.g. 3000-3350)"
},
"mcc_name": { "type": "string", "minLength": 1 },
"category": { "type": "string", "minLength": 1 },
"skr03": {
"type": "object",
"required": ["primary", "confidence"],
"additionalProperties": false,
"properties": {
"primary": {
"type": "string",
"pattern": "^\\d{4}$"
},
"confidence": {
"type": "string",
"enum": ["high", "medium", "low"]
}
}
},
"skr04_primary": {
"type": "string",
"pattern": "^\\d{4}$"
},
"alternatives": {
"type": "array",
"items": { "$ref": "#/$defs/Alternative" }
},
"needs_beleg": { "type": "boolean" },
"ust_abzug": { "type": "boolean" },
"notes": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
]
}
}
},
"Alternative": {
"type": "object",
"required": ["konto", "condition"],
"additionalProperties": false,
"properties": {
"konto": {
"type": "string",
"pattern": "^\\d{4}$"
},
"condition": {
"type": "string",
"minLength": 1
}
}
}
}
}