Retrieve shipping price
Requirements
Request parameters
Parameters
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
$jsonRpcRequest = new stdClass();
$jsonRpcRequest->jsonrpc = '2.0';
$jsonRpcRequest->method = 'getShippingPrice';
$jsonRpcRequest->params = array($sessionID, $cartItems, $billingDetails, $deliveryDetails, $currency);
$jsonRpcRequest->id = $i++;
$getShippingPrice = callRPC($jsonRpcRequest, $host);Response parameters
Parameters
Type / Description
Last updated
Was this helpful?