Beta

The Partner Trading API v1 is in beta — endpoints and response shapes may still change.

Developers
Cru World Wine
API v1 · Read access
Developer tools

SDKs & code examples

Start with the PHP client, or use the Python examples alongside each live endpoint. Both follow the same v1 API contract.

PHP SDK 0.1.0 preview

PHP 8.1+ · cURL · three read endpoints

Download ZIP

Install the source package

Download and unzip the package, then run Composer inside the extracted directory to generate its autoloader.

Terminal
cd cru-php-sdk
composer install

This preview is supplied as source. It is not published on Packagist.

Set your environment variables

Local development environment
export CRU_BASE_URL='https://us.cruworldwine.com/api/v1'
export CRU_CLIENT_KEY='YOUR_CLIENT_KEY'
export CRU_CLIENT_SECRET='YOUR_CLIENT_SECRET'

Use the API hostname Cru supplies for your environment. Keep the credentials in server environment variables or your application’s secret manager.

Make your first request

PHP
<?php
require 'vendor/autoload.php';

use Cru\Trading\Client;

$client = new Client(
    baseUrl: getenv('CRU_BASE_URL'),
    clientKey: getenv('CRU_CLIENT_KEY'),
    clientSecret: getenv('CRU_CLIENT_SECRET'),
);

$identity = $client->ping();
print_r($identity['data']);

Available methods

ping()Confirm your credentials and scopes.
listMarketBids($params)Read one page of wine markets.
getMarketBid($code)Retrieve one bid by its opaque code.
iterateMarketBids($params)Iterate all pages, yielding wine markets.

Read every page

PHP
foreach ($client->iterateMarketBids(['depth' => 'best']) as $market) {
    echo $market['wine_name'] . PHP_EOL;
}

Handle API errors

PHP
try {
    $response = $client->listMarketBids();
} catch (\Cru\Trading\ApiException $e) {
    // Log metadata only. Never log your secret.
    error_log(sprintf('%d %s %s',
        $e->httpStatus, $e->apiCode, $e->requestId));
}

Prefer Python?

Python examples use the requests library. Install it, set your credentials, then choose Python in an endpoint’s request panel.

Terminal
python -m pip install requests
Explore Python examples
Preview integration package

The client implements the supplied reference, including TLS verification, timeouts, encoded bid IDs, pagination, and structured errors. It has not been tested against a running Cru API. Planned endpoints are excluded.

Cru World Wine Developers · Partner Trading API v1
Based on the Cru Partner Trading API v1 reference, 14 September 2026.

API credentials

Enter the client key and secret issued by Cru. They are kept in memory until you reload or clear them.

Credentials are never included in copied examples, and are redacted from anything the console prints back.

Request API access

Tell us who you are and what you want to build. Cru issues a client key and secret for your organisation, scoped to what you need.

Markets you trade in (choose one or more)

We use what you send here to reply about API access, and for nothing else.