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

# Post apikeycards

> Create a new keycard for a person



## OpenAPI

````yaml https://pratiq-docs.s3.eu-west-1.amazonaws.com/open-api/production/public/2025-02-18.json post /api/keycards
openapi: 3.0.0
info:
  title: Pricenow API
  version: '2025-02-18'
servers:
  - url: https://api.pricenow.dev
    description: Production Endpoint
security: []
tags: []
paths:
  /api/keycards:
    post:
      tags:
        - keycards
      description: Create a new keycard for a person
      parameters:
        - name: accept-language
          in: header
          description: Language of the response
          required: true
          schema:
            type: string
            enum:
              - en
              - de
              - fr
              - it
        - name: pratiq-channel-uuid
          in: header
          description: UUID of the sales channel
          required: true
          schema:
            type: string
        - name: personId
          in: query
          required: true
          schema:
            type: number
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  properties:
                    validity:
                      type: object
                      properties:
                        from:
                          type: string
                          format: date-time
                        to:
                          type: string
                          format: date-time
                      required:
                        - from
                        - to
                    keycardType:
                      type: string
                      enum:
                        - SWISSTRAVELPASS
                    cardId:
                      type: string
                  required:
                    - validity
                    - keycardType
                    - cardId
                - type: object
                  properties:
                    validity:
                      type: object
                      properties:
                        from:
                          type: string
                          format: date-time
                        to:
                          type: string
                          format: date-time
                      required:
                        - from
                        - to
                    keycardType:
                      type: string
                      enum:
                        - EUINTERRAIL
                    passId:
                      type: string
                  required:
                    - validity
                    - keycardType
                    - passId
                - type: object
                  properties:
                    zip:
                      type: string
                    keycardType:
                      type: string
                      enum:
                        - SWISSPASS
                    ausweisId:
                      type: string
                  required:
                    - zip
                    - keycardType
                    - ausweisId
                - type: object
                  properties:
                    keycardType:
                      type: string
                      enum:
                        - SKIDATA
                    dataCarrierId:
                      type: string
                  required:
                    - keycardType
                    - dataCarrierId
                - type: object
                  properties:
                    keycardType:
                      type: string
                      enum:
                        - AXESS
                    wtp:
                      type: string
                  required:
                    - keycardType
                    - wtp
                - type: object
                  properties:
                    countryCode:
                      type: string
                    keycardType:
                      type: string
                      enum:
                        - LICENSEPLATE
                    licensePlate:
                      type: string
                  required:
                    - countryCode
                    - keycardType
                    - licensePlate
                - type: object
                  properties:
                    keycardType:
                      type: string
                      enum:
                        - FERATEL
                    cardId:
                      type: string
                  required:
                    - keycardType
                    - cardId
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Checkout_Keycard'
                required:
                  - data
components:
  schemas:
    Checkout_Keycard:
      type: object
      properties:
        id:
          type: number
        dataCarrierId:
          type: string
        personId:
          type: number
        metaInformation:
          type: object
          additionalProperties:
            type: object
            properties: {}
          nullable: true
        type:
          type: string
          enum:
            - SKIDATA
            - AXESS
            - SWISSPASS
            - SWISSTRAVELPASS
            - LICENSEPLATE
            - FERATEL
            - EUINTERRAIL
      required:
        - id
        - dataCarrierId
        - personId
        - metaInformation
        - type

````