id path parameter) into a new invoice.InvoiceItem to choose which lines and quantities to convert (partial conversion is supported); you may also pass standard invoice fields such as date, store_id, or draft.requisition_ids[] (query) to choose them when you hold the convert permission.202 with the new invoice id). Requires the Sales Order module to be enabled and permission to create invoices / convert sales orders. The request is rejected with 404 when the sales order is missing, already invoiced, not permitted, or has no convertible items.curl --location --globoff 'https://.daftra.com/api2/sales_orders/convert_to_invoice/5012.json?requisition_ids[]=3' \
--header 'Accept: application/json' \
--header 'apikey: ' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"InvoiceItem": [
{
"product_id": 12,
"item": "Consulting service",
"unit_price": 100,
"quantity": 2
},
{
"product_id": 12,
"item": "Consulting service",
"unit_price": 100,
"quantity": 2
},
{
"product_id": 12,
"item": "Consulting service",
"unit_price": 100,
"quantity": 2
}
],
"Invoice": {
"date": "2026-06-25",
"store_id": 0,
"draft": true
}
}'{
"result": "successful",
"code": 202,
"id": 2417,
"invoice_number": "INV-0001"
}