{"openapi":"3.1.0","info":{"title":"Keep","version":"1.0.0","description":"APIs for Keep, PayMe's accounting product: partners create and manage sellers, income documents, expenses, and tax and VAT balances, authenticating with OAuth 2.0 client credentials."},"servers":[{"url":"https://sandbox.payme.io/api","description":"Sandbox"},{"url":"https://live.payme.io/api","description":"Production"}],"paths":{"/seller/api/documents/income":{"get":{"security":[{"bearerAuth":[]}],"operationId":"listsellerincomedocuments","summary":"List income documents","tags":["Seller API"],"description":"Retrieve a list of income documents for the authenticated seller.","parameters":[{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Items per page","schema":{"type":"integer"}},{"name":"docType","in":"query","required":false,"description":"Filter by document type","schema":{"type":"string"}},{"name":"fromDate","in":"query","required":false,"description":"Filter documents from this date","schema":{"type":"string"}},{"name":"toDate","in":"query","required":false,"description":"Filter documents until this date","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"docType":{"type":"string"},"docNumber":{"type":"string","description":"Document number"},"docRegulationNumber":{"type":"string","description":"Tax authority regulation number"},"valueDate":{"type":"string"},"dueDate":{"type":"string"},"client":{"type":"object","properties":{"name":{"type":"string","description":"Client/customer name"},"email":{"type":"string","description":"Client email address"},"phone":{"type":"string","description":"Client phone number"},"socialId":{"type":"string","description":"Client's social/business ID number (ת.ז. / ח.פ.)"}}},"totalWithoutVat":{"type":"number"},"vatAmount":{"type":"number"},"totalAmount":{"type":"number"},"currency":{"type":"string"},"status":{"type":"string"},"url":{"type":"string","description":"Document download URL"},"createdAt":{"type":"string"}}}}}}}}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":400,"message":["Validation failed"],"error":"Bad Request"}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":401,"message":"Unauthorized","error":"Unauthorized"}}}}}},"post":{"security":[{"bearerAuth":[]}],"operationId":"createsellerincomedocument","summary":"Create income document","tags":["Seller API"],"description":"Create a new income document (invoice, receipt, deal, etc.) using the new invoicing service.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Document type"},"client":{"type":"object","properties":{"name":{"type":"string","description":"Client/customer name"},"email":{"type":"string","description":"Client email address"},"phone":{"type":"string","description":"Client phone number"},"socialId":{"type":"string","description":"Client's social/business ID number (ת.ז. / ח.פ.)"}},"required":["name"]},"currency":{"type":"string","description":"Document currency (currently only ILS supported)"},"docValueDate":{"type":"string","description":"Document value date"},"dueDate":{"type":"string","description":"Payment due date (required for invoice, deal, offer)"},"title":{"type":"string","description":"Document title (optional)"},"docLang":{"type":"string","description":"Document language"},"items":{"type":"array","description":"Document line items","items":{"type":"object","properties":{"name":{"type":"string","description":"Item name/description"},"quantity":{"type":"number","description":"Item quantity"},"itemNetPrice":{"type":"number","description":"Item net price (before VAT)"},"itemTotalPrice":{"type":"number","description":"Item total price (calculated)"},"itemSumNetTotalPrice":{"type":"number","description":"Item sum net total price (quantity * itemNetPrice)"},"itemCurrency":{"type":"string","description":"Item currency"},"isNoItemVat":{"type":"boolean","description":"VAT exempt flag (true = no VAT for this item)"}},"required":["name","quantity","itemNetPrice","itemCurrency"]}},"bankDetails":{"type":"object","description":"Bank account details for payment","properties":{"bankName":{"type":"string","description":"Bank name"},"branchNumber":{"type":"string","description":"Branch number"},"accountNumber":{"type":"string","description":"Account number"},"accountName":{"type":"string","description":"Account holder name"},"IBAN":{"type":"string","description":"IBAN number"}}},"subTotal":{"type":"number","description":"Subtotal before discount"},"discount":{"type":"number","description":"Discount amount"},"totalWithoutVatAmount":{"type":"number","description":"Total amount without VAT"},"vatAmount":{"type":"number","description":"VAT amount"},"totalAmount":{"type":"number","description":"Total amount including VAT"},"totalPaid":{"type":"number","description":"Total amount paid (required for receipts)"},"originTaxDeduction":{"type":"number","description":"Tax deduction at source (ניכוי מס במקור)"},"comment":{"type":"string","description":"Document comments/notes"},"paymentCash":{"type":"object","description":"Cash payment details","properties":{"date":{"type":"string","description":"Payment date"},"amount":{"type":"number","description":"Payment amount"}},"required":["date","amount"]},"paymentCreditCard":{"type":"object","description":"Credit card payment details","properties":{"date":{"type":"string","description":"Payment date"},"amount":{"type":"number","description":"Payment amount"},"last4Digits":{"type":"string","description":"Last 4 digits of card"}},"required":["date","amount"]},"paymentBankTransfer":{"type":"object","description":"Bank transfer payment details","properties":{"date":{"type":"string","description":"Payment date"},"amount":{"type":"number","description":"Payment amount"},"bankNumber":{"type":"integer","description":"Bank code"},"branchNumber":{"type":"integer","description":"Branch number"},"accountNumber":{"type":"integer","description":"Account number"}},"required":["date","amount"]},"paymentCheque":{"type":"object","description":"Cheque payment details","properties":{"date":{"type":"string","description":"Cheque date"},"receivedDate":{"type":"string","description":"Date cheque was received"},"amount":{"type":"number","description":"Payment amount"},"chequeNumber":{"type":"string","description":"Cheque number"},"bankNumber":{"type":"integer","description":"Bank code"},"branchNumber":{"type":"integer","description":"Branch number"},"accountNumber":{"type":"integer","description":"Account number"}},"required":["date","receivedDate","amount","chequeNumber"]},"paymentEWallet":{"type":"object","description":"E-wallet payment details (PayPal, Bit, etc.)","properties":{"date":{"type":"string","description":"Payment date"},"amount":{"type":"number","description":"Payment amount"},"walletType":{"type":"string","description":"E-wallet type"}},"required":["date","amount","walletType"]},"payment":{"type":"object","description":"Payment link settings (for invoice/deal)","properties":{"isEnabled":{"type":"boolean","description":"Enable payment link"},"clientEmail":{"type":"string","description":"Email to send payment link to"},"clientPhone":{"type":"string","description":"Phone to send payment link to"}}},"callbacks":{"type":"object","description":"Callback URLs for async notifications","properties":{"success":{"type":"array","description":"URLs to call on success"},"error":{"type":"array","description":"URLs to call on error"}}}},"required":["type","client","currency","docValueDate","docLang","items","totalAmount"]},"example":{"type":"invoice","client":{"name":"John Doe","email":"john@example.com","phone":"0500000002","socialId":"123456789"},"currency":"ILS","docValueDate":"2024-01-15","dueDate":"2024-02-15","docLang":"he","items":[{"name":"Consulting Service","quantity":1,"itemNetPrice":1000,"itemCurrency":"ILS","isNoItemVat":false}],"subTotal":1000,"totalWithoutVatAmount":1000,"vatAmount":170,"totalAmount":1170,"comment":"Thank you for your business"}}}},"responses":{"201":{"description":"Document created successfully","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Created document ID"},"url":{"type":"string","description":"URL to download/view the document"},"docRegulationNumber":{"type":"string","description":"Tax authority regulation number (מספר אסמכתא)"}}}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":400,"message":["Validation failed"],"error":"Bad Request"}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":401,"message":"Unauthorized","error":"Unauthorized"}}}}}}},"/seller/api/documents/income/{id}":{"get":{"security":[{"bearerAuth":[]}],"operationId":"getsellerincomedocument","summary":"Get income document","tags":["Seller API"],"description":"Retrieve a specific income document by ID.","parameters":[{"name":"id","in":"path","required":true,"description":"Document ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"docType":{"type":"string"},"docNumber":{"type":"string","description":"Document number"},"docRegulationNumber":{"type":"string","description":"Tax authority regulation number"},"valueDate":{"type":"string"},"dueDate":{"type":"string"},"client":{"type":"object","properties":{"name":{"type":"string","description":"Client/customer name"},"email":{"type":"string","description":"Client email address"},"phone":{"type":"string","description":"Client phone number"},"socialId":{"type":"string","description":"Client's social/business ID number (ת.ז. / ח.פ.)"}}},"totalWithoutVat":{"type":"number"},"vatAmount":{"type":"number"},"totalAmount":{"type":"number"},"currency":{"type":"string"},"status":{"type":"string"},"url":{"type":"string","description":"Document download URL"},"createdAt":{"type":"string"}}}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":401,"message":"Unauthorized","error":"Unauthorized"}}}},"404":{"description":"Not Found","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":404,"message":"Document not found","error":"Not Found"}}}}}}},"/seller/api/documents/income/{id}/cancel":{"post":{"security":[{"bearerAuth":[]}],"operationId":"cancelsellerincomedocument","summary":"Cancel income document","tags":["Seller API"],"description":"Cancel an existing income document. This will create a cancellation record.","parameters":[{"name":"id","in":"path","required":true,"description":"Document ID to cancel","schema":{"type":"string"}}],"responses":{"200":{"description":"Document cancelled successfully","x-response-kind":"success"},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":400,"message":["Validation failed"],"error":"Bad Request"}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":401,"message":"Unauthorized","error":"Unauthorized"}}}},"404":{"description":"Not Found","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":404,"message":"Document not found","error":"Not Found"}}}}}}},"/seller/api/documents/income/preview":{"post":{"security":[{"bearerAuth":[]}],"operationId":"previewsellerincomedocument","summary":"Generate document preview","tags":["Seller API"],"description":"Generate a preview of an income document without saving it.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Document type"},"client":{"type":"object","properties":{"name":{"type":"string","description":"Client/customer name"},"email":{"type":"string","description":"Client email address"},"phone":{"type":"string","description":"Client phone number"},"socialId":{"type":"string","description":"Client's social/business ID number (ת.ז. / ח.פ.)"}},"required":["name"]},"currency":{"type":"string","description":"Document currency (currently only ILS supported)"},"docValueDate":{"type":"string","description":"Document value date"},"dueDate":{"type":"string","description":"Payment due date (required for invoice, deal, offer)"},"title":{"type":"string","description":"Document title (optional)"},"docLang":{"type":"string","description":"Document language"},"items":{"type":"array","description":"Document line items","items":{"type":"object","properties":{"name":{"type":"string","description":"Item name/description"},"quantity":{"type":"number","description":"Item quantity"},"itemNetPrice":{"type":"number","description":"Item net price (before VAT)"},"itemTotalPrice":{"type":"number","description":"Item total price (calculated)"},"itemSumNetTotalPrice":{"type":"number","description":"Item sum net total price (quantity * itemNetPrice)"},"itemCurrency":{"type":"string","description":"Item currency"},"isNoItemVat":{"type":"boolean","description":"VAT exempt flag (true = no VAT for this item)"}},"required":["name","quantity","itemNetPrice","itemCurrency"]}},"bankDetails":{"type":"object","description":"Bank account details for payment","properties":{"bankName":{"type":"string","description":"Bank name"},"branchNumber":{"type":"string","description":"Branch number"},"accountNumber":{"type":"string","description":"Account number"},"accountName":{"type":"string","description":"Account holder name"},"IBAN":{"type":"string","description":"IBAN number"}}},"subTotal":{"type":"number","description":"Subtotal before discount"},"discount":{"type":"number","description":"Discount amount"},"totalWithoutVatAmount":{"type":"number","description":"Total amount without VAT"},"vatAmount":{"type":"number","description":"VAT amount"},"totalAmount":{"type":"number","description":"Total amount including VAT"},"totalPaid":{"type":"number","description":"Total amount paid (required for receipts)"},"originTaxDeduction":{"type":"number","description":"Tax deduction at source (ניכוי מס במקור)"},"comment":{"type":"string","description":"Document comments/notes"},"paymentCash":{"type":"object","description":"Cash payment details","properties":{"date":{"type":"string","description":"Payment date"},"amount":{"type":"number","description":"Payment amount"}},"required":["date","amount"]},"paymentCreditCard":{"type":"object","description":"Credit card payment details","properties":{"date":{"type":"string","description":"Payment date"},"amount":{"type":"number","description":"Payment amount"},"last4Digits":{"type":"string","description":"Last 4 digits of card"}},"required":["date","amount"]},"paymentBankTransfer":{"type":"object","description":"Bank transfer payment details","properties":{"date":{"type":"string","description":"Payment date"},"amount":{"type":"number","description":"Payment amount"},"bankNumber":{"type":"integer","description":"Bank code"},"branchNumber":{"type":"integer","description":"Branch number"},"accountNumber":{"type":"integer","description":"Account number"}},"required":["date","amount"]},"paymentCheque":{"type":"object","description":"Cheque payment details","properties":{"date":{"type":"string","description":"Cheque date"},"receivedDate":{"type":"string","description":"Date cheque was received"},"amount":{"type":"number","description":"Payment amount"},"chequeNumber":{"type":"string","description":"Cheque number"},"bankNumber":{"type":"integer","description":"Bank code"},"branchNumber":{"type":"integer","description":"Branch number"},"accountNumber":{"type":"integer","description":"Account number"}},"required":["date","receivedDate","amount","chequeNumber"]},"paymentEWallet":{"type":"object","description":"E-wallet payment details (PayPal, Bit, etc.)","properties":{"date":{"type":"string","description":"Payment date"},"amount":{"type":"number","description":"Payment amount"},"walletType":{"type":"string","description":"E-wallet type"}},"required":["date","amount","walletType"]},"payment":{"type":"object","description":"Payment link settings (for invoice/deal)","properties":{"isEnabled":{"type":"boolean","description":"Enable payment link"},"clientEmail":{"type":"string","description":"Email to send payment link to"},"clientPhone":{"type":"string","description":"Phone to send payment link to"}}},"callbacks":{"type":"object","description":"Callback URLs for async notifications","properties":{"success":{"type":"array","description":"URLs to call on success"},"error":{"type":"array","description":"URLs to call on error"}}}},"required":["type","client","currency","docValueDate","docLang","items","totalAmount"]}}}},"responses":{"200":{"description":"Preview generated successfully","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"previewUrl":{"type":"string","description":"URL to preview the document (temporary)"}}}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":400,"message":["Validation failed"],"error":"Bad Request"}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":401,"message":"Unauthorized","error":"Unauthorized"}}}}}}},"/oauth2/token":{"post":{"operationId":"gettoken","summary":"Obtain access token","tags":["Partners API"],"description":"Use this endpoint to obtain an access token using Client Credentials or to refresh an existing token.","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"grant_type":{"type":"string","description":"The grant type"},"scope":{"type":"string","description":"Space-separated scopes"},"client_id":{"type":"string","description":"Your client ID"},"client_secret":{"type":"string","description":"Your client secret"},"refresh_token":{"type":"string","description":"Required when grant_type is refresh_token"}},"required":["grant_type","client_id","client_secret"]},"example":{"grant_type":"client_credentials","scope":"partner-api","client_id":"your-client-id","client_secret":"your-client-secret"}}}},"responses":{"200":{"description":"Successful authentication","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"token_type":{"type":"string"},"access_token":{"type":"string","description":"JWT access token"},"refresh_token":{"type":"string","description":"Refresh token"},"expires_in":{"type":"integer","description":"Access token lifetime in seconds"},"refresh_expires_in":{"type":"integer","description":"Refresh token lifetime in seconds"},"scope":{"type":"string","description":"Granted scopes"}}}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}}}}}}}}},"/public/sellers/create":{"post":{"security":[{"bearerAuth":[]}],"operationId":"createseller","summary":"Create seller","tags":["Partners API"],"description":"Register a new seller account with Israeli business compliance validation. Includes validation for Israeli ID numbers, business registration, and bank account details.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":"string","description":"Seller's first name"},"lastName":{"type":"string","description":"Seller's last name"},"email":{"type":"string","description":"Seller's primary email address (used for login)"},"contactEmail":{"type":"string","description":"Business contact email address"},"password":{"type":"string","description":"Account password"},"phone":{"type":"string","description":"Phone number in international format"},"businessName":{"type":"string","description":"Legal business name"},"businessType":{"type":"integer","description":"Israeli business type classification"},"businessNumber":{"type":"string","description":"Israeli business registration number (ח.פ. / עוסק מורשה)"},"socialId":{"type":"string","description":"Israeli ID number (תעודת זהות)"},"industryClassification":{"type":"string","description":"Industry classification code (optional)"},"bankId":{"type":"string","description":"Israeli bank code (optional)"},"accountNumber":{"type":"string","description":"Bank account number (optional)"},"branchNumber":{"type":"string","description":"Bank branch number (optional)"},"logo":{"type":"string","description":"Business logo as base64 encoded data URI (optional)"}},"required":["firstName","lastName","email","password","phone","businessName","businessType","businessNumber","socialId"]},"example":{"firstName":"David","lastName":"Cohen","email":"david.cohen@example.com","contactEmail":"business@cohenelectronics.co.il","password":"securePassword123","phone":"0500000009","businessName":"Cohen Electronics Ltd","businessType":1,"businessNumber":"330988015","socialId":"336907282","industryClassification":"12","bankId":"12","accountNumber":"123456789012345","branchNumber":"123","logo":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."}}}},"responses":{"201":{"description":"Seller created successfully","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"object","properties":{"sellerId":{"type":"string","description":"Newly created seller's UUID"}}}}},"example":{"payload":{"sellerId":"9a5e7898-067e-4c0c-a50f-5f8d83e7c686"}}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":400,"message":["Validation failed"],"error":"Bad Request"}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"example":{"error":"unauthorized_client","error_description":"Client authentication failed"}}}}}}},"/public/sellers/{sellerId}":{"get":{"security":[{"bearerAuth":[]}],"operationId":"getsellerbyid","summary":"Get seller","tags":["Partners API"],"description":"Retrieve seller information by UUID. Returns seller details including business information and timestamps.","parameters":[{"name":"sellerId","in":"path","required":true,"description":"Seller UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Seller retrieved successfully","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"object","properties":{"id":{"type":"string","description":"Seller UUID"},"firstName":{"type":"string","description":"Seller's first name"},"lastName":{"type":"string","description":"Seller's last name"},"email":{"type":"string","description":"Primary email address"},"contactEmail":{"type":"string","description":"Business contact email"},"phone":{"type":"string","description":"Phone number"},"businessName":{"type":"string","description":"Legal business name"},"businessType":{"type":"integer","description":"Israeli business type classification"},"businessNumber":{"type":"string","description":"Israeli business registration number"},"socialId":{"type":"string","description":"Israeli ID number"},"createdAt":{"type":"string","description":"Account creation timestamp"},"updatedAt":{"type":"string","description":"Last update timestamp"}}}}},"example":{"payload":{"id":"97bdce55-b2a2-450d-8d29-1dcf6bbcc419","firstName":"David","lastName":"Cohen","email":"david.cohen@example.com","contactEmail":"business@cohenelectronics.co.il","phone":"0500000009","businessName":"Cohen Electronics Ltd","businessType":1,"businessNumber":"330988015","socialId":"336907282","createdAt":"2026-01-22T09:19:54.264Z","updatedAt":"2026-01-22T09:19:54.403Z"}}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":400,"message":["Validation failed"],"error":"Bad Request"}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"example":{"error":"unauthorized_client","error_description":"Client authentication failed"}}}},"404":{"description":"Seller not found","x-response-kind":"error"}}}},"/public/plans":{"get":{"security":[{"bearerAuth":[]}],"operationId":"getpartnerplans","summary":"Get available plans","tags":["Partners API"],"description":"Retrieve all available plans for the authenticated partner. Free trial and No Cost plans are excluded.","responses":{"200":{"description":"Plans retrieved successfully","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the plan"},"name":{"type":"string","description":"Display name of the plan"},"price":{"type":"number","description":"Plan price in the partner's currency"}}}}}}}},"example":{"payload":{"items":[{"id":"90abd0eb-c374-4a2b-829e-681fba0cdbee","name":"PaturBasic","price":39.9},{"id":"29b1f228-c779-4de3-bb99-aa8e34f29ddc","name":"PaturPremium","price":105},{"id":"3d653770-6376-40a5-b98e-17c598f1d7d8","name":"MursheBasic","price":39.9},{"id":"c2249657-fe98-49ae-950a-3bdf28cdbfee","name":"MurshePremium","price":228}]}}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"example":{"error":"unauthorized_client","error_description":"Client authentication failed"}}}}}}},"/public/expenses":{"get":{"security":[{"bearerAuth":[]}],"operationId":"listpublicexpenses","summary":"List expenses","tags":["Partners API"],"description":"Retrieve expense records for a seller with optional date filtering and pagination.\n\n**Seller identification:** Same rules as the upload endpoint — provide `sellerId` alone, or `socialId` + `email`.\n\n**Date filtering:** `valueDateStart` and `valueDateEnd` filter on the expense value date (not creation date). Dates must be ISO format (`YYYY-MM-DD`) and `valueDateStart` must be ≤ `valueDateEnd`.\n\n**Pagination:** Defaults to `page=0`, `limit=10`. Maximum `limit=500`.\n\nExpenses not found are silently omitted. Order of returned items is not guaranteed.","parameters":[{"name":"sellerId","in":"query","required":false,"description":"Seller UUID (use this OR socialId + email)","schema":{"type":"string"}},{"name":"socialId","in":"query","required":false,"description":"Seller social/business ID number (must be paired with email)","schema":{"type":"string"}},{"name":"email","in":"query","required":false,"description":"Seller email address (must be paired with socialId)","schema":{"type":"string"}},{"name":"valueDateStart","in":"query","required":false,"description":"Filter expenses from this value date (inclusive, YYYY-MM-DD)","schema":{"type":"string"}},{"name":"valueDateEnd","in":"query","required":false,"description":"Filter expenses up to this value date (inclusive, YYYY-MM-DD)","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number (zero-based)","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Items per page","schema":{"type":"integer"}}],"responses":{"200":{"description":"Expenses retrieved successfully","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"object","properties":{"total":{"type":"integer","description":"Total number of matching expenses"},"page":{"type":"integer","description":"Current page number"},"limit":{"type":"integer","description":"Items per page"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Expense record UUID"},"capturedDate":{"type":"string","description":"Timestamp when the expense was captured"},"valueDate":{"type":"string","description":"Expense value date"},"sellerId":{"type":"string","description":"Seller UUID"},"totalAmount":{"type":"number","description":"Total expense amount"},"vatAmount":{"type":"number","description":"VAT amount"},"currency":{"type":"string","description":"Currency code"},"bookkeeperRevisionStatus":{"type":"string","description":"Bookkeeper revision status"},"docRegulationId":{"type":"string","description":"Document regulation ID"},"docType":{"type":"string","description":"Document type"}}}}}}}},"example":{"payload":{"total":1,"page":0,"limit":10,"items":[{"id":"50c6b740-874a-4f54-9669-9a60024be4ed","capturedDate":"2024-06-20T09:35:36.326Z","valueDate":"2024-06-20T00:00:00.000Z","sellerId":"a6a9700f-8571-4f9b-bfae-ba943fb96982","totalAmount":15200,"vatAmount":2209,"currency":"ILS","bookkeeperRevisionStatus":"approved-and-classified","docRegulationId":"1262","docType":"invrec"}]}}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":400,"message":["Validation failed"],"error":"Bad Request"}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"example":{"error":"unauthorized_client","error_description":"Client authentication failed"}}}},"422":{"description":"Unprocessable Entity","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":422,"message":"Bad seller configuration. Please contact support!","error":"Unprocessable Entity"}}}}}},"post":{"security":[{"bearerAuth":[]}],"operationId":"uploadpublicexpense","summary":"Upload expense document","tags":["Partners API"],"description":"Upload an expense document for a seller via a publicly accessible file URL.\n\n**Seller identification:** Exactly one method must be used per request:\n- **Option A:** `sellerId` (UUID)\n- **Option B:** `socialId` + `email`\n\nProviding both or neither returns HTTP 400.\n\n**Supported file formats:** PDF, JPG, PNG.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sellerId":{"type":"string","description":"Seller UUID (use this OR socialId + email, not both)"},"socialId":{"type":"string","description":"Seller social/business ID number (must be paired with email)"},"email":{"type":"string","description":"Seller email address (must be paired with socialId)"},"file":{"type":"string","description":"Publicly accessible URL of the expense document (PDF, JPG, or PNG)"}},"required":["file"]},"example":{"sellerId":"a6a9700f-8571-4f9b-bfae-ba943fb96982","file":"https://i0.wp.com/avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/AK-3.png?ssl=1"}}}},"responses":{"200":{"description":"Expense document uploaded successfully","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the created expense record"},"capturedDate":{"type":"string","description":"Timestamp when the expense was captured"},"sellerId":{"type":"string","description":"Resolved seller UUID"}}}}},"example":{"payload":{"id":"a3504d9d-c187-48a0-8274-bea3b48e5663","capturedDate":"2026-02-02T13:05:54.170Z","sellerId":"a6a9700f-8571-4f9b-bfae-ba943fb96982"}}}}},"400":{"description":"Validation error","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":400,"message":["socialId must be a number conforming to the specified constraints","socialId should not be empty","email must be an email","email should not be empty","sellerId must be a UUID","sellerId should not be empty"],"error":"Bad Request"}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"example":{"error":"unauthorized_client","error_description":"Client authentication failed"}}}},"422":{"description":"Unprocessable entity — seller not resolved or file URL unreachable","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":422,"message":"Could not resolve seller","error":"Unprocessable Entity"}}}}}}},"/public/expenses/{expenseId}":{"patch":{"security":[{"bearerAuth":[]}],"operationId":"updatepublicexpense","summary":"Update expense","tags":["Partners API"],"description":"Partially update an existing expense document. Only expenses with `pending` status can be updated.\n\nThe partner can only update expenses within their own scope, and the expense must belong to the provided `sellerId`.\n\n**Immutable fields** (rejected if provided): `id`, `uid`, `partnerId`, `createdAt`, `updatedAt`, `updatedBy`, `seller`, `supplierSnapshot`, `vatReportSnapshot`, `isAbleToAutoApprove`, `status`.","parameters":[{"name":"expenseId","in":"path","required":true,"description":"Expense UUID to update","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sellerId":{"type":"string","description":"Seller UUID the expense belongs to"},"valueDate":{"type":"string","description":"Expense value date (ISO 8601 UTC)"},"totalAmount":{"type":"number","description":"Total expense amount"},"vatAmount":{"type":"number","description":"VAT amount (must be ≤ totalAmount)"},"currency":{"type":"string","description":"Currency code"},"captureMethod":{"type":"string","description":"How the expense was captured (e.g., 'manual')"},"docType":{"type":"string","description":"Document type"},"docRegulationId":{"type":"string","description":"Document regulation ID"},"docLocatorNumber":{"type":"string","description":"Document locator number"},"classification":{"type":"integer","description":"Classification ID (must be valid for seller/partner context)"},"deductibleIncomeTaxPercent":{"type":"integer","description":"Deductible income tax percentage (0–100)"},"deductibleVatPercent":{"type":"integer","description":"Deductible VAT percentage (0–100)"},"assetVatRefundPercent":{"type":"integer","description":"Asset VAT refund percentage (0–100)"},"comment":{"type":"string","description":"Optional partner note"},"supplierName":{"type":"string","description":"Supplier name"},"supplierVatId":{"type":"string","description":"Supplier VAT ID"},"vatAllocationNumber":{"type":"string","description":"VAT allocation number (nullable)"},"isExcludeFromPCN":{"type":"boolean","description":"Whether to exclude from PCN report"}}},"example":{"sellerId":"a6a9700f-8571-4f9b-bfae-ba943fb96982","valueDate":"2025-10-28T00:00:00.000Z","totalAmount":15000,"vatAmount":2288,"currency":"ILS","captureMethod":"manual","docType":"invrec","docRegulationId":"5132277","docLocatorNumber":"85712","classification":6,"deductibleIncomeTaxPercent":100,"deductibleVatPercent":100,"assetVatRefundPercent":0,"comment":"Optional partner note","supplierName":"Supplier Ltd","supplierVatId":"123456789","vatAllocationNumber":null,"isExcludeFromPCN":false}}}},"responses":{"200":{"description":"Expense updated successfully","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"0 for success"},"payload":{"type":"object","properties":{"expenseId":{"type":"string","description":"Expense UUID"},"sellerId":{"type":"string","description":"Seller UUID"},"valueDate":{"type":"string","description":"Expense value date"},"totalAmount":{"type":"number","description":"Total expense amount"},"vatAmount":{"type":"number","description":"VAT amount"},"currency":{"type":"string","description":"Currency code"},"docType":{"type":"string","description":"Document type"},"docRegulationId":{"type":"string","description":"Document regulation ID"},"docLocatorNumber":{"type":"string","description":"Document locator number"},"classification":{"type":"integer","description":"Classification ID"},"capturedDate":{"type":"string","description":"Timestamp when expense was captured"},"updatedAt":{"type":"string","description":"Last update timestamp"}}}}},"example":{"statusCode":0,"payload":{"expenseId":"edc855f7-cb7c-4d82-8c26-baf5c296d391","sellerId":"a6a9700f-8571-4f9b-bfae-ba943fb96982","valueDate":"2025-10-28T00:00:00.000Z","totalAmount":15000,"vatAmount":2288,"currency":"ILS","docType":"invrec","docRegulationId":"5132277","docLocatorNumber":"85712","classification":6,"capturedDate":"2025-10-28T09:13:37.423Z","updatedAt":"2025-10-28T09:16:33.795Z"}}}}},"400":{"description":"Validation error","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"1 for error"},"payload":{"type":"object","properties":{"message":{"type":"string","description":"Error message"},"additionalInfo":{"type":"object","description":"Field-level validation details"}}}}},"example":{"statusCode":1,"payload":{"message":"Invalid request","additionalInfo":{"valueDate":"Must be a valid ISO datetime","totalAmount":"Must be >= 0"}}}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"example":{"error":"unauthorized_client","error_description":"Client authentication failed"}}}},"403":{"description":"Partner is not authorized to update this expense","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"1 for error"},"payload":{"type":"object","properties":{"message":{"type":"string","description":"Error message"},"additionalInfo":{"type":"object","description":"Field-level validation details"}}}}},"example":{"statusCode":1,"payload":{"message":"Not allowed"}}}}},"404":{"description":"Expense or seller not found","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"1 for error"},"payload":{"type":"object","properties":{"message":{"type":"string","description":"Error message"},"additionalInfo":{"type":"object","description":"Field-level validation details"}}}}},"example":{"statusCode":1,"payload":{"message":"Expense not found"}}}}},"409":{"description":"Update conflict","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"1 for error"},"payload":{"type":"object","properties":{"message":{"type":"string","description":"Error message"},"additionalInfo":{"type":"object","description":"Field-level validation details"}}}}},"example":{"statusCode":1,"payload":{"message":"Update conflict"}}}}},"429":{"description":"Rate limit exceeded","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"1 for error"},"payload":{"type":"object","properties":{"message":{"type":"string","description":"Error message"},"additionalInfo":{"type":"object","description":"Field-level validation details"}}}}},"example":{"statusCode":1,"payload":{"message":"Rate limit exceeded"}}}}}}}},"/public/sellers/{sellerId}/update":{"put":{"security":[{"bearerAuth":[]}],"operationId":"updatesellerbyid","summary":"Update seller","tags":["Partners API"],"description":"Update existing seller details. Supports partial updates with Israeli compliance re-validation for modified fields.","parameters":[{"name":"sellerId","in":"path","required":true,"description":"Seller UUID","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":"string","description":"Seller's first name"},"lastName":{"type":"string","description":"Seller's last name"},"email":{"type":"string","description":"Primary email address"},"contactEmail":{"type":"string","description":"Business contact email"},"phone":{"type":"string","description":"Phone number in international format"},"businessName":{"type":"string","description":"Legal business name"},"businessType":{"type":"integer","description":"Israeli business type classification"},"businessNumber":{"type":"string","description":"Israeli business registration number"},"socialId":{"type":"string","description":"Israeli ID number"},"bankId":{"type":"string","description":"Israeli bank code"},"accountNumber":{"type":"string","description":"Bank account number"},"branchNumber":{"type":"string","description":"Bank branch number"},"logo":{"type":"string","description":"Business logo as base64 encoded data URI"}}},"example":{"firstName":"David","lastName":"Cohen","email":"david.cohen1115@example.com","contactEmail":"business@cohenelectronics.co.il","phone":"0500000008","businessName":"Cohen Electronics","businessType":2,"businessNumber":"330988015","socialId":"336907282","bankId":"12","accountNumber":"123456789012345","branchNumber":"123","logo":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."}}}},"responses":{"200":{"description":"Seller updated successfully","x-response-kind":"success","content":{"application/json":{"example":{}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":400,"message":["Validation failed"],"error":"Bad Request"}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"example":{"error":"unauthorized_client","error_description":"Client authentication failed"}}}},"404":{"description":"Seller not found","x-response-kind":"error"}}}},"/partner/api/sellers/external-urls":{"get":{"security":[{"bearerAuth":[]}],"operationId":"getsellerexternalurls","summary":"Get external URLs for seller","tags":["Partners API"],"description":"Retrieve external URLs for a seller by ID, social ID, or email","parameters":[{"name":"id","in":"query","required":false,"description":"Seller ID (MPL format)","schema":{"type":"string"}},{"name":"socialId","in":"query","required":false,"description":"Seller social/business ID number","schema":{"type":"string"}},{"name":"email","in":"query","required":false,"description":"Seller email address","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"creditCardUrl":{"type":"string"},"financeProfileUrl":{"type":"string"},"paymentsOnboardingUrl":{"type":"string"},"documentsUploadUrl":{"type":"string"}}}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":400,"message":["Validation failed"],"error":"Bad Request"}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"example":{"error":"unauthorized_client","error_description":"Client authentication failed"}}}}}}},"/partner/api/sellers/finance-profile":{"get":{"security":[{"bearerAuth":[]}],"operationId":"getsellerfinanceprofile","summary":"Get finance profile URL","tags":["Partners API"],"description":"Retrieve the finance profile URL for a seller","parameters":[{"name":"id","in":"query","required":false,"description":"Seller ID (MPL format)","schema":{"type":"string"}},{"name":"socialId","in":"query","required":false,"description":"Seller social/business ID number","schema":{"type":"string"}},{"name":"email","in":"query","required":false,"description":"Seller email address","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}}}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":400,"message":["Validation failed"],"error":"Bad Request"}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"example":{"error":"unauthorized_client","error_description":"Client authentication failed"}}}}}}},"/partner/api/sellers/set-plan":{"post":{"security":[{"bearerAuth":[]}],"operationId":"setsellerplan","summary":"Set seller billing plan","tags":["Partners API"],"description":"Assign a billing plan to a seller with payer-based activation flow.\n\n**Payer modes:**\n- `partner` — Plan is activated immediately (no credit card required).\n- `seller` — If the seller already has a credit card on file, the plan is activated immediately. If not, a credit card URL is returned and the plan activates once the seller completes payment.\n\n> **Note:** `callBackUrl` is not yet implemented and will be ignored.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sellerId":{"type":"string","description":"Seller identifier (UUID, MPL ID, email, or socialId)"},"planId":{"type":"string","description":"Plan identifier to assign"},"payer":{"type":"string","description":"Who pays for the plan. 'partner' = immediate activation, 'seller' = may require credit card."}},"required":["sellerId","planId","payer"]},"example":{"sellerId":"a6a9700f-8571-4f9b-bfae-ba943fb96982","planId":"3d653770-6376-40a5-b98e-17c598f1d7d8","payer":"partner"}}}},"responses":{"200":{"description":"Plan set successfully","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"object","properties":{"status":{"type":"string","description":"'activated' when plan is active immediately, 'pending' when seller must complete payment first."},"message":{"type":"string","description":"Human-readable message (present when status is 'pending')"},"creditCardUrl":{"type":"string","description":"URL for seller to submit credit card details (present when status is 'pending')"}}}}},"example":{"payload":{"status":"activated"}}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":400,"message":["Validation failed"],"error":"Bad Request"}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"example":{"error":"unauthorized_client","error_description":"Client authentication failed"}}}},"404":{"description":"Seller or plan not found","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":404,"message":"Seller not found","error":"Not Found"}}}},"422":{"description":"Unprocessable Entity","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":422,"message":"Bad seller configuration. Please contact support!","error":"Unprocessable Entity"}}}}}}},"/partner/api/sellers/comment":{"post":{"security":[{"bearerAuth":[]}],"operationId":"createsellercomment","summary":"Create seller comment","tags":["Partners API"],"description":"Add a comment to a seller's record","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sellerId":{"type":"string","description":"Seller ID"},"commentCategory":{"type":"string","description":"Comment category"},"commentText":{"type":"string","description":"Comment text"}},"required":["sellerId","commentText"]}}}},"responses":{"201":{"description":"Comment created successfully","x-response-kind":"success"},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":400,"message":["Validation failed"],"error":"Bad Request"}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"example":{"error":"unauthorized_client","error_description":"Client authentication failed"}}}}}}},"/partner/api/documents/income":{"get":{"security":[{"bearerAuth":[]}],"operationId":"listincomedocuments","summary":"List income documents","tags":["Partners API"],"description":"Retrieve a list of income documents for a seller","parameters":[{"name":"sellerPaymeId","in":"query","required":false,"description":"Seller PayMe ID","schema":{"type":"string"}},{"name":"sellerId","in":"query","required":false,"description":"Seller ID","schema":{"type":"string"}},{"name":"docNum","in":"query","required":false,"description":"Document number filter","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Items per page","schema":{"type":"integer"}}],"responses":{"200":{"description":"Successful response","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"docType":{"type":"string"},"docNumber":{"type":"string"},"valueDate":{"type":"string"},"totalAmount":{"type":"number"},"vatAmount":{"type":"number"},"currency":{"type":"string"},"status":{"type":"string"}}}}}}}}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":400,"message":["Validation failed"],"error":"Bad Request"}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"example":{"error":"unauthorized_client","error_description":"Client authentication failed"}}}}}}},"/partner/api/documents/income/manual":{"post":{"security":[{"bearerAuth":[]}],"operationId":"createmanualincomedocument","summary":"Create manual income document","tags":["Partners API"],"description":"Create a new income document manually","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"seller_email":{"type":"string","description":"Seller's email address"},"seller_social_id_number":{"type":"string","description":"Seller's social/business ID number"},"doc_type":{"type":"string","description":"Document type"},"value_date":{"type":"string","description":"Document value date"},"due_date":{"type":"string","description":"Payment due date (required for invoice, deal, offer)"},"currency":{"type":"string","description":"Document currency"},"doc_language":{"type":"string","description":"Document language"},"client_name":{"type":"string","description":"Client/customer name"},"client_email":{"type":"string","description":"Client email"},"client_phone":{"type":"string","description":"Client phone"},"items":{"type":"array","description":"Document line items","items":{"type":"object","properties":{"name":{"type":"string","description":"Item name"},"quantity":{"type":"number","description":"Item quantity"},"item_net_price":{"type":"number","description":"Item net price (before VAT)"},"item_currency":{"type":"string","description":"Item currency"},"item_total_price":{"type":"number","description":"Item total price"},"is_no_item_vat":{"type":"boolean","description":"VAT exempt flag (true = no VAT)"}},"required":["name","quantity","item_net_price","item_currency"]}},"total_amount":{"type":"number","description":"Total amount including VAT"},"vat_amount":{"type":"number","description":"VAT amount"},"total_without_vat":{"type":"number","description":"Total amount without VAT"},"discount":{"type":"number","description":"Discount amount"},"comment":{"type":"string","description":"Document comments"},"origin_tax_deduction":{"type":"number","description":"Tax deduction at source"},"callbacks":{"type":"object","description":"Callback URLs for async notifications","properties":{"success":{"type":"array","description":"URLs to call on success"},"error":{"type":"array","description":"URLs to call on error"}}},"payment_cash":{"type":"object","properties":{"date":{"type":"string","description":"Payment date"},"amount":{"type":"number","description":"Payment amount"}},"required":["date","amount"]},"payment_credit_card":{"type":"object","properties":{"date":{"type":"string","description":"Payment date"},"amount":{"type":"number","description":"Payment amount"},"last4Digits":{"type":"string","description":"Last 4 digits of card"}},"required":["date","amount"]},"payment_bank_transfer":{"type":"object","properties":{"date":{"type":"string","description":"Payment date"},"amount":{"type":"number","description":"Payment amount"},"bankNumber":{"type":"integer","description":"Bank code"},"branchNumber":{"type":"integer","description":"Branch number"},"accountNumber":{"type":"integer","description":"Account number"}},"required":["date","amount","accountNumber"]},"payment_cheque":{"type":"object","properties":{"date":{"type":"string","description":"Payment date"},"receivedDate":{"type":"string","description":"Cheque received date"},"amount":{"type":"number","description":"Payment amount"},"chequeNumber":{"type":"number","description":"Cheque number"},"bankNumber":{"type":"integer","description":"Bank code"},"branchNumber":{"type":"integer","description":"Branch number"},"accountNumber":{"type":"integer","description":"Account number"}},"required":["date","receivedDate","amount","chequeNumber"]}},"required":["doc_type","value_date","currency","doc_language","items","total_amount"]},"example":{"seller_email":"seller@example.com","seller_social_id_number":"123456789","doc_type":"deal","value_date":"2024-01-15 00:00:00","currency":"ILS","doc_language":"he","client_name":"John Doe","client_email":"john@example.com","items":[{"name":"Service","quantity":1,"item_net_price":1000,"item_currency":"ILS","is_no_item_vat":false}],"total_amount":1170,"vat_amount":170,"total_without_vat":1000}}}},"responses":{"201":{"description":"Document created","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Document ID"},"url":{"type":"string","description":"Document URL"}}}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":400,"message":["Validation failed"],"error":"Bad Request"}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"example":{"error":"unauthorized_client","error_description":"Client authentication failed"}}}}}}},"/partner/api/tax-authority/setup":{"post":{"security":[{"bearerAuth":[]}],"operationId":"setuptaxauthority","summary":"Setup tax authority for seller","tags":["Partners API"],"description":"Configure tax authority integration for a seller","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"seller_email":{"type":"string","description":"Seller email"},"seller_id_number":{"type":"string","description":"Seller ID number"},"osek_type":{"type":"string","description":"Business type (osek)"},"file_name":{"type":"string","description":"Authorization file name"},"file_path":{"type":"string","description":"Authorization file path"}},"required":["seller_email","seller_id_number","osek_type"]}}}},"responses":{"200":{"description":"Tax authority setup successful","x-response-kind":"success"},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":400,"message":["Validation failed"],"error":"Bad Request"}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"example":{"error":"unauthorized_client","error_description":"Client authentication failed"}}}}}}},"/partner/api/sellers/vat-balance":{"post":{"security":[{"bearerAuth":[]}],"operationId":"setvatbalance","summary":"Set VAT balance","tags":["Partners API"],"description":"Set VAT balance for a seller","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"socialId":{"type":"string","description":"Seller social ID"},"email":{"type":"string","description":"Seller email"},"id":{"type":"string","description":"Seller ID"},"balance":{"type":"number","description":"Balance amount"},"reportingYear":{"type":"integer","description":"Reporting year"},"reportingMonth":{"type":"integer","description":"Reporting month"}},"required":["balance"]}}}},"responses":{"200":{"description":"VAT balance updated","x-response-kind":"success"},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":400,"message":["Validation failed"],"error":"Bad Request"}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"example":{"error":"unauthorized_client","error_description":"Client authentication failed"}}}}}}},"/partner/api/sellers/tax-balance":{"post":{"security":[{"bearerAuth":[]}],"operationId":"settaxbalance","summary":"Set tax balance","tags":["Partners API"],"description":"Set tax balance for a seller","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"socialId":{"type":"string","description":"Seller social ID"},"email":{"type":"string","description":"Seller email"},"id":{"type":"string","description":"Seller ID"},"balance":{"type":"number","description":"Balance amount"},"reportingYear":{"type":"integer","description":"Reporting year"},"reportingMonth":{"type":"integer","description":"Reporting month"}},"required":["balance"]}}}},"responses":{"200":{"description":"Tax balance updated","x-response-kind":"success"},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":400,"message":["Validation failed"],"error":"Bad Request"}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"example":{"error":"unauthorized_client","error_description":"Client authentication failed"}}}}}}},"/partner/api/statistic/checkpoints":{"get":{"security":[{"bearerAuth":[]}],"operationId":"getcheckpoints","summary":"Get financial checkpoints","tags":["Partners API"],"description":"Retrieve financial checkpoints for a seller","parameters":[{"name":"socialId","in":"query","required":true,"description":"Seller social/business ID","schema":{"type":"string"}},{"name":"reportingYear","in":"query","required":true,"description":"Reporting year","schema":{"type":"integer"}},{"name":"reportingMonths","in":"query","required":false,"description":"Reporting months array","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"checkpoints":{"type":"array"}}}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":400,"message":["Validation failed"],"error":"Bad Request"}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"example":{"error":"unauthorized_client","error_description":"Client authentication failed"}}}}}}},"/partner/api/statistic/tax-predictions":{"get":{"security":[{"bearerAuth":[]}],"operationId":"gettaxpredictions","summary":"Get tax predictions","tags":["Partners API"],"description":"Retrieve tax predictions for a seller","parameters":[{"name":"socialId","in":"query","required":true,"description":"Seller social/business ID","schema":{"type":"string"}},{"name":"reportingYear","in":"query","required":true,"description":"Reporting year","schema":{"type":"integer"}},{"name":"reportingMonths","in":"query","required":false,"description":"Reporting months array","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"predictions":{"type":"array","items":{"type":"object","properties":{"reportingYear":{"type":"string"},"reportingMonth":{"type":"string"},"totalIncomesWithoutVat":{"type":"number"},"totalIncomesOriginTaxDeduction":{"type":"number"},"totalDeductibleExpenses":{"type":"number"},"yearlyPredictedProfit":{"type":"number"},"predictedTaxAmount":{"type":"number"},"paychecksPredictedSalary":{"type":"number"},"paychecksPredictedTax":{"type":"number"},"refundPointsValue":{"type":"number"},"predictedTaxRateADV":{"type":"number"}}}}}}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Error message(s)"},"error":{"type":"string","description":"Error type"}}},"example":{"statusCode":400,"message":["Validation failed"],"error":"Bad Request"}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"example":{"error":"unauthorized_client","error_description":"Client authentication failed"}}}}}}}},"tags":[{"name":"Seller API"},{"name":"Partners API"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}}}