Retrieve SKU details by ID
Use the getSkuDetails method to retrieve SKU details based on its ID.
Request parameters
Parameter
Type / Description
sessionID
Required (string)
Session identifier, the output of the Login method. Include sessionID into all your requests. 2Checkout throws an exception if the values are incorrect. The sessionID expires in 10 minutes.
skuCode
Required (string)
Unique identifier of the SKU.
Request sample
<?php
require ('PATH_TO_AUTH');
$sku = 'YOUR_SKU_CODE';
$jsonRpcRequest = new stdClass();
$jsonRpcRequest->jsonrpc = '2.0';
$jsonRpcRequest->method = 'getSKUDetails';
$jsonRpcRequest->params = array($sessionID, $sku);
$jsonRpcRequest->id = $i++;
$getOrder = callRPC($jsonRpcRequest, $host);
var_dump($getOrder);Response sample
Last updated
Was this helpful?