Client SDK

Please see each github repository for instructions on using an SDK.

The Swagger client SDK simplifies your client side code.

PHP Example

require_once(__DIR__ . '/SwaggerClient-php/autoload.php');

$simple_key = '4256aaf6dfedfa01582fe9a961ab0100216d737b874a4801582fe9a961ab0100';
ultracart\v2\Configuration::getDefaultConfiguration()->setApiKey('x-ultracart-simple-key', $simple_key);
ultracart\v2\Configuration::getDefaultConfiguration()->addDefaultHeader("X-UltraCart-Api-Version", "2017-03-01");

try {
    $order_api = new ultracart\v2\Api\CheckoutApi();

    $order_id = "DEMO-0009103586";
    $order_expansion = "shipping,billing,summary,item";
    $order_api = new \ultracart\v2\api\OrderApi();
    $order_response = $order_api->orderOrdersOrderIdGet($order_id, $order_expansion);
    if ($order_response->getSuccess()) {
        $order = $order_response->getOrder();
    }
} catch (\ultracart\v2\ApiException $e) {
    echo 'Exception when calling CustomerApi->customerCustomersCustomerProfileOidGet: ', $e->getMessage(), PHP_EOL;
    // THE FOLLOWING LINE PROVIDES DETAILED ERROR INFORMATION
    print_r($e->getResponseObject());
}