---
title: "Virtualizes the specified gift card which must be already active."
url: "https://developer-qual.migros.ch/apis/gift-cards-8/versions/b5f9bbcd-ab06-4dcd-a09c-7fc0b4a1baf0/operations/virtualize-personal-giftcard"
---

> Full API specification: https://developer-qual.migros.ch/apis/gift-cards-8/versions/b5f9bbcd-ab06-4dcd-a09c-7fc0b4a1baf0.md

# Virtualizes the specified gift card which must be already active.

`POST` `/migros/customers/payment-methods/v1/personal-giftcards/{person_id}/cards/{card_id}/virtualize`

Operation ID: `virtualize-personal-giftcard`

This registers the information that this gift card is used on an electronic system into the gift card server. This call fetches the gift card to check if it really is already active, then creates a transaction for the gift card, and sends a fake activation call to the gift card server. This activation is expected to fail (as the card is already active) but will be logged on the gift card server side so that people know that this card is associated with a mobile device.

## Path parameters

- `person_id` (string, required) - Customer's person ID.
- `card_id` (string, required) - Gift Card ID to activate.

## Query parameters

- `pin` (string, required) - Gift Card Pin. Required for security reasons, even though not mandatory by gift card SOAP service.
- `POS_ID` (string, optional) - Gift Card POS Protocol Specification Version 1.5.0.
- `TERMINAL_ID` (string, optional) - Gift Card POS Protocol Specification Version 1.5.0.
- `STORE_ID` (string, optional) - Store Number/Merchant number.
- `SELLER_NAME` (string, optional) - The name of the sales person.
- `POS_TIMESTAMP` (string, date-time, optional) - Local transaction date from POS.
- `POS_TRANS_ID` (string, optional) - Transaction ID from POS.

## Responses

- `200` - Returned when successful
- `400` - Returned when the request is incorrect
- `404` - Returned when the gift card is not found
- `502` - Returned when the gift card backend has a problem

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Gift Cards
  version: "8"
servers:
  - description: URL of upstream
    url: https://api-qual.migros.ch
paths:
  /migros/customers/payment-methods/v1/personal-giftcards/{person_id}/cards/{card_id}/virtualize:
    post:
      description: >-
        This registers the information that this gift card is used on an
        electronic system into the gift card server.

        This call fetches the gift card to check if it really is already active,
        then creates a transaction for the gift card,

        and sends a fake activation call to the gift card server. This
        activation is expected to fail (as the card is already active)

        but will be logged on the gift card server side so that people know that
        this card is associated with a mobile device.
      operationId: virtualize-personal-giftcard
      parameters:
        - description: Customer's person ID.
          in: path
          name: person_id
          required: true
          schema:
            type: string
        - description: Gift Card ID to activate.
          in: path
          name: card_id
          required: true
          schema:
            type: string
        - description: Gift Card Pin. Required for security reasons, even though not
            mandatory by gift card SOAP service.
          in: query
          name: pin
          required: true
          schema:
            type: string
        - description: Gift Card POS Protocol Specification Version 1.5.0.
          in: query
          name: POS_ID
          schema:
            maxLength: 16
            type: string
        - description: Gift Card POS Protocol Specification Version 1.5.0.
          in: query
          name: TERMINAL_ID
          schema:
            maxLength: 16
            type: string
        - description: Store Number/Merchant number.
          in: query
          name: STORE_ID
          schema:
            maxLength: 16
            type: string
        - description: The name of the sales person.
          in: query
          name: SELLER_NAME
          schema:
            maxLength: 16
            type: string
        - description: Local transaction date from POS.
          in: query
          name: POS_TIMESTAMP
          schema:
            format: date-time
            type: string
        - description: Transaction ID from POS.
          in: query
          name: POS_TRANS_ID
          schema:
            maxLength: 16
            type: string
      responses:
        "200":
          description: Returned when successful
        "400":
          description: Returned when the request is incorrect
        "404":
          description: Returned when the gift card is not found
        "502":
          description: Returned when the gift card backend has a problem
      summary: Virtualizes the specified gift card which must be already active.
      tags:
        - Gift Cards
security:
  - Kong-Api-Key: []
    basicAuth: []
components:
  securitySchemes:
    Kong-Api-Key:
      description: Kong key-auth authentication
      in: header
      name: X-Api-Key
      type: apiKey
    basicAuth:
      scheme: basic
      type: http
```
