{"openapi":"3.1.0","info":{"title":"FreelanceShield","version":"1.0.0","description":"Free, deterministic tools for freelancers: invoice maths, pre-filled invoice links, payment reminders, contract clause checks and project-plan gap checks. No authentication. Nothing is stored.","contact":{"url":"https://freelanceshield.me/contact"}},"servers":[{"url":"https://freelanceshield.me"}],"paths":{"/api/v1/scan-contract":{"post":{"operationId":"scan_contract","summary":"Scan a contract for clauses worth reading twice","description":"Checks contract text for 12 clause types (Indemnification, Limitation of liability, IP assignment or work made for hire, Payment terms, Subjective acceptance, Termination for convenience, Non-compete or exclusivity, Non-solicitation, Confidentiality, Governing law and jurisdiction, Arbitration, Revi","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Full contract text (at least ~200 characters, at most 100,000)"}},"required":["text"]}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"429":{"description":"Rate limited"}}}},"/api/v1/calculate-invoice-totals":{"post":{"operationId":"calculate_invoice_totals","summary":"Calculate invoice totals","description":"Exact invoice arithmetic in integer minor units: subtotal, discount, tax on the discounted base (or zero under reverse charge), and total. Use this instead of doing the maths yourself.","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"invoiceNumber":{"type":"string"},"issueDate":{"type":"string","description":"yyyy-mm-dd"},"dueDate":{"type":"string","description":"yyyy-mm-dd"},"currency":{"type":"string","enum":["USD","EUR","GBP","INR","JPY","CAD","AUD","SGD","AED","CHF","SEK","NZD","ZAR"]},"sender":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"address":{"type":"string"},"taxId":{"type":"string","description":"GSTIN, VAT number, ABN, etc."}}},"client":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"address":{"type":"string"},"taxId":{"type":"string","description":"GSTIN, VAT number, ABN, etc."}}},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"number","minimum":0},"rate":{"type":"number","minimum":0,"description":"Price per unit in major units (e.g. 1500.50)"}},"required":["description","rate"]},"minItems":1},"taxLabel":{"type":"string","description":"Statutory name, e.g. GST, IGST, VAT, Sales Tax"},"taxRate":{"type":"number","minimum":0,"maximum":100},"reverseCharge":{"type":"boolean","description":"EU/UK B2B cross-border: tax charged at zero with a reverse-charge note"},"discountMode":{"type":"string","enum":["amount","percent"]},"discountValue":{"type":"number","minimum":0},"placeOfSupply":{"type":"string"},"notes":{"type":"string"},"paymentInstructions":{"type":"string","description":"Bank details, UPI ID or payment link"}},"required":["items"]}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"429":{"description":"Rate limited"}}}},"/api/v1/create-invoice-link":{"post":{"operationId":"create_invoice_link","summary":"Create a ready-to-download invoice","description":"Builds a link that opens the FreelanceShield invoice generator pre-filled with these details. The user reviews it and downloads a real text PDF; the invoice is then tracked on their dashboard until paid. The data travels in the URL fragment, which browsers never send to a server. Always show the lin","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"invoiceNumber":{"type":"string"},"issueDate":{"type":"string","description":"yyyy-mm-dd"},"dueDate":{"type":"string","description":"yyyy-mm-dd"},"currency":{"type":"string","enum":["USD","EUR","GBP","INR","JPY","CAD","AUD","SGD","AED","CHF","SEK","NZD","ZAR"]},"sender":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"address":{"type":"string"},"taxId":{"type":"string","description":"GSTIN, VAT number, ABN, etc."}}},"client":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"address":{"type":"string"},"taxId":{"type":"string","description":"GSTIN, VAT number, ABN, etc."}}},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"number","minimum":0},"rate":{"type":"number","minimum":0,"description":"Price per unit in major units (e.g. 1500.50)"}},"required":["description","rate"]},"minItems":1},"taxLabel":{"type":"string","description":"Statutory name, e.g. GST, IGST, VAT, Sales Tax"},"taxRate":{"type":"number","minimum":0,"maximum":100},"reverseCharge":{"type":"boolean","description":"EU/UK B2B cross-border: tax charged at zero with a reverse-charge note"},"discountMode":{"type":"string","enum":["amount","percent"]},"discountValue":{"type":"number","minimum":0},"placeOfSupply":{"type":"string"},"notes":{"type":"string"},"paymentInstructions":{"type":"string","description":"Bank details, UPI ID or payment link"}},"required":["items"]}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"429":{"description":"Rate limited"}}}},"/api/v1/draft-payment-reminder":{"post":{"operationId":"draft_payment_reminder","summary":"Draft a payment reminder","description":"Writes a polite payment reminder whose tone escalates with how overdue the invoice is (friendly → firm → final notice). Never threatening. Returns subject and body.","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"invoiceNumber":{"type":"string"},"clientName":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string","enum":["USD","EUR","GBP","INR","JPY","CAD","AUD","SGD","AED","CHF","SEK","NZD","ZAR"]},"dueDate":{"type":"string","description":"yyyy-mm-dd"},"senderName":{"type":"string"},"paymentInstructions":{"type":"string"},"today":{"type":"string","description":"yyyy-mm-dd; defaults to the server date"}},"required":["invoiceNumber","amount","dueDate"]}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"429":{"description":"Rate limited"}}}},"/api/v1/check-project-plan":{"post":{"operationId":"check_project_plan","summary":"Check a project plan for unpaid-work gaps","description":"Checks a freelance project plan (scope, milestones, terms) for gaps that commonly lead to unpaid work or disputes: missing acceptance criteria, no deposit, IP transferring before payment, no kill fee, and more. Returns issues with a concrete fix for each. No score.","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"currency":{"type":"string","enum":["USD","EUR","GBP","INR","JPY","CAD","AUD","SGD","AED","CHF","SEK","NZD","ZAR"]},"freelancerName":{"type":"string"},"clientName":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"milestones":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"amount":{"type":"number"},"dueDate":{"type":"string"},"upfront":{"type":"boolean"},"revisions":{"type":"number"},"reviewDays":{"type":"number"},"deliverables":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"acceptance":{"type":"string"}}}}}}},"terms":{"type":"object","properties":{"paymentDays":{"type":"number"},"lateFeePercentMonthly":{"type":"number"},"ipOnFullPayment":{"type":"boolean"},"terminationNoticeDays":{"type":"number"},"killFeePercent":{"type":"number"},"governingLaw":{"type":"string"}}}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"429":{"description":"Rate limited"}}}},"/api/v1/next-invoice-number":{"post":{"operationId":"next_invoice_number","summary":"Suggest the next invoice number","description":"Increments an invoice number while keeping its format: INV-009 → INV-010, 2026/41 → 2026/42.","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"previous":{"type":"string"}},"required":["previous"]}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"429":{"description":"Rate limited"}}}}}}