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

# archiveOneCoupon



**mutation** `archiveOneCoupon(input: ArchiveCouponInput!): Coupon!`

## Arguments

**`input`**: `ArchiveCouponInput!` (required)

## Returns

`Coupon!`

**`additionalMetaData`**: `JSON`

Metadata associated with the entity

---

**`amountsOff`**: `[Money!]`

Fixed amount discounts in different currencies. Provide exactly one of percentOff or amountsOff — not both, not neither.

---

**`billingId`**: `String`

The unique identifier for the entity in the billing provider

---

**`billingLinkUrl`**: `String`

The URL to the entity in the billing provider

---

**`createdAt`**: `DateTime!`

Timestamp of when the record was created

---

**`customers`**: `[Customer!]`

**Arguments:**

- `filter`: `CustomerFilter` = {} — Specify to filter the records returned.
- `sorting`: `[CustomerSort!]` = [{direction: DESC, field: createdAt}] — Specify to sort results.

---

**`description`**: `String`

Description of the coupon

---

**`discountValue`**: `Float!`

Discount value of the coupon (deprecated)

> Deprecated: Use percentOff or amountsOff fields instead

---

**`durationInMonths`**: `Float`

How many calendar months the discount applies for once redeemed, counted from when the coupon is applied (not tied to the subscription's billing period). Leave unset for a discount that lasts for the lifetime of the subscription.

---

**`environment`**: `Environment`

---

**`environmentId`**: `UUID!`

The unique identifier for the environment

---

**`id`**: `UUID!`

Unique identifier for the entity

---

**`name`**: `String!`

Name of the coupon

---

**`percentOff`**: `Float`

Percentage discount off the original price. Provide exactly one of percentOff or amountsOff — not both, not neither.

---

**`refId`**: `String!`

The unique identifier for the entity

---

**`source`**: `CouponSource!`

The source of the coupon

---

**`status`**: `CouponStatus!`

Current status of the coupon

---

**`syncStates`**: `[SyncState!]`

---

**`type`**: `CouponType!`

Type of the coupon (percentage or fixed amount)

---

**`updatedAt`**: `DateTime!`

Timestamp of when the record was last updated

## Examples

```graphql Mutation
mutation ArchiveOneCoupon($input: ArchiveCouponInput!) {
  archiveOneCoupon(input: $input) {
    additionalMetaData
    amountsOff {
      amount
      currency
    }
    billingId
    billingLinkUrl
    createdAt
    customers {
      additionalMetaData
      awsMarketplaceCustomerId
      billingCurrency
      billingId
      billingLinkUrl
      coupon {
        __typename
      }
    }
  }
}
```

```json Variables
{
  "input": {
    "refId": "string"
  }
}
```

```json Response
{
  "data": {
    "archiveOneCoupon": {
      "additionalMetaData": "value",
      "amountsOff": [
        {
          "amount": 1.5,
          "currency": "AED"
        }
      ],
      "billingId": "string",
      "billingLinkUrl": "string",
      "createdAt": "value",
      "customers": [
        {
          "additionalMetaData": "value",
          "awsMarketplaceCustomerId": "string",
          "billingCurrency": "AED",
          "billingId": "string",
          "billingLinkUrl": "string",
          "coupon": {
            "__typename": "Coupon"
          }
        }
      ]
    }
  }
}
```


## Related topics

- [Archive coupon](https://docs.stigg.io/api-reference/coupons/archive-coupon.md)
- [ArchiveCouponInput](https://docs.stigg.io/graphql-reference/types/ArchiveCouponInput.md)
- [archiveOneProduct](https://docs.stigg.io/graphql-reference/mutations/archiveOneProduct.md)
- [Archiving coupons](https://docs.stigg.io/documentation/modeling-your-pricing-in-stigg/coupons/archiving-coupons.md)
- [Coupon archived](https://docs.stigg.io/api-reference/coupons/coupon-archived.md)


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