swagger: '2.0'
info:
  title: Thales TSH Transit Notification API - TSH to WS
  description: Thales TSH Transit Notification API - TSH to WS
  termsOfService: Copyright (c) 2019 Thales. All Rights Reserved
  version: 1.0.8
paths:
  /pushNotification:
    post:
      summary: Request to push a notification to enduser device
      description: This method is used by TSH to request Wallet Server to send a push notification on the enduser device for a specific virtual card.</br>         Wallet server shall take care of the notification deivery to the device.
      operationId: pushNotification
      produces:
        - application/json
      consumes:
        - application/json
      parameters:
        - $ref: '#/parameters/podHeader'
        - in: body
          name: body
          schema:
            $ref: '#/definitions/pushNotificationReq'
          description: pushNotification request payload
          required: true
      responses:
        '200':
          description: pushNotification response payload
          schema:
            $ref: '#/definitions/pushNotificationRes'
        '500':
          description: Internal Server Error
definitions:
  pushNotificationReq:
    type: object
    properties:
      requestHeader:
        $ref: '#/definitions/requestHeader'
      walletCardId:
        $ref: '#/definitions/walletCardId'
      seId:
        $ref: '#/definitions/seId'
    required:
      - requestHeader
      - walletCardId
      - seId
  requestHeader:
    type: object
    properties:
      requestId:
        $ref: '#/definitions/requestId'
      sessionId:
        $ref: '#/definitions/sessionId'
      generationDateTime:
        $ref: '#/definitions/generationDateTime'
    required:
      - requestId
      - sessionId
  requestId:
    type: string
    description: Unique request identifier
    minLength: 1
    maxLength: 48
  sessionId:
    type: string
    description: Unique session identifier used to trace the calls across systems during a use case.
    minLength: 1
    maxLength: 48
  generationDateTime:
    type: string
    description: |-
      Date time representing when the request or response has been generated.<br/>RFC3339 format. <br/>Example:
       - 2018-12-24T17:32:28Z
    format: date-time
  walletCardId:
    type: string
    description: The Wallet Card Identifier. Unique for each wallet card.
    minLength: 1
    maxLength: 64
  seId:
    type: string
    description: Secure Element Identifier
    pattern: '([0-9a-fA-F][0-9a-fA-F]){1,24}'
  pushNotificationRes:
    type: object
    properties:
      responseHeader:
        $ref: '#/definitions/responseHeader'
    required:
      - responseHeader
  responseHeader:
    type: object
    properties:
      responseId:
        $ref: '#/definitions/responseId'
      sessionId:
        $ref: '#/definitions/sessionId'
      generationDateTime:
        $ref: '#/definitions/generationDateTime'
      statusCode:
        type: number
        description: |
          Status code to the request
          |Status code | Description|
          |-------|-------|
          |0|OK|      
          |111|Missing mandatory parameter|
          |112|Bad parameter format|              
          |119|Unknown virtual card|                                                  
          |911|Operation failed|          
          |921|Unexpected server error|
      statusMessage:
        type: string
        description: Textual status message
    required:
      - responseId
      - sessionId
      - statusCode
  responseId:
    type: string
    description: Unique response identifier
    minLength: 1
    maxLength: 48
parameters:
  podHeader:
    name: x-pod
    in: header
    description: HTTP header identifying the pod and corresponding DNS hostname of the load balancer from which traffic is coming.</br> Subsequent API calls should be sent to this pod.
    required: true
    type: string
    maxLength: 128
