Create SKU

Definition

https://sandbox.bluesnap.com/services/2/catalog/skus


This request enables you to create a new SKU (contract) for a specific product in your account.

Request Content

catalog-sku    required, contains the following properties (see catalog-sku):

PropertyTypeRequired
contract-namestringoptional
product-idlongrequired
sku-statusstringoptional
sku-typestringrequired
pricing-settingscontainerrequired (see pricing-settings)
sku-imagestringoptional
sku-quantity-policycontaineroptional (see sku-quantity-policy)
collect-shipping-addressbooleanoptional
sku-effective-datescontaineroptional (see sku-effective-dates)
sku-coupon-settingscontaineroptional (see sku-coupon-settings)
sku-custom-parameterscontaineroptional (see sku-custom-parameters)

Response Details

If successful, the response HTTP status code is 201 Created.
The contract/SKU ID is included in the Location header.
For details about possible errors, see: General Errors and Catalog Errors.


Examples

Request Examples

curl -v -X POST https://sandbox.bluesnap.com/services/2/catalog/skus \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<catalog-sku xmlns="http://ws.plimus.com">
  <contract-name>One time charge - USD base</contract-name>
  <product-id>307634</product-id>
  <sku-type>DIGITAL</sku-type>
  <pricing-settings>
    <charge-policy-type>ONE TIME PAYMENT</charge-policy-type>
    <charge-policy>
      <one-time-charge>
        <catalog-prices>
          <catalog-price>
            <base-price>true</base-price>
            <currency>USD</currency>
            <amount>7.00</amount>
          </catalog-price>
        </catalog-prices>
      </one-time-charge>
    </charge-policy>
  </pricing-settings>
</catalog-sku>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/catalog/skus \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<catalog-sku xmlns="http://ws.plimus.com">
  <contract-name>One time charge with 20 DAYS TRIAL - USD base</contract-name>
  <product-id>307634</product-id>
  <sku-status>A</sku-status>
  <sku-type>DIGITAL</sku-type>
  <pricing-settings>
    <charge-policy-type>ONE TIME PAYMENT WITH TRIAL</charge-policy-type>
    <charge-policy>
      <free-trial>
        <period-length>20</period-length>
        <interval>DAYS</interval>
      </free-trial>
      <one-time-charge>
        <catalog-prices>
          <catalog-price>
            <base-price>true</base-price>
            <currency>USD</currency>
            <amount>7.00</amount>
          </catalog-price>
        </catalog-prices>
      </one-time-charge>
    </charge-policy>
    <rounding-price-method>ROUNDING UP TO 0.95</rounding-price-method>
  </pricing-settings>
  <sku-quantity-policy>
    <allow-quantity-change>true</allow-quantity-change>
    <minimum-quantity>1</minimum-quantity>
  </sku-quantity-policy>
  <collect-shipping-address>false</collect-shipping-address>
  <sku-effective-dates>
    <effective-from>07-Apr-17</effective-from>
    <effective-till>05-Apr-20</effective-till>
  </sku-effective-dates>
  <sku-coupon-settings>
    <sku-coupon-setting>ENABLE</sku-coupon-setting>
  </sku-coupon-settings>
</catalog-sku>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/catalog/skus \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<catalog-sku xmlns="http://ws.plimus.com">
  <contract-name>Standard monthly SUB - base currency USD</contract-name>
  <product-id>307634</product-id>
  <sku-type>DIGITAL</sku-type>
  <pricing-settings>
    <charge-policy-type>STANDARD SUBSCRIPTION</charge-policy-type>
    <charge-policy>
      <recurring-period>
        <catalog-prices>
          <catalog-price>
            <base-price>true</base-price>
            <currency>USD</currency>
            <amount>7.00</amount>
          </catalog-price>
        </catalog-prices>
        <period-frequency>MONTHLY</period-frequency>
      </recurring-period>
    </charge-policy>
    <recurring-plan-settings/>
  </pricing-settings>
