{"openapi":"3.1.0","info":{"title":"Saffron Scroll API","description":"Reads invoices (PDF, JPG, PNG) into fields and proves the read: every invoice comes back VERIFIED (all checks passed) or NEEDS_REVIEW with the reasons.","version":"1"},"servers":[{"url":"https://saffronscroll.com","description":"Generated server url"}],"security":[{"apiKey":[]}],"paths":{"/v1/webhook":{"get":{"tags":["Account"],"summary":"The webhook called when a read finishes","operationId":"webhook","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Webhook"}}}}}},"put":{"tags":["Account"],"summary":"Set the webhook address (empty switches it off)","operationId":"setWebhook","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUrl"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Webhook"}}}}}}},"/v1/tally-settings":{"get":{"tags":["Tally"],"summary":"Your Tally ledger names","operationId":"settings","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Settings"}}}}}},"put":{"tags":["Tally"],"summary":"Set your Tally ledger names","operationId":"save","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Settings"}}}}}}},"/v1/suppliers/{id}":{"put":{"tags":["Tally"],"summary":"Change a supplier's name or Tally ledgers","operationId":"edit","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierEdit"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Supplier"}}}}}},"delete":{"tags":["Tally"],"summary":"Forget a supplier","operationId":"forget","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"}}}},"/v1/retention":{"get":{"tags":["Documents"],"summary":"How long this account's documents are kept","operationId":"retention","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Retention"}}}}}},"put":{"tags":["Documents"],"summary":"Choose immediate wipe (mode WIPE) or storage for some days (mode KEEP, days)","operationId":"setRetention","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetentionChoice"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Retention"}}}}}}},"/v1/documents/{id}/fields":{"put":{"tags":["Documents"],"summary":"Save corrections; the checks run again","operationId":"correct","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonNode"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Document"}}}}}}},"/v1/billing-profile":{"get":{"tags":["Usage and billing"],"summary":"What is printed on your tax invoices and receipts","operationId":"billingProfile","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BillingProfile"}}}}}},"put":{"tags":["Usage and billing"],"summary":"Set what is printed on your tax invoices and receipts","operationId":"saveBillingProfile","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingProfile"}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BillingProfile"}}}}}}},"/v1/uploads":{"post":{"tags":["Documents"],"summary":"Upload a ZIP of invoices, or a PDF that may hold several: each invoice becomes its own document","description":"A ZIP (up to 50 MB, 200 files) is opened and each PDF, JPG or PNG in it is read. A PDF of up to 50 pages is split where each invoice starts; pages that are not an invoice are skipped and not charged. Each invoice is charged like a single upload. Sending the same file again returns the same documents with no second charge.","operationId":"uploadMany","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"202":{"description":"Queued; fetch each document until its status is final","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Batch"}}}},"200":{"description":"Every document is already final (the same files sent before)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Batch"}}}}}}},"/v1/retention/wipe-now":{"post":{"tags":["Documents"],"summary":"Delete every finished document of this account now: files and results","operationId":"wipeNow","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Wiped"}}}}}}},"/v1/payments":{"get":{"tags":["Credits and payments"],"summary":"Your payments, newest first","operationId":"payments","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Payment"}}}}}}},"post":{"tags":["Credits and payments"],"summary":"Start a payment for a plan or for a number of pages","operationId":"start","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewPayment"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Payment"}}}}}}},"/v1/payments/{id}/verify":{"post":{"tags":["Credits and payments"],"summary":"Ask Cashfree whether an online payment is paid; settles it if so (never adds pages twice)","operationId":"verify","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Payment"}}}}}}},"/v1/payments/{id}/submit":{"post":{"tags":["Credits and payments"],"summary":"Say the payment was made and give the UPI reference number","operationId":"submit","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Utr"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Payment"}}}}}}},"/v1/payments/{id}/cancel":{"post":{"tags":["Credits and payments"],"operationId":"cancel","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Payment"}}}}}}},"/v1/exports/tally":{"post":{"tags":["Tally"],"summary":"Purchase vouchers for the chosen invoices as a TallyPrime import file (XML)","operationId":"export","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ids"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}}}}},"/v1/exports/excel":{"post":{"tags":["Documents"],"summary":"Several invoices in one Excel workbook","operationId":"export_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}}}}},"/v1/documents":{"get":{"tags":["Documents"],"summary":"List documents, newest first (sort=attention: those that need you first)","operationId":"list","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Page"}}}}}},"post":{"tags":["Documents"],"summary":"Upload an invoice (PDF, JPG or PNG) to be read","operationId":"upload","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}},{"name":"wait","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"202":{"description":"Queued; fetch the document until its status is final","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Document"}}}},"200":{"description":"Finished (with wait=true, or the same file sent before)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Document"}}}}}}},"/v1/documents/{id}/reread":{"post":{"tags":["Documents"],"summary":"Read the file again, carefully (free)","operationId":"reread","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"202":{"description":"Queued","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Document"}}}}}}},"/v1/documents/{id}/approve":{"post":{"tags":["Documents"],"summary":"Accept the invoice as it stands","operationId":"approve","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Document"}}}}}}},"/v1/documents/approve":{"post":{"tags":["Documents"],"summary":"Approve several invoices whose checks passed (VERIFIED) at once; any other status is skipped","operationId":"approveMany","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Approved"}}}}}}},"/v1/auth/verify":{"post":{"tags":["Account"],"summary":"Confirm the email address with the emailed code (portal)","operationId":"verify_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Code"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Account"}}}}}}},"/v1/auth/verify/resend":{"post":{"tags":["Account"],"summary":"Send the confirmation code again (portal)","operationId":"resend","responses":{"204":{"description":"Sent"}}}},"/v1/auth/signup":{"post":{"tags":["Account"],"summary":"Create an account (portal)","description":"accept_terms must be true and terms_version the version shown beside the box; the acceptance is recorded with the time, IP address and browser","operationId":"signup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Signup"}}},"required":true},"responses":{"201":{"description":"Created; the session cookie is set","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Account"}}}},"409":{"description":"terms_changed: the Terms were updated since the page was loaded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Account"}}}}}}},"/v1/auth/reset":{"post":{"tags":["Account"],"summary":"Set a new password with the emailed code; signs the account out everywhere","operationId":"reset","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reset"}}},"required":true},"responses":{"204":{"description":"Password changed"}}}},"/v1/auth/logout":{"post":{"tags":["Account"],"summary":"Sign out (portal)","operationId":"logout","responses":{"204":{"description":"Signed out"}}}},"/v1/auth/login":{"post":{"tags":["Account"],"summary":"Sign in (portal)","operationId":"login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Login"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Account"}}}}}}},"/v1/auth/forgot":{"post":{"tags":["Account"],"summary":"Email a code to reset the password; answers the same whether or not the address has an account","operationId":"forgot","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forgot"}}},"required":true},"responses":{"204":{"description":"If the address has an account, a code was sent"}}}},"/v1/api-keys":{"get":{"tags":["Account"],"summary":"API keys of this account","operationId":"apiKeys","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}}}},"post":{"tags":["Account"],"summary":"Create an API key; the full key is returned this once","operationId":"createApiKey","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyName"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/NewApiKey"}}}}}}},"/v1/usage":{"get":{"tags":["Account"],"summary":"Page credits and recent reads","operationId":"usage","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UsageSummary"}}}}}}},"/v1/usage/reads":{"get":{"tags":["Usage and billing"],"summary":"Your reads in a month, newest first (the current month unless said)","operationId":"reads","parameters":[{"name":"month","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Reads"}}}}}}},"/v1/usage/reads.csv":{"get":{"tags":["Usage and billing"],"summary":"Your reads in a month as a CSV file","operationId":"readsCsv","parameters":[{"name":"month","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}}}}},"/v1/usage/months":{"get":{"tags":["Usage and billing"],"summary":"Your reads by month: the last 12 months with any activity, newest first","operationId":"months","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Month"}}}}}}}},"/v1/suppliers":{"get":{"tags":["Tally"],"summary":"Suppliers we remember for you","operationId":"suppliers","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Supplier"}}}}}}}},"/v1/refunds":{"get":{"tags":["refund-controller"],"summary":"Your refunds, newest first","operationId":"mine","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Refund"}}}}}}}},"/v1/refunds/{id}/credit-note.pdf":{"get":{"tags":["refund-controller"],"summary":"The GST credit note of a refund (PDF)","operationId":"creditNote","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/pdf":{"schema":{"type":"string","format":"byte"}}}}}}},"/v1/public/refunds":{"get":{"tags":["refund-policy-controller"],"summary":"The refund rules (the website's refunds page)","operationId":"publicPolicy","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Policy"}}}}}}},"/v1/public/plans":{"get":{"tags":["Credits and payments"],"summary":"Prices, without signing in: what can be bought and what a new account gets","operationId":"publicPlans","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicCatalogue"}}}}}}},"/v1/plans":{"get":{"tags":["Credits and payments"],"summary":"What can be bought","operationId":"plans","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Catalogue"}}}}}}},"/v1/payments/{id}":{"get":{"tags":["Credits and payments"],"operationId":"payment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Payment"}}}}}}},"/v1/payments/{id}/receipt.pdf":{"get":{"tags":["Usage and billing"],"summary":"The tax invoice or payment receipt for a paid payment (PDF)","operationId":"receipt","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/pdf":{"schema":{"type":"string","format":"byte"}}}}}}},"/v1/payments/{id}/qr.png":{"get":{"tags":["Credits and payments"],"summary":"QR code to pay with any UPI app","operationId":"qr","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"image/png":{"schema":{"type":"string","format":"byte"}}}}}}},"/v1/me":{"get":{"tags":["Account"],"summary":"The signed-in account and its page credits","operationId":"me","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Account"}}}}}}},"/v1/email-in":{"get":{"tags":["email-intake-controller"],"summary":"Where to email invoices, and the address they must come from","operationId":"emailIn","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EmailIn"}}}}}}},"/v1/documents/{id}":{"get":{"tags":["Documents"],"summary":"One document with its fields, checks and QR code result","operationId":"get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Document"}}}}}},"delete":{"tags":["Documents"],"summary":"Delete the file and its result","operationId":"delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"}}}},"/v1/documents/{id}/file":{"get":{"tags":["Documents"],"summary":"The original file","operationId":"file","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}}}}},"/v1/documents/{id}/export.xlsx":{"get":{"tags":["Documents"],"summary":"One invoice as Excel","operationId":"exportOne","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}}}}},"/v1/documents/counts":{"get":{"tags":["Documents"],"summary":"How many invoices are in each state","operationId":"counts","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Counts"}}}}}}},"/v1/credits":{"get":{"tags":["Credits and payments"],"summary":"Page credits by lot, soonest expiry first","operationId":"credits","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Wallet"}}}}}}},"/v1/credits/ledger":{"get":{"tags":["Usage and billing"],"summary":"Every change to your page balance, newest first","operationId":"ledger","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Movements"}}}}}}},"/v1/credits/ledger.csv":{"get":{"tags":["Usage and billing"],"summary":"Every change to your page balance as a CSV file","operationId":"ledgerCsv","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}}}}},"/v1/account/export.zip":{"get":{"tags":["account-data-controller"],"summary":"Everything in your account as one ZIP: files, results, invoices, credit notes, page credits (portal)","operationId":"export_2","responses":{"200":{"description":"OK","content":{"application/zip":{"schema":{"$ref":"#/components/schemas/StreamingResponseBody"}}}}}}},"/v1/api-keys/{id}":{"delete":{"tags":["Account"],"summary":"Delete an API key","operationId":"deleteApiKey","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"}}}}},"components":{"schemas":{"WebhookUrl":{"properties":{"url":{"type":"string","maxLength":500,"minLength":0}}},"Webhook":{"properties":{"url":{"type":"string"},"secret":{"type":"string"}}},"Settings":{"properties":{"company":{"type":"string"},"voucher_type":{"type":"string"},"purchase_ledger":{"type":"string"},"cgst_ledger":{"type":"string"},"sgst_ledger":{"type":"string"},"igst_ledger":{"type":"string"},"cess_ledger":{"type":"string"},"roundoff_ledger":{"type":"string"}}},"SupplierEdit":{"properties":{"name":{"type":"string"},"tally_ledger":{"type":"string"},"purchase_ledger":{"type":"string"}}},"Supplier":{"properties":{"id":{"type":"string","format":"uuid"},"gstin":{"type":"string"},"name":{"type":"string"},"tally_ledger":{"type":"string"},"purchase_ledger":{"type":"string"},"seen":{"type":"integer","format":"int32"}}},"RetentionChoice":{"properties":{"mode":{"type":"string"},"days":{"type":"integer","format":"int32"}}},"Retention":{"properties":{"mode":{"type":"string"},"days":{"type":"integer","format":"int32"},"max_days":{"type":"integer","format":"int32"},"max_pages":{"type":"integer","format":"int32"},"wipe_result_hours":{"type":"integer","format":"int32"},"stored_pages":{"type":"integer","format":"int64"}}},"JsonNode":{},"Bundle":{"properties":{"file_name":{"type":"string"},"first_page":{"type":"integer","format":"int32"},"last_page":{"type":"integer","format":"int32"}}},"Document":{"properties":{"id":{"type":"string","format":"uuid"},"file_name":{"type":"string"},"content_type":{"type":"string"},"size_bytes":{"type":"integer","format":"int64"},"pages":{"type":"integer","format":"int32"},"status":{"type":"string"},"reviewed":{"type":"boolean"},"engine":{"type":"string"},"rescanned":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"read_at":{"type":"string","format":"date-time"},"duration_ms":{"type":"integer","format":"int32"},"error":{"type":"string"},"file_available":{"type":"boolean"},"file_deletes_at":{"type":"string","format":"date-time"},"wipes_at":{"type":"string","format":"date-time"},"fields":{"$ref":"#/components/schemas/JsonNode"},"checks":{"$ref":"#/components/schemas/JsonNode"},"problems":{"$ref":"#/components/schemas/JsonNode"},"qr":{"$ref":"#/components/schemas/JsonNode"},"bundle":{"$ref":"#/components/schemas/Bundle"}}},"BillingProfile":{"properties":{"legal_name":{"type":"string"},"gstin":{"type":"string"},"address":{"type":"string"},"state":{"type":"string"},"pincode":{"type":"string"},"billing_email":{"type":"string"}}},"Batch":{"properties":{"documents":{"type":"array","items":{"$ref":"#/components/schemas/Document"}},"skipped":{"type":"array","items":{"$ref":"#/components/schemas/Skipped"}}}},"Skipped":{"properties":{"file_name":{"type":"string"},"reason":{"type":"string"}}},"Wiped":{"properties":{"documents":{"type":"integer","format":"int32"}}},"NewPayment":{"properties":{"plan_id":{"type":"string","format":"uuid"},"pages":{"type":"integer","format":"int32"},"method":{"type":"string"},"phone":{"type":"string"}}},"Gateway":{"properties":{"provider":{"type":"string"},"mode":{"type":"string"},"payment_session_id":{"type":"string"}}},"Payment":{"properties":{"id":{"type":"string","format":"uuid"},"reference":{"type":"string"},"plan_name":{"type":"string"},"pages":{"type":"integer","format":"int32"},"amount_inr":{"type":"number"},"gst_inr":{"type":"number"},"total_inr":{"type":"number"},"method":{"type":"string"},"status":{"type":"string"},"upi_uri":{"type":"string"},"utr":{"type":"string"},"note":{"type":"string"},"validity":{"$ref":"#/components/schemas/Validity"},"created_at":{"type":"string","format":"date-time"},"submitted_at":{"type":"string","format":"date-time"},"decided_at":{"type":"string","format":"date-time"},"credits_expire_at":{"type":"string","format":"date-time"},"invoice_number":{"type":"string"},"gateway":{"$ref":"#/components/schemas/Gateway"},"gateway_payment_id":{"type":"string"},"account_email":{"type":"string"},"account_name":{"type":"string"}}},"Validity":{"properties":{"kind":{"type":"string"},"days":{"type":"integer","format":"int32"}}},"Utr":{"properties":{"utr":{"type":"string"}}},"Ids":{"properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"}}}},"ExportRequest":{"properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"}}}},"Approved":{"properties":{"approved":{"type":"integer","format":"int32"},"skipped":{"type":"integer","format":"int32"}}},"Code":{"properties":{"code":{"type":"string","minLength":1}},"required":["code"]},"Account":{"properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"name":{"type":"string"},"admin":{"type":"boolean"},"email_verified":{"type":"boolean"},"credits":{"$ref":"#/components/schemas/Credits"},"file_retention_days":{"type":"integer","format":"int32"},"has_password":{"type":"boolean"}}},"Credits":{"properties":{"balance":{"type":"integer","format":"int64"},"granted":{"type":"integer","format":"int64"},"used":{"type":"integer","format":"int64"}}},"Signup":{"properties":{"email":{"type":"string","format":"email","maxLength":254,"minLength":0},"password":{"type":"string","maxLength":200,"minLength":10},"name":{"type":"string","maxLength":120,"minLength":0},"accept_terms":{"type":"boolean"},"terms_version":{"type":"string","minLength":1}},"required":["accept_terms","email","name","password","terms_version"]},"Reset":{"properties":{"email":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"password":{"type":"string","maxLength":200,"minLength":10}},"required":["code","email","password"]},"Login":{"properties":{"email":{"type":"string","minLength":1},"password":{"type":"string","minLength":1}},"required":["email","password"]},"Forgot":{"properties":{"email":{"type":"string","minLength":1}},"required":["email"]},"KeyName":{"properties":{"name":{"type":"string","maxLength":80,"minLength":0}},"required":["name"]},"NewApiKey":{"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"prefix":{"type":"string"},"key":{"type":"string"}}},"Recent":{"properties":{"document_id":{"type":"string","format":"uuid"},"file_name":{"type":"string"},"pages":{"type":"integer","format":"int32"},"status":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}},"ThisMonth":{"properties":{"documents":{"type":"integer","format":"int64"},"pages":{"type":"integer","format":"int64"}}},"UsageSummary":{"properties":{"balance":{"type":"integer","format":"int64"},"granted":{"type":"integer","format":"int64"},"used":{"type":"integer","format":"int64"},"this_month":{"$ref":"#/components/schemas/ThisMonth"},"recent":{"type":"array","items":{"$ref":"#/components/schemas/Recent"}}}},"Read":{"properties":{"created_at":{"type":"string","format":"date-time"},"document_id":{"type":"string","format":"uuid"},"file_name":{"type":"string"},"result":{"type":"string"},"read_as":{"type":"string"},"careful":{"type":"boolean"},"pages":{"type":"integer","format":"int32"},"pages_charged":{"type":"integer","format":"int32"},"duration_ms":{"type":"integer","format":"int32"}}},"Reads":{"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Read"}},"total":{"type":"integer","format":"int64"}}},"Month":{"properties":{"month":{"type":"string"},"documents":{"type":"integer","format":"int64"},"pages_charged":{"type":"integer","format":"int64"},"verified":{"type":"integer","format":"int64"},"needs_review":{"type":"integer","format":"int64"},"not_invoice":{"type":"integer","format":"int64"},"failed":{"type":"integer","format":"int64"}}},"Refund":{"properties":{"id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"},"payment_reference":{"type":"string"},"reference":{"type":"string"},"amount_inr":{"type":"number"},"gst_inr":{"type":"number"},"total_inr":{"type":"number"},"pages_removed":{"type":"integer","format":"int32"},"reason":{"type":"string"},"method":{"type":"string"},"status":{"type":"string"},"failure":{"type":"string"},"credit_note_number":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"}}},"Policy":{"properties":{"window_days":{"type":"integer","format":"int32"},"basis":{"type":"string"},"bank_days_min":{"type":"integer","format":"int32"},"bank_days_max":{"type":"integer","format":"int32"},"refund_on_close":{"type":"boolean"}}},"PayAsYouGo":{"properties":{"enabled":{"type":"boolean"},"price_per_page_inr":{"type":"number"},"min_pages":{"type":"integer","format":"int32"},"validity":{"$ref":"#/components/schemas/Validity"}}},"PublicCatalogue":{"properties":{"plans":{"type":"array","items":{"$ref":"#/components/schemas/PublicPlan"}},"pay_as_you_go":{"$ref":"#/components/schemas/PayAsYouGo"},"gst_percent":{"type":"number"},"joining":{"$ref":"#/components/schemas/PublicPlan"},"carry_over_percent":{"type":"integer","format":"int32"},"dormant_after_days":{"type":"integer","format":"int32"},"dormancy_first_warning_days":{"type":"integer","format":"int32"},"dormancy_last_warning_days":{"type":"integer","format":"int32"},"termination_notice_days":{"type":"integer","format":"int32"}}},"PublicPlan":{"properties":{"kind":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"price_inr":{"type":"number"},"pages":{"type":"integer","format":"int32"},"validity":{"$ref":"#/components/schemas/Validity"},"monthly_pages":{"type":"integer","format":"int32"}}},"Catalogue":{"properties":{"plans":{"type":"array","items":{"$ref":"#/components/schemas/Plan"}},"pay_as_you_go":{"$ref":"#/components/schemas/PayAsYouGo"},"gst_percent":{"type":"number"},"upi":{"$ref":"#/components/schemas/Upi"},"cashfree":{"$ref":"#/components/schemas/Online"},"topup_until":{"type":"string","format":"date-time"}}},"Online":{"properties":{"enabled":{"type":"boolean"}}},"Plan":{"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"price_inr":{"type":"number"},"pages":{"type":"integer","format":"int32"},"validity":{"$ref":"#/components/schemas/Validity"},"active":{"type":"boolean"},"sort":{"type":"integer","format":"int32"},"monthly_pages":{"type":"integer","format":"int32"}}},"Upi":{"properties":{"enabled":{"type":"boolean"},"payee_name":{"type":"string"}}},"EmailIn":{"properties":{"enabled":{"type":"boolean"},"address":{"type":"string"},"from":{"type":"string"}}},"Page":{"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Document"}},"total":{"type":"integer","format":"int64"}}},"Counts":{"properties":{"needs_review":{"type":"integer","format":"int64"},"verified":{"type":"integer","format":"int64"},"reading":{"type":"integer","format":"int64"},"queued":{"type":"integer","format":"int64"},"not_invoice":{"type":"integer","format":"int64"},"failed":{"type":"integer","format":"int64"},"total":{"type":"integer","format":"int64"}}},"Lot":{"properties":{"id":{"type":"string","format":"uuid"},"source":{"type":"string"},"plan_name":{"type":"string"},"pages_granted":{"type":"integer","format":"int32"},"pages_left":{"type":"integer","format":"int32"},"expires_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"pages_scheduled":{"type":"integer","format":"int32"},"release_pages":{"type":"integer","format":"int32"},"next_release_at":{"type":"string","format":"date-time"}}},"NextExpiry":{"properties":{"pages":{"type":"integer","format":"int64"},"expires_at":{"type":"string","format":"date-time"}}},"Wallet":{"properties":{"balance":{"type":"integer","format":"int64"},"lots":{"type":"array","items":{"$ref":"#/components/schemas/Lot"}},"next_expiry":{"$ref":"#/components/schemas/NextExpiry"}}},"Movement":{"properties":{"created_at":{"type":"string","format":"date-time"},"kind":{"type":"string"},"pages":{"type":"integer","format":"int32"},"balance_after":{"type":"integer","format":"int64"},"plan_name":{"type":"string"},"lot_expires_at":{"type":"string","format":"date-time"},"document_id":{"type":"string","format":"uuid"},"file_name":{"type":"string"}}},"Movements":{"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Movement"}},"total":{"type":"integer","format":"int64"}}},"ApiKey":{"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"prefix":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"last_used_at":{"type":"string","format":"date-time"}}},"StreamingResponseBody":{}},"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"ocr_..."}}}}