# Base URL: https://api-sandbox.ae.marmin.ai
# PUT /api/proforma-invoices/draft/{id}
curl -X PUT "https://api-sandbox.ae.marmin.ai/api/proforma-invoices/draft/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"profile_execution_id": "00000000",
"document_number": "INV-001",
"issue_date": "2025-05-24",
"issue_time": "10:30:00",
"note": "Thank you for your business",
"tax_point_date": "2025-05-24",
"document_currency_code": "AED",
"tax_currency_code": "AED",
"accounting_cost": "COST-001",
"buyer_reference": "BR-REF-001",
"invoice_period": {
"start_date": "2025-05-01",
"end_date": "2025-05-31",
"description": "May 2025"
},
"order_reference": {
"id": "ORD-001",
"sales_order_id": "SO-001"
},
"billing_reference": [
{
"id": "INV-PRE-001",
"issue_date": "2025-04-15"
}
],
"despatch_document_reference": { "id": "DESP-001" },
"receipt_document_reference": { "id": "REC-001" },
"statement_document_reference": { "id": "STMT-001" },
"originator_document_reference": { "id": "ORIG-001" },
"contract_document_reference": {
"id": "CONTRACT-001",
"document_description": "Master agreement"
},
"payee_party": {
"party_name": "Payee Name",
"party_identification_id": "PID-001",
"company_id": "123456",
"company_scheme_id": "002"
},
"buyer_customer_party": { "id": "1001234567" },
"seller_supplier_party": { "id": "100123456789003" },
"tax_representative_party": {
"endpoint_id": "EP-001",
"endpoint_scheme_id": "0235",
"party_name": "Tax Rep Ltd",
"profile_id": "PROF-001",
"postal_address": {
"street_name": "123 Rep Street",
"additional_street_name": null,
"city_name": "Dubai",
"postal_zone": "12345",
"country_subentity": "DXB",
"address_line": null,
"country": "United Arab Emirates",
"country_code": "AE"
},
"party_tax_scheme": {
"company_id": "300123456789003",
"tax_scheme": "VAT"
},
"tin": null,
"scheme_agency_id": "TL",
"company_id": "123456",
"company_scheme_id": null,
"authority_name": null,
"passport_issuing_country_code": null,
"company_legal_form": null,
"name": "Tax Representative",
"email": "rep@example.com",
"telephone": null,
"logo_url": null
},
"delivery": {
"actual_delivery_date": "2025-05-25",
"delivery_location": {
"id": "LOC-001",
"address": {
"street_name": "456 Delivery St",
"additional_street_name": null,
"city_name": "Abu Dhabi",
"postal_zone": "54321",
"country_subentity": "AUH",
"address_line": null,
"country": "United Arab Emirates",
"country_code": "AE"
}
},
"party_name": null,
"party_id": null,
"terms": null
},
"invoice_type_code": "380",
"due_date": "2025-06-24",
"payment_means": {
"id": null,
"payment_means_code": "30",
"payment_id": ["PAY-REF-001"],
"card_account": null,
"payee_financial_account": {
"id": "IBAN123",
"name": "Account Name",
"financial_institution_branch_id": null,
"address": null
},
"payment_mandate": null
},
"project_reference": { "id": "PRJ-001" },
"charges": [
{
"reason_code": "FC",
"reason": "Freight charge",
"amount": 50.0,
"multiplier_factor_numeric": null,
"base_amount": null,
"tax_category": {
"id": "S",
"percent": 5.0,
"tax_exemption_reason_code": null,
"tax_exemption_reason": null,
"tax_scheme": "VAT"
}
}
],
"allowances": [
{
"reason_code": "95",
"reason": "Discount",
"amount": 10.0,
"multiplier_factor_numeric": null,
"base_amount": null,
"tax_category": {
"id": "S",
"percent": 5.0,
"tax_exemption_reason_code": null,
"tax_exemption_reason": null,
"tax_scheme": "VAT"
}
}
],
"tax_exchange_rate": {
"source_currency_code": "USD",
"target_currency_code": "AED",
"calculation_rate": 3.6725
},
"prepaid_amount": 0.0,
"payable_rounding_amount": 0.0,
"document_lines": [
{
"note": null,
"quantity": 2.0,
"unit_code": "EA",
"accounting_cost": null,
"invoice_period": null,
"order_line_reference": { "line_id": "LINE-001" },
"despatch_line_reference": null,
"document_reference": null,
"charges": null,
"allowances": null,
"description": "Product A description",
"name": "Product A",
"buyer_item_identification": null,
"seller_item_identification": null,
"standard_item_identification": null,
"additional_item_identification": null,
"origin_country": null,
"commodity_classification": null,
"classified_tax_category": {
"id": "S",
"percent": 5.0,
"tax_exemption_reason_code": null,
"tax_exemption_reason": null,
"tax_scheme": "VAT"
},
"additional_item_property": null,
"lot_number_id": null,
"price": {
"base_amount": 100.0,
"base_quantity": 1.0,
"allowance": null
},
"line_object_identifier": null
}
],
"document_source": "API",
"accounting_supplier_party": null,
"accounting_customer_party": {
"endpoint_id": "0199:265627835",
"endpoint_scheme_id": "0235",
"party_name": "Buyer Business LLC",
"profile_id": null,
"postal_address": {
"street_name": "100 Buyer Street",
"additional_street_name": null,
"city_name": "Dubai",
"postal_zone": "00000",
"country_subentity": "DXB",
"address_line": null,
"country": "United Arab Emirates",
"country_code": "AE"
},
"party_tax_scheme": { "company_id": "100123456789003", "tax_scheme": "VAT" },
"tin": null,
"scheme_agency_id": "TL",
"company_id": "265627835",
"company_scheme_id": "002",
"authority_name": null,
"passport_issuing_country_code": null,
"company_legal_form": null,
"name": "Buyer Party",
"email": "buyer@example.com",
"telephone": null,
"logo_url": null
}
}'