buyer_request_interpret.response.schema.json (8460B)
1 { 2 "type": "object", 3 "properties": { 4 "version": { 5 "type": "integer", 6 "const": 1 7 }, 8 "request_id": { 9 "type": "string", 10 "minLength": 1 11 }, 12 "trace_id": { 13 "type": "string" 14 }, 15 "ok": { 16 "type": "boolean" 17 }, 18 "output": { 19 "type": "object", 20 "properties": { 21 "demand_lines": { 22 "type": "array", 23 "items": { 24 "type": "object", 25 "properties": { 26 "line_id": { 27 "type": "string" 28 }, 29 "product": { 30 "type": "object", 31 "properties": { 32 "phrase": { 33 "type": "string" 34 }, 35 "catalogue_id": { 36 "type": [ 37 "string", 38 "null" 39 ] 40 }, 41 "resolution": { 42 "type": "string", 43 "enum": [ 44 "resolved", 45 "unresolved" 46 ] 47 } 48 }, 49 "required": [ 50 "catalogue_id", 51 "phrase", 52 "resolution" 53 ], 54 "additionalProperties": false 55 }, 56 "quantity": { 57 "type": "object", 58 "properties": { 59 "state": { 60 "type": "string", 61 "enum": [ 62 "known", 63 "unknown" 64 ] 65 }, 66 "value": { 67 "type": [ 68 "string", 69 "null" 70 ] 71 }, 72 "unit": { 73 "type": [ 74 "string", 75 "null" 76 ] 77 }, 78 "qualifier": { 79 "type": "string", 80 "enum": [ 81 "exact", 82 "approximate" 83 ] 84 } 85 }, 86 "required": [ 87 "state", 88 "qualifier" 89 ], 90 "additionalProperties": false 91 }, 92 "conditions": { 93 "type": "array", 94 "items": { 95 "type": "object", 96 "properties": { 97 "kind": { 98 "type": "string", 99 "enum": [ 100 "fulfillment", 101 "window", 102 "grade", 103 "price", 104 "attribute", 105 "substitution" 106 ] 107 }, 108 "strength": { 109 "type": "string", 110 "enum": [ 111 "mandatory", 112 "preferred", 113 "excluded", 114 "permitted" 115 ] 116 }, 117 "value": { 118 "type": [ 119 "string", 120 "null" 121 ] 122 }, 123 "evidence": { 124 "type": "array", 125 "items": { 126 "type": "object", 127 "properties": { 128 "source_id": { 129 "type": "string" 130 }, 131 "revision": { 132 "type": "string" 133 }, 134 "start": { 135 "type": "integer", 136 "minimum": 0 137 }, 138 "end": { 139 "type": "integer", 140 "minimum": 0 141 }, 142 "method": { 143 "type": "string" 144 } 145 }, 146 "required": [ 147 "end", 148 "method", 149 "revision", 150 "source_id", 151 "start" 152 ], 153 "additionalProperties": false 154 } 155 } 156 }, 157 "required": [ 158 "kind", 159 "strength", 160 "evidence" 161 ], 162 "additionalProperties": false 163 } 164 }, 165 "evidence": { 166 "type": "array", 167 "items": { 168 "type": "object", 169 "properties": { 170 "source_id": { 171 "type": "string" 172 }, 173 "revision": { 174 "type": "string" 175 }, 176 "start": { 177 "type": "integer", 178 "minimum": 0 179 }, 180 "end": { 181 "type": "integer", 182 "minimum": 0 183 }, 184 "method": { 185 "type": "string" 186 } 187 }, 188 "required": [ 189 "end", 190 "method", 191 "revision", 192 "source_id", 193 "start" 194 ], 195 "additionalProperties": false 196 } 197 }, 198 "review_required": { 199 "type": "boolean" 200 } 201 }, 202 "required": [ 203 "line_id", 204 "product", 205 "quantity", 206 "conditions", 207 "evidence", 208 "review_required" 209 ], 210 "additionalProperties": false 211 } 212 }, 213 "review": { 214 "type": "object", 215 "properties": { 216 "required": { 217 "type": "boolean" 218 }, 219 "clarifications": { 220 "type": "array", 221 "items": { 222 "type": "object", 223 "properties": { 224 "field": { 225 "type": "string" 226 }, 227 "reason": { 228 "type": "string" 229 } 230 }, 231 "required": [ 232 "field", 233 "reason" 234 ], 235 "additionalProperties": false 236 } 237 } 238 }, 239 "required": [ 240 "clarifications", 241 "required" 242 ], 243 "additionalProperties": false 244 }, 245 "execution": { 246 "type": "object", 247 "properties": { 248 "status": { 249 "type": "string", 250 "enum": [ 251 "complete", 252 "degraded", 253 "failed" 254 ] 255 }, 256 "provider_calls": { 257 "type": "integer", 258 "minimum": 0 259 }, 260 "model": { 261 "type": [ 262 "string", 263 "null" 264 ] 265 }, 266 "question_bundle": { 267 "type": [ 268 "string", 269 "null" 270 ] 271 } 272 }, 273 "required": [ 274 "model", 275 "provider_calls", 276 "question_bundle", 277 "status" 278 ], 279 "additionalProperties": false 280 } 281 }, 282 "required": [ 283 "demand_lines", 284 "review", 285 "execution" 286 ], 287 "additionalProperties": false 288 }, 289 "error": { 290 "type": "object", 291 "properties": { 292 "code": { 293 "type": "string" 294 }, 295 "message": { 296 "type": "string" 297 } 298 }, 299 "required": [ 300 "code", 301 "message" 302 ], 303 "additionalProperties": false 304 }, 305 "meta": { 306 "type": "object", 307 "additionalProperties": true 308 } 309 }, 310 "required": [ 311 "version", 312 "request_id", 313 "ok" 314 ], 315 "additionalProperties": false 316 }