> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slm.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List All Discount Tickets

## V2

This topic shows information relevant specifically for Subscribe REST API version 20210401 referred to as V2

Retrieves a list of Discount Tickets. This can be used to get a list of Discount Tickets per a Subscription or per a given Account.

**Note:** The call returns all redeemed and active discount tickets by default. Use Fetch all query parameters if discount tickets in other states are also required.

## HTTP Request

`GET https://api.vindicia.com/discount_tickets?subscription=subscription`

or

`GET https://api.vindicia.com/discount_tickets?account=account`

## Route (URL) Parameters

None.

## **Query Parameters**

| Parameter | Default | Description | Required |
| - | - | - | - |
| subscription | none | Limit the discount ticket list to a specified subscription **id** or **vid** | Yes (either subscription or account are required). |
| account | none | Limit the discount ticket list to a specified account **id** or **vid** | Yes (either subscription or account are required). |
| fetch\_all | none | A boolean parameter that allows you to list all the discount tickets including ones there are in inactive or redemption failed states. | No |
| include\_subscription\_tickets | none | A boolean parameter that indicates whether to return discount tickets for subscriptions | No |
| include\_transaction\_tickets | none | A boolean parameter that indicates whether to return discount tickets for transactions | No |
| limit | 20 | A limit on the number of objects to be returned, between 1 and 100. | No |
| starting\_after | none | A cursor for use in pagination. starting\_after is an object **id** that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj\_foo, your subsequent call can include starting\_after=obj\_foo in order to fetch the next page of the list. | No |
| ending\_before | none | A cursor for use in pagination. ending\_before is an object **id** that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj\_bar, your subsequent call can include ending\_before=obj\_bar in order to fetch the previous page of the list. | No |

## Accepts

None.

## Returns

JSON - A *list* array with a data property that contains an array of [Discount Tickets](Discount_Tickets) per an Account or Subscription, starting after the specified starting\_after (or ending before the specified ending\_before Discount Ticket).

A *list* of [Discount Tickets](Subscriptions) objects matching the query. Also:

* “total\_count”: Integer count of the number of Discount Tickets in the returned list.

* “url”: The query string provided in the request

* “next”: The route (partial URL) to the next Discount Ticket object (string to select the “next”); included **id** should match that of the last object returned here

* “previous”: The route (partial URL) to the previous Discount Ticket object (string to select the “previous”); included **id** should match that of the first object returned here

## Example Request

```

curl -X GET  \
-u acaff38d462f9430d5cbcbaf:a575771fc679b9de \
"https://api.staging.us-west.vindicia.com/discount_tickets?fetch_all=1&subscription=STlYDJVoREr3ac47jzf8_DA14Jg"
```

The above command returns JSON structured like this:

```

{
   "object": "List",
   "data": [
      {
         "object": "DiscountTicket",
         "id": "DIST_STlYDJVoREr3ac47jzf8_DA14Jg",
         "vid": "c9512b9217274f037b29e57640bf5070fe564fcc",
         "state": "Active",
         "added_date": "2021-06-18T13:49:51-07:00",
         "start_billing_sequence": 0,
         "end_billing_sequence": 0,
         "campaign_id": "PROMO1_campaign_mbjUhpf-vf_dV1wabhfexablOb4"
      },
      {
         "object": "DiscountTicket",
         "id": "DIST_STlYDJVoREr3ac47jzf8_DA13Kt",
         "vid": "d1f0050ca5482db5df190e48d96b07c37467fbba",
         "state": "Active",
         "added_date": "2021-06-18T13:50:00-07:00",
         "start_billing_sequence": 0,
         "end_billing_sequence": 0,
         "campaign_id": "PROMO2_campaign_srbUhpf-vf_dV1wabhfexablOg2"
      }
   ],
   "total_count": 2,
   "url": "/discount_tickets?fetch_all=1&subscription=STlYDJVoREr3ac47jzf8_DA14Jg",
   "next": "/discount_tickets?fetch_all=1&subscription=STlYDJVoREr3ac47jzf8_DA14Jg&starting_after=DIST_STlYDJVoREr3ac47jzf8_DA13Kt",
   "previous": "/discount_tickets?fetch_all=1&subscription=STlYDJVoREr3ac47jzf8_DA14Jg&ending_before=DIST_STlYDJVoREr3ac47jzf8_DA14Jg"
}
```

**Parent topic:**[Discount Tickets](../topics/Discount_Tickets)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.