{"openapi":"3.1.0","info":{"title":"parserkit API","version":"1","description":"Turn PDFs, photos, Office files and emails into checked JSON, XLSX, CSV, QuickBooks and Xero files. Billed per page from a prepaid wallet; failed jobs are free. Every response carries a Request-Id header, and every error body the same id as error.request_id."},"servers":[{"url":"https://api.parserkit.com"}],"security":[{"apiKey":[]}],"paths":{"/health":{"get":{"operationId":"health","security":[],"responses":{"200":{"description":"Up","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"version":{"type":"string"},"configured":{"type":"boolean","description":"false while the Worker is missing config: every other request answers 500 until it isn't"}}}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}}},"/openapi.json":{"get":{"operationId":"openapi","security":[],"responses":{"200":{"description":"This document","content":{"application/json":{"schema":{"type":"object"}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}}},"/llms.txt":{"get":{"operationId":"llmsTxt","security":[],"responses":{"200":{"description":"The API in short, for LLMs","content":{"text/markdown":{"schema":{"type":"string"}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}}},"/v1/parse":{"post":{"operationId":"parse","summary":"Parse a document","description":"Send one file: multipart `file` up to 25000000 bytes, `file_url`, or `upload_id` for files up to 100000000 bytes. Pick exactly one of preset, schema_id or schema. Up to 250 pages; .eml, .msg and .zip files hold several documents.","parameters":[{"name":"wait","in":"query","description":"Seconds to wait for the job to finish (0-60). Prefer: wait=N and Prefer: respond-async work too","schema":{"type":"integer","minimum":0,"maximum":60,"default":60}},{"name":"Idempotency-Key","in":"header","description":"Replays the same job for 24 hours; the same key on a different request is 409 IDEMPOTENCY_CONFLICT","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7e]+$"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"file_url":{"type":"string","maxLength":2048,"format":"uri","description":"A public http(s) URL on port 80 or 443 that we fetch (up to 100000000 bytes, 3 redirects)"},"upload_id":{"type":"string","maxLength":64,"description":"A completed upload from POST /v1/uploads (single use)"},"file_name":{"type":"string","minLength":1,"maxLength":255,"description":"The name recorded for a file_url source; an upload keeps the name it was created with"},"preset":{"type":"string","enum":["invoice","receipt","bank_statement","resume","purchase_order","bill_of_lading","generic_table"]},"schema_id":{"type":"string","maxLength":64,"description":"A saved schema of this account"},"schema":{"type":"string","description":"An inline JSON Schema, held to the saved-schema limits (JSON text)"},"field_rules":{"type":"string","description":"Rules that go with an inline schema (JSON text)"},"password":{"type":"string","minLength":1,"maxLength":256,"writeOnly":true,"description":"Opens a password-protected file; never stored or returned"},"vault":{"type":"string","enum":["true","false"]},"gl_accounts":{"type":"string","description":"Chart of accounts; line items gain gl_code, gl_name and gl_confidence (JSON text)"},"enrich":{"type":"string","enum":["true","false"]},"retain_source":{"type":"string","enum":["true","false"]},"webhook_url":{"type":"string","maxLength":2048,"format":"uri","description":"https on port 443 or 8443; defaults to the account's webhook URL"},"metadata":{"type":"string","description":"Returned as-is in the job and its webhooks (JSON text)"}}}},"application/json":{"schema":{"type":"object","properties":{"file_url":{"type":"string","maxLength":2048,"format":"uri","description":"A public http(s) URL on port 80 or 443 that we fetch (up to 100000000 bytes, 3 redirects)"},"upload_id":{"type":"string","maxLength":64,"description":"A completed upload from POST /v1/uploads (single use)"},"file_name":{"type":"string","minLength":1,"maxLength":255,"description":"The name recorded for a file_url source; an upload keeps the name it was created with"},"preset":{"type":"string","enum":["invoice","receipt","bank_statement","resume","purchase_order","bill_of_lading","generic_table"]},"schema_id":{"type":"string","maxLength":64,"description":"A saved schema of this account"},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"An inline JSON Schema, held to the saved-schema limits"},"field_rules":{"type":"array","items":{},"description":"Rules that go with an inline schema"},"password":{"type":"string","minLength":1,"maxLength":256,"writeOnly":true,"description":"Opens a password-protected file; never stored or returned"},"vault":{"type":"boolean","default":false,"description":"Try the account's saved passwords (Pro). Inbox jobs always try them"},"gl_accounts":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":64},"name":{"type":"string","minLength":1,"maxLength":200},"keywords":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"description":{"type":"string","maxLength":500}},"required":["code","name"]},"description":"Chart of accounts; line items gain gl_code, gl_name and gl_confidence"},"enrich":{"type":"boolean","default":false,"description":"Bank statements: merchant and category per transaction"},"retain_source":{"type":"boolean","default":true,"description":"false deletes the input file once the job ends"},"webhook_url":{"type":"string","maxLength":2048,"format":"uri","description":"https on port 443 or 8443; defaults to the account's webhook URL"},"metadata":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"additionalProperties":{"type":"string","maxLength":500},"maxProperties":20,"description":"Returned as-is in the job and its webhooks"}},"additionalProperties":false}}}},"responses":{"200":{"description":"The job finished within the wait","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"202":{"description":"The job is still queued or running","headers":{"Location":{"description":"Where to poll the job","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before the next poll","schema":{"type":"integer"}},"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"INVALID_REQUEST (error.issues lists every problem), INVALID_SCHEMA (error.issues lists every problem)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INVALID_REQUEST","INVALID_SCHEMA"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UNAUTHORIZED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"402":{"description":"INSUFFICIENT_CREDIT (top up at error.billing_url)","content":{"application/json":{"schema":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INSUFFICIENT_CREDIT"]}}}}}]},{"allOf":[{"$ref":"#/components/schemas/FailedJob"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INSUFFICIENT_CREDIT"]}}}}}]}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"NOT_FOUND, SOURCE_NOT_FOUND","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["NOT_FOUND","SOURCE_NOT_FOUND"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"408":{"description":"REQUEST_TIMEOUT (the request body stopped arriving; send it again)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["REQUEST_TIMEOUT"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"IDEMPOTENCY_CONFLICT, SOURCE_CHANGED (failed job)","content":{"application/json":{"schema":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["IDEMPOTENCY_CONFLICT"]}}}}}]},{"allOf":[{"$ref":"#/components/schemas/FailedJob"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["SOURCE_CHANGED"]}}}}}]}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"413":{"description":"FILE_TOO_LARGE","content":{"application/json":{"schema":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["FILE_TOO_LARGE"]}}}}}]},{"allOf":[{"$ref":"#/components/schemas/FailedJob"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["FILE_TOO_LARGE"]}}}}}]}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"UNSUPPORTED_FORMAT (failed job)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FailedJob"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UNSUPPORTED_FORMAT"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"422":{"description":"CORRUPT_FILE (failed job), PASSWORD_REQUIRED (failed job), TOO_MANY_PAGES (failed job), TOO_MANY_SCANNED_PAGES (failed job), SOURCE_NOT_FOUND (failed job), LLM_REFUSED (failed job), BUDGET_EXHAUSTED (failed job)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FailedJob"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["CORRUPT_FILE","PASSWORD_REQUIRED","TOO_MANY_PAGES","TOO_MANY_SCANNED_PAGES","SOURCE_NOT_FOUND","LLM_REFUSED","BUDGET_EXHAUSTED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds), BUSY (wait Retry-After seconds), CONTENT_REFUSALS (too many refused documents today; wait Retry-After seconds (UTC midnight))","content":{"application/json":{"schema":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["RATE_LIMITED","BUSY","CONTENT_REFUSALS"]}}}}}]},{"allOf":[{"$ref":"#/components/schemas/FailedJob"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["RATE_LIMITED","CONTENT_REFUSALS"]}}}}}]}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"INTERNAL (failed job)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FailedJob"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INTERNAL"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"502":{"description":"LLM_UNAVAILABLE (failed job), OCR_UNAVAILABLE (failed job)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FailedJob"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["LLM_UNAVAILABLE","OCR_UNAVAILABLE"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"CONTAINER_UNAVAILABLE (failed job)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FailedJob"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["CONTAINER_UNAVAILABLE"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"504":{"description":"TIMEOUT (failed job)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FailedJob"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["TIMEOUT"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}}},"/v1/jobs":{"get":{"operationId":"listJobs","summary":"List jobs, newest first","parameters":[{"name":"cursor","in":"query","description":"next_cursor of the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"status","in":"query","schema":{"type":"string","enum":["queued","running","succeeded","failed"]}},{"name":"source","in":"query","schema":{"type":"string","enum":["api","inbox","sample","workbench","mcp"]}}],"responses":{"200":{"description":"One page of jobs; download links are signed fresh on every call","content":{"application/json":{"schema":{"type":"object","required":["items","next_cursor"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/JobSummary"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"INVALID_REQUEST (error.issues lists every problem)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INVALID_REQUEST"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UNAUTHORIZED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["RATE_LIMITED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}}},"/v1/jobs/{id}":{"get":{"operationId":"getJob","summary":"Get a job","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^job_[a-z0-9]{20}$"}},{"name":"wait","in":"query","description":"Seconds to wait for the job to finish (0-60). Prefer: wait=N and Prefer: respond-async work too","schema":{"type":"integer","minimum":0,"maximum":60,"default":0}}],"responses":{"200":{"description":"The job; download links are signed fresh on every call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"INVALID_REQUEST (error.issues lists every problem)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INVALID_REQUEST"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UNAUTHORIZED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"JOB_NOT_FOUND","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["JOB_NOT_FOUND"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["RATE_LIMITED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}}},"/v1/uploads":{"post":{"operationId":"createUpload","summary":"Get a signed URL for a file up to 100000000 bytes","description":"PUT the file to the returned url once, within the hour, with a Content-Length header; then pass upload_id to POST /v1/parse within 20 hours. Each upload feeds one job. The declared bytes count toward the daily upload caps from now on, and at most 100 links can wait for their file at once. A replayed Idempotency-Key answers by the upload's state: the same link while it waits for its PUT, 409 UPLOAD_ALREADY_RECEIVED once the file arrived, 409 CONFLICT with Retry-After while a PUT runs, 410 UPLOAD_EXPIRED once it expired.","parameters":[{"name":"Idempotency-Key","in":"header","description":"Replays the same upload for 24 hours; the same key on a different request is 409 IDEMPOTENCY_CONFLICT","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7e]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_name":{"type":"string","minLength":1,"maxLength":255},"content_type":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"bytes":{"type":"integer","minimum":1,"maximum":100000000}},"required":["file_name","bytes"],"additionalProperties":false}}}},"responses":{"201":{"description":"Where to PUT the file; a replayed Idempotency-Key answers the same link while the upload waits for its PUT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Upload"}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"INVALID_REQUEST (error.issues lists every problem)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INVALID_REQUEST"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UNAUTHORIZED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"IDEMPOTENCY_CONFLICT, UPLOAD_ALREADY_RECEIVED (error.upload_id, error.bytes and error.sha256 describe the stored file), CONFLICT","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["IDEMPOTENCY_CONFLICT","UPLOAD_ALREADY_RECEIVED","CONFLICT"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"410":{"description":"UPLOAD_EXPIRED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UPLOAD_EXPIRED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"413":{"description":"FILE_TOO_LARGE","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["FILE_TOO_LARGE"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["RATE_LIMITED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}}},"/v1/schemas":{"get":{"operationId":"listSchemas","parameters":[{"name":"cursor","in":"query","description":"next_cursor of the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"One page of schemas","content":{"application/json":{"schema":{"type":"object","required":["items","next_cursor"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Schema"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"INVALID_REQUEST (error.issues lists every problem)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INVALID_REQUEST"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UNAUTHORIZED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["RATE_LIMITED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}},"post":{"operationId":"createSchema","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Unique per account"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"preset":{"anyOf":[{"type":"string","enum":["invoice","receipt","bank_statement","resume","purchase_order","bill_of_lading","generic_table"]},{"type":"null"}]},"json_schema":{"type":"object","description":"A JSON Schema: depth 6, 200 properties, 65536 bytes"},"field_rules":{"type":"array","maxItems":100,"items":{"type":"object"}},"gl_accounts":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":64},"name":{"type":"string","minLength":1,"maxLength":200},"keywords":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"description":{"type":"string","maxLength":500}},"required":["code","name"],"additionalProperties":false}}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schema"}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"INVALID_REQUEST (error.issues lists every problem), INVALID_SCHEMA (error.issues lists every problem)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INVALID_REQUEST","INVALID_SCHEMA"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UNAUTHORIZED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"CONFLICT","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["CONFLICT"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["RATE_LIMITED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}}},"/v1/schemas/from-sample":{"post":{"operationId":"schemaFromSample","summary":"Propose a schema from a sample document","description":"Bills 1 page. Up to 30 a UTC day per account (429 with Retry-After until midnight); it reads the first 3 pages of the first document and warns SAMPLE_TRUNCATED when it leaves pages or documents out. The job's data is { schema, sample }: save the schema with POST /v1/schemas.","parameters":[{"name":"wait","in":"query","description":"Seconds to wait for the job to finish (0-60). Prefer: wait=N and Prefer: respond-async work too","schema":{"type":"integer","minimum":0,"maximum":60,"default":60}},{"name":"Idempotency-Key","in":"header","description":"Replays the same job for 24 hours; the same key on a different request is 409 IDEMPOTENCY_CONFLICT","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7e]+$"}},{"name":"hint","in":"query","description":"With multipart: what the document is","schema":{"type":"string","maxLength":500}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"}}}},"application/json":{"schema":{"type":"object","properties":{"upload_id":{"type":"string","maxLength":64},"file_url":{"type":"string","maxLength":2048,"format":"uri"},"hint":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"additionalProperties":false,"description":"Exactly one of upload_id and file_url"}}}},"responses":{"200":{"description":"The job finished within the wait","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"202":{"description":"The job is still queued or running","headers":{"Location":{"description":"Where to poll the job","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before the next poll","schema":{"type":"integer"}},"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"INVALID_REQUEST (error.issues lists every problem)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INVALID_REQUEST"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UNAUTHORIZED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"402":{"description":"INSUFFICIENT_CREDIT (top up at error.billing_url)","content":{"application/json":{"schema":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INSUFFICIENT_CREDIT"]}}}}}]},{"allOf":[{"$ref":"#/components/schemas/FailedJob"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INSUFFICIENT_CREDIT"]}}}}}]}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"SOURCE_NOT_FOUND","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["SOURCE_NOT_FOUND"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"408":{"description":"REQUEST_TIMEOUT (the request body stopped arriving; send it again)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["REQUEST_TIMEOUT"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"IDEMPOTENCY_CONFLICT, SOURCE_CHANGED (failed job)","content":{"application/json":{"schema":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["IDEMPOTENCY_CONFLICT"]}}}}}]},{"allOf":[{"$ref":"#/components/schemas/FailedJob"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["SOURCE_CHANGED"]}}}}}]}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"413":{"description":"FILE_TOO_LARGE","content":{"application/json":{"schema":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["FILE_TOO_LARGE"]}}}}}]},{"allOf":[{"$ref":"#/components/schemas/FailedJob"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["FILE_TOO_LARGE"]}}}}}]}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"UNSUPPORTED_FORMAT (failed job)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FailedJob"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UNSUPPORTED_FORMAT"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"422":{"description":"CORRUPT_FILE (failed job), PASSWORD_REQUIRED (failed job), TOO_MANY_PAGES (failed job), TOO_MANY_SCANNED_PAGES (failed job), SOURCE_NOT_FOUND (failed job), LLM_REFUSED (failed job), BUDGET_EXHAUSTED (failed job)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FailedJob"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["CORRUPT_FILE","PASSWORD_REQUIRED","TOO_MANY_PAGES","TOO_MANY_SCANNED_PAGES","SOURCE_NOT_FOUND","LLM_REFUSED","BUDGET_EXHAUSTED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds), BUSY (wait Retry-After seconds), CONTENT_REFUSALS (too many refused documents today; wait Retry-After seconds (UTC midnight))","content":{"application/json":{"schema":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["RATE_LIMITED","BUSY","CONTENT_REFUSALS"]}}}}}]},{"allOf":[{"$ref":"#/components/schemas/FailedJob"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["RATE_LIMITED","CONTENT_REFUSALS"]}}}}}]}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"INTERNAL (failed job)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FailedJob"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INTERNAL"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"502":{"description":"LLM_UNAVAILABLE (failed job), OCR_UNAVAILABLE (failed job)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FailedJob"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["LLM_UNAVAILABLE","OCR_UNAVAILABLE"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"CONTAINER_UNAVAILABLE (failed job)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FailedJob"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["CONTAINER_UNAVAILABLE"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"504":{"description":"TIMEOUT (failed job)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FailedJob"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["TIMEOUT"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}}},"/v1/schemas/{id}":{"get":{"operationId":"getSchema","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^sch_[a-z0-9]{16}$"}}],"responses":{"200":{"description":"The schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schema"}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"INVALID_REQUEST (error.issues lists every problem)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INVALID_REQUEST"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UNAUTHORIZED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["NOT_FOUND"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["RATE_LIMITED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}},"patch":{"operationId":"updateSchema","description":"Every change bumps version. Send the version you read: when the schema moved on since, the answer is 409 CONFLICT with error.version, and nothing changes.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^sch_[a-z0-9]{16}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Unique per account"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"preset":{"anyOf":[{"type":"string","enum":["invoice","receipt","bank_statement","resume","purchase_order","bill_of_lading","generic_table"]},{"type":"null"}]},"json_schema":{"type":"object","description":"A JSON Schema: depth 6, 200 properties, 65536 bytes"},"field_rules":{"type":"array","maxItems":100,"items":{"type":"object"}},"gl_accounts":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":64},"name":{"type":"string","minLength":1,"maxLength":200},"keywords":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"description":{"type":"string","maxLength":500}},"required":["code","name"],"additionalProperties":false}},"version":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Compare-and-set on the version you read"}},"additionalProperties":false}}}},"responses":{"200":{"description":"The updated schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schema"}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"INVALID_REQUEST (error.issues lists every problem), INVALID_SCHEMA (error.issues lists every problem)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INVALID_REQUEST","INVALID_SCHEMA"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UNAUTHORIZED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["NOT_FOUND"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"CONFLICT","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["CONFLICT"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["RATE_LIMITED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}},"delete":{"operationId":"deleteSchema","description":"Jobs keep their results. While an inbox still points at the schema: 409 CONFLICT with error.inbox_ids.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^sch_[a-z0-9]{16}$"}}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"INVALID_REQUEST (error.issues lists every problem)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INVALID_REQUEST"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UNAUTHORIZED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["NOT_FOUND"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"CONFLICT","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["CONFLICT"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["RATE_LIMITED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}}},"/v1/inboxes":{"get":{"operationId":"listInboxes","parameters":[{"name":"cursor","in":"query","description":"next_cursor of the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"One page of inboxes","content":{"application/json":{"schema":{"type":"object","required":["items","next_cursor"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Inbox"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"INVALID_REQUEST (error.issues lists every problem)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INVALID_REQUEST"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UNAUTHORIZED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["RATE_LIMITED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}},"post":{"operationId":"createInbox","description":"Pro. At most 20 live inboxes and 100 addresses over the account's lifetime (409 CONFLICT with error.limit).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"local_part":{"type":"string","maxLength":320},"preset":{"anyOf":[{"type":"string","enum":["invoice","receipt","bank_statement","resume","purchase_order","bill_of_lading","generic_table"]},{"type":"null"}]},"schema_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"webhook_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"allowed_senders":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":320}},"allowed_domains":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":320}},"accept_anyone":{"type":"boolean"},"daily_page_cap":{"type":"integer","minimum":1,"maximum":10000}},"additionalProperties":false}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Inbox"}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"INVALID_REQUEST (error.issues lists every problem)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INVALID_REQUEST"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UNAUTHORIZED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"PLAN_REQUIRED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["PLAN_REQUIRED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["NOT_FOUND"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"CONFLICT","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["CONFLICT"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["RATE_LIMITED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}}},"/v1/inboxes/{id}":{"get":{"operationId":"getInbox","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^ibx_[a-z0-9]{16}$"}}],"responses":{"200":{"description":"The inbox","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Inbox"}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"INVALID_REQUEST (error.issues lists every problem)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INVALID_REQUEST"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UNAUTHORIZED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["NOT_FOUND"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["RATE_LIMITED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}},"patch":{"operationId":"updateInbox","description":"Pro.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^ibx_[a-z0-9]{16}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"preset":{"anyOf":[{"type":"string","enum":["invoice","receipt","bank_statement","resume","purchase_order","bill_of_lading","generic_table"]},{"type":"null"}]},"schema_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"webhook_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"allowed_senders":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":320}},"allowed_domains":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":320}},"accept_anyone":{"type":"boolean"},"daily_page_cap":{"type":"integer","minimum":1,"maximum":10000},"status":{"type":"string","enum":["active","paused"]},"rotate_forwarding_address":{"type":"boolean","const":true}},"additionalProperties":false}}}},"responses":{"200":{"description":"The updated inbox","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Inbox"}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"INVALID_REQUEST (error.issues lists every problem)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INVALID_REQUEST"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UNAUTHORIZED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"PLAN_REQUIRED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["PLAN_REQUIRED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["NOT_FOUND"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"CONFLICT","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["CONFLICT"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["RATE_LIMITED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}},"delete":{"operationId":"deleteInbox","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^ibx_[a-z0-9]{16}$"}}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"INVALID_REQUEST (error.issues lists every problem)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INVALID_REQUEST"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UNAUTHORIZED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["NOT_FOUND"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["RATE_LIMITED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}}},"/v1/inboxes/{id}/events":{"get":{"operationId":"listMailEvents","summary":"The inbox's dropped mail of the last 30 days, newest first","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^ibx_[a-z0-9]{16}$"}},{"name":"cursor","in":"query","description":"next_cursor of the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"One page of mail events","content":{"application/json":{"schema":{"type":"object","required":["items","next_cursor"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MailEvent"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"INVALID_REQUEST (error.issues lists every problem)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INVALID_REQUEST"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UNAUTHORIZED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["NOT_FOUND"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["RATE_LIMITED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}}},"/v1/vault/passwords":{"get":{"operationId":"listPasswords","parameters":[{"name":"cursor","in":"query","description":"next_cursor of the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"One page of passwords, never their values","content":{"application/json":{"schema":{"type":"object","required":["items","next_cursor"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Password"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"INVALID_REQUEST (error.issues lists every problem)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INVALID_REQUEST"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UNAUTHORIZED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["RATE_LIMITED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}},"post":{"operationId":"createPassword","description":"Pro. At most 100 passwords (409 CONFLICT with error.limit).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["label","password"],"additionalProperties":false,"properties":{"label":{"type":"string","minLength":1,"maxLength":64},"password":{"type":"string","minLength":1,"maxLength":512,"writeOnly":true}}}}}},"responses":{"201":{"description":"Stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Password"}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"INVALID_REQUEST (error.issues lists every problem)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INVALID_REQUEST"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UNAUTHORIZED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"PLAN_REQUIRED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["PLAN_REQUIRED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"CONFLICT","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["CONFLICT"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["RATE_LIMITED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}}},"/v1/vault/passwords/{id}":{"delete":{"operationId":"deletePassword","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^pwd_[a-z0-9]{16}$"}}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"INVALID_REQUEST (error.issues lists every problem)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INVALID_REQUEST"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UNAUTHORIZED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["NOT_FOUND"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["RATE_LIMITED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}}},"/f/{key}":{"servers":[{"url":"https://files.parserkit.com"}],"get":{"operationId":"download","summary":"A job output, from the signed link in the job's outputs","security":[],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The file, as an attachment","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"FORBIDDEN","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["FORBIDDEN"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["NOT_FOUND"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}},"head":{"operationId":"downloadHead","security":[],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The file's headers","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"FORBIDDEN","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["FORBIDDEN"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["NOT_FOUND"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}}},"/u/{upload_id}":{"servers":[{"url":"https://files.parserkit.com"}],"put":{"operationId":"putUpload","summary":"Send the file of an upload (the signed url from POST /v1/uploads)","description":"Once per upload. A bad signature is 403 whatever the upload's state; a repeat PUT is 409 UPLOAD_ALREADY_RECEIVED with error.upload_id, error.bytes and error.sha256 of the stored file; a PUT while another runs is 409 CONFLICT with Retry-After: 30; an expired link is 410 UPLOAD_EXPIRED.","security":[],"parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","pattern":"^upl_[a-z0-9]{16}$"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Stored","content":{"application/json":{"schema":{"type":"object","properties":{"upload_id":{"type":"string"},"bytes":{"type":"integer"},"sha256":{"type":"string"}}}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"INVALID_REQUEST (error.issues lists every problem)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["INVALID_REQUEST"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"FORBIDDEN","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["FORBIDDEN"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["NOT_FOUND"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"408":{"description":"REQUEST_TIMEOUT (the request body stopped arriving; send it again)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["REQUEST_TIMEOUT"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"UPLOAD_ALREADY_RECEIVED (error.upload_id, error.bytes and error.sha256 describe the stored file), CONFLICT","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UPLOAD_ALREADY_RECEIVED","CONFLICT"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"410":{"description":"UPLOAD_EXPIRED","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["UPLOAD_EXPIRED"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}},"413":{"description":"FILE_TOO_LARGE","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["FILE_TOO_LARGE"]}}}}}]}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}}}}}}},"webhooks":{"job.succeeded":{"post":{"summary":"job.succeeded: POSTed to the job's webhook_url","description":"Verify Parserkit-Signature (t=<unix>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your webhook secret>) and reject old timestamps. Answer 2xx; we retry with backoff otherwise.","parameters":[{"name":"Parserkit-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Parserkit-Event","in":"header","required":true,"schema":{"const":"job.succeeded"}},{"name":"Parserkit-Job-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"The event id; the same on every retry","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"const":"job.succeeded"},"created_at":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/Job"}}}}}},"responses":{"200":{"description":"Received"}}}},"job.discrepancy_flagged":{"post":{"summary":"job.discrepancy_flagged: POSTed to the job's webhook_url","description":"Verify Parserkit-Signature (t=<unix>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your webhook secret>) and reject old timestamps. Answer 2xx; we retry with backoff otherwise.","parameters":[{"name":"Parserkit-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Parserkit-Event","in":"header","required":true,"schema":{"const":"job.discrepancy_flagged"}},{"name":"Parserkit-Job-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"The event id; the same on every retry","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"const":"job.discrepancy_flagged"},"created_at":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/Job"}}}}}},"responses":{"200":{"description":"Received"}}}},"job.failed":{"post":{"summary":"job.failed: POSTed to the job's webhook_url","description":"Verify Parserkit-Signature (t=<unix>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your webhook secret>) and reject old timestamps. Answer 2xx; we retry with backoff otherwise.","parameters":[{"name":"Parserkit-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Parserkit-Event","in":"header","required":true,"schema":{"const":"job.failed"}},{"name":"Parserkit-Job-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"The event id; the same on every retry","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"const":"job.failed"},"created_at":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/Job"}}}}}},"responses":{"200":{"description":"Received"}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Authorization: Bearer pkit_live_..."}},"headers":{"RequestId":{"description":"The cf-ray of the request, else a random UUID; error bodies repeat it as error.request_id","schema":{"type":"string"}}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST","INVALID_SCHEMA","UNAUTHORIZED","INSUFFICIENT_CREDIT","FORBIDDEN","PLAN_REQUIRED","HTTPS_REQUIRED","NOT_FOUND","SOURCE_NOT_FOUND","JOB_NOT_FOUND","METHOD_NOT_ALLOWED","REQUEST_TIMEOUT","IDEMPOTENCY_CONFLICT","CONFLICT","UPLOAD_ALREADY_RECEIVED","UPLOAD_EXPIRED","FILE_TOO_LARGE","UNSUPPORTED_FORMAT","PASSWORD_REQUIRED","TOO_MANY_PAGES","CORRUPT_FILE","LLM_REFUSED","RATE_LIMITED","BUSY","CONTENT_REFUSALS","INTERNAL","NOT_IMPLEMENTED","LLM_UNAVAILABLE","OCR_UNAVAILABLE","CONTAINER_UNAVAILABLE","TIMEOUT"]},"message":{"type":"string"},"request_id":{"type":"string","description":"The Request-Id header of this response"}},"additionalProperties":true}}},"FailedJob":{"type":"object","required":["error","job"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["CORRUPT_FILE","PASSWORD_REQUIRED","TOO_MANY_PAGES","TOO_MANY_SCANNED_PAGES","UNSUPPORTED_FORMAT","FILE_TOO_LARGE","SOURCE_NOT_FOUND","SOURCE_CHANGED","INSUFFICIENT_CREDIT","LLM_REFUSED","LLM_UNAVAILABLE","OCR_UNAVAILABLE","BUDGET_EXHAUSTED","TIMEOUT","CONTAINER_UNAVAILABLE","RATE_LIMITED","CONTENT_REFUSALS","INTERNAL"]},"message":{"type":"string"},"request_id":{"type":"string"}}},"job":{"$ref":"#/components/schemas/Job"}}},"Deleted":{"type":"object","required":["id","deleted"],"properties":{"id":{"type":"string"},"deleted":{"const":true}}},"Upload":{"type":"object","required":["upload_id","method","url","max_bytes","expires_at"],"properties":{"upload_id":{"type":"string"},"method":{"const":"PUT"},"url":{"type":"string","format":"uri"},"max_bytes":{"type":"integer"},"expires_at":{"type":"string","format":"date-time"}}},"Schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"preset":{"anyOf":[{"type":"string","enum":["invoice","receipt","bank_statement","resume","purchase_order","bill_of_lading","generic_table"]},{"type":"null"}]},"json_schema":{"anyOf":[{"type":"object"},{"type":"null"}]},"field_rules":{"type":"array","items":{"type":"object"}},"gl_accounts":{"type":"array","items":{"type":"object","required":["code","name"],"additionalProperties":false,"properties":{"code":{"type":"string","minLength":1,"maxLength":64},"name":{"type":"string","minLength":1,"maxLength":200},"keywords":{"type":"array","maxItems":50,"items":{"type":"string","minLength":1,"maxLength":100}},"description":{"type":"string","maxLength":500}}}},"version":{"type":"integer","minimum":1},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Inbox":{"type":"object","properties":{"id":{"type":"string"},"address":{"type":"string","format":"email"},"local_part":{"type":"string"},"forwarding_address":{"anyOf":[{"type":"string"},{"type":"null"}]},"preset":{"anyOf":[{"type":"string","enum":["invoice","receipt","bank_statement","resume","purchase_order","bill_of_lading","generic_table"]},{"type":"null"}]},"schema_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"allowed_senders":{"type":"array","items":{"type":"string"}},"allowed_domains":{"type":"array","items":{"type":"string"}},"accept_anyone":{"type":"boolean"},"daily_page_cap":{"type":"integer"},"status":{"type":"string","enum":["active","paused"]},"last_verification":{"anyOf":[{"type":"object","properties":{"received_at":{"type":"string","format":"date-time"},"source":{"type":"string"},"link":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"via":{"type":"string"}}},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"MailEvent":{"type":"object","properties":{"id":{"type":"string"},"from_domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"type":"string","enum":["unauthenticated","sender_not_allowed","replayed","daily_cap","malformed","refusals"]},"created_at":{"type":"string","format":"date-time"}}},"Password":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}},"FieldProvenance":{"type":"object","properties":{"page":{"anyOf":[{"type":"integer","minimum":0,"maximum":1000000},{"type":"null"}]},"bbox":{"anyOf":[{"type":"array","prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"items":false,"minItems":4,"maxItems":4},{"type":"null"}]},"band":{"anyOf":[{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"items":false,"minItems":2,"maxItems":2},{"type":"null"}]},"row":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000},{"type":"null"}]},"line":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000},{"type":"null"}]},"origin":{"type":"string","enum":["text","table","vision","repair","barcode","rule","derived"]},"confidence":{"type":"number","minimum":0,"maximum":1},"checks":{"maxItems":5,"type":"array","items":{"type":"string","enum":["math","checksum","text","ocr","agreement"]},"description":"The independent checks the value passed; a value a field rule changed carries none"},"by_rule":{"type":"boolean","const":true,"description":"True when a field rule changed the value; left out otherwise"},"year_assumed":{"type":"boolean","const":true,"description":"True on a date whose year nothing printed gives; it takes the year of its last occurrence up to the day the job came in and carries no check"},"inherited_from":{"type":"string","maxLength":1024,"description":"On a statement row that prints no date: the path of the date it repeats. The copy counts toward no status"},"unread":{"type":"boolean","const":true,"description":"True on a null date whose row prints a date that could not be read; it counts as an unchecked value"}},"required":["page","bbox","band","row","line","origin","confidence","checks"]},"Output":{"type":"object","required":["name","url","bytes","expires_at"],"properties":{"name":{"type":"string","enum":["output.json","output.xlsx","output.csv","quickbooks.csv","xero.csv"]},"url":{"type":"string","format":"uri","description":"A signed link on https://files.parserkit.com"},"bytes":{"type":"integer"},"expires_at":{"type":"string","format":"date-time"}}},"JobSummary":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed"]},"source":{"type":"string","enum":["api","inbox","sample","workbench","mcp"]},"mode":{"type":"string","enum":["parse","schema_from_sample"]},"preset":{"anyOf":[{"type":"string","enum":["invoice","receipt","bank_statement","resume","purchase_order","bill_of_lading","generic_table"]},{"type":"null"}]},"schema_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"inbox_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"file":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"anyOf":[{"type":"integer"},{"type":"null"}]},"kind":{"anyOf":[{"type":"string","enum":["pdf","image","tiff","heic","docx","xlsx","csv","html","text","eml","msg","zip"]},{"type":"null"}]}}},"pages":{"anyOf":[{"type":"integer"},{"type":"null"}]},"digital_pages":{"anyOf":[{"type":"integer"},{"type":"null"}]},"ocr_pages":{"anyOf":[{"type":"integer"},{"type":"null"}]},"repaired_fields":{"anyOf":[{"type":"integer"},{"type":"null"}]},"cost_usd":{"type":"number","description":"What this job cost; 0 for failed jobs and exact duplicates"},"verification_status":{"anyOf":[{"type":"string","enum":["verified","partial","unverified","discrepancy"]},{"type":"null"}]},"duplicate":{"anyOf":[{"type":"object","properties":{"job_id":{"type":"string"},"match_type":{"type":"string","enum":["exact","semantic"]},"reparsed":{"type":"boolean","description":"An exact duplicate whose earlier result an older engine made, parsed again on the current one at cost 0"}}},{"type":"null"}]},"outputs":{"type":"array","items":{"$ref":"#/components/schemas/Output"}},"webhook_status":{"anyOf":[{"type":"string","enum":["pending","delivered","failed"]},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["CORRUPT_FILE","PASSWORD_REQUIRED","TOO_MANY_PAGES","TOO_MANY_SCANNED_PAGES","UNSUPPORTED_FORMAT","FILE_TOO_LARGE","SOURCE_NOT_FOUND","SOURCE_CHANGED","INSUFFICIENT_CREDIT","LLM_REFUSED","LLM_UNAVAILABLE","OCR_UNAVAILABLE","BUDGET_EXHAUSTED","TIMEOUT","CONTAINER_UNAVAILABLE","RATE_LIMITED","CONTENT_REFUSALS","INTERNAL"]},"message":{"type":"string"}}},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"Job":{"allOf":[{"$ref":"#/components/schemas/JobSummary"},{"type":"object","properties":{"data":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/InvoiceData"},{"$ref":"#/components/schemas/ReceiptData"},{"$ref":"#/components/schemas/BankStatementData"},{"$ref":"#/components/schemas/ResumeData"},{"$ref":"#/components/schemas/PurchaseOrderData"},{"$ref":"#/components/schemas/BillOfLadingData"},{"$ref":"#/components/schemas/GenericTableData"},{"type":"object","description":"Data for a custom schema, or { schema, sample } from schema_from_sample"}]},{"type":"null"}],"description":"The document's fields when the job holds exactly one document, else null (see documents)"},"data_omitted":{"type":"boolean","description":"True when the result is over 3 MiB: data, verification and each document's data, provenance and verification are null, and warnings holds the first 100; fetch data_url"},"data_url":{"anyOf":[{"type":"string","format":"uri","description":"Signed link to the whole result ({ documents, warnings }) when data_omitted, else null; re-signed on every read"},{"type":"null"}]},"data_url_expires_at":{"anyOf":[{"type":"string","format":"date-time","description":"When data_url stops working; null unless data_omitted"},{"type":"null"}]},"verification":{"anyOf":[{"type":"object","description":"Math checks when the job holds exactly one document, else null"},{"type":"null"}]},"documents":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"name":{"type":"string"},"source":{"type":"string","enum":["file","attachment","body","zip_entry"]},"kind":{"type":"string","enum":["pdf","image","tiff","heic","docx","xlsx","csv","html","text","eml","msg","zip"]},"pages":{"type":"integer"},"digital_pages":{"type":"integer"},"ocr_pages":{"type":"integer"},"repaired_fields":{"type":"integer"},"data":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/InvoiceData"},{"$ref":"#/components/schemas/ReceiptData"},{"$ref":"#/components/schemas/BankStatementData"},{"$ref":"#/components/schemas/ResumeData"},{"$ref":"#/components/schemas/PurchaseOrderData"},{"$ref":"#/components/schemas/BillOfLadingData"},{"$ref":"#/components/schemas/GenericTableData"},{"type":"object","description":"Data for a custom schema, or { schema, sample } from schema_from_sample"}]},{"type":"null"}]},"provenance":{"anyOf":[{"type":"object","description":"The evidence for each value, keyed by its path in data; null when data_omitted","additionalProperties":{"$ref":"#/components/schemas/FieldProvenance"}},{"type":"null"}]},"verification":{"anyOf":[{"type":"object","description":"null when data_omitted"},{"type":"null"}]},"duplicate":{"anyOf":[{"type":"object","properties":{"job_id":{"type":"string"},"match_type":{"const":"semantic"}}},{"type":"null"}]}}}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}]},"InvoiceData":{"type":"object","description":"An invoice","properties":{"invoice_number":{"type":["string","null"],"description":"Invoice number"},"issue_date":{"type":["string","null"],"description":"Issue date","format":"date"},"due_date":{"type":["string","null"],"description":"Due date","format":"date"},"purchase_order":{"type":["string","null"],"description":"Purchase order number referenced by the invoice"},"currency":{"type":["string","null"],"description":"Invoice currency","format":"currency"},"vendor":{"type":"object","description":"The seller issuing the invoice","properties":{"name":{"type":["string","null"],"description":"Legal or trading name"},"address":{"type":["string","null"],"description":"Full postal address on one line"},"vat_id":{"type":["string","null"],"description":"VAT or GST registration number"},"tax_id":{"type":["string","null"],"description":"Other tax id, like a US EIN"},"email":{"type":["string","null"],"description":"Email address"},"phone":{"type":["string","null"],"description":"Phone number"}},"required":["name","address","vat_id","tax_id","email","phone"],"additionalProperties":false},"customer":{"type":"object","description":"The buyer being invoiced","properties":{"name":{"type":["string","null"],"description":"Legal or trading name"},"address":{"type":["string","null"],"description":"Full postal address on one line"},"vat_id":{"type":["string","null"],"description":"VAT or GST registration number"},"tax_id":{"type":["string","null"],"description":"Other tax id, like a US EIN"},"email":{"type":["string","null"],"description":"Email address"},"phone":{"type":["string","null"],"description":"Phone number"}},"required":["name","address","vat_id","tax_id","email","phone"],"additionalProperties":false},"ship_to":{"type":["string","null"],"description":"Delivery address on one line"},"line_items":{"type":"array","description":"Every line item in printed order","items":{"type":"object","properties":{"description":{"type":["string","null"],"description":"Item or service description"},"sku":{"type":["string","null"],"description":"SKU, article or product code"},"quantity":{"type":["number","null"],"description":"Quantity"},"unit":{"type":["string","null"],"description":"Unit of measure, like hrs or pcs"},"unit_price":{"type":["number","null"],"description":"Price per unit"},"discount":{"type":["number","null"],"description":"Discount on this line"},"tax_rate":{"type":["number","null"],"description":"Tax rate in percent"},"tax_amount":{"type":["number","null"],"description":"Tax amount on this line"},"total":{"type":["number","null"],"description":"Line total"},"gl_code":{"type":["string","null"],"description":"GL account code assigned by parserkit, null without gl_accounts","readOnly":true},"gl_name":{"type":["string","null"],"description":"GL account name assigned by parserkit","readOnly":true},"gl_confidence":{"type":["number","null"],"description":"Deterministic GL match confidence, 0..1","readOnly":true}},"required":["description","sku","quantity","unit","unit_price","discount","tax_rate","tax_amount","total","gl_code","gl_name","gl_confidence"],"additionalProperties":false}},"subtotal":{"type":["number","null"],"description":"Total before tax, shipping and invoice-level discounts"},"discount_total":{"type":["number","null"],"description":"Invoice-level discount"},"shipping":{"type":["number","null"],"description":"Shipping or freight charge"},"taxes":{"type":"array","description":"Tax breakdown per rate","items":{"type":"object","properties":{"label":{"type":["string","null"],"description":"Tax name as printed, like VAT 21%"},"rate":{"type":["number","null"],"description":"Rate in percent"},"base":{"type":["number","null"],"description":"Taxable base"},"amount":{"type":["number","null"],"description":"Tax amount"}},"required":["label","rate","base","amount"],"additionalProperties":false}},"tax_total":{"type":["number","null"],"description":"Total tax"},"grand_total":{"type":["number","null"],"description":"Total including tax"},"amount_paid":{"type":["number","null"],"description":"Amount already paid on this invoice; never a previous or unpaid balance carried in from earlier invoices"},"amount_due":{"type":["number","null"],"description":"Balance due"},"payment":{"type":"object","description":"How to pay","properties":{"terms":{"type":["string","null"],"description":"Payment terms, like Net 30"},"iban":{"type":["string","null"],"description":"IBAN","format":"iban"},"bic":{"type":["string","null"],"description":"BIC / SWIFT code"},"account_number":{"type":["string","null"],"description":"Domestic account number"},"routing_number":{"type":["string","null"],"description":"ABA routing number or sort code"},"reference":{"type":["string","null"],"description":"Payment reference, like an RF or Swiss QR reference"}},"required":["terms","iban","bic","account_number","routing_number","reference"],"additionalProperties":false},"notes":{"type":["string","null"],"description":"Free-text notes"}},"required":["invoice_number","issue_date","due_date","purchase_order","currency","vendor","customer","ship_to","line_items","subtotal","discount_total","shipping","taxes","tax_total","grand_total","amount_paid","amount_due","payment","notes"],"additionalProperties":false},"ReceiptData":{"type":"object","description":"A purchase receipt","properties":{"merchant":{"type":"object","description":"The store or service","properties":{"name":{"type":["string","null"],"description":"Merchant name"},"address":{"type":["string","null"],"description":"Merchant address on one line"},"phone":{"type":["string","null"],"description":"Merchant phone"},"vat_id":{"type":["string","null"],"description":"Merchant VAT or tax id"}},"required":["name","address","phone","vat_id"],"additionalProperties":false},"receipt_number":{"type":["string","null"],"description":"Receipt or transaction number"},"date":{"type":["string","null"],"description":"Purchase date","format":"date"},"time":{"type":["string","null"],"description":"Purchase time, HH:MM or HH:MM:SS (24h)"},"currency":{"type":["string","null"],"description":"Receipt currency","format":"currency"},"items":{"type":"array","description":"Every purchased item in printed order","items":{"type":"object","properties":{"description":{"type":["string","null"],"description":"Item description"},"quantity":{"type":["number","null"],"description":"Quantity"},"unit_price":{"type":["number","null"],"description":"Price per unit"},"total":{"type":["number","null"],"description":"Line total"},"gl_code":{"type":["string","null"],"description":"GL account code assigned by parserkit, null without gl_accounts","readOnly":true},"gl_name":{"type":["string","null"],"description":"GL account name assigned by parserkit","readOnly":true},"gl_confidence":{"type":["number","null"],"description":"Deterministic GL match confidence, 0..1","readOnly":true}},"required":["description","quantity","unit_price","total","gl_code","gl_name","gl_confidence"],"additionalProperties":false}},"subtotal":{"type":["number","null"],"description":"Total before tax and tip"},"discount_total":{"type":["number","null"],"description":"Total discounts"},"taxes":{"type":"array","description":"Tax breakdown per rate","items":{"type":"object","properties":{"label":{"type":["string","null"],"description":"Tax name as printed, like VAT 21%"},"rate":{"type":["number","null"],"description":"Rate in percent"},"base":{"type":["number","null"],"description":"Taxable base"},"amount":{"type":["number","null"],"description":"Tax amount"}},"required":["label","rate","base","amount"],"additionalProperties":false}},"tax_total":{"type":["number","null"],"description":"Total tax"},"tip":{"type":["number","null"],"description":"Tip or gratuity"},"total":{"type":["number","null"],"description":"Amount paid"},"payment":{"type":"object","description":"How it was paid","properties":{"method":{"type":["string","null"],"description":"cash, card, mobile or other"},"card_brand":{"type":["string","null"],"description":"Card brand, like Visa"},"card_last4":{"type":["string","null"],"description":"Last four card digits"}},"required":["method","card_brand","card_last4"],"additionalProperties":false},"category":{"type":["string","null"],"description":"Expense category, like meals or travel"}},"required":["merchant","receipt_number","date","time","currency","items","subtotal","discount_total","taxes","tax_total","tip","total","payment","category"],"additionalProperties":false},"BankStatementData":{"type":"object","description":"A bank or card statement","properties":{"bank":{"type":"object","description":"The issuing bank","properties":{"name":{"type":["string","null"],"description":"Bank name"},"address":{"type":["string","null"],"description":"Bank address on one line"},"bic":{"type":["string","null"],"description":"BIC / SWIFT code"}},"required":["name","address","bic"],"additionalProperties":false},"account":{"type":"object","description":"The statement account","properties":{"holder":{"type":["string","null"],"description":"Account holder name"},"number":{"type":["string","null"],"description":"Account number as printed"},"iban":{"type":["string","null"],"description":"IBAN","format":"iban"},"routing_number":{"type":["string","null"],"description":"ABA routing number or sort code"},"type":{"type":["string","null"],"description":"Account type, like checking, savings or credit card"}},"required":["holder","number","iban","routing_number","type"],"additionalProperties":false},"currency":{"type":["string","null"],"description":"Account currency","format":"currency"},"period_start":{"type":["string","null"],"description":"First day of the statement period","format":"date"},"period_end":{"type":["string","null"],"description":"Last day of the statement period","format":"date"},"opening_balance":{"type":["number","null"],"description":"Opening balance"},"closing_balance":{"type":["number","null"],"description":"Closing balance"},"total_credits":{"type":["number","null"],"description":"Total credits"},"total_debits":{"type":["number","null"],"description":"Total debits"},"transactions":{"type":"array","description":"Every transaction in printed order, carried-forward rows dropped","items":{"type":"object","properties":{"date":{"type":["string","null"],"description":"Booking date","format":"date"},"value_date":{"type":["string","null"],"description":"Value date","format":"date"},"description":{"type":["string","null"],"description":"Description as printed, multi-line descriptions joined with spaces"},"reference":{"type":["string","null"],"description":"Transaction reference or check number"},"amount":{"type":["number","null"],"description":"Amount, when the statement prints one signed amount column"},"debit":{"type":["number","null"],"description":"Debit or money-out column"},"credit":{"type":["number","null"],"description":"Credit or money-in column"},"balance":{"type":["number","null"],"description":"Running balance after this transaction, when printed"},"page":{"type":["integer","null"],"description":"1-based page the row is printed on","readOnly":true},"bbox":{"type":["array","null"],"description":"Row box [x0, y0, x1, y1] in 0..1 page coordinates, null for rows read by vision","items":{"type":"number"},"readOnly":true},"merchant":{"type":["string","null"],"description":"Merchant name from opt-in enrichment","readOnly":true},"category":{"type":["string","null"],"description":"Spending category from opt-in enrichment","readOnly":true},"gl_code":{"type":["string","null"],"description":"GL account code assigned by parserkit, null without gl_accounts","readOnly":true},"gl_name":{"type":["string","null"],"description":"GL account name assigned by parserkit","readOnly":true},"gl_confidence":{"type":["number","null"],"description":"Deterministic GL match confidence, 0..1","readOnly":true}},"required":["date","value_date","description","reference","amount","debit","credit","balance","page","bbox","merchant","category","gl_code","gl_name","gl_confidence"],"additionalProperties":false}}},"required":["bank","account","currency","period_start","period_end","opening_balance","closing_balance","total_credits","total_debits","transactions"],"additionalProperties":false},"ResumeData":{"type":"object","description":"A resume or CV","properties":{"name":{"type":["string","null"],"description":"Candidate full name"},"headline":{"type":["string","null"],"description":"Current title or headline"},"email":{"type":["string","null"],"description":"Email address","format":"email"},"phone":{"type":["string","null"],"description":"Phone number"},"location":{"type":["string","null"],"description":"City and country"},"links":{"type":"array","description":"Profile and portfolio links","items":{"type":"object","properties":{"label":{"type":["string","null"],"description":"Link label, like LinkedIn"},"url":{"type":["string","null"],"description":"URL","format":"uri"}},"required":["label","url"],"additionalProperties":false}},"summary":{"type":["string","null"],"description":"Profile summary"},"experience":{"type":"array","description":"Work history, most recent first","items":{"type":"object","properties":{"title":{"type":["string","null"],"description":"Job title"},"company":{"type":["string","null"],"description":"Employer"},"location":{"type":["string","null"],"description":"Work location"},"start_date":{"type":["string","null"],"description":"Start date","format":"date"},"end_date":{"type":["string","null"],"description":"End date, null when current","format":"date"},"current":{"type":["boolean","null"],"description":"Still in this role"},"description":{"type":["string","null"],"description":"Role description"},"highlights":{"type":"array","description":"Bullet points","items":{"type":"string"}}},"required":["title","company","location","start_date","end_date","current","description","highlights"],"additionalProperties":false}},"education":{"type":"array","description":"Education, most recent first","items":{"type":"object","properties":{"institution":{"type":["string","null"],"description":"School or university"},"degree":{"type":["string","null"],"description":"Degree, like BSc"},"field":{"type":["string","null"],"description":"Field of study"},"start_date":{"type":["string","null"],"description":"Start date","format":"date"},"end_date":{"type":["string","null"],"description":"End or graduation date","format":"date"},"grade":{"type":["string","null"],"description":"Grade or GPA as printed"}},"required":["institution","degree","field","start_date","end_date","grade"],"additionalProperties":false}},"skills":{"type":"array","description":"Skills, one skill per item","items":{"type":"string"}},"languages":{"type":"array","description":"Spoken languages","items":{"type":"object","properties":{"language":{"type":["string","null"],"description":"Language"},"proficiency":{"type":["string","null"],"description":"Proficiency as printed"}},"required":["language","proficiency"],"additionalProperties":false}},"certifications":{"type":"array","description":"Certifications","items":{"type":"object","properties":{"name":{"type":["string","null"],"description":"Certification"},"issuer":{"type":["string","null"],"description":"Issuer"},"date":{"type":["string","null"],"description":"Date obtained","format":"date"}},"required":["name","issuer","date"],"additionalProperties":false}}},"required":["name","headline","email","phone","location","links","summary","experience","education","skills","languages","certifications"],"additionalProperties":false},"PurchaseOrderData":{"type":"object","description":"A purchase order","properties":{"po_number":{"type":["string","null"],"description":"Purchase order number"},"issue_date":{"type":["string","null"],"description":"Order date","format":"date"},"delivery_date":{"type":["string","null"],"description":"Requested delivery date","format":"date"},"currency":{"type":["string","null"],"description":"Order currency","format":"currency"},"buyer":{"type":"object","description":"The ordering company","properties":{"name":{"type":["string","null"],"description":"Legal or trading name"},"address":{"type":["string","null"],"description":"Full postal address on one line"},"vat_id":{"type":["string","null"],"description":"VAT or GST registration number"},"tax_id":{"type":["string","null"],"description":"Other tax id, like a US EIN"},"email":{"type":["string","null"],"description":"Email address"},"phone":{"type":["string","null"],"description":"Phone number"}},"required":["name","address","vat_id","tax_id","email","phone"],"additionalProperties":false},"supplier":{"type":"object","description":"The supplier","properties":{"name":{"type":["string","null"],"description":"Legal or trading name"},"address":{"type":["string","null"],"description":"Full postal address on one line"},"vat_id":{"type":["string","null"],"description":"VAT or GST registration number"},"tax_id":{"type":["string","null"],"description":"Other tax id, like a US EIN"},"email":{"type":["string","null"],"description":"Email address"},"phone":{"type":["string","null"],"description":"Phone number"}},"required":["name","address","vat_id","tax_id","email","phone"],"additionalProperties":false},"ship_to":{"type":["string","null"],"description":"Delivery address on one line"},"bill_to":{"type":["string","null"],"description":"Billing address on one line"},"line_items":{"type":"array","description":"Every ordered line in printed order","items":{"type":"object","properties":{"line_number":{"type":["string","null"],"description":"Line number as printed"},"sku":{"type":["string","null"],"description":"SKU or part number"},"description":{"type":["string","null"],"description":"Item description"},"quantity":{"type":["number","null"],"description":"Ordered quantity"},"unit":{"type":["string","null"],"description":"Unit of measure"},"unit_price":{"type":["number","null"],"description":"Price per unit"},"total":{"type":["number","null"],"description":"Line total"},"gl_code":{"type":["string","null"],"description":"GL account code assigned by parserkit, null without gl_accounts","readOnly":true},"gl_name":{"type":["string","null"],"description":"GL account name assigned by parserkit","readOnly":true},"gl_confidence":{"type":["number","null"],"description":"Deterministic GL match confidence, 0..1","readOnly":true}},"required":["line_number","sku","description","quantity","unit","unit_price","total","gl_code","gl_name","gl_confidence"],"additionalProperties":false}},"subtotal":{"type":["number","null"],"description":"Total before tax and shipping"},"discount_total":{"type":["number","null"],"description":"Order-level discount"},"shipping":{"type":["number","null"],"description":"Shipping or freight charge"},"taxes":{"type":"array","description":"Tax breakdown per rate","items":{"type":"object","properties":{"label":{"type":["string","null"],"description":"Tax name as printed, like VAT 21%"},"rate":{"type":["number","null"],"description":"Rate in percent"},"base":{"type":["number","null"],"description":"Taxable base"},"amount":{"type":["number","null"],"description":"Tax amount"}},"required":["label","rate","base","amount"],"additionalProperties":false}},"tax_total":{"type":["number","null"],"description":"Total tax"},"grand_total":{"type":["number","null"],"description":"Order total"},"payment_terms":{"type":["string","null"],"description":"Payment terms"},"incoterms":{"type":["string","null"],"description":"Incoterms, like FOB Rotterdam"},"notes":{"type":["string","null"],"description":"Free-text notes"}},"required":["po_number","issue_date","delivery_date","currency","buyer","supplier","ship_to","bill_to","line_items","subtotal","discount_total","shipping","taxes","tax_total","grand_total","payment_terms","incoterms","notes"],"additionalProperties":false},"BillOfLadingData":{"type":"object","description":"A bill of lading","properties":{"bol_number":{"type":["string","null"],"description":"Bill of lading number"},"booking_number":{"type":["string","null"],"description":"Booking reference"},"issue_date":{"type":["string","null"],"description":"Date of issue","format":"date"},"shipped_on_board_date":{"type":["string","null"],"description":"Shipped on board date","format":"date"},"shipper":{"type":"object","description":"The shipper","properties":{"name":{"type":["string","null"],"description":"Legal or trading name"},"address":{"type":["string","null"],"description":"Full postal address on one line"},"vat_id":{"type":["string","null"],"description":"VAT or GST registration number"},"tax_id":{"type":["string","null"],"description":"Other tax id, like a US EIN"},"email":{"type":["string","null"],"description":"Email address"},"phone":{"type":["string","null"],"description":"Phone number"}},"required":["name","address","vat_id","tax_id","email","phone"],"additionalProperties":false},"consignee":{"type":"object","description":"The consignee","properties":{"name":{"type":["string","null"],"description":"Legal or trading name"},"address":{"type":["string","null"],"description":"Full postal address on one line"},"vat_id":{"type":["string","null"],"description":"VAT or GST registration number"},"tax_id":{"type":["string","null"],"description":"Other tax id, like a US EIN"},"email":{"type":["string","null"],"description":"Email address"},"phone":{"type":["string","null"],"description":"Phone number"}},"required":["name","address","vat_id","tax_id","email","phone"],"additionalProperties":false},"notify_party":{"type":"object","description":"The notify party","properties":{"name":{"type":["string","null"],"description":"Legal or trading name"},"address":{"type":["string","null"],"description":"Full postal address on one line"},"vat_id":{"type":["string","null"],"description":"VAT or GST registration number"},"tax_id":{"type":["string","null"],"description":"Other tax id, like a US EIN"},"email":{"type":["string","null"],"description":"Email address"},"phone":{"type":["string","null"],"description":"Phone number"}},"required":["name","address","vat_id","tax_id","email","phone"],"additionalProperties":false},"carrier":{"type":["string","null"],"description":"Carrier or NVOCC name"},"vessel":{"type":["string","null"],"description":"Vessel name"},"voyage":{"type":["string","null"],"description":"Voyage number"},"place_of_receipt":{"type":["string","null"],"description":"Place of receipt"},"port_of_loading":{"type":["string","null"],"description":"Port of loading"},"port_of_discharge":{"type":["string","null"],"description":"Port of discharge"},"place_of_delivery":{"type":["string","null"],"description":"Place of delivery"},"containers":{"type":"array","description":"Every container","items":{"type":"object","properties":{"number":{"type":["string","null"],"description":"Container number, like MSCU1234565"},"seal":{"type":["string","null"],"description":"Seal number"},"type":{"type":["string","null"],"description":"Container type, like 40HC"},"packages":{"type":["integer","null"],"description":"Packages in this container"},"gross_weight":{"type":["number","null"],"description":"Gross weight in weight_unit"},"volume":{"type":["number","null"],"description":"Volume in volume_unit"}},"required":["number","seal","type","packages","gross_weight","volume"],"additionalProperties":false}},"goods":{"type":"array","description":"Every goods line","items":{"type":"object","properties":{"marks":{"type":["string","null"],"description":"Marks and numbers"},"description":{"type":["string","null"],"description":"Description of goods"},"hs_code":{"type":["string","null"],"description":"HS tariff code"},"packages":{"type":["integer","null"],"description":"Number of packages"},"package_type":{"type":["string","null"],"description":"Package type, like pallets or cartons"},"gross_weight":{"type":["number","null"],"description":"Gross weight in weight_unit"},"volume":{"type":["number","null"],"description":"Volume in volume_unit"}},"required":["marks","description","hs_code","packages","package_type","gross_weight","volume"],"additionalProperties":false}},"total_packages":{"type":["integer","null"],"description":"Total packages"},"total_gross_weight":{"type":["number","null"],"description":"Total gross weight"},"total_volume":{"type":["number","null"],"description":"Total volume"},"weight_unit":{"type":["string","null"],"description":"kg or lb"},"volume_unit":{"type":["string","null"],"description":"cbm or cft"},"freight_terms":{"type":["string","null"],"description":"prepaid or collect"},"declared_value":{"type":["number","null"],"description":"Declared value of goods"},"currency":{"type":["string","null"],"description":"Currency of the declared value","format":"currency"}},"required":["bol_number","booking_number","issue_date","shipped_on_board_date","shipper","consignee","notify_party","carrier","vessel","voyage","place_of_receipt","port_of_loading","port_of_discharge","place_of_delivery","containers","goods","total_packages","total_gross_weight","total_volume","weight_unit","volume_unit","freight_terms","declared_value","currency"],"additionalProperties":false},"GenericTableData":{"type":"object","description":"Tables from any document","properties":{"tables":{"type":"array","description":"Every table in reading order","items":{"type":"object","properties":{"title":{"type":["string","null"],"description":"Table caption or the heading above it"},"page_start":{"type":["integer","null"],"description":"First page of the table","readOnly":true},"page_end":{"type":["integer","null"],"description":"Last page of the table","readOnly":true},"columns":{"type":"array","description":"Columns in order","items":{"type":"object","properties":{"name":{"type":["string","null"],"description":"Header text"},"type":{"type":"string","enum":["string","number","date","currency"],"description":"Column value type"}},"required":["name","type"],"additionalProperties":false}},"rows":{"type":"array","description":"Data rows, repeated headers and footers dropped","items":{"type":"array","description":"Cells in column order","items":{"type":["string","number","null"]}}},"row_pages":{"type":"array","description":"Page of each row","items":{"type":"integer"},"readOnly":true}},"required":["title","page_start","page_end","columns","rows","row_pages"],"additionalProperties":false}}},"required":["tables"],"additionalProperties":false}}}}