English
A PHP Software Development Kit for interacting with the auctions and events endpoints
composer require topsort/sdk
{ "require": { "topsort/sdk": "3.0.0" } }
<?php use Topsort\SDK; $topsort_client = new SDK("my_api_key"); $products = ["i8bfHPJaxcAb3", "gDG0HV97ed2s"]; $slots = 1; $auction_result = $topsort_client->create_auction($slots, $products)->wait();
<?php use Topsort\SDK; $topsort_client = new SDK('my_api_key'); $placement = [ "path" => "/categories/shoes", ]; $topsort_client->report_click([ "placement" => $placement, "resolvedBidId" => "AKFU78", ]);
<?php use Topsort\SDK; $topsort_client = new SDK('my_api_key'); $impression = [ "placement" => [ "path" => "/categories/shoes", ], "resolvedBidId" => "AKFU78", ]; $topsort_client->report_impression($impression);
<?php use Topsort\SDK; $topsort_client = new SDK('my_api_key'); $items = [ [ "productId" => "gDG0HV97ed2s", "quantity" => 2, "unitPrice" => 10000, ] ]; $topsort_client->report_purchase([ "occurredAt" => new DateTime(), "items" => $items, ]);
Was this page helpful?