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

# Generate coupon wallet pass

> Generate an Apple/Google wallet pass for a redeemed coupon.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v2/wallet/passes/coupons/
openapi: 3.0.3
info:
  title: Zupy API v2
  version: 2.0.0
  description: >-
    Zupy API v2 — versioned, gateway-aware API with envelope responses, RFC 7807
    errors, and multi-auth support (JWT, API Key, Device Key).
servers:
  - url: https://api.zupy.com
    description: Production
security: []
tags:
  - name: Authentication
    description: OTP request and verification endpoints
  - name: Customers
    description: Customer management, points, history, and data operations
  - name: Loyalty Programs
    description: Loyalty program configuration and details
  - name: Rewards
    description: Loyalty reward catalog (definitions redeemed with points)
  - name: Companies
    description: Company information and loyalty configuration
  - name: Coupons
    description: >-
      Issued coupons (RewardRedemption) — both loyalty-reward redemptions and
      marketing claims
  - name: Wallet
    description: Apple Wallet pass generation and notifications
  - name: Webhooks
    description: Partner integration webhook endpoints
  - name: Webhook Management
    description: Configure and test outbound webhook delivery
paths:
  /api/v2/wallet/passes/coupons/:
    post:
      tags:
        - Wallet
      summary: Generate coupon wallet pass
      description: Generate an Apple/Google wallet pass for a redeemed coupon.
      operationId: wallet_passes_coupons_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CouponPassRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CouponPassRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CouponPassRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CouponPassResponse'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
      security:
        - apiKeyAuth: []
components:
  schemas:
    CouponPassRequest:
      type: object
      description: Coupon pass generation request parameters.
      properties:
        customer_id:
          type: string
          maxLength: 27
        coupon_id:
          type: string
          maxLength: 27
        platform:
          $ref: '#/components/schemas/PlatformEnum'
      required:
        - coupon_id
        - customer_id
        - platform
    CouponPassResponse:
      type: object
      description: Coupon pass generation result with pass URL and status.
      properties:
        id:
          type: string
        pass_url:
          type: string
          format: uri
        platform:
          type: string
        coupon_title:
          type: string
        expiry_date:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
      required:
        - coupon_title
        - created_at
        - expiry_date
        - id
        - pass_url
        - platform
    Error:
      type: object
      description: RFC 7807 Problem Details error response.
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        instance:
          type: string
      required:
        - detail
        - instance
        - status
        - title
        - type
    ValidationError:
      type: object
      description: RFC 7807 error with validation errors array.
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        instance:
          type: string
        errors:
          type: array
          items:
            $ref: '#/components/schemas/FieldError'
      required:
        - detail
        - errors
        - instance
        - status
        - title
        - type
    PlatformEnum:
      enum:
        - apple
        - google
      type: string
      description: |-
        * `apple` - Apple
        * `google` - Google
    FieldError:
      type: object
      description: Individual field error in a validation error response.
      properties:
        field:
          type: string
        detail:
          type: string
      required:
        - detail
        - field
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Per-company partner API key (zupy_pk_…). Validated by Zupy against the
        company integration key hash (Story 14.x); send it on every request as
        the X-API-Key header. Scoped read-write to the owning company's data.

````