{
	"name": "form/nc/erp-sync/ksef/save/invoice-ksef-out.json",
	"info": "Send invoice to KSeF.",
	"save": [
		{
			"table": "order",
			"record_type": "invoice",
			"all_fields": false,
			"key_field": ["order_id"]
		}
	],
	"parameter": {
		"organization_id": "ksef-rest",
		"invoice_content": { "field": "json_data.import_text" },
		"show_sql": true
	},
	"call_array": [
		{
			"call_url": "sessions/online",
			"call_body": {
				"formCode": {
					"systemCode": "FA (3)",
					"schemaVersion": "1-0E",
					"value": "FA"
				},
				"encryption": {
					"encryptedSymmetricKey": "",
					"initializationVector": ""
				}
			},
			"ksef_session_encrypt": true
		},
		{
			"call_url": "sessions/online/{{referenceNumber}}/invoices",
			"ksef_invoice_encrypt": true,
			"previous_call_param": {
				"referenceNumber": "referenceNumber"
			},
			"call_body": {
				"invoice_content": "",
				"encryptedInvoiceContent": "",
				"encryptedInvoiceSize": 0,
				"encryptedInvoiceHash": "",
				"invoiceHash": "",
				"invoiceSize": 0,
				"offlineMode": false
			}
		}
	]
}
