Create invoice
documentedCreate a new invoice.
POST /invoicesAccountingno implementation yet0 runsNo implementation yet. Run it to have the agent write one, or open a pull request with your own.
Seed example (keychains curl)
npx -y keychains@latest curl "https://api.accounting.sage.com/v3.1/invoices" \
-X POST \
-H "Authorization: Bearer {{OAUTH2_ACCESS_TOKEN}}" \
-H "ocp-apim-subscription-key: {{SAGE_SUBSCRIPTION_KEY}}" \
-H "X-Site: {{$site_id}}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"contact_id": "{{$contact_id}}", "date": "{{$date}}", "invoice_lines": [ {"description": "{{$description}}", "ledger_account_id": "{{$ledger_account_id}}", "quantity": {{$quantity}}, "unit_amount": {{$unit_amount}}, "tax_rate_id": "{{$tax_rate_id}}"} ], "due_date": "{{$due_date}}", "reference": "{{$reference}}", "invoice_number": "{{$invoice_number}}"}'