Search shipping methods
Use searchShippingMethods to retrieve information on the shipping methods currently defined on your account.
Search filters
Use the parameters below to filter the results of your search for shipping methods.
Name
Optional (string)
Name of the shipping method.
Codes
Optional (array of strings)
Codes assigned to the shipping methods.
Countries
Optional (array of strings)
Countries to which the shipping method is assigned.
Active
Optional (boolean)
TRUE — active shipping methods;
FALSE — inactive shipping methods.
Pagination
Optional (object)
Control the results pagination. See sub-parameters below.
Pagination.Page
Optional (integer)
Number of pages to display the results
Pagination.Limit
Optional (integer)
Limit the number of results of the search
Request sample
<?php
require ('PATH_TO_AUTH'); // authentication call
$SearchOptions = new \stdClass();
$SearchOptions->Name = 'ShippingMethodName'; // search for a specific shipping method
$SearchOptions->Codes = ['Code1', 'Code2', 'Code3']; // array of shipping method codes
$SearchOptions->Countries = ['US', 'UK', 'AU']; // array of country codes
$SearchOptions->Active = true; // only active shipping methods
$SearchOptions->Pagination = new \stdClass();
$SearchOptions->Pagination->Page = 1; // set display pages
$SearchOptions->Pagination->Limit = 200; // limit the results
$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'searchShippingMethods',
'params' => array($sessionID, $SearchOptions)
);
var_dump (callRPC((Object)$jsonRpcRequest, $host));Response parameters
Object
Last updated
Was this helpful?