<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client();
$url = 'https://affilibee.com/api/orders/create';
$token = 'YOUR_ACCESS_TOKEN';
$response = $client->post($url, [
    'headers' => [
        'Authorization' => "Bearer $token",
        'Content-Type' => 'application/json',
        'Accept' => 'application/json',
    ],
    'json' => [
        'affiliate_slug' => 'affiliate123',
        'order_no' => 'ORDER-001',
        'total_shipping_value' => 1500,
        'currency_code' => 'USD',
        'order_rows' => [
            [
                'product_sku' => 'SKU123',
                'product_name' => 'Product Name A',
                'segment_slug' => 'segment-001',
                'price_value' => 10000,
                'tax_value' => 500,
                'quantity' => 2,
            ]
        ],
        'customer' => [
            'name' => 'John Doe',
            'email' => 'john.doe@example.com',
        ],
    ],
]);
echo $response->getBody();