Retrieve Coupon

Definition

https://sandbox.bluesnap.com/services/2/coupons/:coupon-id
https://sandbox.bluesnap.com/services/2/coupons/resolve?couponcode=:couponcode


The Retrieve Coupon request enables you to retrieve details of an existing coupon. You can retrieve it based either on the coupon ID or the coupon code.


Request Content

Retrieve based on coupon ID

Enter the coupon-id into the web service URL, in the format:
services/2/coupons/{coupon-id}

For example:
services/2/coupons/149920

Retrieve based on coupon code

Enter the coupon code into the web service URL, in the format:
services/2/coupons/resolve?couponcode={couponcode}

For example:
services/2/coupons/resolve?couponcode=50off

Response Details

If successful, the response HTTP status code is 200 OK.
The response contains the retrieved coupon-info resource.
For details about possible errors, see: General Errors and Catalog Errors.


Examples

Request Examples

curl -v -X GET https://sandbox.bluesnap.com/services/2/coupons/149920 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='
curl -v -X GET https://sandbox.bluesnap.com/services/2/coupons/resolve?couponcode=testcode2 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='

Response Examples

<?xml version="1.0" encoding="UTF-8"?>
<coupon-info xmlns="http://ws.plimus.com">
  <coupon-id>149920</coupon-id>
  <product-owner-id>397248</product-owner-id>
  <coupon-name>test-coupon</coupon-name>
  <coupon-display-name>test-coupon</coupon-display-name>
  <minimal-amount>0</minimal-amount>
  <usage-count-limit>99999</usage-count-limit>
  <coupon-effective-date>29-Jun-17</coupon-effective-date>
  <one-per-email>false</one-per-email>
  <apply-recurring-charges>false</apply-recurring-charges>
  <coupon-discount-policy>
    <coupon-discount-type>PRICE</coupon-discount-type>
    <coupon-price>
      <price-discounts>
        <price-discount>
          <currency>USD</currency>
          <amount>20.00</amount>
        </price-discount>
      </price-discounts>
    </coupon-price>
  </coupon-discount-policy>
  <coupon-rules>
    <applied-skus-rule>INCLUDE_All</applied-skus-rule>
  </coupon-rules>
  <coupon-codes-info>
    <coupon-code-info>
      <coupon-code>testcode</coupon-code>
      <coupon-code-usage>2</coupon-code-usage>
    </coupon-code-info>
  </coupon-codes-info>
</coupon-info>
<?xml version="1.0" encoding="UTF-8"?>
<coupon-info xmlns="http://ws.plimus.com">
  <coupon-id>150400</coupon-id>
  <product-owner-id>397248</product-owner-id>
  <coupon-name>test-coupon2</coupon-name>
  <coupon-display-name>test-coupon2</coupon-display-name>
  <minimal-amount>10</minimal-amount>
  <usage-count-limit>99999</usage-count-limit>
  <coupon-effective-date>11-Aug-17</coupon-effective-date>
  <one-per-email>true</one-per-email>
  <apply-recurring-charges>false</apply-recurring-charges>
  <coupon-discount-policy>
    <coupon-discount-type>PERCENT</coupon-discount-type>
    <coupon-percent>
      <percent-discount>20</percent-discount>
    </coupon-percent>
  </coupon-discount-policy>
  <coupon-rules>
    <applied-skus-rule>EXCLUDE_ALL</applied-skus-rule>
    <coupon-exceptions>
      <sku-id>2180434</sku-id>
    </coupon-exceptions>
  </coupon-rules>
  <coupon-codes-info>
    <coupon-code-info>
      <coupon-code>testcode2</coupon-code>
      <coupon-code-usage>0</coupon-code-usage>
    </coupon-code-info>
  </coupon-codes-info>
</coupon-info>

Back to Top