curl --location -g --request POST 'https://.daftra.com/api2/purchase_debit_note' \
--header 'apikey: 2fd74d2014d6a3ffbc2b91c99693536565e94435' \
--header 'apikey;' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
"invoice_layout_id": 8,
"type": "14",
"supplier_id": 1,
"currency_code": "EGP",
"language_id": 7,
"supplier_supplier_number": "000001",
"supplier_business_name": "مورد",
"supplier_first_name": "مورد",
"supplier_last_name": "جديد",
"supplier_address1": "22بب2",
"supplier_address2": "3ي2",
"supplier_city": "القرية",
"supplier_state": "الذكية",
"supplier_postal_code": "9999999",
"supplier_phone1": "64646464646",
"supplier_phone2": "6595959595",
"supplier_country_code": "EG",
"supplier_bn1_label": "سجل تجاري",
"supplier_bn2_label": "بطاقة ضريبية",
"supplier_default_currency_code": "EGP",
"date": "23/03/2025",
"work_order_id": 34,
"store_id": 2,
"show_item_stores": "0",
"shipping_tax_id": null,
"shipping_amount": null,
"discount": null,
"discount_amount": null,
"adjustment_label": "",
"adjustment_value": "",
"html_notes": null,
"draft": "1",
"purchase_debit_notes_items": [
{
"product_id": 2,
"item": "منتج 1",
"description": "",
"col_3": "",
"col_4": "",
"col_5": "",
"unit_price": 100,
"quantity": 1,
"discount": 0,
"discount_type": 1,
"tax1": null,
"tax2": null
}
],
"summary_total": {
"currency": "EGP"
},
"PurchaseOrderCustomField": {
"0": {
"label": "الإجمالي",
"value": "%total%"
},
"1": {
"label": "القيمة المضافة",
"value": "10"
},
"2": {
"label": "الأجمالى",
"value": "5"
},
"3": {
"label": "المدفوع",
"value": "8"
},
"4": {
"label": "الرصيد المستحق",
"value": "9"
},
"5": {
"label": "PO NO",
"value": null
}
}
}'