The Spire API allows an existing sales order to be invoiced. This automatically generates the invoice, post the General Ledger Journal entry, and updates all the other relevant parts of company data (e.g. inventory quantities, customer Receivables, etc).
Assume we have an order with the ID "1", and it's located in a company called "SuperCo".
Send a POST to the following endpoint;
Note that this will take the same steps the Spire desktop application will take to invoice. Accordingly, you should make sure inventory commitment, pricing and other order attributes are correct before executing this command.