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

# Get Coupons

> Retrieve a list of coupons

<RequestExample>
  ```bash Bash theme={null}
  curl --location --request GET 'https://client.corrily.com/v1/coupons'
  ```

  ```bash Bash theme={null}
  curl --location --request GET 'https://client.corrily.com/v1/coupons?name=Discount-1'
  ```
</RequestExample>

<ResponseExample>
  ```json Example theme={null}
  {
    "message": "Successfully retrieved all coupons.",
    "success": true,
    "coupons": [
      {
        "api_id": "coupon_1",
        "name": "Coupon_1",
        "currency": null,
        "coupon_type": {
            "coupon_type": "percentage"
        },
        "value": 10,
        "active_from": null,
        "active_till": null,
        "org": 1,
        "status": "ACTIVE",
        "created_at": "2024-01-17T09:40:18.058647+00:00",
        "updated_at": "2024-01-17T09:40:18.058647+00:00",
        "coupon_external_coupons": []
      }
    ]
  }
  ```
</ResponseExample>

## Query Params

<ParamField query="name" type="string">
  Filter coupons by name
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether or not the request completed successfully.
</ResponseField>

<ResponseField name="message" type="string">
  Text information about request status. In case of an error here will be a useful explanation.
</ResponseField>

<ResponseField name="coupons" type="array">
  An array of found coupons

  <Expandable>
    <ResponseField name="coupon" type="object">
      A coupon object

      <Expandable>
        <ResponseField name="api_id" type="string">
          Coupon's api\_id value
        </ResponseField>

        <ResponseField name="name" type="string">
          Coupon's name
        </ResponseField>

        <ResponseField name="currency" type="string">
          Coupon's currency. Can be null
        </ResponseField>

        <ResponseField name="coupon_type" type="object">
          Coupon\_type object

          <Expandable>
            <ResponseField name="coupon_type" type="string">
              Can be:

              * 'percentage' for coupons with discount in percents.
              * 'fixed\_amount' for coupons with fixed discount
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="value" type="number">
          Coupon's value for discount
        </ResponseField>

        <ResponseField name="active_from" type="string">
          ISODate value since which a coupon can be applied.
        </ResponseField>

        <ResponseField name="active_till" type="string">
          ISODate value until which a coupon can be used.
        </ResponseField>

        <ResponseField name="status" type="string">
          Coupon's status. Can be: "ACTIVE" and "NOT\_ACTIVE"
        </ResponseField>

        <ResponseField name="coupon_external_coupons" type="array">
          Attached to coupon external coupons

          <Expandable>
            <ResponseField name="coupon_external_coupon" type="object">
              An external coupon object

              <Expandable>
                <ResponseField name="external_coupon" type="object">
                  External coupon object

                  <Expandable>
                    <ResponseField name="source" type="string">
                      External coupon source. Can be: "STRIPE", "CHARGEBEE", "RECURLY"
                    </ResponseField>
                  </Expandable>
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>
