openapi: 3.0.1
info:
  title: Asset Service API Specification
  description: The Asset REST Service provides API endpoints related to assets
  version: 1.0.79
servers:
- description: ''
  url: https://api.uat.btx.fr.banqup.com/core/asset
- description: ''
  url: https://api.uat.btx.eu.banqup.com/core/asset
paths:
  /v1/assets/{asset}:
    get:
      tags:
      - Asset Service
      summary: Retrieve asset
      description: 'Retrieve asset <br/> Scope: asset_retrieve'
      operationId: retrieveAsset
      parameters:
      - name: Accept
        in: header
        required: false
        schema:
          type: array
          items:
            type: string
      - name: Accept-Language
        in: header
        required: false
        schema:
          type: array
          items:
            type: string
      - name: asset
        in: path
        required: true
        schema:
          type: string
      - name: type
        in: query
        required: false
        schema:
          type: string
      - name: l
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Retrieved asset
          content:
            '*/*':
              schema:
                type: object
        '406':
          description: Not acceptable asset parameters
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '500':
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 500
                error: INTERNAL
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50
                type: about:blank
                title: Internal Server Error
                detail: The server encountered an unexpected error.
      security:
      - asset_service:
        - asset_retrieve
    post:
      tags:
      - Asset Service
      summary: Resolve asset
      description: 'Resolve asset <br/> Scope: asset_resolve'
      operationId: resolveAsset
      parameters:
      - name: Accept
        in: header
        required: false
        schema:
          type: array
          items:
            type: string
      - name: Accept-Language
        in: header
        required: false
        schema:
          type: array
          items:
            type: string
      - name: asset
        in: path
        required: true
        schema:
          type: string
      - name: type
        in: query
        required: false
        schema:
          type: string
      - name: l
        in: query
        required: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetInput'
        required: true
      responses:
        '406':
          description: Not acceptable asset parameters
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '500':
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 500
                error: INTERNAL
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50
                type: about:blank
                title: Internal Server Error
                detail: The server encountered an unexpected error.
        '200':
          description: Resolved asset
          content:
            '*/*':
              schema:
                type: object
      security:
      - asset_service:
        - asset_resolve
components:
  schemas:
    AssetInput:
      type: object
      properties:
        recipient:
          $ref: '#/components/schemas/Recipient'
        data:
          type: object
    Recipient:
      type: object
      properties:
        id:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        language:
          type: string
        email:
          type: string
        mobile:
          type: string
        brand:
          type: string
    ApiErrorProblemDetail:
      required:
      - error
      - requestId
      - timestamp
      type: object
      properties:
        status:
          type: integer
          format: int32
        error:
          type: string
        requestId:
          type: string
        timestamp:
          type: string
          format: date-time
        type:
          type: string
          format: uri
        title:
          type: string
        detail:
          type: string
        instance:
          type: string
          format: uri
        problems:
          type: array
          items:
            $ref: '#/components/schemas/NestedProblem'
        properties:
          type: object
          additionalProperties:
            type: object
    NestedProblem:
      required:
      - detail
      - error
      - title
      type: object
      properties:
        error:
          type: string
        title:
          type: string
        detail:
          type: string
        type:
          type: string
          format: uri
  securitySchemes:
    asset_service:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://api.uat.btx.fr.banqup.com/v1/oauth20/authorization
          tokenUrl: https://api.uat.btx.fr.banqup.com/v1/oauth20/token_kc
          scopes:
            asset_retrieve: Can retrieve assets
            asset_resolve: Can resolve assets
