{"_id":"5bcf3922e8455d049c357e28","category":{"_id":"5bcf3922e8455d049c357e12","version":"5bcf3922e8455d049c357ed7","project":"57336fd5a6a9c40e00e13a0b","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-05-12T15:22:00.041Z","from_sync":false,"order":4,"slug":"coupon","title":"Catalog"},"user":"560d5913af97231900938124","parentDoc":null,"project":"57336fd5a6a9c40e00e13a0b","version":{"_id":"5bcf3922e8455d049c357ed7","project":"57336fd5a6a9c40e00e13a0b","__v":0,"forked_from":"5b8ec6a1f8dd7c0003386069","createdAt":"2018-04-24T15:33:45.744Z","releaseDate":"2018-04-24T15:33:45.744Z","categories":["5bcf3922e8455d049c357e0e","5bcf3922e8455d049c357e0f","5bcf3922e8455d049c357e10","5bcf3922e8455d049c357e11","5bcf3922e8455d049c357e12","5bcf3922e8455d049c357e13","5bcf3922e8455d049c357e14","5bcf3922e8455d049c357e15","5bcf3922e8455d049c357e16","5bcf3922e8455d049c357e17","5bcf3922e8455d049c357e18"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"3.27.2 Release","version_clean":"8976.0.0-Extended","version":"8976-Extended"},"githubsync":"","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-05-12T15:18:03.762Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"method":"put","results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":true,"order":4,"body":"##Definition\nhttps<span>://sandbox.bluesnap.com/services/2/catalog/skus/:sku-id</span>\n\n<hr>\n\n##Documentation\nThe Update SKU request enables you to update the settings of an existing SKU (contract) in your account.\n\n###Request Content\n`catalog-sku` &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>, contains the following properties (see [catalog-sku](doc:catalog-sku)):\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`contract-name` *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`product-id` *long* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`sku-status` *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`sku-type` *string* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`pricing-settings` *container* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span> (see [pricing-settings](doc:pricing-settings)) \n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`sku-image` *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`sku-quantity-policy` *container* &nbsp;&nbsp;&nbsp;optional (see [sku-quantity-policy](doc:sku-quantity-policy)) \n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`collect-shipping-address` *boolean* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`sku-effective-dates` *container* &nbsp;&nbsp;&nbsp;optional (see [sku-effective-dates](doc:sku-effective-dates)) \n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`sku-coupon-settings` *container* &nbsp;&nbsp;&nbsp;optional (see [sku-coupon-settings](doc:sku-coupon-settings)) \n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`sku-custom-parameters` *container* &nbsp;&nbsp;&nbsp;optional (see [sku-custom-parameters](doc:sku-custom-parameters)) \n\n###Response Details\nIf successful, the response HTTP status code is 204 No Content.\nThere is no content in the response body.\nFor details about possible errors, see: [General Errors](doc:general-errors) and [Catalog Errors](doc:catalog-errors).\n\n<hr>\n\n##Examples\n\n###Request Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/catalog/skus/307634 \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<catalog-sku xmlns=\\\"http://ws.plimus.com\\\">\\n  <product-id>307634</product-id>\\n  <sku-type>DIGITAL</sku-type>\\n  <pricing-settings>\\n    <charge-policy-type>ONE TIME PAYMENT</charge-policy-type>\\n    <charge-policy>\\n      <one-time-charge>\\n        <catalog-prices>\\n          <catalog-price>\\n            <base-price>true</base-price>\\n            <currency>USD</currency>\\n            <amount>100.00</amount>\\n          </catalog-price>\\n        </catalog-prices>\\n      </one-time-charge>\\n    </charge-policy>\\n  </pricing-settings>\\n</catalog-sku>'\",\n      \"language\": \"curl\",\n      \"name\": \"Update SKU Request: change one-time charge SKU settings\"\n    },\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/catalog/skus/2181160 \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<catalog-sku xmlns=\\\"http://ws.plimus.com\\\">\\n  <product-id>307634</product-id>\\n  <sku-type>DIGITAL</sku-type>\\n  <pricing-settings>\\n    <charge-policy-type>STANDARD SUBSCRIPTION</charge-policy-type>\\n    <charge-policy>\\n      <recurring-period>\\n        <catalog-prices>\\n          <catalog-price>\\n            <base-price>true</base-price>\\n            <currency>USD</currency>\\n            <amount>10.00</amount>\\n          </catalog-price>\\n        </catalog-prices>\\n        <period-frequency>DAILY</period-frequency>\\n      </recurring-period>\\n    </charge-policy>\\n    <recurring-plan-settings />\\n  </pricing-settings>\\n</catalog-sku>'\",\n      \"language\": \"curl\",\n      \"name\": \"change subscription SKU settings\"\n    },\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/catalog/skus/2181160 \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<catalog-sku xmlns=\\\"http://ws.plimus.com\\\">\\n   <sku-name>new CRUD API product Standard monthly SUB - base currency USD</sku-name>\\n   <contract-name>Standard monthly SUB - base currency USD</contract-name>\\n   <product-id>307634</product-id>\\n   <sku-status>D</sku-status>\\n   <sku-type>DIGITAL</sku-type>\\n   <pricing-settings>\\n      <charge-policy-type>STANDARD SUBSCRIPTION</charge-policy-type>\\n      <charge-policy>\\n         <recurring-period>\\n            <catalog-prices>\\n               <catalog-price>\\n                  <base-price>true</base-price>\\n                  <currency>USD</currency>\\n                  <amount>10.00</amount>\\n               </catalog-price>\\n            </catalog-prices>\\n            <period-frequency>DAILY</period-frequency>\\n         </recurring-period>\\n      </charge-policy>\\n      <recurring-plan-settings>\\n         <charge-upon-plan-change>false</charge-upon-plan-change>\\n         <grace-period-length>99999</grace-period-length>\\n         <plan-charge-amount-limit>\\n            <currency>USD</currency>\\n            <amount>10.00</amount>\\n         </plan-charge-amount-limit>\\n      </recurring-plan-settings>\\n   </pricing-settings>\\n</catalog-sku>'\",\n      \"language\": \"curl\",\n      \"name\": \"delete SKU\"\n    }\n  ]\n}\n[/block]\n###Response Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/ 1.1 204 No Content\",\n      \"language\": \"http\",\n      \"name\": \"Update SKU Reponse\"\n    }\n  ]\n}\n[/block]\n<hr>\n\n##Example Descriptions\n \n###Update SKU: change SKU settings (one-time charge or subscription)\nThis example shows how to update product settings. Simply include the fields that you want to update in the request, with the new values.\n\n###Update SKU: delete SKU\nThis example shows how to delete a SKU by entering **D** in the `sku-status` field.\n\n<br>\n<a class=\"btn btn-primary\" href=\"#\" role=\"button\">Back to Top</a>","excerpt":"","slug":"update-sku","type":"endpoint","title":"Update SKU"}

Definition

https://sandbox.bluesnap.com/services/2/catalog/skus/:sku-id


Documentation

The Update SKU request enables you to update the settings of an existing SKU (contract) 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 204 No Content.
There is no content in the response body.
For details about possible errors, see: General Errors and Catalog Errors.


Examples

Request Examples

curl -v -X PUT https://sandbox.bluesnap.com/services/2/catalog/skus/307634 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<catalog-sku xmlns="http://ws.plimus.com">
  <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>100.00</amount>
          </catalog-price>
        </catalog-prices>
      </one-time-charge>
    </charge-policy>
  </pricing-settings>
</catalog-sku>'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/catalog/skus/2181160 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<catalog-sku xmlns="http://ws.plimus.com">
  <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>10.00</amount>
          </catalog-price>
        </catalog-prices>
        <period-frequency>DAILY</period-frequency>
      </recurring-period>
    </charge-policy>
    <recurring-plan-settings />
  </pricing-settings>
</catalog-sku>'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/catalog/skus/2181160 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<catalog-sku xmlns="http://ws.plimus.com">
   <sku-name>new CRUD API product Standard monthly SUB - base currency USD</sku-name>
   <contract-name>Standard monthly SUB - base currency USD</contract-name>
   <product-id>307634</product-id>
   <sku-status>D</sku-status>
   <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>10.00</amount>
               </catalog-price>
            </catalog-prices>
            <period-frequency>DAILY</period-frequency>
         </recurring-period>
      </charge-policy>
      <recurring-plan-settings>
         <charge-upon-plan-change>false</charge-upon-plan-change>
         <grace-period-length>99999</grace-period-length>
         <plan-charge-amount-limit>
            <currency>USD</currency>
            <amount>10.00</amount>
         </plan-charge-amount-limit>
      </recurring-plan-settings>
   </pricing-settings>
</catalog-sku>'

Response Examples

HTTP/ 1.1 204 No Content


Example Descriptions

Update SKU: change SKU settings (one-time charge or subscription)

This example shows how to update product settings. Simply include the fields that you want to update in the request, with the new values.

Update SKU: delete SKU

This example shows how to delete a SKU by entering D in the sku-status field.



Back to Top