forked from wgbergeripg/MOAllocationSchemas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExtractSchema.json
317 lines (317 loc) · 10 KB
/
ExtractSchema.json
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "SpectraOX allocation buy entry extract",
"type": "object",
"properties": {
"transactionId": {
"title": "The transaction ID uniquely identifies this specific buy data extract.",
"description": "The transaction ID uniquely identifies the extract and must be returned as part of the allocation instructions.",
"type": "integer",
"minimum": 1
},
"clientCode": {
"title": "The client's identifier within SpectraOX",
"description": "The client identifier helps the allocation tool link schedule data to goal data",
"type": "string",
"minLength": 1,
"maxLength": 4
},
"clientName": {
"title": "The client's name within SpectraOX",
"description": "The long client name helps the allocation system inform the user within that system.",
"type": "string",
"minLength": 1,
"maxLength": 30
},
"estimateCode": {
"title": "The estimate code from the SpectraOX system",
"description": "The estimate code is used by the buyers and is found in goal data, but is part of a compound key. The code itself is not unique.",
"type": "string",
"minLength": 1,
"maxLength": 4
},
"estimateNumber": {
"title": "The surrogate key for an estimate in SpectraOX",
"description": "The estimate number, unlike the estimate code, is a unique identifer for a given estimate record in SpectraOX",
"type": "integer",
"minimum": 1
},
"demoCount": {
"title": "The number of elements that will be found in each estDemo array ",
"description": "The number of elements that will be found in each estDemo array",
"type": "integer",
"minimum": 0,
"maximum": 20
},
"extractRecordCount": {
"title": "The length of the buys array",
"description": "The length of the buys array",
"type": "integer",
"minimum": 1
},
"buys": {
"title": "The list of buy data.",
"description": "The list of buy data",
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"buyNumber": {
"title": "The buyNumber is the surrogate key for each unit.",
"description": "The buyNumber is the surrogate key for each unit.",
"type": "integer"
},
"updateInvalidReason": {
"title": "The update invalid reason, when non-blank, notes that a given unit must not be changed in the returned allocation.",
"description": "The update invalid reason, when non-blank, notes that a given unit must not be changed in the returned allocation. Allocation instructions to change an unit described as having an update invalid reason will result in all transactions failing and/or rolled back.",
"type": "string",
"enum": [
"Matched",
"Cleared",
"Billed",
"Trafficked",
""
]
},
"daypartCode": {
"title": "The daypart code assigned to the unit.",
"description": "The daypart code assigned to the unit. This data helps determine the correct goal data for the allocation exercise. All units within a given extract must have the same daypart code throughout.",
"type": "string",
"minLength": 1,
"maxLength": 2
},
"daypartName": {
"title": "The name of the daypart.",
"description": "The name of the daypart.",
"type": "string",
"minLength": 1,
"maxLength": 30
},
"networkCode": {
"title": "The SpectraOX code of the network",
"description": "The SpectraOX code of the network",
"type": "string",
"minLength": 1,
"maxLength": 4
},
"networkName": {
"title": "The name of the network in SpectraOX",
"description": "The name of the network in SpectraOX",
"type": "string",
"minLength": 1,
"maxLength": 30
},
"programCode": {
"title": "The program code in SpectraOX",
"description": "The program code in SpectraOX",
"type": "string",
"minLength": 1,
"maxLength": 6
},
"programName": {
"title": "The program name in SpectraOX",
"description": "The program name in SpectraOX, entered for the buy unit",
"type": "string",
"minLength": 1,
"maxLength": 30
},
"brandCode": {
"title": "The current brand assignment within SpectraOX for this unit.",
"description": "The current brand assignment within SpectraOX for this unit. If the buy is unallocated, the code will be an empty string.",
"type": "string",
"minLength": 0,
"maxLength": 4
},
"brandName": {
"title": "The brand name for the currently allocated brand for this unit.",
"description": "The brand name for the currently allocated brand for this unit. If the buy is unallocated, the code will be an empty string",
"type": "string",
"minLength": 0,
"maxLength": 30
},
"programStartTime": {
"title": "The start time of the program/rotation for this unit.",
"description": "The start time of the program/rotation for this unit",
"type": "string",
"minLength": 5,
"maxLength": 5,
"pattern": "[0-9]{4}[AP]"
},
"programEndTime": {
"title": "The end time of the program/rotation for this unit.",
"description": "The end time of the program/rotation for this unit",
"type": "string",
"minLength": 5,
"maxLength": 5,
"pattern": "[0-9]{4}[AP]"
},
"programDays": {
"title": "The possible days of the week in the rotation purchased for this unit.",
"description": "The possible days of the week in the rotation purchased for this unit.",
"type": "object",
"properties": {
"Mon": {
"type": "boolean"
},
"Tue": {
"type": "boolean"
},
"Wed": {
"type": "boolean"
},
"Thu": {
"type": "boolean"
},
"Fri": {
"type": "boolean"
},
"Sat": {
"type": "boolean"
},
"Sun": {
"type": "boolean"
}
},
"required": [
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
"Sun"
],
"additionalProperties": false
},
"airDate": {
"title": "Air date, or the first possible date this unit may air.",
"description": "The air date as entered in SpectraOX. The expected format for dates here is YYYYMMDD",
"type": "string",
"minLength": 8,
"maxLength": 8,
"pattern": "[0-9]{8}"
},
"firstAirDate": {
"title": "Air date, or the first possible date this unit may air.",
"description": "If the unit is scheduled to air on a specific date, this will be that date. Otherwise, the first possible date in the week this unit may air (consistent with latest TRUE programDays). The expected format for dates here is YYYYMMDD",
"type": "string",
"minLength": 8,
"maxLength": 8,
"pattern": "[0-9]{8}"
},
"lastAirDate": {
"title": "Air date, or the last possible date this unit may air.",
"description": "If the unit is scheduled to air on a specific date, this will be that date. Otherwise, the last possible date in the week this unit may air (consistent with earliest TRUE programDays). The expected format for dates here is YYYYMMDD",
"type": "string",
"minLength": 8,
"maxLength": 8,
"pattern": "[0-9]{8}"
},
"unitLength": {
"title": "The number of seconds within this purchased unit",
"description": "The number of seconds within this purchased unit",
"type": "integer",
"minimum": 1
},
"timeCost": {
"title": "The current time cost for this unit",
"description": "The current time cost for this unit",
"type": "number",
"minimum": 0,
"maximum": 9999999.99
},
"estDemos": {
"title": "The list of demographic estimates for this unit",
"description": "The list of demographic estimates for this unit",
"type": "array",
"minItems": 0,
"maxItems": 20,
"items": {
"type": "object",
"properties": {
"demoType": {
"title": "The demographic modifier for this demo from the inbound schedule data.",
"description": "The demographic modifier distinguishes differences in ethnicity and/or Nielsen ratings products/streams",
"type": "string",
"minLength": 1,
"maxLength": 1
},
"demoCode": {
"title": "The demographic (i.e. sex and age range) estimate for the new unit.",
"description": "The demographic (i.e. sex and age range) estimate for the new unit.",
"type": "string",
"minLength": 1,
"maxLength": 6
},
"estRtgData": {
"title": "The numeric rating for the new unit.",
"description": "The unequivalenced Estimated Rating data.",
"type": "number",
"minimum": 0,
"maximum": 999.99
},
"estImpData": {
"title": "The numeric rating for the new unit.",
"description": "The unequivalenced Estimated Impression data.",
"type": "number",
"minimum": 0,
"maximum": 9999999.99
}
},
"required": [
"demoType",
"demoCode",
"estRtgData",
"estImpData"
],
"additionalProperties": false
}
},
"networkType": {
"type": "string",
"minLength": 0,
"maxLength": 1,
"enum": [
"N",
"C",
"S",
""
]
}
},
"required": [
"buyNumber",
"updateInvalidReason",
"daypartCode",
"daypartName",
"networkCode",
"networkName",
"programCode",
"programName",
"programStartTime",
"programEndTime",
"programDays",
"airDate",
"lastAirDate",
"firstAirDate",
"unitLength",
"timeCost",
"networkType"
],
"additionalProperties": false
}
}
},
"required": [
"transactionId",
"clientCode",
"clientName",
"estimateCode",
"estimateNumber",
"demoCount",
"extractRecordCount",
"buys"
],
"additionalProperties": false
}