---
title: "List coupon sets"
description: "Archived sets are left out unless include_archived=true."
canonical_url: "https://twominutebilling.com/help/developers/api-reference/catalog/list-coupon-sets"
---
# List coupon sets

> Archived sets are left out unless include_archived=true.

<api-operation method="GET" path="/v1/businesses/{biz}/coupon_sets">
<template v-slot:docs="">

Archived sets are left out unless `include_archived=true`.

## Path parameters

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        biz
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      Business id (biz_…)
    </td>
  </tr>
</tbody>
</table>

## Query parameters

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        include_archived
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Set to <code>
        true
      </code>
      
       to also list archived rows.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limit
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Opt-in paging. Without <code>
        limit
      </code>
      
       or <code>
        starting_after
      </code>
      
       every matching row is returned as <code>
        { object, data }
      </code>
      
      ; <code>
        q
      </code>
      
      , <code>
        sort_by
      </code>
      
       and <code>
        field[op]
      </code>
      
       filters apply either way. With either, the response is one page with <code>
        has_more
      </code>
      
      , <code>
        next_cursor
      </code>
      
       and <code>
        total
      </code>
      
       (<code>
        limit
      </code>
      
       defaults to 50).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        starting_after
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Opaque cursor from a previous next_cursor
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        offset
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      The previous page's next_offset — the same token as next_cursor under a second name. Pass one of offset or starting_after, not two different values.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        q
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Matches id or name
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        sort_by[asc]
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Sort ascending by this field.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        sort_by[desc]
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Sort descending by this field.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        id
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Filter on <code>
        id
      </code>
      
      . Send as <code>
        id[<operator>]=<value>
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        name
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Filter on <code>
        name
      </code>
      
      . Send as <code>
        name[<operator>]=<value>
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        coupon
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Filter by the coupon's id (a slug id, e.g. <code>
        welcome-10
      </code>
      
      ).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        created_at
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Filter on <code>
        created_at
      </code>
      
      . Send as <code>
        created_at[<operator>]=<value>
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        archived_at
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Filter on <code>
        archived_at
      </code>
      
      . Send as <code>
        archived_at[<operator>]=<value>
      </code>
      
      .
    </td>
  </tr>
</tbody>
</table>

## Response

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The object type; always <code>
        list
      </code>
      
      . One of <code>
        list
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data
      </code>
    </td>
    
    <td>
      <code>
        array of object
      </code>
    </td>
    
    <td>
      The rows on this page.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.object
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The object type.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The coupon set's id (<code>
        launch-codes
      </code>
      
      ).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.name
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The coupon set's name.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.coupon
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The id of the coupon the codes in this set redeem (a slug id, e.g. <code>
        welcome-10
      </code>
      
      ).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.total_count
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Number of codes in the set.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.redeemed_count
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Number of codes already redeemed.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.archived_count
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Codes withdrawn via archive — spent, but not by a customer.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.unredeemed_count
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Still redeemable. Not total_count − redeemed_count: archived codes are neither.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.created_at
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      When the coupon set was created (ISO-8601 UTC).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.archived_at
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      When the set was archived (ISO-8601 UTC), or null.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.metadata
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      Key-value pairs you attach to the coupon set.
    </td>
  </tr>
</tbody>
</table>

## Status codes

<table>
<thead>
  <tr>
    <th>
      Status
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        200
      </code>
    </td>
    
    <td>
      Success
    </td>
  </tr>
</tbody>
</table>
</template>

<template v-slot:request="">

```bash [Request]
curl "$TMBILLING_URL/v1/businesses/biz_XXXXXXXXXXXX01/coupon_sets?limit=10" \
  -H "Authorization: Bearer $TMBILLING_API_KEY"
```

</template>

<template v-slot:response="">

```json [200 OK]
{
  "object": "list",
  "data": [
    {
      "object": "coupon_set",
      "id": "launch-codes",
      "name": "Welcome 10% off",
      "coupon": "welcome-10",
      "total_count": 2900,
      "redeemed_count": 1,
      "archived_count": 1,
      "unredeemed_count": 1
    }
  ]
}
```

</template>
</api-operation>


## Sitemap

See the full [sitemap](https://twominutebilling.com/sitemap.md) for all pages.
