{"openapi":"3.0.3","info":{"title":"Text-to-Structured Date, Money & Unit Parser API","version":"1.0.0","description":"Extracts and normalizes messy locale-specific money strings ('1.234,50 Ft', 'CHF 1\\'250.00'), relative/localized dates ('next Friday 5pm CET', '2026. március 15.'), and physical units ('5 ft 10 in') into ISO/SI values."},"servers":[{"url":"https://api.tinplate.dev","description":"Production Edge Gateway"}],"components":{"schemas":{"ValueParseResponseData":{"type":"object","properties":{"money":{"type":"array","items":{"type":"object","properties":{"raw":{"type":"string"},"amount":{"type":"number","example":1234.5},"currency":{"type":"string","example":"HUF"},"formatted_iso":{"type":"string","example":"1234.50 HUF"}},"required":["raw","amount","currency","formatted_iso"]}},"dates":{"type":"array","items":{"type":"object","properties":{"raw":{"type":"string"},"iso_utc":{"type":"string","example":"2026-11-20T16:00:00.000Z"},"date_only":{"type":"string","example":"2026-11-20"},"epoch_ms":{"type":"integer"},"kind":{"type":"string","enum":["absolute","relative"]}},"required":["raw","iso_utc","date_only","epoch_ms","kind"]}},"units":{"type":"array","items":{"type":"object","properties":{"raw":{"type":"string"},"category":{"type":"string","enum":["length","mass","temperature","volume","speed","digital"]},"value":{"type":"number"},"unit":{"type":"string"},"normalized_value":{"type":"number"},"normalized_unit":{"type":"string"}},"required":["raw","category","value","unit","normalized_value","normalized_unit"]}},"total_extracted":{"type":"integer","minimum":0}},"required":["money","dates","units","total_extracted"]},"ValueParseRequest":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":16384,"example":"Invoice total: 1.234,50 Ft due next Friday 5pm CET (weight: 5 ft 10 in)","description":"Messy string containing money, dates/times, and/or physical units."},"locale_hint":{"type":"string","enum":["EU","HU","US","CH","GB"],"default":"EU","example":"HU","description":"Disambiguates ambiguous date formats (DD/MM/YYYY vs MM/DD/YYYY) and currency symbols."},"reference_time":{"type":"string","example":"2026-11-14T08:00:00Z","description":"ISO-8601 reference timestamp for relative dates ('tomorrow', 'next Friday 5pm CET')."}},"required":["text"]},"ResponseMeta":{"type":"object","required":["request_id"],"properties":{"request_id":{"type":"string","format":"uuid"},"ms":{"type":"integer","minimum":0},"version":{"type":"string","example":"1.0.0"}}},"ErrorEnvelope":{"type":"object","required":["ok","error","meta"],"properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"invalid_input"},"message":{"type":"string","example":"Request body failed validation"}}},"meta":{"$ref":"#/components/schemas/ResponseMeta"}}}},"parameters":{}},"paths":{"/v1/locale-value-parser":{"post":{"tags":["22_LOCALE_VALUE_PARSER"],"summary":"Parse messy money, date/time, and unit strings into structured normalized values","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueParseRequest"}}}},"responses":{"200":{"description":"Extracted and normalized money, date, and unit values","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/ValueParseResponseData"},"meta":{"$ref":"#/components/schemas/ResponseMeta"}},"required":["ok","data","meta"]}}}},"400":{"description":"Invalid input or malformed JSON request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid authentication credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Request payload exceeds subscribed plan byte cap","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}}}