Create SKU

Definition

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


Documentation

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):
     contract-name string    optional
     product-id long    required
     sku-status string    optional
     sku-type string    required
     pricing-settings container    required (see pricing-settings)
     sku-image string    optional
     sku-quantity-policy container    optional (see sku-quantity-policy)
     collect-shipping-address boolean    optional
     sku-effective-dates container    optional (see sku-effective-dates)
     sku-coupon-settings container    optional (see sku-coupon-settings)
     sku-custom-parameters container    optional (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

Example Descriptions

Create One-Time Charge SKU

The example above shows how to create a basic SKU for a one-time charge. The example contains the minimum required fields. Additional options are available, such as custom parameters, coupons, and more.

Create One-Time Charge SKU with Trial

The example above shows how to create a SKU for a one-time charge, with a trial period of 20 days. This means that the one-time charge will occur once the trial period ends.

Create Subscription SKU

The example above shows how to create a basic SKU for a recurring subscription charge, with no trial period or initial charge. The example contains the minimum required fields. Additional options are available, such as custom parameters, coupons and more.

Create Subscription SKU with Trial

The example above shows how to create a SKU for a recurring subscription charge, with a trial period of 20 days. This means that no charge would be made until the trial period ends.

Create Subscription SKU with Initial Charge

The example above shows how to create a SKU for a recurring subscription charge, with an initial charge of $11.00. This means that this initial charge would be processed at the beginning of the subscription and then the regular recurring price would be charged on an ongoing basis.


Back to Top
Language
Credentials
:
Click Try It! to start a request and see the response here!