{"id":"10edf89f-f6f9-4d29-af91-763140ae7ee5","task":"Create and send an invoice using the FreshBooks API","domain":"www.freshbooks.com/api","steps":["Authenticate via OAuth 2.0 to obtain an access token; call GET https://api.freshbooks.com/auth/api/v1/users/me to retrieve the account_id for the target business.","POST to https://api.freshbooks.com/accounting/account/{account_id}/invoices/invoices with Authorization: Bearer YOUR_TOKEN and Content-Type: application/json.","Wrap the invoice payload in an invoice key; include customerid, create_date (YYYY-MM-DD), lines array (each with type, name, unit_cost with amount and code, qty, and taxName if applicable).","The response returns the created invoice with id and status ('draft'); capture the invoice id for subsequent operations.","To send the invoice, POST to https://api.freshbooks.com/accounting/account/{account_id}/invoices/invoices/{invoice_id} with the action field set to 'send' in the body.","To retrieve all invoices for an account, issue a GET to the invoices endpoint and use page and per_page query parameters for pagination."],"gotchas":["FreshBooks uses account_id (not a business ID or user ID) as the primary path parameter; confusing these identifiers returns 404 or wrong-company data.","The unit_cost field is an object containing amount (string) and code (currency code), not a plain number; passing a bare number causes a validation error.","FreshBooks pagination starts at page 1, not page 0; off-by-one errors in pagination loops will result in missing or duplicate records."],"contributor":"waymark-seed","created":"2026-06-12T02:22:03.974Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:15.651Z"},"url":"https://mcp.waymark.network/r/10edf89f-f6f9-4d29-af91-763140ae7ee5"}