{"openapi":"3.1.0","info":{"title":"patrapi API","version":"0.0.1","description":"Field extraction from documents through the workflows you publish."},"paths":{"/v1/workflows/{id}/extractions":{"post":{"tags":["Workflows"],"operationId":"workflows.extract","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["extraction"]},"id":{"type":"string"},"status":{"type":"string","enum":["queued","processing","succeeded","needs_review","failed","cancelled","rejected"]},"document_type":{"type":"string"},"profile_version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pipeline_version":{"type":"string"},"fields":{"anyOf":[{"type":"object","additionalProperties":{"type":"object","properties":{"value":{"anyOf":[{"type":"string"},{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"normalized":{"anyOf":[{"type":"string"},{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"status":{"type":"string","enum":["present","not_present","unreadable","redacted","conflicting"]},"page":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"source_text":{"anyOf":[{"type":"string"},{"type":"null"}]},"bbox":{"anyOf":[{"type":"array","prefixItems":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}],"maxItems":4,"minItems":4},{"type":"null"}]}},"required":["value","normalized","status","page","source_text","bbox"],"additionalProperties":false}},{"type":"null"}]},"warnings":{"type":"array","items":{"type":"string"}},"review_reasons":{"type":"array","items":{"type":"string"}},"credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}]},"workflow":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","version"],"additionalProperties":false},{"type":"null"}]},"reviewed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejection":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["reason","note"],"additionalProperties":false},{"type":"null"}]},"pages":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"created_at":{"type":"string","description":"ISO 8601"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"result_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","id","status","document_type","profile_version","pipeline_version","fields","warnings","review_reasons","credits","metadata","workflow","reviewed_at","rejection","pages","created_at","completed_at","result_expires_at","deleted_at"],"additionalProperties":false}}}},"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["extraction.receipt"]},"id":{"type":"string"},"status":{"type":"string","enum":["queued","processing","succeeded","needs_review","failed","cancelled","rejected"]}},"required":["object","id","status"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"402":{"description":"InsufficientCredits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsufficientCreditsEncoded"}}}},"404":{"description":"WorkflowNotPublished","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowNotPublishedEncoded"}}}},"422":{"description":"UnsupportedFile | PasswordProtected","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnsupportedFileEncoded"},{"$ref":"#/components/schemas/PasswordProtectedEncoded"}]}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedEncoded"}}}}},"description":"Run a document through a published workflow. Returns 202 with an id to poll at `GET /v1/extractions/{id}`, or 200 with the finished extraction when `wait` is set and it completes in time, or the same bytes were already processed by this version. Send `Idempotency-Key` to make retries safe.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"version":{"anyOf":[{"type":"string"},{"type":"null"}]},"wait":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"string"},{"type":"null"}]},"password":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["file"],"additionalProperties":false}}},"required":true}}},"/v1/extractions":{"post":{"tags":["Extractions"],"operationId":"extractions.create","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["extraction"]},"id":{"type":"string"},"status":{"type":"string","enum":["queued","processing","succeeded","needs_review","failed","cancelled","rejected"]},"document_type":{"type":"string"},"profile_version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pipeline_version":{"type":"string"},"fields":{"anyOf":[{"type":"object","additionalProperties":{"type":"object","properties":{"value":{"anyOf":[{"type":"string"},{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"normalized":{"anyOf":[{"type":"string"},{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"status":{"type":"string","enum":["present","not_present","unreadable","redacted","conflicting"]},"page":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"source_text":{"anyOf":[{"type":"string"},{"type":"null"}]},"bbox":{"anyOf":[{"type":"array","prefixItems":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}],"maxItems":4,"minItems":4},{"type":"null"}]}},"required":["value","normalized","status","page","source_text","bbox"],"additionalProperties":false}},{"type":"null"}]},"warnings":{"type":"array","items":{"type":"string"}},"review_reasons":{"type":"array","items":{"type":"string"}},"credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}]},"workflow":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","version"],"additionalProperties":false},{"type":"null"}]},"reviewed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejection":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["reason","note"],"additionalProperties":false},{"type":"null"}]},"pages":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"created_at":{"type":"string","description":"ISO 8601"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"result_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","id","status","document_type","profile_version","pipeline_version","fields","warnings","review_reasons","credits","metadata","workflow","reviewed_at","rejection","pages","created_at","completed_at","result_expires_at","deleted_at"],"additionalProperties":false}}}},"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["extraction.receipt"]},"id":{"type":"string"},"status":{"type":"string","enum":["queued","processing","succeeded","needs_review","failed","cancelled","rejected"]}},"required":["object","id","status"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"402":{"description":"InsufficientCredits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsufficientCreditsEncoded"}}}},"422":{"description":"UnknownDocumentType | UnsupportedFile | PasswordProtected","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnknownDocumentTypeEncoded"},{"$ref":"#/components/schemas/UnsupportedFileEncoded"},{"$ref":"#/components/schemas/PasswordProtectedEncoded"}]}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedEncoded"}}}}},"description":"Submit one logical document. Returns 202 with an id to poll. Send `Idempotency-Key` to make retries safe. Returns 200 with the existing resource when the same bytes were already processed under the same profile and pipeline version.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"document_type":{"type":"string"},"metadata":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"anyOf":[{"type":"string","enum":["standard","economy"]},{"type":"null"}]},"password":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["file","document_type"],"additionalProperties":false}}},"required":true}},"get":{"tags":["Extractions"],"operationId":"extractions.list","parameters":[{"name":"status","in":"query","schema":{"anyOf":[{"type":"string","enum":["queued","processing","succeeded","needs_review","failed","cancelled","rejected"]},{"type":"null"}]},"required":false},{"name":"document_type","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string","pattern":"^[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?$"},{"type":"null"}]},"required":false},{"name":"cursor","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["extraction"]},"id":{"type":"string"},"status":{"type":"string","enum":["queued","processing","succeeded","needs_review","failed","cancelled","rejected"]},"document_type":{"type":"string"},"profile_version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pipeline_version":{"type":"string"},"fields":{"anyOf":[{"type":"object","additionalProperties":{"type":"object","properties":{"value":{"anyOf":[{"type":"string"},{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"normalized":{"anyOf":[{"type":"string"},{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"status":{"type":"string","enum":["present","not_present","unreadable","redacted","conflicting"]},"page":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"source_text":{"anyOf":[{"type":"string"},{"type":"null"}]},"bbox":{"anyOf":[{"type":"array","prefixItems":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}],"maxItems":4,"minItems":4},{"type":"null"}]}},"required":["value","normalized","status","page","source_text","bbox"],"additionalProperties":false}},{"type":"null"}]},"warnings":{"type":"array","items":{"type":"string"}},"review_reasons":{"type":"array","items":{"type":"string"}},"credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}]},"workflow":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","version"],"additionalProperties":false},{"type":"null"}]},"reviewed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejection":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["reason","note"],"additionalProperties":false},{"type":"null"}]},"pages":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"created_at":{"type":"string","description":"ISO 8601"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"result_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","id","status","document_type","profile_version","pipeline_version","fields","warnings","review_reasons","credits","metadata","workflow","reviewed_at","rejection","pages","created_at","completed_at","result_expires_at","deleted_at"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedEncoded"}}}}}}},"/v1/extractions/{id}":{"get":{"tags":["Extractions"],"operationId":"extractions.get","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["extraction"]},"id":{"type":"string"},"status":{"type":"string","enum":["queued","processing","succeeded","needs_review","failed","cancelled","rejected"]},"document_type":{"type":"string"},"profile_version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pipeline_version":{"type":"string"},"fields":{"anyOf":[{"type":"object","additionalProperties":{"type":"object","properties":{"value":{"anyOf":[{"type":"string"},{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"normalized":{"anyOf":[{"type":"string"},{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"status":{"type":"string","enum":["present","not_present","unreadable","redacted","conflicting"]},"page":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"source_text":{"anyOf":[{"type":"string"},{"type":"null"}]},"bbox":{"anyOf":[{"type":"array","prefixItems":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}],"maxItems":4,"minItems":4},{"type":"null"}]}},"required":["value","normalized","status","page","source_text","bbox"],"additionalProperties":false}},{"type":"null"}]},"warnings":{"type":"array","items":{"type":"string"}},"review_reasons":{"type":"array","items":{"type":"string"}},"credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}]},"workflow":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","version"],"additionalProperties":false},{"type":"null"}]},"reviewed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejection":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["reason","note"],"additionalProperties":false},{"type":"null"}]},"pages":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"created_at":{"type":"string","description":"ISO 8601"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"result_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","id","status","document_type","profile_version","pipeline_version","fields","warnings","review_reasons","credits","metadata","workflow","reviewed_at","rejection","pages","created_at","completed_at","result_expires_at","deleted_at"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"ExtractionNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionNotFoundEncoded"}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedEncoded"}}}}}},"delete":{"tags":["Extractions"],"operationId":"extractions.delete","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[{"bearer":[]}],"responses":{"204":{"description":"<No Content>"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"ExtractionNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionNotFoundEncoded"}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedEncoded"}}}}},"description":"Delete the document's data: stops it first if it is still queued or processing, then removes the field values, evidence, metadata and file name. The extraction stays (status, pages and usage) with `deleted_at` set. Results are also deleted automatically at `result_expires_at`. Safe to repeat."}},"/v1/extractions/{id}/feedback":{"post":{"tags":["Extractions"],"operationId":"extractions.feedback","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["feedback"]},"extraction_id":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"mistake":{"type":"string","enum":["missed","invented","format","reordered","misread","different"]}},"required":["field","mistake"],"additionalProperties":false}},"created_at":{"type":"string"}},"required":["object","extraction_id","fields","created_at"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"ExtractionNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionNotFoundEncoded"}}}},"422":{"description":"InvalidFeedback","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidFeedbackEncoded"}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedEncoded"}}}}},"description":"Tell us which fields were wrong and what they should have been. Send only the wrong fields: `{ \"fields\": { \"pan\": { \"correct\": \"ABCDE1234F\" }, \"trade_name\": { \"correct\": null } } }`, where `null` means the document doesn't carry the field. The result itself is not changed. Corrections show up as field health on the workflow, so its weak fields can be fixed. Sending a field again replaces its earlier correction.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fields":{"type":"object","additionalProperties":{"type":"object","properties":{"correct":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["correct"],"additionalProperties":false}},"note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}},"required":["fields"],"additionalProperties":false}}},"required":true}}},"/v1/document-profiles":{"get":{"tags":["Document profiles"],"operationId":"documentProfiles.list","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["document_profile"]},"name":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pipeline_version":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"required":{"type":"boolean"}},"required":["name","description","required"],"additionalProperties":false}},"max_file_bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accepted_media_types":{"type":"array","items":{"type":"string"}}},"required":["object","name","version","pipeline_version","fields","max_file_bytes","accepted_media_types"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedEncoded"}}}}}}},"/health":{"get":{"tags":["system"],"operationId":"health","parameters":[],"security":[],"responses":{"204":{"description":"<No Content>"}}}},"/ready":{"get":{"tags":["system"],"operationId":"ready","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"database":{"type":"boolean"},"engine":{"type":"boolean"}},"required":["database","engine"],"additionalProperties":false}}}}}}}},"components":{"schemas":{"RateLimitedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["RateLimited"]},"message":{"type":"string"},"retry_after_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["_tag","message","retry_after_seconds"],"additionalProperties":false},"UnauthorizedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["Unauthorized"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"ExtractionNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ExtractionNotFound"]},"id":{"type":"string"}},"required":["_tag","id"],"additionalProperties":false},"InvalidFeedbackEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["InvalidFeedback"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"InsufficientCreditsEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["InsufficientCredits"]},"message":{"type":"string"},"required":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"available":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["_tag","message","required","available"],"additionalProperties":false},"PasswordProtectedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PasswordProtected"]},"reason":{"type":"string","enum":["password_required","wrong_password"]},"message":{"type":"string"}},"required":["_tag","reason","message"],"additionalProperties":false},"UnsupportedFileEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["UnsupportedFile"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"UnknownDocumentTypeEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["UnknownDocumentType"]},"document_type":{"type":"string"}},"required":["_tag","document_type"],"additionalProperties":false},"WorkflowNotPublishedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["WorkflowNotPublished"]},"workflow_id":{"type":"string"},"message":{"type":"string"}},"required":["_tag","workflow_id","message"],"additionalProperties":false}},"securitySchemes":{"bearer":{"type":"http","scheme":"Bearer"}}},"security":[],"tags":[{"name":"Workflows"},{"name":"Extractions"},{"name":"Document profiles"},{"name":"system"}]}