Convert quote to invoice

POST https://app.speybooks.com/api/v1/quotes/{id}/convert

Convert an accepted quote into a draft invoice. This operation:

  1. Validates the quote is in accepted status and not already converted
  2. Generates a new invoice number from the standard sequence
  3. Creates a draft invoice copying contact, totals, notes, and terms
  4. Copies all line items to the new invoice
  5. Marks the quote as converted with a link to the invoice

The entire operation runs within a savepoint. The new invoice defaults to a 30-day payment term from today.

Returns the new invoice ID and number. Returns 400 if the quote is not accepted or has already been converted.

Path parameters

id string required
Quote ID to convert (e.g. quo_42). Must be in accepted status.

Response

200 Quote converted to a draft invoice. Returns the new invoice ID and number. Quote status is set to converted.
Show response fields
invoiceId string
invoiceNumber string

Error codes

400 Quote is not in accepted status or has already been converted.
404 Quote not found.