</catalog-sku>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/catalog/skus \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<catalog-sku xmlns="http://ws.plimus.com">
  <contract-name>Standard SUB with 20 days TRIAL - USD only</contract-name>
  <product-id>307634</product-id>
  <sku-status>A</sku-status>
  <sku-type>DIGITAL</sku-type>
  <sku-image />
  <pricing-settings>
    <charge-policy-type>STANDARD SUBSCRIPTION WITH TRIAL</charge-policy-type>
    <charge-policy>
      <free-trial>
        <period-length>20</period-length>
        <interval>DAYS</interval>
      </free-trial>
      <recurring-period>
        <catalog-prices>
          <catalog-price>
            <base-price>true</base-price>
            <currency>USD</currency>
            <amount>24.00</amount>
          </catalog-price>
          <catalog-price>
            <currency>EUR</currency>
            <amount>12.00</amount>
          </catalog-price>
        </catalog-prices>
        <period-frequency>MONTHLY</period-frequency>
      </recurring-period>
    </charge-policy>
    <rounding-price-method>ROUNDING UP TO 0.50</rounding-price-method>
    <recurring-plan-settings>
      <charge-upon-plan-change>false</charge-upon-plan-change>
      <grace-period-length>30</grace-period-length>
      <plan-charge-amount-limit>
        <currency>USD</currency>
        <amount>100000.00</amount>
      </plan-charge-amount-limit>
      <plan-duration-period>3650</plan-duration-period>
    </recurring-plan-settings>
  </pricing-settings>
  <sku-quantity-policy>
    <allow-quantity-change>true</allow-quantity-change>
    <minimum-quantity>1</minimum-quantity>
  </sku-quantity-policy>
  <collect-shipping-address>false</collect-shipping-address>
  <sku-effective-dates>
    <effective-from>07-Apr-17</effective-from>
    <effective-till>05-Apr-20</effective-till>
  </sku-effective-dates>
  <sku-coupon-settings>
    <sku-coupon-setting>ENABLE</sku-coupon-setting>
  </sku-coupon-settings>
</catalog-sku>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/catalog/skus \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<catalog-sku xmlns="http://ws.plimus.com">
  <contract-name>API multi currencies - initial followed by sub after 14 days</contract-name>
  <product-id>307634</product-id>
  <sku-status>A</sku-status>
  <sku-type>DIGITAL</sku-type>
  <pricing-settings>
    <charge-policy-type>STANDARD SUBSCRIPTION WITH INITIAL CHARGE</charge-policy-type>
    <charge-policy>
      <initial-period>
        <catalog-prices>
          <catalog-price>
            <base-price>true</base-price>
            <currency>USD</currency>
            <amount>11.00</amount>
          </catalog-price>
        </catalog-prices>
        <period-length>14</period-length>
        <interval>DAYS</interval>
      </initial-period>
      <recurring-period>
        <catalog-prices>
          <catalog-price>
            <base-price>true</base-price>
            <currency>USD</currency>
            <amount>8.00</amount>
          </catalog-price>
        </catalog-prices>
        <period-frequency>MONTHLY</period-frequency>
      </recurring-period>
    </charge-policy>
    <rounding-price-method>ROUNDING UP TO 0.50</rounding-price-method>
    <recurring-plan-settings>
      <charge-upon-plan-change>false</charge-upon-plan-change>
      <grace-period-length>30</grace-period-length>
      <plan-charge-amount-limit>
        <currency>USD</currency>
        <amount>100000.00</amount>
      </plan-charge-amount-limit>
      <plan-duration-period>3650</plan-duration-period>
    </recurring-plan-settings>
  </pricing-settings>
  <sku-quantity-policy>
    <allow-quantity-change>true</allow-quantity-change>
    <minimum-quantity>1</minimum-quantity>
  </sku-quantity-policy>
</catalog-sku>'

Response Examples

HTTP/ 1.1 201 Created
Location: https://sandbox.bluesnap.com/services/2/catalog/skus/2181118

Back to Top