Retrieve shipping price
Requirements
Request parameters
Parameter
Type / Description
Sample request
<?php
require ('PATH_TO_AUTH'); // authentication call
$cartItems = [];
$cartItem = new stdClass();
$cartItem->Code = 'my_product_code_1'; // product code defined in the Information tab, at product level
$cartItem->Quantity = 2; // quantity that is being purchased
$cartItems[0] = $cartItem;
$billingDetails = new stdClass();
$billingDetails->CountryCode = 'US'; // billing country
$deliveryDetails = new stdClass();
$deliveryDetails->CountryCode = 'AU'; // delivery country
$currency = 'USD'; // purchase currency
$couponCode = ['TANGIBLEPROMO']; // apply discount to promotion
try {
$shippingPrice = $client->getShippingPrice($sessionID, $cartItems, $billingDetails, $deliveryDetails, $currency);
}
catch (SoapFault $e) {
echo "ShippingPrice: " . $e->getMessage();
exit;
}
var_dump("ShippingPrice", $shippingPrice);Response parameters
Parameter
Type / Description
Last updated
Was this helpful?