{"name":"AskPay API","version":"1","rest":{"base":"https://api.askpay.co/v1","alias":"https://www.askpay.co/api/v1","direct":"https://us-central1-askpay.cloudfunctions.net/api/v1","docs":"https://api.askpay.co/docs","method":"POST /<operation> with a JSON body; GET is allowed for read-only operations (query string = fields)","auth":"Authorization: Bearer <api key from הגדרות → API ו-Claude>"},"mcp":{"url":"https://mcp.askpay.co","direct":"https://us-central1-askpay.cloudfunctions.net/mcp","transport":"streamable-http","auth":"Authorization: Bearer <api key>"},"openapi":"https://api.askpay.co/openapi.json","docs":"https://api.askpay.co/docs","groups":{"account":"Account and business profile (הגדרות)","payments":"Payments to suppliers (תשלום לספקים)","incoming":"Payments to receive (תשלומים לקבל)","suppliers":"Suppliers and freelancers (ספקים ופרילנסרים)","invoices":"Invoices, pay marks, categories, mails (חשבוניות)","folders":"Invoice folders and folder rules (תיקיות חשבוניות)","software":"Card-paid tools and services (תוכנות)","statements":"Monthly statements from Stripe, Mercury, Wise, BlueSnap, Upwork and the Open Finance connection (דפי פירוט)","cards":"Credit card transactions pulled through Open Finance (כרטיסי אשראי)","bank":"Bank account movements pulled through Open Finance (תנועות בנק)","gmail":"Gmail mailboxes and invoice imports","calendar":"Google Calendar: see, add and change events (יומן גוגל)","automations":"Automations (אוטומציות)","employees":"Employees: the people of the business with pay, dates, days, documents; the same people are the shifts crew (עובדים)","shifts":"Shifts board: programs (תוכניות), who works on which program on which day, the AI auto-planner, the crew link (שיבוצים)","projects":"Projects: productions per month with income, work lines and worker payments (פרוייקטים)","team":"Team users and invites (משתמשים)","documents":"AI-filled supplier onboarding forms and signatures (חתימות מסמכים)","accountant":"Accountant folders and ZIP packages (מסמכים לרואה חשבון)","activity":"Activity log (יומן פעילות)"},"operations":[{"name":"whoami","group":"account","title":"Who am I","description":"The business and user this API key acts as, plus the key name and role. Call this first.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"getBusiness","group":"account","title":"Get business profile","description":"The full business profile: names, company id, address, notification settings, public listing, price list, document (bank) details, connected integrations, enabled apps, and the caller role.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"updateBusiness","group":"account","title":"Update business profile","description":"Update profile fields. Send only the fields to change, with the same names getBusiness returns (name, nameEn, businessName, businessNameEn, companyId, businessType, street, city, zip, notifyUploadWhatsApp, notifyUploadEmail, notifyLateInvoiceWhatsApp, notifyLateInvoiceEmail, publicListing, publicListingBy, priceList, docBankName, docBankCode, docBankBranch, docBankAccount, docBankBeneficiary, docCustomFields, myName, myNameEn).","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"name":{"type":"string","description":"owner name"},"nameEn":{"type":"string","description":"owner name in English"},"businessName":{"type":"string","description":"official business name (as it appears on invoices)"},"businessNameEn":{"type":"string","description":"business name in English"},"companyId":{"type":"string","description":"ח.פ / עוסק מורשה number"},"businessType":{"type":"string","enum":["","patur","murshe","company"],"description":"עוסק פטור / עוסק מורשה / חברה"},"street":{"type":"string","description":"street and number"},"city":{"type":"string","description":"city"},"zip":{"type":"string","description":"postal code"},"notifyUploadWhatsApp":{"type":"boolean","description":"WhatsApp when a supplier finished and the payment is ready"},"notifyUploadEmail":{"type":"boolean","description":"email when a supplier finished and the payment is ready"},"notifyLateInvoiceWhatsApp":{"type":"boolean","description":"WhatsApp when an invoice is added to a paid payment"},"notifyLateInvoiceEmail":{"type":"boolean","description":"email when an invoice is added to a paid payment"},"publicListing":{"type":"boolean","description":"show the business in the public directory"},"publicListingBy":{"type":"string","enum":["name","phone","both"],"description":"what visitors can find the business by"},"priceList":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"service or product"},"amountAgorot":{"type":"integer","description":"amount in agorot (integer; 1 ILS = 100 agorot; also used for USD/EUR cents)"}},"required":["title","amountAgorot"]},"description":"the price list"},"docBankName":{"type":"string","description":"bank name for AI-filled forms"},"docBankCode":{"type":"string","description":"bank code"},"docBankBranch":{"type":"string","description":"branch"},"docBankAccount":{"type":"string","description":"account number"},"docBankBeneficiary":{"type":"string","description":"beneficiary name"},"docCustomFields":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","description":""},"value":{"type":"string","description":""}},"required":["label","value"]},"description":"extra label/value pairs for AI-filled forms"}}}},{"name":"setBusinessApp","group":"account","title":"Enable or disable an app","description":"חנות אפליקציות: switch one optional screen on or off. payments needs invoices. Admins only.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"app":{"type":"string","enum":["incoming","invoices","payments","software","statements","cards","bank","employees","shifts","projects","calendar","documents","accountant"],"description":"the app"},"enabled":{"type":"boolean","description":"true = on"}},"required":["app","enabled"]}},{"name":"getMyPublicLink","group":"account","title":"Get the permanent request link","description":"The business standing link (askpay.co/link/<slug>): anyone opening it files a payment request themselves.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"checkPublicSlug","group":"account","title":"Check a slug","description":"Is this slug free for the permanent link?","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"slug":{"type":"string","description":"lowercase Latin letters, digits, hyphens"}},"required":["slug"]}},{"name":"setMyPublicLink","group":"account","title":"Rename the permanent link","description":"Set the slug of the permanent link (askpay.co/link/<slug>).","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"slug":{"type":"string","description":"the new slug"}},"required":["slug"]}},{"name":"saveBusinessIntegration","group":"account","title":"Connect or disconnect an invoicing provider","description":"Store the API credentials of an invoicing provider (greeninvoice, icount, sumit, rivhit, ezcount…) or disconnect it with action \"disconnect\". Credentials are write-only. Admins only.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"provider":{"type":"string","description":"provider id"},"apiKey":{"type":"string","description":"the provider API key"},"apiSecret":{"type":"string","description":"the provider API secret, when it has one"},"note":{"type":"string","description":"free note"},"action":{"type":"string","enum":["disconnect"],"description":"send \"disconnect\" to remove the connection"}},"required":["provider"]}},{"name":"itaConnectStart","group":"account","title":"Start Tax Authority consent","description":"Returns the רשות המסים login URL the user must open in a browser to grant the 90-day consent used for allocation-number checks.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"itaDisconnect","group":"account","title":"Disconnect Tax Authority","description":"Forget the רשות המסים consent tokens.","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{}}},{"name":"itaVerifyAllocation","group":"account","title":"Verify an allocation number","description":"Check a payment invoice מספר הקצאה against the Tax Authority; the verdict (match / amount_mismatch / not_found) is stored on the payment.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"paymentId":{"type":"string","description":"payment id"}},"required":["paymentId"]}},{"name":"paymentsList","group":"payments","title":"List payments to suppliers","description":"Payments this business created (תשלום לספקים), newest first. Statuses: sent (link created, awaiting bank details), awaiting_invoice, ready (ready to pay), paid, canceled. Each row carries the supplier, amount, status, invoice summary and the supplier link.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"status":{"type":"string","enum":["sent","awaiting_invoice","ready","paid","canceled"],"description":"only this status"},"supplierKey":{"type":"string","description":"only this supplier (phone E.164 or email)"},"q":{"type":"string","description":"free text over supplier name, description, invoice number"},"limit":{"type":"integer","description":"rows per page (default 50, max 200)"},"offset":{"type":"integer","description":"rows to skip (default 0)"}}}},{"name":"paymentGet","group":"payments","title":"Get a payment","description":"One payment with everything on it: supplier payout details, invoice(s) with download URLs, proof of payment, ITA verdict, timestamps.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"paymentId":{"type":"string","description":"payment id"}},"required":["paymentId"]}},{"name":"createPayment","group":"payments","title":"Create a payment to a supplier","description":"Open a payment request and send the supplier a link (WhatsApp when a phone is given, email when an email is given). The supplier enters bank details and attaches the invoice; the payment turns \"ready\" for the business to pay. channel \"link\" = deliver nothing, the business passes the link itself. invoiceDocId = open the payment from an uploaded invoice (the document is copied onto the payment).","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"amountAgorot":{"type":"integer","description":"amount in agorot (integer; 1 ILS = 100 agorot; also used for USD/EUR cents)"},"openAmount":{"type":"boolean","description":"true = the supplier fills in the amount (send amountAgorot 0)"},"currency":{"type":"string","enum":["ILS","USD","EUR"],"description":"currency (default ILS)"},"vatIncluded":{"type":"boolean","description":"the amount includes VAT"},"invoiceRequired":{"type":"boolean","description":"the supplier must attach an invoice before the payment turns ready (default false)"},"payMethods":{"type":"array","items":{"type":"string","enum":["bank","bit","wise","payoneer","paypal"],"description":""},"description":"payout methods the supplier may pick; omit or send all = free choice"},"description":{"type":"string","description":"what the payment is for (shown to the supplier)"},"supplierName":{"type":"string","description":"supplier name"},"supplierPhone":{"type":"string","description":"supplier phone (Israeli or E.164); phone or email is required"},"supplierEmail":{"type":"string","description":"supplier email; phone or email is required"},"channel":{"type":"string","enum":["link"],"description":"\"link\" = do not send anything"},"invoiceDocId":{"type":"string","description":"an uploaded invoice document id to attach (from invoicesList)"}},"required":["amountAgorot","vatIncluded","description","supplierName"]}},{"name":"updatePaymentSettings","group":"payments","title":"Update a payment","description":"Change a payment after sending: the invoice requirement, allowed payout methods, amount / VAT / description while unpaid, and the supplier identity, contact or channel while the supplier has not filled bank details yet.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"paymentId":{"type":"string","description":"payment id"},"invoiceRequired":{"type":"boolean","description":""},"payMethods":{"type":"array","items":{"type":"string","enum":["bank","bit","wise","payoneer","paypal"],"description":""},"description":"payout methods the supplier may pick; omit or send all = free choice"},"amountAgorot":{"type":"integer","description":"amount in agorot (integer; 1 ILS = 100 agorot; also used for USD/EUR cents)"},"currency":{"type":"string","enum":["ILS","USD","EUR"],"description":"currency (default ILS)"},"vatIncluded":{"type":"boolean","description":""},"description":{"type":"string","description":""},"supplierName":{"type":"string","description":""},"supplierPhone":{"type":"string","description":"\"\" clears the phone"},"supplierEmail":{"type":"string","description":"\"\" clears the email"},"channel":{"type":"string","enum":["wa","em","link"],"description":"wa = WhatsApp, em = email, link = self-sent"}},"required":["paymentId"]}},{"name":"resendPayment","group":"payments","title":"Resend the payment link","description":"Send the supplier link again over WhatsApp or email (the payment must carry that contact).","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"paymentId":{"type":"string","description":"payment id"},"channel":{"type":"string","enum":["wa","em"],"description":"wa = WhatsApp, em = email"}},"required":["paymentId","channel"]}},{"name":"cancelPayment","group":"payments","title":"Cancel a payment","description":"Cancel a payment request. The supplier link shows it was canceled.","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"paymentId":{"type":"string","description":"payment id"}},"required":["paymentId"]}},{"name":"deletePayment","group":"payments","title":"Delete a payment","description":"Remove a payment row for good — only allowed when no invoice is attached to it (cancel a live request instead). Proof-of-payment files go with it.","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"paymentId":{"type":"string","description":"payment id"}},"required":["paymentId"]}},{"name":"markPaid","group":"payments","title":"Mark a payment as paid","description":"The business paid the supplier: status becomes \"paid\" and the supplier is told. Optionally attach a proof (bank screenshot / PDF, max 5MB). notify picks the channels that tell the supplier; omitted = WhatsApp when the payment has a phone, else email.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"paymentId":{"type":"string","description":"payment id"},"proof":{"type":"object","properties":{"fileName":{"type":"string","description":"file name with extension"},"mimeType":{"type":"string","description":"MIME type, e.g. application/pdf, image/jpeg, image/png"},"dataBase64":{"type":"string","description":"file body, base64 (no data: prefix)"}},"required":["fileName","mimeType","dataBase64"],"description":"optional proof of payment"},"notify":{"type":"object","properties":{"wa":{"type":"boolean","description":"send the WhatsApp message"},"email":{"type":"boolean","description":"send the email"}},"description":"which channels tell the supplier \"paid\""},"paidMethod":{"type":"string","enum":["bank","card","bit","cash","check","wise","payoneer","paypal"],"description":"how the payment was actually made; omitted = as the payout requested"}},"required":["paymentId"]}},{"name":"revertPaid","group":"payments","title":"Undo mark paid","description":"Move a paid payment back to sent / awaiting_invoice / ready.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"paymentId":{"type":"string","description":"payment id"},"status":{"type":"string","enum":["sent","awaiting_invoice","ready"],"description":"the status to return to"}},"required":["paymentId","status"]}},{"name":"listIncomingPayments","group":"incoming","title":"List payments to receive","description":"תשלומים לקבל: payments other businesses addressed to this account (by its verified phone / email), with their invoices and proofs.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"suppliersList","group":"suppliers","title":"List suppliers","description":"Every supplier and freelancer the business works with: derived from payments plus suppliers created by hand. supplierKey = phone (E.164) or email; it is the id for getSupplierContact / saveSupplierContact / invoice assignment.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"getSupplierContact","group":"suppliers","title":"Get a supplier card","description":"The business private card of a supplier: contact person, company, address, emails, its own record of the supplier bank details, notes, plus what the supplier set on their side (read-only).","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"supplierKey":{"type":"string","description":"phone E.164 or email"}},"required":["supplierKey"]}},{"name":"saveSupplierContact","group":"suppliers","title":"Save a supplier card","description":"Update the business private card of a supplier. Send only the fields to change.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"supplierKey":{"type":"string","description":"phone E.164 or email"},"kind":{"type":"string","enum":["supplier","freelancer"],"description":"tag"},"fullName":{"type":"string","description":"contact person"},"companyName":{"type":"string","description":""},"companyId":{"type":"string","description":"ח.פ / עוסק מורשה"},"address":{"type":"string","description":"street and number"},"addressCity":{"type":"string","description":""},"addressZip":{"type":"string","description":""},"phone2":{"type":"string","description":"second phone"},"personalEmail":{"type":"string","description":""},"companyEmail":{"type":"string","description":""},"bankCode":{"type":"string","description":""},"bankBranch":{"type":"string","description":""},"bankAccount":{"type":"string","description":""},"bankBeneficiary":{"type":"string","description":""},"bitPhone":{"type":"string","description":""},"wiseEmail":{"type":"string","description":"email of the supplier Wise account"},"payoneerEmail":{"type":"string","description":"email of the supplier Payoneer account"},"paypalEmail":{"type":"string","description":"email of the supplier PayPal account"},"notes":{"type":"string","description":""}},"required":["supplierKey"]}},{"name":"createSupplier","group":"suppliers","title":"Create a supplier","description":"Add a supplier before any payment exists. Phone or email is required and becomes the supplierKey.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"name":{"type":"string","description":"supplier name"},"phone":{"type":"string","description":"phone"},"email":{"type":"string","description":"email"},"kind":{"type":"string","enum":["supplier","freelancer"],"description":"default supplier"}},"required":["name"]}},{"name":"listManualSuppliers","group":"suppliers","title":"List hand-created suppliers","description":"Suppliers created by hand (no payment yet) and the keys of every supplier tagged as a freelancer.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"supplierSuggestionsList","group":"suppliers","title":"List supplier suggestions","description":"Issuers the AI found on uploaded invoices that are not suppliers yet (the \"הצעות\" strip on the suppliers screen).","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"supplierSuggestionsCreate","group":"suppliers","title":"Accept supplier suggestions","description":"Turn suggestions into suppliers. A suggestion without phone/email needs `contact` for it, else it is returned in needsContact.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","description":""},"description":"suggestion ids"},"contact":{"type":"object","properties":{},"description":"map of suggestion id → { phone?, email? }"},"kind":{"type":"string","enum":["supplier","freelancer"],"description":"default supplier"}},"required":["ids"]}},{"name":"supplierSuggestionsDismiss","group":"suppliers","title":"Dismiss supplier suggestions","description":"Hide suggestions.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","description":""},"description":"suggestion ids"}},"required":["ids"]}},{"name":"supplierSuggestionToSoftware","group":"suppliers","title":"Suggestion is a software","description":"\"זו תוכנה\": move a supplier suggestion with its invoices to the תוכנות screen.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":"suggestion id"}},"required":["id"]}},{"name":"invoicesList","group":"invoices","title":"List invoices","description":"Invoice documents of the חשבוניות screen (uploaded by hand or imported from Gmail), newest first, with what the AI read (issuer, number, date, total, currency, pay method, card ending), folder, category and pay mark. Filters combine.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"folderId":{"type":"string","description":"only this invoice folder"},"category":{"type":"string","description":"only this category id (\"\" = uncategorized)"},"supplierKey":{"type":"string","description":"only this supplier"},"payMark":{"type":"string","enum":["unpaid","paid_card","paid_paypal","paid_transfer","paid_other","not_payable",""],"description":"how the invoice was paid; \"\" = let the AI decide"},"source":{"type":"string","enum":["gmail","upload"],"description":"where it came from"},"q":{"type":"string","description":"free text over file name, issuer, invoice number, note, mail subject"},"from":{"type":"string","description":"invoice date from, YYYY-MM-DD"},"to":{"type":"string","description":"invoice date to, YYYY-MM-DD"},"limit":{"type":"integer","description":"rows per page (default 50, max 200)"},"offset":{"type":"integer","description":"rows to skip (default 0)"}}}},{"name":"invoiceGet","group":"invoices","title":"Get an invoice","description":"One invoice document in full: the AI reading with line items and bank details, duplicates found, Gmail origin, folder, category, pay mark, download URL.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"docId":{"type":"string","description":"invoice document id"}},"required":["docId"]}},{"name":"uploadInvoiceDoc","group":"invoices","title":"Upload an invoice","description":"Store an invoice / receipt file (PDF or image). The AI reads it, checks for duplicates (skipped=true when it is already in the system; send skipDuplicates=false to store anyway), assigns the supplier when not given, and files it into a folder.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"fileName":{"type":"string","description":"file name with extension"},"mimeType":{"type":"string","description":"MIME type, e.g. application/pdf, image/jpeg, image/png"},"dataBase64":{"type":"string","description":"file body, base64 (no data: prefix)"},"supplierKey":{"type":"string","description":"assign to this supplier"},"supplierName":{"type":"string","description":"free-text supplier name when there is no key"},"note":{"type":"string","description":""},"skipDuplicates":{"type":"boolean","description":"default true"},"folderId":{"type":"string","description":"force a folder (\"\" = by rule)"}},"required":["fileName","mimeType","dataBase64"]}},{"name":"analyzeInvoice","group":"invoices","title":"Re-read an invoice with AI","description":"Run (or rerun) the AI reading on a business upload (docId) or a supplier attachment (paymentId, plus fileId for an extra document).","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"docId":{"type":"string","description":"invoice document id"},"paymentId":{"type":"string","description":"payment id"},"fileId":{"type":"string","description":"extra document file id"}}}},{"name":"updateInvoiceDoc","group":"invoices","title":"Update an invoice","description":"Re-assign the supplier (\"\" clears), edit the note, or override the pay mark.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"docId":{"type":"string","description":"invoice document id"},"supplierKey":{"type":"string","description":""},"supplierName":{"type":"string","description":""},"note":{"type":"string","description":""},"payMark":{"type":"string","enum":["unpaid","paid_card","paid_paypal","paid_transfer","paid_other","not_payable",""],"description":"how the invoice was paid; \"\" = let the AI decide"}},"required":["docId"]}},{"name":"deleteInvoiceDoc","group":"invoices","title":"Delete an invoice","description":"Remove an uploaded invoice document and its file.","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"docId":{"type":"string","description":"invoice document id"}},"required":["docId"]}},{"name":"invoiceBulkPayRule","group":"invoices","title":"Mark invoices paid by card / not by card","description":"Bulk \"שולם באשראי\" / \"לא באשראי\". With remember=true the rule is saved per issuer so their next invoices are marked automatically.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"docIds":{"type":"array","items":{"type":"string","description":""},"description":"invoice document ids"},"rule":{"type":"string","enum":["card","not_card"],"description":""},"remember":{"type":"boolean","description":"save as a rule per issuer"}},"required":["docIds","rule","remember"]}},{"name":"vendorPayRuleSet","group":"invoices","title":"Set an issuer pay rule","description":"Set or forget (\"\" = forget) the \"paid by card\" rule of one issuer. key = the issuer vendorKey (vat:/email:/phone:/name:…) from vendorRulesList or an invoice.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"key":{"type":"string","description":"vendorKey"},"rule":{"type":"string","enum":["card","not_card",""],"description":""},"name":{"type":"string","description":"display name"}},"required":["key","rule"]}},{"name":"vendorRulesList","group":"invoices","title":"List issuer rules","description":"The per-issuer rules: pay rules (paid by card / not) and category rules.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"categoriesList","group":"invoices","title":"List expense categories","description":"The fixed expense categories (סיווג הוצאות) with ids and Hebrew labels.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"invoiceSetCategory","group":"invoices","title":"Set invoice categories","description":"Classify documents (\"\" = no category). With remember=true the category becomes the rule for each distinct issuer.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"docIds":{"type":"array","items":{"type":"string","description":""},"description":"invoice document ids"},"category":{"type":"string","description":"category id from categoriesList, or \"\""},"remember":{"type":"boolean","description":"save as a rule per issuer"}},"required":["docIds","category","remember"]}},{"name":"vendorCategoryRuleSet","group":"invoices","title":"Set an issuer category rule","description":"Set or forget (\"\" = forget) the category rule of one issuer.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"key":{"type":"string","description":"vendorKey"},"category":{"type":"string","description":"category id or \"\""},"name":{"type":"string","description":"display name"}},"required":["key","category"]}},{"name":"categorySync","group":"invoices","title":"Classify uncategorized invoices","description":"Classify every AI-read invoice without a category (rules first, then the AI). Call again while remaining > 0.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"mailsList","group":"invoices","title":"List scanned mails","description":"Every Gmail message a scan looked at (the מיילים view): sender, subject, date, result (imported / no_invoice / duplicate / error) and how many invoices came out.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"result":{"type":"string","enum":["processing","imported","no_invoice","duplicate","error"],"description":"only this result"},"accountId":{"type":"string","description":"only this mailbox"},"q":{"type":"string","description":"free text over sender and subject"},"limit":{"type":"integer","description":"rows per page (default 50, max 200)"},"offset":{"type":"integer","description":"rows to skip (default 0)"}}}},{"name":"gmailMailGet","group":"invoices","title":"Get a mail","description":"Headers, body (HTML) and attachment names of one scanned mail.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"seenId":{"type":"string","description":"mail id from mailsList"}},"required":["seenId"]}},{"name":"gmailMailAsInvoice","group":"invoices","title":"This mail is an invoice","description":"A mail nothing came out of: print its body to PDF, read it with the AI and file it like an attachment. rememberSender adds a folder rule for the sender.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"seenId":{"type":"string","description":"mail id from mailsList"},"rememberSender":{"type":"boolean","description":""}},"required":["seenId","rememberSender"]}},{"name":"gmailMailsBackfill","group":"invoices","title":"Backfill mail details","description":"Fill sender / subject / date on scanned mails that were stored before the מיילים view existed (40 per call; loop while remaining > 0).","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"foldersList","group":"folders","title":"List invoice folders","description":"The invoice folder tree: general (כללי), petty (קופה קטנה), one per card ending, transfer (העברות בנקאיות, invoices paid by bank transfer), and custom folders; parentId nests them.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"folderCreate","group":"folders","title":"Create a folder","description":"Add a custom invoice folder, optionally under a parent.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"name":{"type":"string","description":"folder name"},"parentId":{"type":"string","description":"parent folder id (\"\" = top level)"}},"required":["name"]}},{"name":"folderRename","group":"folders","title":"Rename a folder","description":"Rename a folder","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":"folder id"},"name":{"type":"string","description":"new name"}},"required":["id","name"]}},{"name":"folderMove","group":"folders","title":"Move a folder","description":"Re-parent a folder with everything below it (\"\" = top level).","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":"folder id"},"parentId":{"type":"string","description":"new parent id or \"\""}},"required":["id","parentId"]}},{"name":"folderDelete","group":"folders","title":"Delete a folder","description":"Delete a folder and every folder below it; their invoices move to moveTo (default כללי).","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"id":{"type":"string","description":"folder id"},"moveTo":{"type":"string","description":"folder id to receive the invoices"}},"required":["id"]}},{"name":"invoiceSetFolder","group":"folders","title":"Move an invoice to a folder","description":"Move one invoice by hand: a business upload (docId) or a supplier attachment (paymentId + fileId).","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"folderId":{"type":"string","description":"target folder id"},"docId":{"type":"string","description":"invoice document id"},"paymentId":{"type":"string","description":"payment id"},"fileId":{"type":"string","description":"file id of the attachment"}},"required":["folderId"]}},{"name":"folderSync","group":"folders","title":"File unfoldered invoices","description":"Ensure the built-in folders exist and file a batch of unfoldered invoices by rule. Loop while remaining > 0.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"folderRulesList","group":"folders","title":"List folder rules","description":"The Gmail-filter style rules that file new invoices into folders, in priority order.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"folderRuleSave","group":"folders","title":"Create or update a folder rule","description":"Create (no id) or edit a rule: conditions over the invoice, then what to do with it — file it into a folder, stamp a pay mark (\"always paid by card\"), set an expense category, turn a mail body into the invoice, or take the invoice from a link in the mail. At least one action is required; folderId \"\" means the rule does not move the invoice.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":"rule id to edit; omit to create"},"when":{"type":"object","properties":{"from":{"type":"string","description":"piece of the From header: an address, a domain or a name; \"\" = any"},"subject":{"type":"string","description":"piece of the subject; \"\" = any"},"words":{"type":"string","description":"every word (or \"quoted phrase\") must appear in the invoice text; \"\" = any"},"notWords":{"type":"string","description":"none of these words may appear; \"\" = any"},"supplier":{"type":"string","description":"piece of the issuer name, ח.פ or email as the AI read them; \"\" = any"},"invoiceNumber":{"type":"string","description":"piece of the invoice number as the AI read it; \"\" = any"},"allocation":{"type":"string","description":"piece of the allocation number (מספר הקצאה); \"\" = any"},"customer":{"type":"string","description":"piece of the customer name or ח.פ on the invoice; \"\" = any"},"cardLast4":{"type":"string","description":"digits the paying card's last-4 ends with; \"\" = any"},"desc":{"type":"string","description":"piece of the invoice description or a line item; \"\" = any"},"bank":{"type":"string","description":"piece of the bank details: name, branch, account or beneficiary; \"\" = any"},"amountOp":{"type":"string","enum":["","gt","lt"],"description":"compare an amount: gt / lt / \"\" = no amount condition"},"amount":{"type":"number","description":"the amount for amountOp (major units, e.g. 500 = 500 ILS)"},"amountField":{"type":"string","enum":["","total","beforeVat","vat"],"description":"which amount amountOp compares; \"\" = the total"},"dateField":{"type":"string","enum":["","invoice","due","received"],"description":"which date dateFrom/dateTo check; \"\" = the invoice date, received = the day it entered AskPay"},"dateFrom":{"type":"string","description":"YYYY-MM-DD; \"\" = open start"},"dateTo":{"type":"string","description":"YYYY-MM-DD; \"\" = open end"},"currency":{"type":"string","description":"ILS / USD / EUR; \"\" = any"},"docType":{"type":"string","description":"tax_invoice / tax_invoice_receipt / receipt / proforma / credit_note / other; \"\" = any"},"payMethod":{"type":"string","description":"card / paypal / bank_transfer / cash / check / other; \"\" = any"},"category":{"type":"string","description":"category id (see categoriesList); none = no category fits; \"\" = any"},"accountId":{"type":"string","description":"Gmail mailbox id; \"\" = any"},"source":{"type":"string","enum":["","gmail","whatsapp","upload","supplier"],"description":"where the invoice came from; \"\" = any"}},"description":"conditions, Gmail-filter style; every set condition must hold. Send \"\" for conditions you do not use."},"folderId":{"type":"string","description":"target folder id; \"\" = do not move it, only do the rest"},"payMark":{"type":"string","enum":["unpaid","paid_card","paid_paypal","paid_transfer","paid_other","not_payable",""],"description":"how the invoice was paid; \"\" = let the AI decide"},"category":{"type":"string","description":"expense category id from categoriesList; \"\" = leave it alone"},"bodyInvoice":{"type":"boolean","description":"mail body is the receipt: print it to PDF and read it"},"linkInvoice":{"type":"boolean","description":"the document sits behind a link in the mail body: open the link and read the file behind it"},"enabled":{"type":"boolean","description":"default true"},"applyExisting":{"type":"boolean","description":"also file existing rule-placed invoices"}},"required":["when"]}},{"name":"folderRuleApply","group":"folders","title":"Apply a folder rule","description":"File the rule-placed invoices by this one rule.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":"rule id"}},"required":["id"]}},{"name":"folderRuleDelete","group":"folders","title":"Delete a folder rule","description":"Delete a folder rule","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"id":{"type":"string","description":"rule id"}},"required":["id"]}},{"name":"folderRuleReorder","group":"folders","title":"Reorder folder rules","description":"Every rule id in the new order, first = highest priority.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","description":""},"description":"all rule ids"}},"required":["ids"]}},{"name":"softwareList","group":"software","title":"List software","description":"Card-paid tools and services (תוכנות) with cadence and hidden flag.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"softwareSync","group":"software","title":"Detect software from invoices","description":"Classify invoice issuers into software vs suppliers (AI). force=true re-runs even when nothing changed.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"force":{"type":"boolean","description":""}}}},{"name":"softwareUpdate","group":"software","title":"Update a software","description":"Update a software","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":"software id"},"name":{"type":"string","description":""},"hidden":{"type":"boolean","description":""},"cadence":{"type":"string","enum":["auto","monthly","yearly"],"description":""}},"required":["id"]}},{"name":"softwareToSupplier","group":"software","title":"Software is a supplier","description":"\"זה ספק\": the tool becomes an open supplier suggestion with its invoices.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":"software id"}},"required":["id"]}},{"name":"statementsList","group":"statements","title":"List statements","description":"דפי פירוט: every stored monthly statement (Stripe, Mercury, Wise, BlueSnap, Upwork) with its official files and download URLs, plus per-month send state.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"statementDelete","group":"statements","title":"Delete a statement","description":"Delete a statement","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"id":{"type":"string","description":"statement id"}},"required":["id"]}},{"name":"statementsSend","group":"statements","title":"Email a month package","description":"Mail the month package to the automation recipients, or to the given addresses.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"month":{"type":"string","description":"month as YYYY-MM (a closed month)","pattern":"^\\d{4}-\\d{2}$"},"recipients":{"type":"array","items":{"type":"string","description":"email"},"description":"override recipients"}},"required":["month"]}},{"name":"statementsZip","group":"statements","title":"ZIP a month","description":"Build the ZIP of a month (every account, or one) and return its download URL.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"month":{"type":"string","description":"month as YYYY-MM (a closed month)","pattern":"^\\d{4}-\\d{2}$"},"accountId":{"type":"string","description":"one statement account"}},"required":["month"]}},{"name":"statementsExpectedSet","group":"statements","title":"Set expected accounts","description":"\"מה צריך להיות בדפי פירוט\": the accounts that must have a statement every month, each from a month on. A month missing one of them shows \"חסר חשבון\". Replaces the whole list.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"expected":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["stripe","mercury","wise","bluesnap","upwork","openfinance","openfinance_bank"],"description":""},"accountId":{"type":"string","description":"statement account id"},"from":{"type":"string","description":"first month YYYY-MM, empty = every month"}},"required":["provider","accountId"]},"description":"the full list"}},"required":["expected"]}},{"name":"stripeConnect","group":"statements","title":"Connect Stripe","description":"Connect a Stripe account with a restricted API key. Returns the months to pull.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"apiKey":{"type":"string","description":"Stripe restricted key (rk_…)"}},"required":["apiKey"]}},{"name":"stripeListAccounts","group":"statements","title":"List Stripe accounts","description":"List Stripe accounts","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"stripeDisconnect","group":"statements","title":"Disconnect Stripe","description":"Disconnect Stripe","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"accountId":{"type":"string","description":""}},"required":["accountId"]}},{"name":"stripeSync","group":"statements","title":"Pull a Stripe month","description":"Build (or rebuild) one month statement: balance summary, itemized activity, itemized payouts.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"accountId":{"type":"string","description":""},"month":{"type":"string","description":"month as YYYY-MM (a closed month)","pattern":"^\\d{4}-\\d{2}$"}},"required":["accountId","month"]}},{"name":"mercuryConnect","group":"statements","title":"Connect Mercury","description":"Connect with a read-only Mercury token; every bank account becomes a row.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"token":{"type":"string","description":"Mercury API token"}},"required":["token"]}},{"name":"mercuryListAccounts","group":"statements","title":"List Mercury accounts","description":"List Mercury accounts","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"mercuryDisconnect","group":"statements","title":"Disconnect Mercury","description":"Disconnect Mercury","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"accountId":{"type":"string","description":""}},"required":["accountId"]}},{"name":"mercurySync","group":"statements","title":"Pull a Mercury month","description":"Fetch the bank statement PDF of one month.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"accountId":{"type":"string","description":""},"month":{"type":"string","description":"month as YYYY-MM (a closed month)","pattern":"^\\d{4}-\\d{2}$"}},"required":["accountId","month"]}},{"name":"wiseConnect","group":"statements","title":"Connect Wise","description":"Connect with a personal API token; every balance (currency) becomes a row.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"token":{"type":"string","description":"Wise personal token"},"sandbox":{"type":"boolean","description":"default false"}},"required":["token"]}},{"name":"wiseListAccounts","group":"statements","title":"List Wise balances","description":"List Wise balances","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"wiseDisconnect","group":"statements","title":"Disconnect Wise","description":"Disconnect Wise","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"accountId":{"type":"string","description":""}},"required":["accountId"]}},{"name":"wiseSync","group":"statements","title":"Pull a Wise month","description":"Fetch the balance statement (PDF + CSV) and transfer receipts of one month.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"accountId":{"type":"string","description":""},"month":{"type":"string","description":"month as YYYY-MM (a closed month)","pattern":"^\\d{4}-\\d{2}$"}},"required":["accountId","month"]}},{"name":"bluesnapConnect","group":"statements","title":"Connect BlueSnap","description":"Connect with the API user credentials.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"username":{"type":"string","description":"API user"},"password":{"type":"string","description":"API password"},"sandbox":{"type":"boolean","description":""}},"required":["username","password","sandbox"]}},{"name":"bluesnapListAccounts","group":"statements","title":"List BlueSnap merchants","description":"List BlueSnap merchants","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"bluesnapDisconnect","group":"statements","title":"Disconnect BlueSnap","description":"Disconnect BlueSnap","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"accountId":{"type":"string","description":""}},"required":["accountId"]}},{"name":"bluesnapSync","group":"statements","title":"Pull a BlueSnap month","description":"Fetch the payout reports of one month.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"accountId":{"type":"string","description":""},"month":{"type":"string","description":"month as YYYY-MM (a closed month)","pattern":"^\\d{4}-\\d{2}$"}},"required":["accountId","month"]}},{"name":"openFinanceConnect","group":"statements","title":"Connect Open Finance","description":"Connect with the User ID, Client ID and Client Secret from the Open Finance dashboard. Returns the banks and accounts found; all of them start linked.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"userId":{"type":"string","description":"Open Finance user id"},"clientId":{"type":"string","description":"client id"},"clientSecret":{"type":"string","description":"client secret"}},"required":["userId","clientId","clientSecret"]}},{"name":"openFinanceListAccounts","group":"statements","title":"List Open Finance links","description":"Every credentials set with its banks, accounts and which accounts are linked.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"openFinanceRefresh","group":"statements","title":"Re-read Open Finance banks","description":"Read the banks and accounts again from Open Finance.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"accountId":{"type":"string","description":""}},"required":["accountId"]}},{"name":"openFinanceSelect","group":"statements","title":"Choose linked accounts","description":"Set which Open Finance accounts (by their ids) are linked to AskPay.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"accountId":{"type":"string","description":""},"selected":{"type":"array","items":{"type":"string","description":"Open Finance account id"},"description":"the linked account ids"}},"required":["accountId","selected"]}},{"name":"openFinanceDisconnect","group":"statements","title":"Disconnect Open Finance","description":"Disconnect Open Finance","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"accountId":{"type":"string","description":""}},"required":["accountId"]}},{"name":"openFinanceTransactions","group":"statements","title":"List Open Finance transactions","description":"The transactions of one linked account for a date range, as Open Finance holds them.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"accountId":{"type":"string","description":""},"ofAccountId":{"type":"string","description":"the linked account id"},"dateFrom":{"type":"string","description":"YYYY-MM-DD"},"dateTo":{"type":"string","description":"YYYY-MM-DD"}},"required":["accountId","ofAccountId","dateFrom","dateTo"]}},{"name":"openFinanceCardsList","group":"cards","title":"List credit cards","description":"Every credit card linked through Open Finance (id, label, bank, last 4 digits, currency, status, last pull). Use the id as cardId.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"openFinanceCardSync","group":"cards","title":"Pull a card month","description":"Fetch the month transactions of one card from the bank into rows and one CSV statement (a closed month, or the running one). Admins only. Rows are also refreshed every morning by themselves.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"accountId":{"type":"string","description":"card id"},"month":{"type":"string","description":"month as YYYY-MM (closed or running)","pattern":"^\\d{4}-\\d{2}$"}},"required":["accountId","month"]}},{"name":"cardTransactionsList","group":"cards","title":"Query card transactions","description":"Search the stored credit card transactions with filters, sorted and paged, with totals per currency for the whole match. Money is in MAJOR units of the card currency (120.5 = 120.50); amount is what the card charged, positive, a refund negative. Default span: the last 12 months.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"cardId":{"type":"string","description":"one card (from openFinanceCardsList); omit = every card"},"month":{"type":"string","description":"one month, YYYY-MM (wins over from / to)"},"from":{"type":"string","description":"first day, YYYY-MM-DD or YYYY-MM (default: 11 months before to)"},"to":{"type":"string","description":"last day, YYYY-MM-DD or YYYY-MM (default: today); at most 36 months per query"},"currency":{"type":"string","description":"ILS / USD / EUR…; \"\" = any"},"category":{"type":"string","description":"the bank category, exact (see the rows); \"\" = any"},"subCategory":{"type":"string","description":"the bank sub-category, exact; \"\" = any"},"merchant":{"type":"string","description":"piece of the merchant / counterparty name or description; \"\" = any"},"q":{"type":"string","description":"free text over merchant, description, details, categories and the bank transaction id; \"\" = any"},"minAmount":{"type":"number","description":"smallest absolute amount, major units (e.g. 500 = 500.00)"},"maxAmount":{"type":"number","description":"largest absolute amount, major units"},"status":{"type":"string","description":"the bank status text, exact (e.g. completed, pending); \"\" = any"},"type":{"type":"string","description":"the bank transaction type text, exact; \"\" = any"},"includeDuplicates":{"type":"boolean","description":"also rows the bank flags as duplicates (default false)"},"direction":{"type":"string","enum":["","charges","refunds"],"description":"charges = money out, refunds = money back; \"\" = both"},"installmentsOnly":{"type":"boolean","description":"only rows that are part of an installment plan (תשלומים)"},"sort":{"type":"string","enum":["date_desc","date_asc","amount_desc","amount_asc"],"description":"order (default date_desc; amount sorts by absolute value)"},"limit":{"type":"integer","description":"rows per page (default 50, max 200)"},"offset":{"type":"integer","description":"rows to skip (default 0)"}}}},{"name":"cardTransactionsSummary","group":"cards","title":"Summarize card transactions","description":"Totals of the matching card transactions grouped by account (card), month, day, category, subCategory, merchant, currency, status or type: count, out (charged), in (refunds), net per group and currency. Same filters as cardTransactionsList. Use it for \"how much did we spend on X\", \"top merchants\", \"monthly card spend\".","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"cardId":{"type":"string","description":"one card; omit = every card"},"groupBy":{"type":"string","enum":["account","month","day","category","subCategory","merchant","currency","status","type"],"description":"what to group by (default month)"},"month":{"type":"string","description":"one month, YYYY-MM (wins over from / to)"},"from":{"type":"string","description":"first day, YYYY-MM-DD or YYYY-MM (default: 11 months before to)"},"to":{"type":"string","description":"last day, YYYY-MM-DD or YYYY-MM (default: today); at most 36 months per query"},"currency":{"type":"string","description":"ILS / USD / EUR…; \"\" = any"},"category":{"type":"string","description":"the bank category, exact (see the rows); \"\" = any"},"subCategory":{"type":"string","description":"the bank sub-category, exact; \"\" = any"},"merchant":{"type":"string","description":"piece of the merchant / counterparty name or description; \"\" = any"},"q":{"type":"string","description":"free text over merchant, description, details, categories and the bank transaction id; \"\" = any"},"minAmount":{"type":"number","description":"smallest absolute amount, major units (e.g. 500 = 500.00)"},"maxAmount":{"type":"number","description":"largest absolute amount, major units"},"status":{"type":"string","description":"the bank status text, exact (e.g. completed, pending); \"\" = any"},"type":{"type":"string","description":"the bank transaction type text, exact; \"\" = any"},"includeDuplicates":{"type":"boolean","description":"also rows the bank flags as duplicates (default false)"},"direction":{"type":"string","enum":["","charges","refunds"],"description":"\"\" = both"},"installmentsOnly":{"type":"boolean","description":"only installment rows"}}}},{"name":"cardTransactionGet","group":"cards","title":"Get a card transaction","description":"One stored card transaction by its id (from cardTransactionsList).","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":"transaction row id"}},"required":["id"]}},{"name":"openFinanceBankList","group":"bank","title":"List bank accounts","description":"Every checking account linked through Open Finance (id, label, bank, last 4 digits, currency, current balance, status, last pull). Use the id as accountId.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"openFinanceBankSync","group":"bank","title":"Pull a bank account month","description":"Fetch the month movements of one bank account into rows and one CSV statement (a closed month, or the running one). Admins only. Rows are also refreshed every morning by themselves.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"accountId":{"type":"string","description":"bank account id"},"month":{"type":"string","description":"month as YYYY-MM (closed or running)","pattern":"^\\d{4}-\\d{2}$"}},"required":["accountId","month"]}},{"name":"bankTransactionsList","group":"bank","title":"Query bank transactions","description":"Search the stored bank account movements with filters, sorted and paged, with totals per currency for the whole match. Money is in MAJOR units of the account currency; amount is signed the bank way (out negative, in positive), out / in carry the absolute value, balance is the day-end balance. Default span: the last 12 months.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"accountId":{"type":"string","description":"one bank account (from openFinanceBankList); omit = every account"},"month":{"type":"string","description":"one month, YYYY-MM (wins over from / to)"},"from":{"type":"string","description":"first day, YYYY-MM-DD or YYYY-MM (default: 11 months before to)"},"to":{"type":"string","description":"last day, YYYY-MM-DD or YYYY-MM (default: today); at most 36 months per query"},"currency":{"type":"string","description":"ILS / USD / EUR…; \"\" = any"},"category":{"type":"string","description":"the bank category, exact (see the rows); \"\" = any"},"subCategory":{"type":"string","description":"the bank sub-category, exact; \"\" = any"},"merchant":{"type":"string","description":"piece of the merchant / counterparty name or description; \"\" = any"},"q":{"type":"string","description":"free text over merchant, description, details, categories and the bank transaction id; \"\" = any"},"minAmount":{"type":"number","description":"smallest absolute amount, major units (e.g. 500 = 500.00)"},"maxAmount":{"type":"number","description":"largest absolute amount, major units"},"status":{"type":"string","description":"the bank status text, exact (e.g. completed, pending); \"\" = any"},"type":{"type":"string","description":"the bank transaction type text, exact; \"\" = any"},"includeDuplicates":{"type":"boolean","description":"also rows the bank flags as duplicates (default false)"},"direction":{"type":"string","enum":["","out","in"],"description":"out = money that left, in = money that came in; \"\" = both"},"sort":{"type":"string","enum":["date_desc","date_asc","amount_desc","amount_asc"],"description":"order (default date_desc; amount sorts by absolute value)"},"limit":{"type":"integer","description":"rows per page (default 50, max 200)"},"offset":{"type":"integer","description":"rows to skip (default 0)"}}}},{"name":"bankTransactionsSummary","group":"bank","title":"Summarize bank transactions","description":"Totals of the matching bank movements grouped by account, month, day, category, subCategory, merchant (counterparty), currency, status or type: count, out, in, net per group and currency. Same filters as bankTransactionsList. Use it for \"how much came in this month\", \"biggest payees\", \"monthly cash flow\".","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"accountId":{"type":"string","description":"one account; omit = every account"},"groupBy":{"type":"string","enum":["account","month","day","category","subCategory","merchant","currency","status","type"],"description":"what to group by (default month)"},"month":{"type":"string","description":"one month, YYYY-MM (wins over from / to)"},"from":{"type":"string","description":"first day, YYYY-MM-DD or YYYY-MM (default: 11 months before to)"},"to":{"type":"string","description":"last day, YYYY-MM-DD or YYYY-MM (default: today); at most 36 months per query"},"currency":{"type":"string","description":"ILS / USD / EUR…; \"\" = any"},"category":{"type":"string","description":"the bank category, exact (see the rows); \"\" = any"},"subCategory":{"type":"string","description":"the bank sub-category, exact; \"\" = any"},"merchant":{"type":"string","description":"piece of the merchant / counterparty name or description; \"\" = any"},"q":{"type":"string","description":"free text over merchant, description, details, categories and the bank transaction id; \"\" = any"},"minAmount":{"type":"number","description":"smallest absolute amount, major units (e.g. 500 = 500.00)"},"maxAmount":{"type":"number","description":"largest absolute amount, major units"},"status":{"type":"string","description":"the bank status text, exact (e.g. completed, pending); \"\" = any"},"type":{"type":"string","description":"the bank transaction type text, exact; \"\" = any"},"includeDuplicates":{"type":"boolean","description":"also rows the bank flags as duplicates (default false)"},"direction":{"type":"string","enum":["","out","in"],"description":"\"\" = both"}}}},{"name":"bankTransactionGet","group":"bank","title":"Get a bank transaction","description":"One stored bank movement by its id (from bankTransactionsList).","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":"transaction row id"}},"required":["id"]}},{"name":"upworkConnectStart","group":"statements","title":"Start Upwork consent","description":"Returns the Upwork OAuth URL the user must open in a browser.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"origin":{"type":"string","description":"site origin the browser returns to after consent (default https://www.askpay.co)"}}}},{"name":"upworkListAccounts","group":"statements","title":"List Upwork organizations","description":"configured=false means the server has no Upwork API key yet.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"upworkDisconnect","group":"statements","title":"Disconnect Upwork","description":"Disconnect Upwork","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"accountId":{"type":"string","description":""}},"required":["accountId"]}},{"name":"upworkSync","group":"statements","title":"Pull an Upwork month","description":"Fetch the month transactions as rows and one CSV.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"accountId":{"type":"string","description":""},"month":{"type":"string","description":"month as YYYY-MM (a closed month)","pattern":"^\\d{4}-\\d{2}$"}},"required":["accountId","month"]}},{"name":"upworkTransactions","group":"statements","title":"List Upwork transactions","description":"The stored transactions of one month.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"accountId":{"type":"string","description":""},"month":{"type":"string","description":"month as YYYY-MM (a closed month)","pattern":"^\\d{4}-\\d{2}$"}},"required":["accountId","month"]}},{"name":"gmailConnectStart","group":"gmail","title":"Start Gmail consent","description":"Returns the Google consent URL the user must open in a browser to connect a mailbox.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"origin":{"type":"string","description":"site origin the browser returns to after consent (default https://www.askpay.co)"}}}},{"name":"gmailListAccounts","group":"gmail","title":"List Gmail mailboxes","description":"Connected mailboxes with status and how many automations use each.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"gmailDisconnect","group":"gmail","title":"Disconnect a mailbox","description":"Remove the mailbox and the automations built on it.","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"accountId":{"type":"string","description":""}},"required":["accountId"]}},{"name":"gmailListLabels","group":"gmail","title":"List Gmail labels","description":"List Gmail labels","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"accountId":{"type":"string","description":""}},"required":["accountId"]}},{"name":"gmailImportCount","group":"gmail","title":"Count mails to import","description":"How many mails an import since a date would look at (nothing is read yet).","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"accountId":{"type":"string","description":""},"since":{"type":"integer","description":"unix millis"},"labelId":{"type":"string","description":"only this label"}},"required":["accountId","since"]}},{"name":"gmailImportStart","group":"gmail","title":"Import invoices from Gmail","description":"Scan the mailbox since a date, read attachments with the AI and store the invoices. Runs to completion (up to 9 minutes). importId is generated when omitted; progress is on the returned import.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"importId":{"type":"string","description":"20 lowercase letters/digits; omit to generate"},"accountId":{"type":"string","description":""},"since":{"type":"integer","description":"unix millis"},"labelId":{"type":"string","description":"only this label"},"labelName":{"type":"string","description":"the label as shown; remembered per mailbox for the next import"}},"required":["accountId","since"]}},{"name":"gmailImportCancel","group":"gmail","title":"Cancel an import","description":"Flag a running import to stop before its next mail.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"importId":{"type":"string","description":""}},"required":["importId"]}},{"name":"gcalConnectStart","group":"calendar","title":"Start Google Calendar consent","description":"Returns the Google consent URL the user must open in a browser to connect their calendar.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"origin":{"type":"string","description":"site origin the browser returns to after consent (default https://www.askpay.co)"}}}},{"name":"gcalListAccounts","group":"calendar","title":"List connected calendars","description":"Google accounts whose calendar is connected: those of the calling user, plus all of them for an admin. canWrite = events may be added; calendarId = the default calendar for new events; calendarIds = the calendars the יומן app shows (empty = all).","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"gcalCalendars","group":"calendar","title":"List calendars of an account","description":"The calendars inside one connected Google account (primary first), with canWrite and colour.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"accountId":{"type":"string","description":"connected Google account id from gcalListAccounts; omit = the calendar of the calling user"}}}},{"name":"gcalEvents","group":"calendar","title":"Read calendar events","description":"Events of one or more calendars of an account in a date window (default: the next 14 days, at most 62 days). Every event carries its id, calendarId, times (ISO with offset; all-day as YYYY-MM-DD), guests with their answers (attendees), reminders (null = calendar default), the organizer and whether the account may change it (canEdit).","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"accountId":{"type":"string","description":"connected Google account id from gcalListAccounts; omit = the calendar of the calling user"},"calendarId":{"type":"string","description":"calendar id from gcalCalendars; omit = the default calendar of the account"},"calendarIds":{"type":"array","items":{"type":"string","description":"calendar id"},"description":"several calendars at once (wins over calendarId)"},"from":{"type":"string","description":"first day YYYY-MM-DD, or an ISO date-time (default: now)"},"to":{"type":"string","description":"last day YYYY-MM-DD, included, or an ISO date-time"},"q":{"type":"string","description":"free-text search in title, place, notes and guests"}}}},{"name":"gcalBoard","group":"calendar","title":"Read every calendar","description":"The יומן app read: all accounts the user may use, their calendars (with colour and enabled flag) and the events of every enabled calendar in the window (default: the next 14 days, at most 62 days).","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"from":{"type":"string","description":"first day YYYY-MM-DD or ISO date-time"},"to":{"type":"string","description":"last day YYYY-MM-DD, included, or ISO date-time"}}}},{"name":"gcalCreateEvent","group":"calendar","title":"Add a calendar event","description":"Add an event to a Google Calendar of the user: one or more days, with a start and end time or all day. Times are Israel time unless timeZone says otherwise. Guests get their invitation mail from Google only when notify=true.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"accountId":{"type":"string","description":"connected Google account id from gcalListAccounts; omit = the calendar of the calling user"},"calendarId":{"type":"string","description":"calendar id from gcalCalendars; omit = the default calendar of the account"},"title":{"type":"string","description":"event title"},"date":{"type":"string","description":"YYYY-MM-DD, the first day"},"endDate":{"type":"string","description":"YYYY-MM-DD, the last day of a multi-day event (default: date)"},"startTime":{"type":"string","description":"HH:MM, 24h"},"endTime":{"type":"string","description":"HH:MM, 24h, after startTime"},"allDay":{"type":"boolean","description":"all-day event (no times)"},"startAt":{"type":"string","description":"exact start, ISO with offset (instead of date + startTime)"},"endAt":{"type":"string","description":"exact end, ISO with offset"},"description":{"type":"string","description":"notes"},"location":{"type":"string","description":"place"},"attendees":{"type":"array","items":{"type":"string","description":"email"},"description":"guests to invite"},"reminders":{"type":"array","items":{"type":"object","properties":{"method":{"type":"string","enum":["popup","email"],"description":"popup = on screen, email = by mail"},"minutes":{"type":"integer","description":"minutes before the event, 0 to 40320"}},"required":["method","minutes"]},"description":"the event reminders; [] = none"},"useDefaultReminders":{"type":"boolean","description":"true = the calendar default reminders"},"notify":{"type":"boolean","description":"true = Google emails the guests the invitation (ask the user first)"},"timeZone":{"type":"string","description":"IANA zone (default Asia/Jerusalem)"}},"required":["title","date"]}},{"name":"gcalUpdateEvent","group":"calendar","title":"Change a calendar event","description":"Change an event found with gcalEvents: move it, rename it, invite or remove guests, set reminders. Send only what changes; a new time needs date plus startTime and endTime (or allDay=true), or startAt + endAt. An empty description or location clears it. attendees replaces the whole guest list; addAttendees / removeAttendees change it. toCalendarId moves the event to another calendar of the same account. Guests get the update mail from Google only when notify=true.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"accountId":{"type":"string","description":"connected Google account id from gcalListAccounts; omit = the calendar of the calling user"},"calendarId":{"type":"string","description":"calendar id from gcalCalendars; omit = the default calendar of the account"},"eventId":{"type":"string","description":"event id from gcalEvents"},"title":{"type":"string","description":""},"date":{"type":"string","description":"YYYY-MM-DD"},"endDate":{"type":"string","description":"YYYY-MM-DD, last day of a multi-day event"},"startTime":{"type":"string","description":"HH:MM, 24h"},"endTime":{"type":"string","description":"HH:MM, 24h"},"allDay":{"type":"boolean","description":""},"startAt":{"type":"string","description":"exact start, ISO with offset"},"endAt":{"type":"string","description":"exact end, ISO with offset"},"description":{"type":"string","description":""},"location":{"type":"string","description":""},"attendees":{"type":"array","items":{"type":"string","description":"email"},"description":"the full guest list (replaces it)"},"addAttendees":{"type":"array","items":{"type":"string","description":"email"},"description":"guests to add"},"removeAttendees":{"type":"array","items":{"type":"string","description":"email"},"description":"guests to remove"},"reminders":{"type":"array","items":{"type":"object","properties":{"method":{"type":"string","enum":["popup","email"],"description":"popup = on screen, email = by mail"},"minutes":{"type":"integer","description":"minutes before the event, 0 to 40320"}},"required":["method","minutes"]},"description":"the event reminders; [] = none"},"useDefaultReminders":{"type":"boolean","description":"true = back to the calendar default reminders"},"toCalendarId":{"type":"string","description":"move the event to this calendar of the same account"},"notify":{"type":"boolean","description":"true = Google emails the guests about the change (ask the user first)"},"timeZone":{"type":"string","description":"IANA zone (default Asia/Jerusalem)"}},"required":["eventId"]}},{"name":"gcalDeleteEvent","group":"calendar","title":"Delete a calendar event","description":"Delete an event found with gcalEvents. notify=true makes Google send every guest the cancellation mail, as Google Calendar does; the confirm button lets the user pick.","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"accountId":{"type":"string","description":"connected Google account id from gcalListAccounts; omit = the calendar of the calling user"},"calendarId":{"type":"string","description":"calendar id from gcalCalendars; omit = the default calendar of the account"},"eventId":{"type":"string","description":"event id from gcalEvents"},"notify":{"type":"boolean","description":"true = Google emails the guests that the event was cancelled"}},"required":["eventId"]}},{"name":"gcalRespondEvent","group":"calendar","title":"Answer an invitation","description":"Accept, decline or tentatively accept an event the connected account was invited to (found with gcalEvents; mine=false). notify=true mails the organizer the answer.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"accountId":{"type":"string","description":"connected Google account id from gcalListAccounts; omit = the calendar of the calling user"},"calendarId":{"type":"string","description":"calendar id from gcalCalendars; omit = the default calendar of the account"},"eventId":{"type":"string","description":"event id from gcalEvents"},"status":{"type":"string","enum":["accepted","declined","tentative"],"description":"the answer"},"notify":{"type":"boolean","description":"true = the organizer gets the answer by mail"}},"required":["eventId","status"]}},{"name":"gcalSetCalendars","group":"calendar","title":"Choose the calendars to show","description":"Which calendars of an account the יומן app shows (calendarIds, empty = all) and the default calendar for new events (calendarId).","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"accountId":{"type":"string","description":"account id from gcalListAccounts"},"calendarIds":{"type":"array","items":{"type":"string","description":"calendar id"},"description":"calendars to show; [] = all"},"calendarId":{"type":"string","description":"default calendar for new events"}},"required":["accountId"]}},{"name":"gcalDisconnect","group":"calendar","title":"Disconnect a calendar","description":"Revoke the access of AskPay to the Google account and forget it.","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"accountId":{"type":"string","description":"account id from gcalListAccounts"}},"required":["accountId"]}},{"name":"automationList","group":"automations","title":"List automations","description":"Gmail invoice automations and the system statements automation, with last run results.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"automationCreate","group":"automations","title":"Create a Gmail automation","description":"Watch a mailbox (optionally one label) and import every invoice that arrives.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"type":{"type":"string","enum":["gmail_invoices"],"description":""},"name":{"type":"string","description":""},"config":{"type":"object","properties":{"accountId":{"type":"string","description":"mailbox id"},"labelId":{"type":"string","description":"label id or null"},"labelName":{"type":"string","description":"label name"}},"required":["accountId"]}},"required":["type","config"]}},{"name":"automationUpdate","group":"automations","title":"Update an automation","description":"Pause/resume, rename, or (statements automation) change recipients / onlyWhenComplete / the pull times.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":""},"enabled":{"type":"boolean","description":""},"name":{"type":"string","description":""},"config":{"type":"object","properties":{"recipients":{"type":"array","items":{"type":"string","description":"email"},"description":""},"onlyWhenComplete":{"type":"boolean","description":""},"times":{"type":"array","items":{"type":"object","properties":{"day":{"type":"integer","description":"day of the month, 1-28"},"hour":{"type":"integer","description":"hour 0-23, Israel time"}}},"description":"when the statements are pulled (1-8 times a month)"}}}},"required":["id"]}},{"name":"automationDelete","group":"automations","title":"Delete an automation","description":"System automations cannot be deleted, only paused.","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"id":{"type":"string","description":""}},"required":["id"]}},{"name":"automationRunNow","group":"automations","title":"Run the statements automation now","description":"Pull the closed month for every statement account and, when configured, mail the package.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":"automation id"},"month":{"type":"string","description":"month as YYYY-MM (a closed month)","pattern":"^\\d{4}-\\d{2}$"}},"required":["id"]}},{"name":"automationRuns","group":"automations","title":"List automation runs","description":"The last 30 runs of an automation, newest first.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":""}},"required":["id"]}},{"name":"employeesList","group":"employees","title":"List employees","description":"עובדים: every person of the business (the same rows are the shifts crew): name, phone, email, title, active, assignable (on the board), role (editor / sampler), priority, rules, employment, startDate, endDate, payModel + payRate (shekels), workDays, bank and emergency details, notes, files (documents with URLs), connectedAt (opened the crew page), source (manual / slack / import).","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"q":{"type":"string","description":"piece of a name, title, email or phone; \"\" = all"},"active":{"type":"boolean","description":"true = only active, false = only inactive; omit = all"}}}},{"name":"employeeCreate","group":"employees","title":"Create an employee","description":"Only name is required; the rest can be filled later with employeeUpdate.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"name":{"type":"string","description":"full name"},"phone":{"type":"string","description":""},"email":{"type":"string","description":""},"title":{"type":"string","description":"job title in free text (e.g. עורך וידאו); the board role is `role`"},"role":{"type":"string","enum":["editor","sampler"],"description":"role on the shifts board: editor (עורך) or sampler (דוגם); default editor"},"assignable":{"type":"boolean","description":"false = never put this person on the shifts board (default true)"},"priority":{"type":"boolean","description":"true = gets shifts before the others (תיעדוף)"},"rules":{"type":"string","description":"standing constraint for the board, free text, every month (e.g. \"לא עובד בימי שישי\"); \"\" = none"},"employment":{"type":"string","enum":["salaried","freelance",""],"description":"salaried = שכיר, freelance = עצמאי against an invoice, \"\" = not set"},"startDate":{"type":"string","description":"YYYY-MM-DD joined the company, \"\" = unknown"},"endDate":{"type":"string","description":"YYYY-MM-DD left, \"\" = still here (for the record only; use shiftWorkerSetFlags active=false to take them off the board)"},"payModel":{"type":"string","enum":["hourly","daily","monthly","shift",""],"description":"what payRate is per: hour / day / month / shift"},"payRate":{"type":"number","description":"pay in shekels per payModel unit; 0 = not set"},"workDays":{"type":"array","items":{"type":"integer","description":"0 = Sunday … 6 = Saturday"},"description":"weekdays, 0 = Sunday … 6 = Saturday"},"idNumber":{"type":"string","description":"ID number (תעודת זהות)"},"birthDate":{"type":"string","description":"YYYY-MM-DD"},"address":{"type":"string","description":""},"bankName":{"type":"string","description":""},"bankBranch":{"type":"string","description":""},"bankAccount":{"type":"string","description":""},"emergencyName":{"type":"string","description":"emergency contact name"},"emergencyPhone":{"type":"string","description":"emergency contact phone"},"notes":{"type":"string","description":"free notes"}},"required":["name"]}},{"name":"employeeUpdate","group":"employees","title":"Update an employee","description":"Only the fields sent change; everything else stays as it is.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":"employee id"},"name":{"type":"string","description":"full name"},"phone":{"type":"string","description":""},"email":{"type":"string","description":""},"title":{"type":"string","description":"job title in free text (e.g. עורך וידאו); the board role is `role`"},"role":{"type":"string","enum":["editor","sampler"],"description":"role on the shifts board: editor (עורך) or sampler (דוגם); default editor"},"assignable":{"type":"boolean","description":"false = never put this person on the shifts board (default true)"},"priority":{"type":"boolean","description":"true = gets shifts before the others (תיעדוף)"},"rules":{"type":"string","description":"standing constraint for the board, free text, every month (e.g. \"לא עובד בימי שישי\"); \"\" = none"},"employment":{"type":"string","enum":["salaried","freelance",""],"description":"salaried = שכיר, freelance = עצמאי against an invoice, \"\" = not set"},"startDate":{"type":"string","description":"YYYY-MM-DD joined the company, \"\" = unknown"},"endDate":{"type":"string","description":"YYYY-MM-DD left, \"\" = still here (for the record only; use shiftWorkerSetFlags active=false to take them off the board)"},"payModel":{"type":"string","enum":["hourly","daily","monthly","shift",""],"description":"what payRate is per: hour / day / month / shift"},"payRate":{"type":"number","description":"pay in shekels per payModel unit; 0 = not set"},"workDays":{"type":"array","items":{"type":"integer","description":"0 = Sunday … 6 = Saturday"},"description":"weekdays, 0 = Sunday … 6 = Saturday"},"idNumber":{"type":"string","description":"ID number (תעודת זהות)"},"birthDate":{"type":"string","description":"YYYY-MM-DD"},"address":{"type":"string","description":""},"bankName":{"type":"string","description":""},"bankBranch":{"type":"string","description":""},"bankAccount":{"type":"string","description":""},"emergencyName":{"type":"string","description":"emergency contact name"},"emergencyPhone":{"type":"string","description":"emergency contact phone"},"notes":{"type":"string","description":"free notes"}},"required":["id"]}},{"name":"employeeDelete","group":"employees","title":"Delete an employee","description":"Removes the person with every shift of theirs and their documents. To just take someone off the board, use shiftWorkerSetFlags with active=false instead.","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"id":{"type":"string","description":""}},"required":["id"]}},{"name":"employeeFileAdd","group":"employees","title":"Attach a document to an employee","description":"A contract (kind contract), an ID copy (id), a 101 form (form101) or any other file (other), up to 8MB; served from files.askpay.co.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":"employee id"},"kind":{"type":"string","enum":["contract","id","form101","other"],"description":"what the document is"},"label":{"type":"string","description":"short description, optional"},"fileName":{"type":"string","description":"file name with extension"},"mimeType":{"type":"string","description":"MIME type, e.g. application/pdf, image/jpeg, image/png"},"dataBase64":{"type":"string","description":"file body, base64 (no data: prefix)"}},"required":["id","fileName","mimeType","dataBase64"]}},{"name":"employeeFileDelete","group":"employees","title":"Delete an employee document","description":"Delete an employee document","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"id":{"type":"string","description":"employee id"},"fileId":{"type":"string","description":"the file id from employeesList files[]"}},"required":["id","fileId"]}},{"name":"shiftProgramsList","group":"shifts","title":"List programs","description":"תוכניות: the programs of the board with hours, weekdays, people needed, group, order, and whether they are off the board (removedFrom / archived).","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"shiftProgramCreate","group":"shifts","title":"Create a program","description":"A new program on the board. days omitted = every day.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"name":{"type":"string","description":"program name"},"group":{"type":"string","description":"heading the program sits under on the board (e.g. בוקר / ערב); \"\" = none"},"start":{"type":"string","description":"HH:MM"},"end":{"type":"string","description":"HH:MM"},"needed":{"type":"integer","description":"people needed per day (1-20)"},"maxWorkers":{"type":"integer","description":"most people allowed per day (>= needed; default = needed)"},"days":{"type":"array","items":{"type":"integer","description":"0 = Sunday … 6 = Saturday"},"description":"weekdays, 0 = Sunday … 6 = Saturday"}},"required":["name"]}},{"name":"shiftProgramUpdate","group":"shifts","title":"Update a program","description":"Only the fields sent change.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":"program id"},"name":{"type":"string","description":"program name"},"group":{"type":"string","description":"heading the program sits under on the board (e.g. בוקר / ערב); \"\" = none"},"start":{"type":"string","description":"HH:MM"},"end":{"type":"string","description":"HH:MM"},"needed":{"type":"integer","description":"people needed per day (1-20)"},"maxWorkers":{"type":"integer","description":"most people allowed per day (>= needed; default = needed)"},"days":{"type":"array","items":{"type":"integer","description":"0 = Sunday … 6 = Saturday"},"description":"weekdays, 0 = Sunday … 6 = Saturday"}},"required":["id"]}},{"name":"shiftProgramRemove","group":"shifts","title":"Take a program off the board from a month on","description":"month = YYYY-MM from which the program no longer appears (earlier months keep it); month \"\" puts it back on the board.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":"program id"},"month":{"type":"string","description":"YYYY-MM, or \"\" to restore"}},"required":["id","month"]}},{"name":"shiftProgramReorder","group":"shifts","title":"Reorder the programs","description":"The full list of program ids in the wanted order.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","description":""},"description":"program ids, first to last"}},"required":["ids"]}},{"name":"shiftProgramDelete","group":"shifts","title":"Delete a program","description":"Deletes the program with its future shifts; one with past shifts is archived (kept for those shifts only).","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"id":{"type":"string","description":""}},"required":["id"]}},{"name":"shiftsList","group":"shifts","title":"List shifts","description":"Who is on which program on which day, from..to (YYYY-MM-DD, at most 62 days), optionally one program or one person; rows carry programName, workerName, status approved / pending and note.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"from":{"type":"string","description":"YYYY-MM-DD"},"to":{"type":"string","description":"YYYY-MM-DD"},"programId":{"type":"string","description":"only this program; \"\" = all"},"workerId":{"type":"string","description":"only this person; \"\" = all"}},"required":["from","to"]}},{"name":"shiftCreate","group":"shifts","title":"Put a person on a program on a day","description":"One shift: the program, the person (employee id) and the date. Refused when the person is not assignable, is blocked on that program, or the program is full that day.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"programId":{"type":"string","description":""},"workerId":{"type":"string","description":"employee id"},"date":{"type":"string","description":"YYYY-MM-DD"},"status":{"type":"string","enum":["approved","pending"],"description":"default approved; pending = ממתין לאישור"},"note":{"type":"string","description":"short description of the shift, up to 300 chars"}},"required":["programId","workerId","date"]}},{"name":"shiftUpdate","group":"shifts","title":"Change a shift","description":"Move it to another person, program or day, or change its status / note; only the fields sent change.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":"shift id from shiftsList"},"programId":{"type":"string","description":""},"workerId":{"type":"string","description":""},"date":{"type":"string","description":"YYYY-MM-DD"},"status":{"type":"string","enum":["approved","pending"],"description":""},"note":{"type":"string","description":""}},"required":["id"]}},{"name":"shiftDelete","group":"shifts","title":"Remove a shift","description":"Takes the person off that program on that day.","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"id":{"type":"string","description":"shift id"}},"required":["id"]}},{"name":"shiftWorkerSetFlags","group":"shifts","title":"Change a person's board switches","description":"Only the fields sent change: priority (תיעדוף), assignable (לשבץ: false = never on the board), active (false = לא פעיל: off the board, and their shifts from today on are deleted; true brings them back), blockedPrograms (program ids never to put them on), rules (standing constraint text).","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":"employee id"},"priority":{"type":"boolean","description":""},"assignable":{"type":"boolean","description":""},"active":{"type":"boolean","description":""},"blockedPrograms":{"type":"array","items":{"type":"string","description":"program id"},"description":"the full list; [] = none"},"rules":{"type":"string","description":""}},"required":["id"]}},{"name":"shiftWorkerSetConstraints","group":"shifts","title":"Write a person's constraints for one month","description":"The free-text constraints the planner respects for that month (what the person wrote on the crew page, or what the manager types); \"\" clears them.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":"employee id"},"month":{"type":"string","description":"month as YYYY-MM (closed or running)","pattern":"^\\d{4}-\\d{2}$"},"text":{"type":"string","description":""}},"required":["id","month","text"]}},{"name":"shiftsAutoPlanStart","group":"shifts","title":"Auto-plan: fill the empty places","description":"Starts the AI planner in the background for the EMPTY places of a month (YYYY-MM, this month up to three ahead) or only of from..to inside it; existing shifts stay. notes = instructions in free text. Returns planId and openPlaces (0 = nothing to fill); it runs for a few minutes, follow it with shiftPlanStatus.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"month":{"type":"string","description":"month as YYYY-MM: this month up to three months ahead","pattern":"^\\d{4}-\\d{2}$"},"from":{"type":"string","description":"first day YYYY-MM-DD inside the month; omit = from today"},"to":{"type":"string","description":"last day YYYY-MM-DD inside the month; omit = month end"},"notes":{"type":"string","description":"instructions for the planner, Hebrew free text"}},"required":["month"]}},{"name":"shiftsImproveStart","group":"shifts","title":"Auto-plan: change the existing board","description":"The AI reworks the shifts already on the board in month / from..to according to notes (required: what to change, e.g. \"שבץ מחדש את כל השבוע\", \"תן לדנה פחות משמרות\", \"החלף בין גל לפבל ביום שלישי\"). Nothing is written yet: the result is a proposal (shiftPlanStatus → status proposed with the changes) that shiftsImproveApply writes or shiftsAutoPlanCancel drops. Returns planId.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"month":{"type":"string","description":"month as YYYY-MM: this month up to three months ahead","pattern":"^\\d{4}-\\d{2}$"},"from":{"type":"string","description":"first day YYYY-MM-DD; omit = whole month"},"to":{"type":"string","description":"last day YYYY-MM-DD; omit = month end"},"notes":{"type":"string","description":"what to change, Hebrew free text"}},"required":["month","notes"]}},{"name":"shiftsImproveApply","group":"shifts","title":"Auto-plan: apply the proposed changes","description":"Writes the changes of a plan in status proposed. skip = indexes (0-based) of proposed changes to leave out.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"planId":{"type":"string","description":"the plan id returned by shiftsAutoPlanStart / shiftsImproveStart / shiftsResetMonth, or from shiftPlanStatus"},"skip":{"type":"array","items":{"type":"integer","description":""},"description":"indexes of proposed changes not to apply"}},"required":["planId"]}},{"name":"shiftsAutoPlanCancel","group":"shifts","title":"Auto-plan: stop a running plan or drop a proposal","description":"Auto-plan: stop a running plan or drop a proposal","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"planId":{"type":"string","description":"the plan id returned by shiftsAutoPlanStart / shiftsImproveStart / shiftsResetMonth, or from shiftPlanStatus"}},"required":["planId"]}},{"name":"shiftsAutoUndo","group":"shifts","title":"Auto-plan: undo a plan","description":"Removes the shifts a plan created, or puts back what an improvement or a month reset changed.","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"planId":{"type":"string","description":"the plan id returned by shiftsAutoPlanStart / shiftsImproveStart / shiftsResetMonth, or from shiftPlanStatus"}},"required":["planId"]}},{"name":"shiftsPlanNoteUpdate","group":"shifts","title":"Auto-plan: fix an earlier request of the month","description":"The month's earlier requests (prevNotes in the plan preview) are read by every later plan and improvement of that month. Sends the new text; an empty text takes the request out. The shifts stay as they are.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"planId":{"type":"string","description":"the plan id returned by shiftsAutoPlanStart / shiftsImproveStart / shiftsResetMonth, or from shiftPlanStatus"},"notes":{"type":"string","description":"the new text; empty = take it out"}},"required":["planId"]}},{"name":"shiftsResetMonth","group":"shifts","title":"Empty a month","description":"Deletes EVERY shift of the month from today on (the planner can then fill it again). Returns a planId for shiftsAutoUndo.","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"month":{"type":"string","description":"month as YYYY-MM: this month up to three months ahead","pattern":"^\\d{4}-\\d{2}$"}},"required":["month"]}},{"name":"shiftPlanStatus","group":"shifts","title":"Auto-plan: status of a plan","description":"The plan by planId, or the active one of the business when planId is omitted: kind (plan / improve / reset), status (running / proposed / done / failed / cancelled), progress, created, unfilled places with reasons, the proposed changes of an improvement, summaries.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"planId":{"type":"string","description":"omit = the active plan"}}}},{"name":"shiftShareLink","group":"shifts","title":"The crew link","description":"The open, view-only link of the board for the crew: https://askpay.co/shifts/<token>. renew=true replaces it (the old link stops working).","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"renew":{"type":"boolean","description":"default false"}}}},{"name":"shiftConstraintNotesList","group":"shifts","title":"List the constraints workers sent","description":"אילוצים מעובדים: the constraint messages the manager handed in (forwarded from her WhatsApp, or typed in the chat), newest first: workerId, workerName, month (YYYY-MM it is about), text as the worker wrote it, source, reviewed (gone over in the start-of-month review), applied (already copied into the worker's constraints for that month).","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"month":{"type":"string","description":"YYYY-MM; \"\" = every month"},"reviewed":{"type":"boolean","description":"true = only reviewed, false = only waiting; omit = all"}}}},{"name":"shiftConstraintNoteCreate","group":"shifts","title":"Save a constraint a worker sent","description":"A constraint a worker sent the manager (\"אני לא יכול ב-12 וב-13\"), kept word for word for her review on the board (אילוצים מעובדים). Name the worker as the user does (workerName: matched against the crew; several matches or none come back as an error saying so, then ask the user and call again) or pass workerId from employeesList. month = the YYYY-MM the constraint is about; omit it for the month after today.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"workerName":{"type":"string","description":"the worker, as the user names them"},"workerId":{"type":"string","description":"employee id, when known"},"text":{"type":"string","description":"the constraint, as the worker wrote it"},"month":{"type":"string","description":"YYYY-MM; omit = the month after today"},"source":{"type":"string","enum":["whatsapp","chat"],"description":"where the manager handed it in: whatsapp when answering on WhatsApp, else chat"}},"required":["text"]}},{"name":"shiftConstraintNoteUpdate","group":"shifts","title":"Fix a saved constraint","description":"Another worker, another month, or the text; only the fields sent change.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":"note id from shiftConstraintNotesList"},"workerId":{"type":"string","description":"employee id"},"month":{"type":"string","description":"YYYY-MM"},"text":{"type":"string","description":""}},"required":["id"]}},{"name":"shiftConstraintNoteApply","group":"shifts","title":"Copy a saved constraint into the worker's month","description":"Appends the note's text to the worker's constraints for its month (what the planner reads, the same as shiftWorkerSetConstraints) and marks the note applied.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":"note id"}},"required":["id"]}},{"name":"shiftConstraintNotesDone","group":"shifts","title":"Finish the review of a month","description":"\"סיימתי\": every constraint of the month still waiting is marked reviewed. Returns count.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"month":{"type":"string","description":"month as YYYY-MM (closed or running)","pattern":"^\\d{4}-\\d{2}$"}},"required":["month"]}},{"name":"shiftConstraintNoteDelete","group":"shifts","title":"Delete a saved constraint","description":"Delete a saved constraint","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"id":{"type":"string","description":"note id"}},"required":["id"]}},{"name":"projectsList","group":"projects","title":"List projects","description":"The productions of a month (or all): income (billed to the client), expense (sum of worker payments), profit, invoice number, when the client paid. Shekels.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"month":{"type":"string","description":"YYYY-MM; \"\" = every month"}}}},{"name":"projectLinesList","group":"projects","title":"List project lines","description":"The lines of one project (projectId) or of a month: work lines (what was done, hours, amount billed) and worker lines (who was paid how much, paidAt, workerId).","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"projectId":{"type":"string","description":"one project; \"\" = by month"},"month":{"type":"string","description":"YYYY-MM when projectId is empty"}}}},{"name":"projectCreate","group":"projects","title":"Create a project","description":"Create a project","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"name":{"type":"string","description":"project / production name"},"month":{"type":"string","description":"month as YYYY-MM (closed or running)","pattern":"^\\d{4}-\\d{2}$"},"income":{"type":"number","description":"what the client is billed for the month, shekels"},"invoiceNo":{"type":"string","description":"invoice number to the client; \"\" = none yet"},"clientPaidAt":{"type":"string","description":"YYYY-MM-DD the client paid; \"\" = not yet"},"note":{"type":"string","description":""}},"required":["name","month"]}},{"name":"projectUpdate","group":"projects","title":"Update a project","description":"Only the fields sent change. Changing the month moves its lines with it.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":"project id"},"name":{"type":"string","description":"project / production name"},"month":{"type":"string","description":"month as YYYY-MM (closed or running)","pattern":"^\\d{4}-\\d{2}$"},"income":{"type":"number","description":"what the client is billed for the month, shekels"},"invoiceNo":{"type":"string","description":"invoice number to the client; \"\" = none yet"},"clientPaidAt":{"type":"string","description":"YYYY-MM-DD the client paid; \"\" = not yet"},"note":{"type":"string","description":""}},"required":["id"]}},{"name":"projectDelete","group":"projects","title":"Delete a project","description":"Removes the project with every line under it.","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"id":{"type":"string","description":""}},"required":["id"]}},{"name":"projectLineCreate","group":"projects","title":"Add a project line","description":"A work line (what was done, billed) or a worker payment. For a worker payment pass workerId from employeesList whenever the person is an employee; the name fills in by itself.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"projectId":{"type":"string","description":""},"kind":{"type":"string","enum":["work","worker"],"description":"work = a line of what was done (billed to the client); worker = a payment to one worker (the expense)"},"title":{"type":"string","description":"work: what was done; worker: the person's name (may be left out when workerId is given)"},"workerId":{"type":"string","description":"worker lines: the employee id from employeesList; \"\" = a free name"},"date":{"type":"string","description":"YYYY-MM-DD or \"\""},"hours":{"type":"number","description":"work lines: hours"},"amount":{"type":"number","description":"shekels: work = billed for this line, worker = paid to the worker"},"parking":{"type":"number","description":"work lines: parking, shekels"},"billed":{"type":"boolean","description":"work lines: already passed on to billing"},"paidAt":{"type":"string","description":"worker lines: YYYY-MM-DD the worker was paid; \"\" = not yet"},"note":{"type":"string","description":""}},"required":["projectId","kind","amount"]}},{"name":"projectLineUpdate","group":"projects","title":"Change a project line","description":"Only the fields sent change.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":"line id"},"kind":{"type":"string","enum":["work","worker"],"description":"work = a line of what was done (billed to the client); worker = a payment to one worker (the expense)"},"title":{"type":"string","description":"work: what was done; worker: the person's name (may be left out when workerId is given)"},"workerId":{"type":"string","description":"worker lines: the employee id from employeesList; \"\" = a free name"},"date":{"type":"string","description":"YYYY-MM-DD or \"\""},"hours":{"type":"number","description":"work lines: hours"},"amount":{"type":"number","description":"shekels: work = billed for this line, worker = paid to the worker"},"parking":{"type":"number","description":"work lines: parking, shekels"},"billed":{"type":"boolean","description":"work lines: already passed on to billing"},"paidAt":{"type":"string","description":"worker lines: YYYY-MM-DD the worker was paid; \"\" = not yet"},"note":{"type":"string","description":""}},"required":["id"]}},{"name":"projectLineDelete","group":"projects","title":"Delete a project line","description":"Delete a project line","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"id":{"type":"string","description":""}},"required":["id"]}},{"name":"slackConnectStart","group":"employees","title":"Start Slack consent","description":"Returns the Slack OAuth URL the user must open in a browser.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"origin":{"type":"string","description":"site origin the browser returns to after consent (default https://www.askpay.co)"},"returnView":{"type":"string","enum":["employees","integrations"],"description":"dashboard screen to return to"}}}},{"name":"slackStatus","group":"employees","title":"Slack status","description":"Slack status","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"slackDisconnect","group":"employees","title":"Disconnect Slack","description":"Disconnect Slack","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{}}},{"name":"slackListUsers","group":"employees","title":"List Slack users","description":"Workspace members, flagged when already imported.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"slackImportUsers","group":"employees","title":"Import Slack users as employees","description":"Import Slack users as employees","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","description":"Slack user id"},"description":""}},"required":["ids"]}},{"name":"listTeam","group":"team","title":"List team users","description":"Members with roles and pending invites.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"inviteMember","group":"team","title":"Invite a user","description":"Email an invite link (7 days). Admins only.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"email":{"type":"string","description":""},"role":{"type":"string","enum":["admin","user"],"description":""}},"required":["email","role"]}},{"name":"updateMemberRole","group":"team","title":"Change a user role","description":"Admins only.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"email":{"type":"string","description":""},"role":{"type":"string","enum":["admin","user"],"description":""}},"required":["email","role"]}},{"name":"removeMember","group":"team","title":"Remove a user","description":"Immediate lockout. Admins only.","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"email":{"type":"string","description":""}},"required":["email"]}},{"name":"revokeInvite","group":"team","title":"Revoke an invite","description":"Revoke an invite","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"inviteId":{"type":"string","description":""}},"required":["inviteId"]}},{"name":"resendInvite","group":"team","title":"Resend an invite","description":"The old link is revoked and a fresh 7-day link is emailed.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"inviteId":{"type":"string","description":""}},"required":["inviteId"]}},{"name":"listSignupDocs","group":"documents","title":"List filled documents","description":"Supplier onboarding forms uploaded for AI filling, with download ids.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"analyzeSignupDoc","group":"documents","title":"Analyze a form","description":"Upload a PDF/DOCX form; the AI finds the blanks and suggests values from the business profile. Pass docId alone to re-analyze a stored one.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"fileName":{"type":"string","description":""},"mimeType":{"type":"string","description":""},"dataBase64":{"type":"string","description":""},"docId":{"type":"string","description":"re-analyze this stored document"}}}},{"name":"generateSignupDoc","group":"documents","title":"Fill a form","description":"Write the reviewed values (plus signature / stamp / initials) into the document and return the filled file id.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"docId":{"type":"string","description":""},"fields":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","description":""},"value":{"type":"string","description":""},"kind":{"type":"string","enum":["text","date","signature","stamp","checkbox"],"description":""},"page":{"type":"integer","description":"PDF page, 0-based"},"box":{"type":"array","items":{"type":"number","description":""},"description":"[ymin,xmin,ymax,xmax] 0-1000"}},"required":["label","value","kind"]},"description":"the fields from analyzeSignupDoc with final values"},"withSignature":{"type":"boolean","description":""},"withStamp":{"type":"boolean","description":""},"withInitials":{"type":"boolean","description":"PDF only"}},"required":["docId","fields","withSignature","withStamp"]}},{"name":"getSignupDocFields","group":"documents","title":"Get stored form fields","description":"Get stored form fields","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"docId":{"type":"string","description":""}},"required":["docId"]}},{"name":"deleteSignupDoc","group":"documents","title":"Delete a document","description":"Delete a document","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"docId":{"type":"string","description":""}},"required":["docId"]}},{"name":"accountantFoldersList","group":"accountant","title":"List accountant folders","description":"The smart folder tree for the accountant; each folder has a source rule (invoices / statements / proofs / signed) or none.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"accFolderCreate","group":"accountant","title":"Create an accountant folder","description":"Create an accountant folder","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"name":{"type":"string","description":""},"parentId":{"type":"string","description":"\"\" = top level"},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["invoices","statements","cards","bank","proofs","signed"],"description":"what the folder collects"},"folderIds":{"type":"array","items":{"type":"string","description":""},"description":"invoices: only these invoice folders (empty = all)"},"payMethods":{"type":"array","items":{"type":"string","enum":["card","paypal","bank_transfer","cash","check","other","unknown"],"description":""},"description":"invoices: only these pay methods (empty = all)"},"accountIds":{"type":"array","items":{"type":"string","description":""},"description":"statements / cards / bank: only these statement accounts, cards or bank accounts (empty = all)"}},"required":["kind"],"description":"the source rule of an accountant folder; null = a plain folder"}},"required":["name"]}},{"name":"accFolderRename","group":"accountant","title":"Rename an accountant folder","description":"Rename an accountant folder","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":""},"name":{"type":"string","description":""}},"required":["id","name"]}},{"name":"accFolderSetSource","group":"accountant","title":"Set a folder source","description":"Send source null for a plain folder.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":""},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["invoices","statements","cards","bank","proofs","signed"],"description":"what the folder collects"},"folderIds":{"type":"array","items":{"type":"string","description":""},"description":"invoices: only these invoice folders (empty = all)"},"payMethods":{"type":"array","items":{"type":"string","enum":["card","paypal","bank_transfer","cash","check","other","unknown"],"description":""},"description":"invoices: only these pay methods (empty = all)"},"accountIds":{"type":"array","items":{"type":"string","description":""},"description":"statements / cards / bank: only these statement accounts, cards or bank accounts (empty = all)"}},"required":["kind"],"description":"the source rule of an accountant folder; null = a plain folder"}},"required":["id"]}},{"name":"accFolderMove","group":"accountant","title":"Move an accountant folder","description":"Move an accountant folder","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"id":{"type":"string","description":""},"parentId":{"type":"string","description":"\"\" = top level"}},"required":["id","parentId"]}},{"name":"accFolderDelete","group":"accountant","title":"Delete an accountant folder","description":"Removes the folder and everything below it (files are never stored there, nothing else is lost).","readOnly":false,"dangerous":true,"input":{"type":"object","properties":{"id":{"type":"string","description":""}},"required":["id"]}},{"name":"accFolderTemplate","group":"accountant","title":"Build the recommended tree","description":"Create the recommended folders from what the business has; adds only what is missing.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"accFolderSync","group":"accountant","title":"Sync with the invoice folders","description":"Runs the template, then makes the חשבוניות folder an exact copy of the invoice folders: same names, same nesting; renamed ones are renamed, deleted ones removed when empty. Hand-made folders stay.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{}}},{"name":"accZip","group":"accountant","title":"ZIP for the accountant","description":"The whole tree (or one folder down) as one ZIP, optionally limited to a range of months. Returns a download URL.","readOnly":false,"dangerous":false,"input":{"type":"object","properties":{"folderId":{"type":"string","description":"one folder; omit for the whole tree"},"from":{"type":"string","description":"YYYY-MM"},"to":{"type":"string","description":"YYYY-MM"}}}},{"name":"listActivity","group":"activity","title":"List activity","description":"יומן פעילות, newest first, 60 per page; pass before = the `at` of the last row to page on.","readOnly":true,"dangerous":false,"input":{"type":"object","properties":{"before":{"type":"integer","description":"unix millis of the last row seen"}}}}]}