curl --location -g --request POST 'https://.daftra.com/api2/invoices' \
--header 'Accept: application/json' \
--header 'apikey: ' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"Invoice": {
"subscription_id": "",
"store_id": 1,
"type": 19,
"po_number": 26,
"client_id": 46,
"client_email": "",
"client_country_code": "SAR",
"draft": "0",
"follow_up_status": null,
"staff_id": 0,
"name": "",
"is_offline": 1,
"currency_code": "SAR",
"payment_status": 2,
"date": "2026-04-07",
"discount": 0,
"discount_amount": 0,
"deposit": 0,
"deposit_type": 0,
"notes": "",
"html_notes": "",
"invoice_layout_id": 9,
"estimate_id": 0,
"shipping_options": "",
"shipping_amount": null,
"requisition_delivery_status": null,
"pos_shift_id": null,
"branch_id": 1
},
"Payment": {
"client_id": null,
"payment_method": "cash",
"amount": 100,
"transaction_id": "",
"date": "2026-04-07 00:00:00",
"email": null,
"status": 1,
"notes": null,
"response_code": null,
"response_message": null,
"created": "2026-04-07 18:59:02",
"currency_code": "SAR",
"first_name": "",
"last_name": "",
"address1": null,
"address2": "",
"city": "",
"state": "",
"postal_code": "",
"country_code": "",
"phone1": "+966547895120",
"phone2": null,
"attachment": null,
"staff_id": 4,
"payment_work_order_id": null,
"treasury_id": 1,
"pos_shift_id": null,
"receipt_notes": null,
"extra_details": null,
"branch_id": 1,
"added_by": 1,
"is_paid": 1
},
"InvoiceItem": [
{
"item": "خدمة",
"description": "",
"unit_price": 100,
"quantity": 1,
"col_3": "",
"col_4": "",
"tax1": 0,
"tax2": 0,
"product_id": 112
}
],
"InvoiceCustomField": []
}'