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

# List passes

> List passes for a template with pagination and sorting



## OpenAPI

````yaml /api-reference/openapi.json get /v1/pass/{templateId}/passes
openapi: 3.1.0
info:
  title: Passform API
  description: The Passform API for creating Google and Apple wallet passes
  version: 0.1.0
servers:
  - url: https://api.passform.io
security: []
tags:
  - name: mcp
    description: Routes exposed via the MCP server at /mcp
  - name: auth
    description: Routes for managing API keys
  - name: templates
    description: >-
      Templates represent the appearance of a pass. They include information on
      things such as icons, images, colours and text. A template is used by a
      pass to define how the pass should look and behave.
  - name: passes
    description: >-
      A pass is an individual instance based on a template. It contains details
      that are specific to its instance.
  - name: apple
    description: >-
      Routes used by apple to update passes and manage devices associated to
      passes.
externalDocs:
  url: https://swagger.io
  description: Find more info here
paths:
  /v1/pass/{templateId}/passes:
    get:
      tags:
        - passes
        - mcp
      summary: List passes
      description: List passes for a template with pagination and sorting
      operationId: listPasses
      parameters:
        - schema:
            type: string
          in: query
          name: accountId
          required: false
        - schema:
            minimum: 1
            maximum: 100
            default: 10
            type: integer
          in: query
          name: limit
          required: false
        - schema:
            type: string
          in: query
          name: pageToken
          required: false
        - schema:
            default: id
            anyOf:
              - type: string
                enum:
                  - voided
              - type: string
                enum:
                  - expiry
              - type: string
                enum:
                  - id
              - type: string
                enum:
                  - code
          in: query
          name: sortBy
          required: false
        - schema:
            default: desc
            anyOf:
              - type: string
                enum:
                  - asc
              - type: string
                enum:
                  - desc
          in: query
          name: sortOrder
          required: false
        - schema:
            type: string
          in: path
          name: templateId
          required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  passes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          minLength: 1
                          description: >-
                            Id is a unique identifier of the pass, it could be a
                            voucher code or membership id
                          type: string
                        templateId:
                          description: Template id used by this voucher
                          type: string
                        accountId:
                          description: The account id that created the pass/template
                          type: string
                        code:
                          minLength: 1
                          description: >-
                            The code that is used as data in the QR Code. This
                            can be different to the id if you wish to have a url
                            or more data in the QR code.
                          type: string
                        expiry:
                          anyOf:
                            - format: date-time
                              description: >-
                                The UTC date at which the pass expires. If this
                                is not provided the voucher will have no expiry.
                              type: string
                            - type: 'null'
                        validFrom:
                          anyOf:
                            - format: date-time
                              description: >-
                                The UTC date at which the pass becomes valid. If
                                this is not provided the pass is valid from when
                                it is created.
                              type: string
                            - type: 'null'
                        voided:
                          default: false
                          description: Set this to true once the pass has been used
                          type: boolean
                        primaryValue:
                          description: Required for 'generic' pass types.
                          type: string
                        metadata:
                          description: >-
                            Metadata is for your internal use. It is not exposed
                            to users through passes.
                             The metadata is limited to 5000 characters when serialized to JSON.
                          type: object
                          additionalProperties: {}
                        locations:
                          maxItems: 10
                          description: >-
                            Adds to the template's locations for this pass —
                            does not replace them. Combined list is subject to
                            each wallet platform's location limit.
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                description: >-
                                  The name of the location where the event is
                                  held.
                                type: string
                              address:
                                description: >-
                                  The address of the location where the event is
                                  held.
                                type: string
                              latitude:
                                description: The latitude of the location.
                                type: number
                              longitude:
                                description: The longitude of the location.
                                type: number
                              relevantText:
                                description: >-
                                  Text shown in the Apple Wallet notification
                                  when the device enters this location. Falls
                                  back to name, then address, if not set. Not
                                  used by Google Wallet, which has no
                                  per-location text.
                                type: string
                            required:
                              - address
                              - latitude
                              - longitude
                            example:
                              name: Spark Arena
                              address: >-
                                42/80 Mahuhu Crescent, Parnell, Auckland 1010,
                                New Zealand
                              latitude: -36.847136000000006
                              longitued: 174.7769837
                        fields:
                          maxItems: 4
                          type: array
                          items:
                            description: >-
                              A field that is displayed in a voucher, that is
                              identified by the key. It can be defined in a
                              template and overwritten in a pass
                            type: object
                            properties:
                              key:
                                description: >-
                                  The identifier of the field. This is not
                                  presented to the user.
                                type: string
                              label:
                                description: The label to go with the value.
                                type: string
                              value:
                                description: The data to display.
                                type: string
                            required:
                              - key
                              - label
                              - value
                            example:
                              key: voucher
                              label: free drinks
                              value: '1'
                        backFields:
                          description: The values can be text, numbers or urls.
                          type: array
                          items:
                            description: >-
                              A field that is displayed in a voucher, that is
                              identified by the key. It can be defined in a
                              template and overwritten in a pass
                            type: object
                            properties:
                              key:
                                description: >-
                                  The identifier of the field. This is not
                                  presented to the user.
                                type: string
                              label:
                                description: The label to go with the value.
                                type: string
                              value:
                                description: The data to display.
                                type: string
                            required:
                              - key
                              - label
                              - value
                            example:
                              key: voucher
                              label: free drinks
                              value: '1'
                        createdAt:
                          format: date-time
                          type: string
                        updatedAt:
                          format: date-time
                          type: string
                      required:
                        - id
                        - templateId
                        - accountId
                        - code
                        - expiry
                        - validFrom
                        - voided
                  nextPageToken:
                    type: string
                  totalCount:
                    type: integer
                required:
                  - passes
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/def-0'
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/def-0'
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/def-0'
      security:
        - bearerAuth: []
components:
  schemas:
    def-0:
      type: object
      properties:
        statusCode:
          type: number
        code:
          type: string
        error:
          type: string
        message:
          type: string
      title: HttpError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````