REST API

Documentation


Shipping costs

The costs for shipping and handling of an order depend on the items and country. You don't need to calculate these yourself: you can request the shipping cost from the API before creating an order.

TIP: You can find an indication of the shipping and handling rates in our products list.

Example
$quote = $api->post('/shipping/quote', get_shipment_data());
    
function get_shipment_data()
{
    return array(
        'country' => 'NL',
        'items' => array(
            array('productId' => 'canvas_30x20', 'quantity' => 1)
        )        
    );
}

$amount = $quote->shipping + $quote->handling;

echo 'Cost price: € ' . $amount . ' excl. VAT <br />';                 
echo 'Cost price VAT: € ' . round($amount * $quote->taxRate, 2) . '<br />';

// If you use our payment screen:

echo 'Retail price: € ' . $quote->payment . ' incl. VAT';
Special fields:
Name Details
"country" An ISO 3166-1 alpha 2 country code
"state" Only for U.S. addresses: a ISO 3166-2:US state code
item["productId"] Can be found in the products list
item["pageCount"] Needed only for books and photo prints

The API response contains the cost prices for shipping and handling, excluding VAT. If you use our payment screen, you can find the payment due in the field payment: this is the shipping + handling cost including VAT, rounded up to a consumer-friendly amount.

Next