Skip to main content
knowledgecenter.2checkout.com

Search SKU codes

Overview

Use the searchSku method to perform product SKU search calls with the below parameters.

Request Parameters

Parameters Required Type/Description
ProductCode Required String.  The product code that you can define for each of your offerings. Needs to be unique.
PricingConfigurationCode Required String. Unique identifier of the pricing configuration.

Currencies

Optional String. ISO currency code.
QuantityInterval Optional Integer. Numeric identifier of product quantity.
PurchaseTypes Optional String. Purchase type identifier. Possible values:
  • NEW_PRODUCT
  • RENEWAL
  • UPGRADE
PriceOptionGroups Optional String. Array of price option groups.
PriceOptions Optional String. Array of price options names.

Request Example

<?php

require ('PATH_TO_AUTH');

$searchSchema = new \stdClass();
$searchSchema->ProductCode= '6B3CB17DDA_COPY1';

$pricingConfiguration = new \stdClass();
$pricingConfiguration->Code = 'E684EC99B0';

$currency = new \stdClass();
$currency->Code = 'EUR';
$pricingConfiguration->Currencies = [$currency];

$purchaseType = new \stdClass();
$purchaseType->Code = 'RENEWAL';
$pricingConfiguration->PurchaseTypes = [$purchaseType];
$searchSchema->PricingConfigurations = [$pricingConfiguration];

$jsonRpcRequest = array (
    'method' => 'searchSku',
    'params' => array($sessionID, $searchSchema),
    'id' => $i++,
    'jsonrpc' => '2.0'
);

var_dump (callRPC((Object)$jsonRpcRequest, $host, true));

Response Parameters

Parameters Type/Description
ProductCode String.
PricingConfigurationCode String.

Currencies

String.
QuantityInterval Integer.
PurchaseTypes String.
PriceOptionGroups String.
PriceOptions String.

Response Example

