List deal types

A deal type is used to categorize a deal. You can use deal_type ids to further filter product/deal queries.

Request URL

[GET] http://api.popshops.com/v3/deal_types.xml
[GET] http://api.popshops.com/v3/deal_types.json

Response Formats

XML, JSON

Required request parameters

Parameter name Type Kind Allowed values Default value Description
account account Your API account key. You can find this on your API keys account page.

Optional request parameters

None

Response results

Node Attribute Kind Data Type Description
deal_types The container for all individual deal types.
deal_type An individual deal type.
deal_count count integer A count of deals that belong to the deal type.
idrequired primary_key integer The unique identifier for a deal type. This acts as a primary key that can be used to reference the deal type.
namerequired display string The display name of the deal type.

Resources

None

Sample response


<?xml version="1.0" encoding="UTF-8"?>
<response status="200" message="ok">
  <parameters>...</parameters>
  <results>
    <deal_types count="16">
      <deal_type deal_count="682" name="1-2-3 Day Only" id="18"></deal_type>
      <deal_type deal_count="4475" name="Coupon Code" id="2"></deal_type>
      <deal_type deal_count="181" name="Deal of Day" id="8"></deal_type>
      <deal_type deal_count="1086" name="Dollars Off Coupon" id="6"></deal_type>
      <deal_type deal_count="834" name="Free Gift" id="3"></deal_type>
      <deal_type deal_count="4145" name="Free Shipping" id="1"></deal_type>
      ...
    </deal_types>
  </results>
</response>

{
   "results":
   {
       "deal_types":
       {
           "count": 16,
           "deal_type":
           [
               {
                   "deal_count": 682,
                   "name": "1-2-3 Day Only",
                   "id": 18
               },
               {
                   "deal_count": 4475,
                   "name": "Coupon Code",
                   "id": 2
               },
               {
                   "deal_count": 181,
                   "name": "Deal of Day",
                   "id": 8
               },
               {
                   "deal_count": 1086,
                   "name": "Dollars Off Coupon",
                   "id": 6
               },
               {
                   "deal_count": 834,
                   "name": "Free Gift",
                   "id": 3
               },
               ...
           ]
       }
   },
   "status": 200,
   "parameters":
   [
       {
           "kind": "account",
           "value": "d1lg0my9c6y3j5iv5vkc6ayrd",
           "name": "account"
       }
   ],
   "message": "ok"
}