{
	"name": "table/external/ksef/product/product.json",
	"info": "KSeF product mapping from invoice line items",
	"table_name": "product",
	"table_prefix": "pr",
	"record_type": [""],
	"local_table": "product",
	"local_record_type": "",
	"format": {
		"date": "%Y-%m-%d",
		"datetime": "%Y-%m-%dT%H:%M:%SZ"
	},
	"field": [
		{
			"field_name": "productCode",
			"local_field": "product_id",
			"field_type": "string",
			"info": "Product or service code (main identifier)"
		},
		{
			"field_name": "barcode",
			"local_field": "ean_code",
			"field_type": "string",
			"info": "EAN/GTIN barcode"
		},
		{
			"field_name": "productName",
			"local_field": "name",
			"field_type": "string",
			"info": "Product or service name"
		},
		{
			"field_name": "pkwiu",
			"local_field": "json_data.pkwiu",
			"field_type": "string",
			"info": "PKWiU classification code (Polish product classification)"
		},
		{
			"field_name": "cn",
			"local_field": "json_data.cn_code",
			"field_type": "string",
			"info": "CN (Combined Nomenclature) code for customs"
		},
		{
			"field_name": "unit",
			"local_field": "stock_unit",
			"field_type": "string",
			"info": "Unit of measure (szt, usl, kg, m, etc.)"
		},
		{
			"field_name": "netPrice",
			"local_field": "sales_price",
			"field_type": "decimal",
			"info": "Net sales price"
		},
		{
			"field_name": "vatRate",
			"local_field": "json_data.vat_rate",
			"field_type": "string",
			"info": "Default VAT rate (8, 23, 7, 5, 0, etc.)"
		},
		{
			"field_name": "gtu",
			"local_field": "json_data.gtu_code",
			"field_type": "string",
			"info": "GTU code (special goods marker - fuel, alcohol, etc.)"
		},
		{
			"field_name": "productType",
			"local_field": "product_type",
			"field_type": "string",
			"info": "Product type code (GOODS, SERVICE, OTHER)"
		},
		{
			"field_name": "description",
			"local_field": "info",
			"field_type": "text",
			"info": "Additional product information"
		},
		{
			"field_name": "exciseDuty",
			"local_field": "json_data.excise_duty",
			"field_type": "decimal",
			"info": "Excise duty amount (for excise goods)"
		},
		{
			"field_name": "exemptionReason",
			"local_field": "json_data.exemption_reason",
			"field_type": "string",
			"info": "VAT exemption reason code"
		}
	]
}