class stdClass#7 (3) {
  public $ProductCode =>
  string(16) "6B3CB17DDA_COPY1"
  public $PricingConfigurations =>
  array(1) {
    [0] =>
    class stdClass#8 (6) {
      public $Code =>
      string(10) "E684EC99B0"
      public $Currencies =>
      array(1) {
        [0] =>
        class stdClass#9 (1) {
          public $Code =>
          string(3) "EUR"
        }
      }
      public $PurchaseTypes =>
      array(1) {
        [0] =>
        class stdClass#10 (1) {
          public $Code =>
          string(7) "RENEWAL"
        }
      }
      public $QuantityIntervals =>
      array(0) {
      }
      public $PriceOptionGroups =>
      array(0) {
      }
      public $SkuCollection =>
      array(1) {
        [0] =>
        class stdClass#11 (2) {
          public $ProductCode =>
          string(16) "6B3CB17DDA_COPY1"
          public $SkuPricingOptions =>
          array(1) {
            [0] =>
            class stdClass#12 (3) {
              public $Code =>
              string(10) "E684EC99B0"
              public $Details =>
              array(8) {
                [0] =>
                class stdClass#13 (7) {
                  public $ProductSKU =>
                  string(23) "Product_Test_SKU_008899"
                  public $Currency =>
                  string(3) "EUR"
                  public $FromQty =>
                  int(1)
                  public $ToQty =>
                  int(3)
                  public $PurchaseType =>
                  string(7) "RENEWAL"
                  public $Groups =>
                  array(1) {
                    [0] =>
                    class stdClass#14 (2) {
                      public $GroupCode =>
                      string(6) "GRUP_2"
                      public $Options =>
                      array(1) {
                        [0] =>
                        class stdClass#15 (2) {
                          public $Name =>
                          string(6) "grup 2"
                          public $Value =>
                          string(13) "option_code_4"
                        }
                      }
                    }
                  }
                  public $Options =>
                  string(32) "a:1:{i:16885;a:1:{i:0;i:78164;}}"
                }
                [1] =>
                class stdClass#16 (7) {
                  public $ProductSKU =>
                  string(23) "Product_Test_SKU_008902"
                  public $Currency =>
                  string(3) "EUR"
                  public $FromQty =>
                  int(1)
                  public $ToQty =>
                  int(3)
                  public $PurchaseType =>
                  string(7) "RENEWAL"
                  public $Groups =>
                  array(1) {
                    [0] =>
                    class stdClass#17 (2) {
                      public $GroupCode =>
                      string(6) "GRUP_2"
                      public $Options =>
                      array(1) {
                        [0] =>
                        class stdClass#18 (2) {
                          public $Name =>
                          string(6) "grup 2"
                          public $Value =>
                          string(13) "option_code_4"
                        }
                      }
                    }
                  }
                  public $Options =>
                  string(6) "a:0:{}"
                }
                [2] =>
                class stdClass#19 (7) {
                  public $ProductSKU =>
                  string(23) "Product_Test_SKU_008900"
                  public $Currency =>
                  string(3) "EUR"
                  public $FromQty =>
                  int(1)
                  public $ToQty =>
                  int(3)
                  public $PurchaseType =>
                  string(7) "RENEWAL"
                  public $Groups =>
                  array(1) {
                    [0] =>
                    class stdClass#20 (2) {
                      public $GroupCode =>
                      string(6) "GRUP_2"
                      public $Options =>
                      array(1) {
                        [0] =>
                        class stdClass#21 (2) {
                          public $Name =>
                          string(6) "grup 2"
                          public $Value =>
                          string(13) "option_code_4"
                        }
                      }
                    }
                  }
                  public $Options =>
                  string(32) "a:1:{i:16885;a:1:{i:0;i:78165;}}"
                }
                [3] =>
                class stdClass#22 (7) {
                  public $ProductSKU =>
                  string(23) "Product_Test_SKU_008901"
                  public $Currency =>
                  string(3) "EUR"
                  public $FromQty =>
                  int(1)
                  public $ToQty =>
                  int(3)
                  public $PurchaseType =>
                  string(7) "RENEWAL"
                  public $Groups =>
                  array(1) {
                    [0] =>
                    class stdClass#23 (2) {
                      public $GroupCode =>
                      string(6) "GRUP_2"
                      public $Options =>
                      array(1) {
                        [0] =>
                        class stdClass#24 (2) {
                          public $Name =>
                          string(6) "grup 2"
                          public $Value =>
                          string(13) "option_code_4"
                        }
                      }
                    }
                  }
                  public $Options =>
                  string(32) "a:1:{i:16885;a:1:{i:0;i:78166;}}"
                }
                [4] =>
                class stdClass#25 (7) {
                  public $ProductSKU =>
                  string(23) "Product_Test_SKU_008907"
                  public $Currency =>
                  string(3) "EUR"
                  public $FromQty =>
                  int(4)
                  public $ToQty =>
                  int(7)
                  public $PurchaseType =>
                  string(7) "RENEWAL"
                  public $Groups =>
                  array(1) {
                    [0] =>
                    class stdClass#26 (2) {
                      public $GroupCode =>
                      string(6) "GRUP_2"
                      public $Options =>
                      array(1) {
                        [0] =>
                        class stdClass#27 (2) {
                          public $Name =>
                          string(6) "grup 2"
                          public $Value =>
                          string(13) "option_code_4"
                        }
                      }
                    }
                  }
                  public $Options =>
                  string(32) "a:1:{i:16885;a:1:{i:0;i:78164;}}"
                }
                [5] =>
                class stdClass#28 (7) {
                  public $ProductSKU =>
                  string(23) "Product_Test_SKU_008910"
                  public $Currency =>
                  string(3) "EUR"
                  public $FromQty =>
                  int(4)
                  public $ToQty =>
                  int(7)
                  public $PurchaseType =>
                  string(7) "RENEWAL"
                  public $Groups =>
                  array(1) {
                    [0] =>
                    class stdClass#29 (2) {
                      public $GroupCode =>
                      string(6) "GRUP_2"
                      public $Options =>
                      array(1) {
                        [0] =>
                        class stdClass#30 (2) {
                          public $Name =>
                          string(6) "grup 2"
                          public $Value =>
                          string(13) "option_code_4"
                        }
                      }
                    }
                  }
                  public $Options =>
                  string(6) "a:0:{}"
                }
                [6] =>
                class stdClass#31 (7) {
                  public $ProductSKU =>
                  string(23) "Product_Test_SKU_008908"
                  public $Currency =>
                  string(3) "EUR"
                  public $FromQty =>
                  int(4)
                  public $ToQty =>
                  int(7)
                  public $PurchaseType =>
                  string(7) "RENEWAL"
                  public $Groups =>
                  array(1) {
                    [0] =>
                    class stdClass#32 (2) {
                      public $GroupCode =>
                      string(6) "GRUP_2"
                      public $Options =>
                      array(1) {
                        [0] =>
                        class stdClass#33 (2) {
                          public $Name =>
                          string(6) "grup 2"
                          public $Value =>
                          string(13) "option_code_4"
                        }
                      }
                    }
                  }
                  public $Options =>
                  string(32) "a:1:{i:16885;a:1:{i:0;i:78165;}}"
                }
                [7] =>
                class stdClass#34 (7) {
                  public $ProductSKU =>
                  string(23) "Product_Test_SKU_008909"
                  public $Currency =>
                  string(3) "EUR"
                  public $FromQty =>
                  int(4)
                  public $ToQty =>
                  int(7)
                  public $PurchaseType =>
                  string(7) "RENEWAL"
                  public $Groups =>
                  array(1) {
                    [0] =>
                    class stdClass#35 (2) {
                      public $GroupCode =>
                      string(6) "GRUP_2"
                      public $Options =>
                      array(1) {
                        [0] =>
                        class stdClass#36 (2) {
                          public $Name =>
                          string(6) "grup 2"
                          public $Value =>
                          string(13) "option_code_4"
                        }
                      }
                    }
                  }
                  public $Options =>
                  string(32) "a:1:{i:16885;a:1:{i:0;i:78166;}}"
                }
              }
              public $Errors =>
              array(0) {
              }
            }
          }
        }
      }
    }
  }
  public $Errors =>
  array(0) {
  }
} 

 

  • Was this article helpful?