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

# Attach a coupon to a Physical Card Order

> This endpoint associates a provided coupon code with an existing card order by its `orderId`. Use the `GPDOCS` coupon code to get the card for free.



## OpenAPI

````yaml https://api.gnosispay.com/api-docs/spec.json post /api/v1/order/{orderId}/attach-coupon
openapi: 3.0.0
info:
  title: GnosisPay API
  version: 1.0.0
  description: OpenAPI documentation for GnosisPay
servers:
  - url: https://api.gnosispay.com
security: []
tags:
  - name: Account Management
    description: Information about your Account
  - name: Authentication
    description: Authenticate to our API using SIWE
  - name: Card Management
    description: Manage all your Cards
  - name: IBAN
    description: Integrate with Monerium to issue IBANs
  - name: KYC
    description: KYC using Sumsub SDK
  - name: Physical Card Order
    description: Order a Physical Card and manage the process
  - name: Rewards
    description: Cashback Rewards
  - name: Safe Management
    description: Manage your Safe
  - name: Transactions
    description: Manage Card Transactions
  - name: User
    description: Manage User Information
  - name: Webhooks
    description: Manage Webhooks
paths:
  /api/v1/order/{orderId}/attach-coupon:
    post:
      tags:
        - Physical Card Order
      summary: Attach a coupon to a Physical Card Order
      description: >-
        This endpoint associates a provided coupon code with an existing card
        order by its `orderId`. Use the `GPDOCS` coupon code to get the card for
        free.
      parameters:
        - in: path
          name: orderId
          required: true
          description: >-
            The unique identifier of the card order to which the coupon will be
            attached.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - couponCode
              properties:
                couponCode:
                  type: string
                  description: The coupon code to be applied to the order.
                  example: DISCOUNT2023
      responses:
        '200':
          description: Coupon successfully attached to the card order.
          content:
            application/json:
              schema:
                type: object
                properties:
                  couponCode:
                    type: string
                    description: The coupon code that was applied to the order.
                    example: DISCOUNT2023
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          description: Card order not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Details about the error.
                    example: Card order not found.
        '422':
          description: Coupon code is invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Details about the error.
                    example: Coupon code is invalid.
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Details about the server error.
                    example: An unexpected error occurred.
      security:
        - bearerAuth: []
components:
  responses:
    UnauthorizedError:
      description: Unauthorized Error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````