{"uid":"cap_f6t6KenQzfrHjBIWEwm2k","slug":"paidpilot-timesheet-to-invoice-converter-f2a6b6a8","name":"PaidPilot Timesheet-to-Invoice Converter","description":"PaidPilot Invoice API: Timesheet to invoice JSON. Time entries (hours x rate, optional per-entry rounding, grouping by description, expenses, tax, terms) become a validated invoice JSON with totals, ready to POST to /v1/invoice.pdf for the PDF.","url":"https://api.paidpilot.io/v1/invoice-from-timesheet?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"buyer":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":120,"minLength":1},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","maxLength":254},"phone":{"type":"string","maxLength":40},"tax_id":{"type":"string","maxLength":60},"address":{"type":"string","maxLength":400}}},"notes":{"type":"string","maxLength":2000},"terms":{"type":"string","maxLength":40,"minLength":1,"description":"e.g. \"Net 15\"; sets due_date from issue_date (early-pay discounts are not applied to the invoice)"},"seller":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":120,"minLength":1},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","maxLength":254},"phone":{"type":"string","maxLength":40},"tax_id":{"type":"string","maxLength":60},"address":{"type":"string","maxLength":400}}},"entries":{"type":"array","items":{"type":"object","required":["description","hours"],"properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"rate":{"type":"number","maximum":1000000,"minimum":0},"hours":{"type":"number","maximum":1000,"exclusiveMinimum":0},"description":{"type":"string","maxLength":250,"minLength":1}},"additionalProperties":false},"maxItems":500,"minItems":1},"currency":{"type":"string","default":"USD"},"discount":{"type":"number","maximum":1000000000,"minimum":0},"due_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD; or give terms instead"},"expenses":{"type":"array","items":{"type":"object","required":["description","amount"],"properties":{"amount":{"type":"number","maximum":1000000000,"minimum":0},"description":{"type":"string","maxLength":250,"minLength":1}},"additionalProperties":false},"maxItems":100,"description":"Reimbursable expenses, one line each"},"group_by":{"enum":["entry","description"],"type":"string","default":"entry","description":"entry = one line per entry; description = merge entries with the same description and rate"},"rounding":{"type":"object","required":["increment_minutes"],"properties":{"mode":{"enum":["up","nearest"],"type":"string","default":"up"},"increment_minutes":{"anyOf":[{"type":"number","const":1},{"type":"number","const":5},{"type":"number","const":6},{"type":"number","const":10},{"type":"number","const":15},{"type":"number","const":30},{"type":"number","const":60}],"description":"Round each entry to this many minutes"}},"additionalProperties":false},"tax_rate":{"type":"number","maximum":100,"minimum":0},"issue_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"default_rate":{"type":"number","maximum":1000000,"minimum":0,"description":"Hourly rate for entries without their own rate"},"invoice_number":{"type":"string","maxLength":64,"minLength":1},"payment_instructions":{"type":"string","maxLength":1000}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_hAymTHqVDPCjmMLRgLXU7","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts timesheet entries (hours, rates, expenses) into a validated invoice JSON with computed totals, ready to render as a PDF.","exampleAgentPrompt":"Turn my timesheet into a validated invoice JSON: I'm Jane Doe Consulting (jane@janedoe.com), billing Acme Corp (acme@acmecorp.com) for 8 hours of 'Backend API development' at $150/hr on 2024-06-03, plus a $50 software expense — Net 30 terms, USD.","exampleUseCases":[{"title":"Freelancer weekly invoice from timesheet","prompt":"I need to invoice my client GlobalTech Inc for this week's work — 6 hours of 'UI design mockups' at $120/hr on June 2nd and 4 hours of 'Design revisions' at $120/hr on June 4th. My name is Sarah Park (sarah@sarahpark.design), client email is billing@globaltech.com, payment terms Net 15, USD. Generate the invoice JSON for me."},{"title":"Agency multi-entry timesheet billing","prompt":"Convert our agency's timesheet to invoice JSON for client Bright Brand Co. Seller is Pixel Agency (accounts@pixelagency.com). Entries: 10 hours 'Brand strategy' at $200/hr on 2024-06-01, 5 hours 'Copywriting' at $100/hr on 2024-06-03, and a $300 stock photography expense. Apply Net 30 terms and currency USD."},{"title":"Consultant invoice with discount and tax","prompt":"Build an invoice from my timesheet: I'm Marcus Webb (marcus@webbconsult.com), billing DataCore Ltd (finance@datacore.com) for 12 hours of 'Data pipeline architecture' at $175/hr on 2024-05-28 and 3 hours of 'Documentation' at $100/hr on 2024-05-29. Add a $200 travel expense, a $150 discount, and set terms to Net 45 in USD."}],"resultDescription":"Returns a validated invoice JSON object containing structured line items with per-entry totals, subtotal, expense breakdown, discount applied, tax amount, grand total, computed due date from terms, buyer/seller details, currency, and notes — formatted and ready to POST to /v1/invoice.pdf for PDF rendering.","failureModes":["Missing required 'entries' array or empty entries array returns validation error","Hours value of 0 or negative rejected (exclusiveMinimum: 0)","Invalid email format for buyer or seller returns schema validation error","Invalid date format (non YYYY-MM-DD) in entries or due_date rejected","Conflicting due_date and terms fields may produce unexpected due date","Rate or amount exceeding maximum bounds returns validation error","More than 500 time entries or 100 expenses triggers maxItems error","Missing seller.name or buyer.name (required fields) returns error"],"whenToPreferThis":"Choose this endpoint when you have raw timesheet data (hours, rates, descriptions) that needs to be aggregated, validated, and structured into a complete invoice JSON before PDF generation. It is the right choice when billing logic — totals, due dates from terms, expenses, discounts — needs to be computed automatically rather than manually. Prefer it over a generic invoice builder when input is time-based entries rather than fixed line items.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T12:30:19.357Z","isFirstParty":false,"canonicalSlug":"paidpilot-timesheet-to-invoice-converter-f2a6b6a8"}