curl --location --globoff --request PUT 'https://.daftra.com/api2/invoices/' \
--header 'Accept: application/json' \
--header 'apikey: ' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"Invoice": {
"client_id": 15,
"type": 0,
"store_id": 0,
"staff_id": 0,
"subscription_id": 0,
"no": "0700000AAAAA0001",
"po_number": "string",
"name": "string",
"branch_id": 0,
"is_offline": true,
"currency_code": "USD",
"client_currency_code": "string",
"date": "2026-06-17",
"issue_date": "2019-08-24",
"due_after": 0,
"draft": false,
"discount": 0,
"discount_amount": 0,
"deposit": 0,
"deposit_type": 0,
"shipping_options": 0,
"shipping_amount": 0,
"notes": "string",
"terms": "string",
"html_notes": "string",
"invoice_layout_id": 0,
"estimate_id": 0,
"order_source_id": 0,
"language_id": 0,
"date_format": "string",
"cost_center_id": 0,
"sales_person_id": 0,
"terminal_id": "string",
"unique_id": "string",
"pos_shift_id": 0,
"follow_up_status": 0,
"work_order_id": 0,
"requisition_delivery_status": 0,
"source_type": 0,
"source_id": 0,
"client_business_name": "string",
"client_first_name": "string",
"client_last_name": "string",
"client_email": "user@example.com",
"client_address1": "string",
"client_address2": "string",
"client_postal_code": "string",
"client_city": "string",
"client_state": "string",
"client_country_code": "EG",
"client_active_secondary_address": true,
"client_secondary_name": "string",
"client_secondary_address1": "string",
"client_secondary_address2": "string",
"client_secondary_city": "string",
"client_secondary_state": "string",
"client_secondary_postal_code": "string",
"client_secondary_country_code": "string"
},
"InvoiceItem": [
{
"item": "string",
"description": "string",
"unit_price": 0,
"quantity": 0,
"tax1": 0,
"tax2": 0,
"product_id": 0,
"discount": 0,
"discount_type": 0,
"store_id": 0,
"lot": [
"string"
],
"expiry_date": [
"2019-08-24"
],
"serials": [
"string"
]
}
],
"Payment": [
{
"payment_method": "string",
"amount": 0,
"transaction_id": "string",
"treasury_id": 0,
"date": "string",
"staff_id": 0,
"email": "user@example.com"
}
],
"InvoiceCustomField": {},
"Deposit": {},
"InvoiceReminder": {},
"Document": {},
"DocumentTitle": {}
}'