$data = [
"orderNumber" => "".$orderNum."",
"orderLines" => [],
];
foreach ($products as $item) {
$data['orderLines'][] = [
"articleNumber" => $item['article'],
"name" => $item['name'],
"sellingPrice" => $item['price'],
"estimatedPrice" => $item['price'],
"quantity" => $item['count'],
"vat" => [
"rate" => 0,
"sum" => 0
],
"attributes" => [
"isDangerous" => false
],
"resideInPackages" => [
"1"
],
"supplierTin" => null,
"cis" => [
"0"
],
];
}