# Issue wallet pass

- Operation ID: `issueWalletPassUsingGET`
- HTTP method: `GET`
- Path: `/device-hub/wallets/issue`
- [Human-readable API reference](https://hub.synerise.com/api-reference/loyalty-and-engagement#tag/Wallet-passes/operation/issueWalletPassUsingGET)

## Self-contained OpenAPI method

The fenced document below contains this method's documentation and all of its local references. It is self-contained; no category or master specification fetch is required.

```yaml
openapi: 3.0.0
info:
  title: Synerise Public API
  version: 1.9.1
paths:
  /device-hub/wallets/issue:
    get:
      tags:
        - Wallet passes
      summary: Issue wallet pass
      operationId: issueWalletPassUsingGET
      description: |
        **IMPORTANT**: This feature is in private preview mode and accessible only on selected workspaces. To get access, contact your account manager or Synerise Support.

        ---

        Handle issuing a wallet pass.
        - If the platform (IOS, ANDROID) is not specified, the endpoint returns a landing page where the user can choose their OS.
        - If the platform is specified, the endpoint issues a wallet card.

        To obtain the parameters required by this endpoint, generate a link with the `/wallets/issue/link` endpoint. You can also generate the link with Jinjava inserts in communication, for example in push messages or when rendering content from Brickworks.


        ---

        **Authentication:** Not required
      parameters:
        - name: clientUuid
          in: query
          required: false
          schema:
            type: string
            format: uuid
          description: When present, also goes into the HMAC payload depending on the wallet pass record configuration. If an UUID was used to generate the link, make sure to use the same UUID when issuing the wallet pass.
        - name: issueId
          in: query
          required: true
          schema:
            type: string
            format: uuid
          description: Primary key for the IssueLinkEntity lookup. Returned as part of the link by `/wallets/issue/link` or a Jinjava insert.
        - name: hmac
          in: query
          required: true
          schema:
            type: string
          description: Base64url-no-padding HMAC-SHA256 returned as part of the link by `/wallets/issue/link` or a Jinjava insert.
        - name: platform
          in: query
          required: false
          schema:
            type: string
            enum:
              - IOS
              - ANDROID
            description: Mobile phone operating system
          description: |
            When absent, the server renders the HTML landing page. When platform is specified, then wallet pass issuance is performed for selected platform.
      responses:
        "200":
          description: "OK: Apple .pkpass file or landing page with platform selection"
          content:
            text/html:
              schema:
                type: string
                description: Returns the rendered landing page where the user can select their platform. Selecting the button makes a new request to this endpoint, with the `platform` parameter.
            application/vnd.apple.pkpass:
              schema:
                type: string
                description: .pkpass file
                format: binary
        "302":
          description: |
            Found - Issued wallet pass for Android. The Location header points at `https://pay.google.com/gp/v/save/<jwt>`. Empty body.
          headers:
            Location:
              description: The Google Wallet save-jwt URL the browser should follow.
              schema:
                type: string
                format: uri
                example: https://pay.google.com/gp/v/save/eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
        "400":
          description: |
            Bad Request - Missing/malformed required query parameter, malformed platform enum value, or HMAC verification failed (rendered as the link-error view for the HMAC case).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
        "404":
          description: |
            Not Found - issueId not found in issue_links (including soft-deleted entries), or the wallet pass record's googleCredentialId does not resolve to a credential for this tenant.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
        "410":
          description: Gone - The issue link has expired.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
        "500":
          description: |
            Internal Server Error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
        "502":
          description: |
            Bad Gateway - another service or Google Wallet returned an error or is unreachable.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Wallet-passes/operation/issueWalletPassUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/device-hub/wallets/issue?clientUuid=SOME_STRING_VALUE&issueId=SOME_STRING_VALUE&hmac=SOME_STRING_VALUE&platform=SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            conn.request("GET", "/device-hub/wallets/issue?clientUuid=SOME_STRING_VALUE&issueId=SOME_STRING_VALUE&hmac=SOME_STRING_VALUE&platform=SOME_STRING_VALUE")

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/device-hub/wallets/issue?clientUuid=SOME_STRING_VALUE&issueId=SOME_STRING_VALUE&hmac=SOME_STRING_VALUE&platform=SOME_STRING_VALUE");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/device-hub/wallets/issue?clientUuid=SOME_STRING_VALUE&issueId=SOME_STRING_VALUE&hmac=SOME_STRING_VALUE&platform=SOME_STRING_VALUE",
              "headers": {}
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/device-hub/wallets/issue');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'clientUuid' => 'SOME_STRING_VALUE',
              'issueId' => 'SOME_STRING_VALUE',
              'hmac' => 'SOME_STRING_VALUE',
              'platform' => 'SOME_STRING_VALUE'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/device-hub/wallets/issue?clientUuid=SOME_STRING_VALUE&issueId=SOME_STRING_VALUE&hmac=SOME_STRING_VALUE&platform=SOME_STRING_VALUE")
              .asString();
servers:
  - description: Microsoft Azure EU
    url: https://api.synerise.com
  - description: Microsoft Azure USA
    url: https://api.azu.synerise.com
  - description: Google Cloud Platform
    url: https://api.geb.synerise.com
tags:
  - name: Wallet passes
```
