---
title: "List coupon codes across every set"
description: "?status= and ?coupon_set= are flat shorthands for the status and coupon_set filters below (a parameter name can only be declared once, so they are described here); the bracketed form…"
canonical_url: "https://twominutebilling.com/help/developers/api-reference/catalog/list-coupon-codes-across-every-set"
---
# List coupon codes across every set

> ?status= and ?coupon_set= are flat shorthands for the status and coupon_set filters below (a parameter name can only be declared once, so they are described here); the bracketed form…

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

`?status=` and `?coupon_set=` are flat shorthands for the `status` and `coupon_set` filters below (a parameter name can only be declared once, so they are described here); the bracketed form `?<field>[is]=` works too.

## 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>
        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 the code
    </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>
        code
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Filter on <code>
        code
      </code>
      
      . Send as <code>
        code[<operator>]=<value>
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        status
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Filter on <code>
        status
      </code>
      
      . Send as <code>
        status[<operator>]=<value>
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        coupon_set
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Filter by the coupon set's id (a slug id, e.g. <code>
        launch-codes
      </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>
        redeemed_at
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Filter on <code>
        redeemed_at
      </code>
      
      . Send as <code>
        redeemed_at[<operator>]=<value>
      </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>
</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.code
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The code string.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.status
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The code's status. One of <code>
        not_redeemed
      </code>
      
      , <code>
        redeemed
      </code>
      
      , <code>
        archived
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.redeemed_at
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      When the code was redeemed (ISO-8601 UTC), or null.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.coupon_set
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      On the cross-set list, the code retrieve and paged per-set lists
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.coupon
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The parent coupon, where coupon_set is present
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.subscription
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      Subscription the code was redeemed on; null until redeemed.
    </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>
  
  <tr>
    <td>
      <code>
        404
      </code>
    </td>
    
    <td>
      No such coupon set
    </td>
  </tr>
</tbody>
</table>
</template>

<template v-slot:request="">

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

</template>

<template v-slot:response="">
<code-group>

```json [200 OK]
{
  "object": "list",
  "data": [
    {
      "object": "coupon_code",
      "code": "welcome-10",
      "status": "not_redeemed"
    }
  ]
}
```

```json [404 Not Found]
{
  "error": {
    "type": "invalid_request_error",
    "message": "No such coupon set"
  }
}
```

</code-group>
</template>
</api-operation>


## Sitemap

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