Create invoice
documentedCreate a new invoice.
POST /invoiceInvoiceno 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.servicetrade.com/api/invoice" \
-X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Cookie: PHPSESSID={{SERVICETRADE_SECRET}}" \
-d '{"type":"invoice","status":"ok","substatus":"sales_approved","jobId":{{$job_id}},"items":[{"description":"{{$item1_description}}","serviceLineId":{{$item1_serviceLineId}},"quantity":{{$item1_quantity}},"price":{{$item1_price}}},{"libItemId":{{$item2_libItemId}},"quantity":{{$item2_quantity}},"serviceRequestId":{{$item2_serviceRequestId}}}]}'