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

# Admin Get Coupon

> Fetch a single coupon by id.



## OpenAPI

````yaml /openapi/mio-openapi.json get /api/v1/teams/{team_id}/coupons/{coupon_id}
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /api/v1/teams/{team_id}/coupons/{coupon_id}:
    get:
      tags:
        - products-admin
      summary: Admin Get Coupon
      description: Fetch a single coupon by id.
      operationId: >-
        products_admin.get_products_admin_get_teams_by_team_id_coupons_by_coupon_id
      parameters:
        - in: path
          name: team_id
          required: true
          schema:
            title: Team Id
            type: string
        - in: path
          name: coupon_id
          required: true
          schema:
            title: Coupon Id
            type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/CouponResponse'
          description: Successful Response
        '401':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Authentication required.
        '403':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Forbidden — caller is not the team owner.
        '404':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Resource not found.
        '409':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Conflict — duplicate or already-attached resource.
        '415':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: >-
            Unsupported Media Type — write routes require `Content-Type:
            application/vnd.api+json`.
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Validation error or invalid query parameter.
        '429':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Too many requests — rate limit exceeded.
      security:
        - HTTPBearer: []
components:
  schemas:
    CouponResponse:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/CouponResource'
      required:
        - data
      title: CouponResponse
      type: object
    JsonApiErrorResponse:
      description: Error JSON:API response.
      properties:
        errors:
          items:
            $ref: '#/components/schemas/JsonApiError'
          title: Errors
          type: array
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
      required:
        - errors
      title: JsonApiErrorResponse
      type: object
    CouponResource:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/CouponAttributes'
        id:
          title: Id
          type: string
        type:
          const: coupons
          default: coupons
          title: Type
          type: string
      required:
        - id
        - attributes
      title: CouponResource
      type: object
    JsonApiError:
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        source:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Source
        status:
          title: Status
          type: string
        title:
          title: Title
          type: string
      required:
        - status
        - title
      title: JsonApiError
      type: object
    CouponAttributes:
      additionalProperties: false
      properties:
        code:
          title: Code
          type: string
        created_at:
          format: date-time
          title: Created At
          type: string
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        deleted_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Deleted At
        discount_type:
          title: Discount Type
          type: string
        discount_value:
          title: Discount Value
          type: integer
        expires_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Expires At
        first_time_only:
          title: First Time Only
          type: boolean
        is_active:
          title: Is Active
          type: boolean
        max_redemptions:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Redemptions
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
        redemption_count:
          title: Redemption Count
          type: integer
        team_id:
          title: Team Id
          type: string
        updated_at:
          format: date-time
          title: Updated At
          type: string
      required:
        - team_id
        - code
        - discount_type
        - discount_value
        - currency
        - max_redemptions
        - redemption_count
        - first_time_only
        - expires_at
        - is_active
        - metadata
        - created_at
        - updated_at
        - deleted_at
      title: CouponAttributes
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````