swagger: '2.0'
schemes: 
  - https
host: yourHost
produces:
  - application/json; charset=utf-8
consumes:
  - application/json; charset=utf-8
info:
  title: Zuora Revenue API Reference
  x-logo:
    url: https://www.zuora.com/wp-content/uploads/2016/10/zuora-dev-logo-api-ref.svg
  version: 2020-4-21
  description: |

    # Introduction


    Welcome to the reference for Zuora Revenue REST API!


    REST is a web-service protocol that lends itself to rapid development by 
    using everyday HTTP and JSON technology. Zuora Revenue provides various REST 
    APIs for data integration. Use these REST APIs to authenticate and integrate 
    data from the source ERP systems with Zuora Revenue.
    
    
    This reference provides detailed descriptions about functions, requests, and responses of each REST API.

    Zuora Revenue REST APIs can be broadly classified into the following categories:

     * Authentication

     * Inbound

     * Outbound 
     
    **Remember:** Both the inbound and outbound operations require an authentication token to perform integration.
    You can obtain the token by using the Authentication operation.


    ## Endpoints

    After the APIs are provisioned in Zuora Revenue Cloud, you can get the endpoint and use that endpoint to call the APIs.

  

    ## Requirements

    Before you use the Zuora Revenue APIs, make sure the following requirements are met:

      * Zuora Revenue uses role based access control to restrict system access to authorized users. 
    To use the Zuora Revenue APIs, make sure that your user role has the **Webservices Inbound** 
    and **Webservices Outbound** previleges in Zuora Revenue security settings. For more information, 
    see <a href="https://knowledgecenter.zuora.com/Zuora_Revenue/B_System_Related_Configuration/B_Manage_user_access" target="_blank">Manage User Access</a>.      
      * To use the inbound operations to upload data into Zuora Revenue, the upload templates must be created by using the **File Upload** menu options in the Zuora Revenue UI. 
      Currently, the APIs support transaction upload, bundle upload, and event upload.
      * To use the outbound operations, the outbound GL interface mapping must be set up in the Zuora Revenue UI (**Setups > Application > Interface Setup**). 

    
    ## Requests and Responses

    Zuora Revenue APIs support the JSON format of HTTP responses. Inbound operations for data upload support the CSV format only.


    ## Inbound Data Error

    All the inbound data into Zuora Revenue are first loaded into pre-stage tables, namely CUST_UI tables in Zuora Revenue,
    and then pushed to the corresponding staging tables from CUST_UI tables. 


    If the data fails in the CUST_UI tables, the entire batch of records will be marked as `Failed`.
    It means All or Nothing approach will be followed when data is being inserted to the CUST_UI tables. 
    If the data has been successfully inserted into the CUST_UI tables, it will then be automatically pushed to 
    the staging tables and no manual work is required. 


    Any uncollected data that remains in the staging tables can be manually fixed or downloaded, and can be reposted from the upstream systems. 
    
    
    You can use the Stage Error operations to retrieve error information about the uploaded data.

tags:
  - name: Authentication
    description: |
      The Authentication operation is the authentication layer when you integrate
      data with Zuora Revenue APIs. Currently, this operation supports the basic authentication
      with Zuora Revenue username and password. 
      
      
      To acquire the token, you must provide the role and client ID along with basic 
      authorization in the HTTP request header. Username and password are base64-encoded texts 
      that are passed in the HTTP authorization header. 


      An example of basic authorization header is as follows:       
      
      `Basic c3lzYWRtaW46fsDFsgsV2cHJvJTEyMw==`


      Zuora Revenue can authenticate and generate a token that can be valid for
      a specific time period. If the issued token expires, you can call
      this operation again with valid credentials to get a new token.
      By default, a token will be valid for 30 minutes before it expires. Token expiration time 
      can be changed based on your integration needs during provisioning.


      An example of the returned authentication token is as follows:      
      
      ```eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2V
      ybmFtZSI6InZpbm90aC5iYWFsYWppIiwiaXNzIjoiUkV```
      
  - name: Adapter
    description: >
      The Adapter operation is used to retrieve field mapping information in an upload template definitions.
      The field mapping information determines the mapping between the staging field names and the label names
      in the upload file.

  - name: BI Views v1
    description: >
      The BI Views V1 operations are used to download data for Zuora Revenue standard BI views.


      **Note:** 
      
      * Only the standard Zuora Revenue BI views are supported. 
      
      * If the data volume to be processed exceeds 100k records per query, it is recommended to use <a href="https://www.zuora.com/developer/revpro-api/#tag/BI-Views-v2">BI Views V2</a> operations.

  - name: BI Views v2
    description: >
      **Note:** This feature is in **Limited Availability** and is currently released only to the **Zuora Revenue API Sandbox environment**. 
      We are actively soliciting feedback from a small set of early adopters before releasing as generally available.

      
      Starting from version 36.008.00, the BI Views V2 operations are provided to download data from the standard BI views.
      Compared with the previous version, BI Views V1, this new version has the following enhancements:
      
      
      * In addition to CSV format, data can also be downloaded in a compressed format, gzip.

      * The number of rows on each downloaded page is increased. In the CSV format, each page can contain up to 10,000 rows.
      In the gzip format, each page can contain up to 20,000 rows.

      * The data volume of up to 5 million rows per query can be supported by using the BI Views V2 operations.

      * A continuation token is introduced to accelerate data download for multiple pages. After a request is made for the first page,
      a continuation token is returned in the response header. Meanwhile, subsequent pages are cached by the system. Using the continuation token 
      in the subsequent requests will make the system to retrieve data from the cache instead of re-executing the query against the database.

      * An operation to query the row count is introduced. You can know the number of rows to be returned before the actual download. 


      For more information about the BI Views V2 operations, such as new feature introduction, suggested pattern to consume these APIs, 
      and sample codes, see <a href="https://knowledgecenter.zuora.com/Zuora_Revenue/Y_Integration_service_(BI_Views_V2)" target="_blank">Integration service (BI Views V2)</a> in Zuora Revenue Knowledge Center.

  - name: File Upload
    description: >
      The File Upload operations are used to upload large volumes of data as a CSV file in the HTTP body to Zuora Revenue
      and to get status information about the file upload.

    
      If the data volume is in the range of 40k-60k records per file per request, the Upload file operation can process 
      the data quickly. 
      
      A unique request ID is generated after the file is successfully received, which can be used 
      to query the upload status in the Get file upload status operation.    

  - name: Inbound
    description: >
      The Inbound operations are used to upload data in the CSV format to Zuora Revenue. As a prerequisite, 
      the upload template definitions must be present in Zuora Revenue. Then, you specify the template name, 
      file name, authentication token, and the CSV data in HTTP body of the inbound operations to upload data.
      It is recommended to use the Create upload operation for the CSV file than contains less than 20k lines. 


      After the data is uploaded to the pre-stage table, Zuora Revenue scheduler will load the
      CSV content to corresponding staging tables in Zuora Revenue. You can query the upload status
      by using the Get upload status operation.
   

  - name: Reports
    description: >
      The Reports operations are used to download reports that are generated in
      Zuora Revenue. 
 
        
  - name: Stage Error
    description: >
      The Stage Error operation is used to get the list of records that contain errors in
      the Zuora Revenue staging tables for transactions or events.

  - name: Transfer Accounting
    description: >
      The Transfer Accounting operations are used to support outbound data integrations. You 
      can use these operations to query the transfer batch information and to update the transfer
      batch status.
   
  - name: Transfer Accounting Files
    description: >
      The Transfer Accounting Files operation is used to download the transfer accounting 
      data in a CSV file from Zuora Revenue for a specific transfer batch.



paths:
  '/integration/v1/authenticate':
    post:
      operationId: POST_Authenticate
      description: >
        Authenticates and gets the Json Web Token to push and pull data from your Zuora Revenue
        instance.
      parameters:
        - default: Revpro API Role
          in: header
          name: role
          required: true
          type: string
        - default: Default
          in: header
          name: clientname
          required: true
          type: string
      x-code-samples:
      - lang: Curl
        source: |
          curl -X POST --header "Content-Type: application/json" --header "Accept: application/json" --header "role: Revpro API Role" --header "clientname: Default" --header "Authorization: Basic WklOR0FQSToxMnF3IUBRVw==" "https://yourHost/integration/v1/authenticate"
      responses:
        '200':
          description: Authentication token is returned.
          schema:
            properties:
              Message:
                default: Token Generated
                description: Token
                type: string
              status:
                default: success
                description: Response Status
                type: string
      security:
        - basicAuth: []
      summary: Create authentication
      tags:
        - Authentication
        
  '/integration/v1/fileupload/status/{file_request_id}':
    get:
      operationId: GET_FileUploadStatus
      description: Gets the status information about the specified file upload request.
      parameters:
        - in: header
          name: token
          required: true
          type: string
          description: The valid authentication token that is generated by the Authentication operation.
        - in: path
          name: file_request_id
          required: true
          type: integer
          description: The request ID of the file upload to be queried.
      x-code-samples:
      - lang: Curl
        source: |
          curl -X GET --header "Accept: application/json" --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0NTIxMywiaWF0IjoxNTA0NzQzNDEzLCJuYmYiOjE1MDQ3NDM0MTMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.umtarSxRc0KUld5RZkrZMwzIypQYdwFYBP5-d1Cbi1Q" --header "Authorization: Basic WklOR0FQSToxMnF3IUBRVw==" "https://yourHost/integration/v1/fileupload/status/12333"
      responses:
        '200':
          description: The status information is returned for the requested file upload.
          schema:
            properties:
              Result:
                items:
                  $ref: '#/definitions/uploadStatus'
                type: array
              message:
                default: Data Staged in RevPro Successfully
                description: Response Message
                type: string
              status:
                default: Success
                description: Response Status
                type: string
        '400':
          description: The status information cannot be retrieved for the specified request ID.
          schema:
            properties:
              message:
                default: No records found matching the file Job ID. Logs might have been truncated. Please contact RevPro support
                description: Response Message
                type: string
              status:
                default: Error
                description: Response Status
                type: string
      summary: Get file upload status
      tags:
        - File Upload
        
  '/integration/v1/upload/file':
    post:
      operationId: POST_UploadFile
      description: |
        Uploads a CSV file to Zuora Revenue.

        **Note:** Up to 60k lines per request can be supported by this operation.

      consumes:
        - multipart/form-data
      parameters:
        - in: header
          name: token
          required: true
          type: string
          description: The valid authentication token that is generated by the Authentication operation.
        - in: formData
          name: file
          required: true
          type: file
          description: The path to the CSV file that is to be uploaded.
        - in: header
          name: templatename
          required: true
          type: string
          description: Name of the upload template that you want to use.
        - in: header
          name: Content-Type
          required: true
          type: string
          description: Must be set to "multipart/form-data".
          enum:
            - multipart/form-data
      x-code-samples:
      - lang: Curl
        source: |
          curl -X POST \
            https://yourHost/integration/v1/upload/file \
            -H 'cache-control: no-cache' \
            -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
            -H 'postman-token: dbbd593e-f738-2b1e-5a08-8f675b6b02d7' \
            -H 'templatename: gsdf' \
            -H 'token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0NTIxMywiaWF0IjoxNTA0NzQzNDEzLCJuYmYiOjE1MDQ3NDM0MTMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.umtarSxRc0KUld5RZkrZMwzIypQYdwFYBP5-d1Cbi1Q' \
            -F 'file=@/Users/vin/Downloads/CDW Upload Template MO.csv'
      responses:
        '200':
          description: The file is uploaded to Zuora Revenue.
          schema:
            properties:
              message:
                default: File consumed successfully by Revpro
                description: Response Message
                type: string
              status:
                default: Success
                description: Response Status
                type: string
        '400':
          description: Exception occurs. Please contact Zuora Revenue Support.
          schema:
            properties:
              message:
                default: Exception occurred. Please contact RevPro Support
                description: Response Message
                type: string
              status:
                default: Error
                description: Response Status
                type: string
      summary: Upload file
      tags:
        - File Upload
        
  '/integration/v1/csv/upload/status':
    get:
      operationId: GET_UploadStatus
      description: Gets the status information about the Create upload operation.
      parameters:
        - in: header
          name: token
          required: true
          type: string
          description: The valid authentication token that is generated by the Authentication operation.
        - in: query
          name: id
          required: true
          type: integer
          description: The request ID of the uploaded file for which the status information is being queried.
      x-code-samples:
      - lang: Curl
        source: |
          curl -X GET --header "Accept: application/json" --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0NTIxMywiaWF0IjoxNTA0NzQzNDEzLCJuYmYiOjE1MDQ3NDM0MTMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.umtarSxRc0KUld5RZkrZMwzIypQYdwFYBP5-d1Cbi1Q" --header "Authorization: Basic WklOR0FQSToxMnF3IUBRVw==" "https://yourHost/integration/v1/csv/upload/status?id=10002"
      responses:
        '200':
          description: The status information is returned for the requested upload.
          schema:
            properties:
              result:
                properties:
                  client_id:
                    type: integer
                  id:
                    type: integer
                  message:
                    default: Data Received
                    type: string
                  status:
                    default: Successfully Uploaded
                    type: string
                type: object
              status:
                default: Success
                description: Response Response
                type: string
        '400':
          description: The status information cannot be retrieved for the specified request ID.
          schema:
            properties:
              Result:
                type: string
              message:
                default: No data found
                description: Default error message
                type: string
              status:
                default: Error
                description: Error Response
                type: string
      summary: Get upload status
      tags:
        - Inbound
        
  '/integration/v1/csv/upload':
    post:
      operationId: POST_Upload
      description: |
        Uploads the transaction, events, or bundle configuration data in the CSV
        format to Zuora Revenue.

        **Note:** Up to 20k lines per request can be supported by this operation. If the CSV file contains more than 20k lines, it is recommended to use the <a href="https://www.zuora.com/developer/revpro-api/#operation/POST_UploadFile">Upload file</a> operation. 
      parameters:
        - in: header
          name: token
          required: true
          type: string
          description: The valid authentication token that is generated by the Authentication operation.
        - in: header
          name: templatename
          required: true
          type: string
          description: The name of the upload template that you want to use.
        - in: header
          name: filename
          required: true
          type: string
          description: The unique file name to populate the data in the Zuora Revenue UI.
        - in: body
          name: data
          required: true
          schema:
            type: array
            items:
              type: string
              description: The actual data to be uploaded.
      x-code-samples:
      - lang: Curl
        source: |
          curl -X POST --header "Content-Type: application/json" --header "Accept: application/json" --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0NTIxMywiaWF0IjoxNTA0NzQzNDEzLCJuYmYiOjE1MDQ3NDM0MTMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.umtarSxRc0KUld5RZkrZMwzIypQYdwFYBP5-d1Cbi1Q" --header "templatename: TEST TEMPLATE" --header "filename: TEST.csv" -d "\"Batch Id\",\"Process Flag\",\"Created By\",\"Creation Date\",\"Type\",\"Business Unit\",\"Atr48\",\"Atr8\",\"Atr60\",\"Ct Line Num\",\"Doc Num\",\"Doc Line Num\",\"Doc Line Id\",\"Doc Date\",\"Start Date\",\"End Date\",\"Date1\",\"Ct Mod Date\",\"Cust Num\",\"Cstmr Nm\",\"Atr45\",\"Curr\",\"F Cur\",\"F Ex Rate\",\"G Ex Rate\",\"Item Num\",\"Prod Ctgry\",\"Inv Num\",\"Inv Line Num\",\"Inv Line Id\",\"Orig Inv Line Id\",\"Orig So Line Id\",\"Inv Date\",\"Atr58\",\"Ord Qty\",\"Unit List Prc\",\"Ext Lst Prc\",\"Unit Sell Prc\",\"Ext Sll Prc\",\"Atr9\",\"Inv Qty\",\"Return Flag\",\"Ret Qty\",\"Def Segments\",\"Rev Segments\",\"Al Account\",\"Ar Account\",\"Ca Account\",\"Cv Eligible Flag\",\"Atr50\",\"Atr51\",\"Atr52\",\"Atr53\",\"Atr54\",\"Atr55\",\"Atr56\",\"Atr46\",\"Prod Class\",\"Prod Fmly\",\"Prod Ln\",\"Atr49\",\"Atr14\",\"Atr15\",\"Atr12\",\"Atr13\",\"Atr47\",\"Sob Id\",\"Credit Rule\",\"Num1\",\"Num2\",\"Date2\",\"Date3\",\"Atr10\",\"Atr11\",\"Atr57\",\"Atr5\",\"Atr6\"" "https://yourHost/integration/v1/csv/upload"
      responses:
        '200':
          description: Data is uploaded to the staging tables in Zuora Revenue.
          schema:
            properties:
              message:
                default: Data Staged in RevPro Successfully
                description: Response Message
                type: string
              result:
                properties:
                  client_id:
                    type: integer
                  id:
                    type: integer
                  message:
                    type: string
                  status:
                    type: string
                type: object
              status:
                default: Success
                description: Response Status
                type: string
        '400':
          description: Error occurs when data is being uploaded to Zuora Revenue staging tables.
          schema:
            properties:
              message:
                default: Error loading Data into RevPro Stage
                description: Error Message
                type: string
              result:
                properties:
                  client_id:
                    type: integer
                  id:
                    type: integer
                  message:
                    type: string
                  status:
                    type: string
                type: object
              status:
                default: Error
                description: Error Response
                type: string
      summary: Create upload
      tags:
        - Inbound
        
  '/integration/v1/journal/batch/status/{batch_id}':
    put:
      operationId: PUT_TransferBatchStatus
      description: Updates the transfer batch status to `Transferred` in Zuora Revenue.
      parameters:
        - in: header
          name: token
          required: true
          type: string
          description: The valid authentication token that is generated by the Authentication operation.
        - in: path
          name: batch_id
          required: true
          type: integer
          description: The batch ID of the transfer accounting batch.
      x-code-samples:
      - lang: Curl
        source: |
          curl -X PUT --header "Content-Type: application/json" --header "Accept: application/json" --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0ODE4MywiaWF0IjoxNTA0NzQ2MzgzLCJuYmYiOjE1MDQ3NDYzODMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.k1usDPkgldj-OG9-ga-jn5B2Axx-HG4D0chytx5JPIg" --header "Authorization: Basic WklOR0FQSToxMnF3IUBRVw==" "https://yourHost/integration/v1/journal/batch/status/10110"
      responses:
        '200':
          description: The status of the transfer batch is changed to `Transferred`.
          schema:
            properties:
              status:
                default: Success
                description: Response Status
                type: string
      summary: Update transfer batch status
      tags:
        - Transfer Accounting
        
  '/integration/v1/journal/batch/{batch_id}/{page_num}':
    get:
      operationId: GET_TransferBatch
      description: Downloads the transfer batch data for the specified transfer batch ID and page number.
      parameters:
        - in: header
          name: token
          required: true
          type: string
          description: The valid authentication token that is generated by the Authentication operation.
        - in: path
          name: batch_id
          required: true
          type: integer
          description: The batch ID of the transfer accounting batch.
        - in: path
          name: page_num
          required: true
          type: integer
          description: The number of page to be downloaded.
        - enum:
            - CSV
          in: query
          name: Output
          required: false
          type: string
          description: Specify `CSV` to download data in CSV format. If not specified, data is downloaded in the JSON format.
      x-code-samples:
      - lang: Curl
        source: |
          curl -X GET --header "Accept: application/json" --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0ODE4MywiaWF0IjoxNTA0NzQ2MzgzLCJuYmYiOjE1MDQ3NDYzODMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.k1usDPkgldj-OG9-ga-jn5B2Axx-HG4D0chytx5JPIg" --header "Authorization: Basic WklOR0FQSToxMnF3IUBRVw==" "https://yourHost/integration/v1/journal/batch/10000/1?Output=CSV"
      responses:
        '200':
          description: Operation is successful.
          schema:
            properties:
              status:
                default: Success
                description: Response Status
                type: string
      summary: Get transfer batch
      tags:
        - Transfer Accounting
        
  '/integration/v1/biviews/{tmpl_name}':
    get:
      operationId: GET_BIViews
      description: |
        Retrieves the data from a BI view during the specified time period in a CSV file. 
        Use the `fromDate` and `toDate` parameters to specify the time period for which 
        data is to be queried. You can also use the `count` parameter to get the row count 
        for the queried bi view data.

      parameters:
        - in: header
          name: token
          required: true
          type: string
          description: The valid authentication token that is generated by the Authentication operation.
        - in: path
          name: tmpl_name
          required: true
          type: string
          description: Name of the BI view.
        - default: 1
          in: query
          name: clientId
          required: true
          type: integer
          description: The ID of the Zuora Revenue application user.
        - default: '2016-07-26T00:00:00'
          in: query
          name: fromDate
          required: true
          type: string
          description: The date from which the data query begins.
        - default: '2016-07-26T00:00:00'
          in: query
          name: toDate
          required: true
          type: string
          description: The date on which the data query ends. 
        - default: 1
          in: query
          name: pagenum
          required: true
          type: integer
          description: The number of page to download.
        - default: 
          in: query
          name: count
          required: false
          type: boolean
          description: >
            Set to `true` to get the row count of the BI view for the specified time period. 
            

            **Note:** Setting this parameter to `true` might cause timeout errors for large volume scenarios.
      x-code-samples:
      - lang: Curl
        source: |
          curl -X GET --header "Accept: application/json" --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0ODE4MywiaWF0IjoxNTA0NzQ2MzgzLCJuYmYiOjE1MDQ3NDYzODMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.k1usDPkgldj-OG9-ga-jn5B2Axx-HG4D0chytx5JPIg" --header "Authorization: Basic WklOR0FQSToxMnF3IUBRVw==" "https://yourHost/integration/v1/biviews/BI3_RC_POB?clientId=1&fromDate=2016-07-26T00%3A00%3A00&toDate=2016-07-26T00%3A00%3A00&pagenum=1"
      responses:
        '200':
          description: BI view data is returned in CSV format.
        '204':
          description: No rows are found for the specified time period.
        '400':
          description: Error is returned. For example, the user ID is invalid, or the BI view does not exist.
        '401':
          description: The authentication token has expired. To solve this problem, re-generate a token by using the Authentication operation.
      summary: Get BI Views
      tags:
        - BI Views v1

    post:
      operationId: POST_BIViews
      description: |
        Fetches data in a CSV or gzip file from BI View.

      parameters:
        - in: header
          name: token
          required: true
          type: string
          description: The valid authentication token that is generated by the Authentication operation.
        - in: path
          name: tmpl_name
          required: true
          type: string
          description: Name of the BI view.
        - default: 1
          in: query
          name: clientId
          required: true
          type: integer
          description: The ID of the Zuora Revenue application user.
        - default: '2016-07-26T00:00:00'
          in: query
          name: fromDate
          required: true
          type: string
          description: The date from which the data query begins.
        - default: '2016-07-26T00:00:00'
          in: query
          name: toDate
          required: true
          type: string
          description: The date on which the data query ends. 
        - default: 1
          in: query
          name: pagenum
          required: true
          type: integer
          description: The number of page to download.
        - default: 
          in: query
          name: count
          required: false
          type: boolean
          description: >
            Set to `true` to get the row count of the BI view for the specified time period. 

            **Note:** Setting this parameter to `true` might cause timeout errors for large volume scenarios.
        - in: body
          name: data
          required: true
          schema:
            description: A list of field names to be selected from the BI view.
            type: array
            items:
              type: string
      responses:
        '200':
          description: BI view data is returned in CSV format.
        '204':
          description: No rows are found for the given time period.
        '400':
          description: Error is returned. For example, Invalid User ID.
        '401':
          description: The authentication token has expired. To solve this problem, re-generate a token by using the Authentication operation.
      summary: Get BI View data for selected fields
      tags:
        - BI Views v1

  '/integration/v1/journal/list':
    get:
      operationId: GET_TransferBatchList
      description: Gets a list of the transfer accounting batches that are available in Zuora Revenue.
      parameters:
        - in: header
          name: token
          required: true
          type: string
          description: The valid authentication token that is generated by the Authentication operation.
      x-code-samples:
      - lang: Curl
        source: |
          curl -X GET --header "Accept: application/json" --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0ODE4MywiaWF0IjoxNTA0NzQ2MzgzLCJuYmYiOjE1MDQ3NDYzODMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.k1usDPkgldj-OG9-ga-jn5B2Axx-HG4D0chytx5JPIg" --header "Authorization: Basic WklOR0FQSToxMnF3IUBRVw==" "https://yourHost/integration/v1/journal/list"
      responses:
        '200':
          description: Operation is successful.
          schema:
            properties:
              result:
                items:
                  $ref: '#/definitions/Journal'
                type: array
              status:
                default: Success
                description: Response Status
                type: string
        '400':
          description: Error occurs. For example, exception occurs when journal entry list is being queried.
      summary: Get transfer batch list
      tags:
        - Transfer Accounting
        
  '/integration/v1/download/transferbatchfile/{batch_id}':
    get:
      operationId: GET_TransferBatchFile
      description: |
        Downloads the GL transfer batch files from Zuora Revenue for the specified batch ID. 
        

        **Note:** 
        
        * Only the transfer accounting files that are created in the last 48 hours are available for download.

        * The maximum downloadable file size is 1 GB.

      parameters:
        - in: header
          name: token
          required: true
          type: string
          description: The valid authentication token that is generated by the Authentication operation.
        - in: path
          name: batch_id
          required: true
          type: integer
          description: The batch ID of the transfer accounting batch.
      x-code-samples:
      - lang: Curl
        source: |
          curl -X GET --header "Accept: application/json" --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0ODE4MywiaWF0IjoxNTA0NzQ2MzgzLCJuYmYiOjE1MDQ3NDYzODMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.k1usDPkgldj-OG9-ga-jn5B2Axx-HG4D0chytx5JPIg" --header "Authorization: Basic WklOR0FQSToxMnF3IUBRVw==" "https://yourHost/integration/v1/download/transferbatchfile/10110"
      responses:
        '200':
          description: Operation is successful.
          schema:
            properties:
              active:
                default: Success
                description: Response Status
                type: array
      summary: Get transfer batch file
      tags:
        - Transfer Accounting Files
        
  '/integration/v1/reports/download/{filename}':
    get:
      operationId: GET_DownloadReports
      description: |
        Downloads a specific report from Zuora Revenue.

         **Note:** 
         
         * Only the report files that are created in the last 48 hours are available for download. 

         * The maximum downloadable file size is 1 GB.

      parameters:
        - in: header
          name: token
          required: true
          type: string
          description: The valid authentication token that is generated by the Authentication operation.
        - in: path
          name: filename
          required: true
          type: string
          description: The name of the report file to be downloaded.
      x-code-samples:
      - lang: Curl
        source: |
          curl -X GET --header "Accept: application/json" --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0NTIxMywiaWF0IjoxNTA0NzQzNDEzLCJuYmYiOjE1MDQ3NDM0MTMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.umtarSxRc0KUld5RZkrZMwzIypQYdwFYBP5-d1Cbi1Q" --header "Authorization: Basic WklOR0FQSToxMnF3IUBRVw==" "https://yourHost/integration/v1/reports/download/10002.csv"
      responses:
        '200':
          description: Operation is successful. Report is downloaded.
        '400':
          description: The specified file does not exist in Zuora Revenue.
          schema:
            properties:
              Message:
                default: File name test does not exist in RevPro. Please check the file extension.
                description: Response Status
                type: string
              Result:
                default: None
                description: Response Status
                type: string
              status:
                default: Error
                description: Response Status
                type: string
              token:
                default: null
                description: Response Status
                type: string
      summary: Download a report
      tags:
        - Reports

  # '/integration/v1/reports/recent-n/{number_of_records}':
  #   get:
  #     operationId: GET_RecentReports 
  #     description: Download the latest reports.
  #     parameters:
  #       - in: header
  #         name: token
  #         required: true
  #         type: string
  #         description: The valid authentication token that is generated by the Authentication operation.

  #       - name: number_of_records
  #         in: path
  #         type: int 
  #         description: The number of reports to be downloaded.
  #     # x-code-samples:
  #     # - lang: Curl
  #     #   source: |
  #     #     curl -X GET --header "Accept: application/json" --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0ODE4MywiaWF0IjoxNTA0NzQ2MzgzLCJuYmYiOjE1MDQ3NDYzODMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.k1usDPkgldj-OG9-ga-jn5B2Axx-HG4D0chytx5JPIg" --header "Authorization: Basic WklOR0FQSToxMnF3IUBRVw==" "https://yourHost/integration/v1/stage/error/transaction"
  #     responses:
  #       '200':
  #         description: Operation is successful.
  #         schema:
  #           properties:
  #             Message:
  #               description: Response Message
  #               type: string
  #             Result:
  #               items:
  #                 $ref: '#/definitions/reportList'
  #               type: array
  #             status:
  #               default: Success
  #               description: Response Status
  #               type: string
  #       '400':
  #         description: Unable to download the report.
  #         schema:
  #           properties:
  #             Message:
  #               description: Response Status
  #               type: string
  #             status:
  #               default: Error
  #               description: Error Status
  #               type: string
  #       '404':
  #         description: The number of reports to be downloaded is not specified in the path.
  #         schema:
  #           properties:
  #             Message:
  #               default: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
  #               description: Response Status
  #               type: string
  #     summary: Download recent reports
  #     tags:
  #       - Reports 

  '/integration/v1/reports/list':
    get:
      operationId: GET_ReportList
      description: Gets a list of available reports that are created on a specified date.
      parameters:
        - in: header
          name: token
          required: true
          type: string
          description: The valid authentication token that is generated by the Authentication operation.
        - format: date
          in: query
          name: createddate
          type: string
          description: The date when reports are created.
      x-code-samples:
      - lang: Curl
        source: |
          curl -X GET --header "Accept: application/json" --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0ODE4MywiaWF0IjoxNTA0NzQ2MzgzLCJuYmYiOjE1MDQ3NDYzODMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.k1usDPkgldj-OG9-ga-jn5B2Axx-HG4D0chytx5JPIg" --header "Authorization: Basic WklOR0FQSToxMnF3IUBRVw==" "https://yourHost/integration/v1/reports/list?createddate=01-JAN-2012"
      responses:
        '200':
          description: Operation is successful.
          schema:
            properties:
              Message:
                description: Response Message
                type: string
              Result:
                items:
                  $ref: '#/definitions/reportList'
                type: array
              status:
                default: Success
                description: Response Status
                type: string
        '400':
          description: The specified date format is invalid.
          schema:
            properties:
              Message:
                default: Invalid date format for 30-11-1993
                description: Response Status
                type: string
              status:
                default: Error
                description: Error Status
                type: string
      summary: Get report list
      tags:
        - Reports


  '/integration/v1/stage/error/{errortype}':
    get:
      operationId: GET_StaggingError
      description: Gets the information about transaction staging errors or event staging errors.
      parameters:
        - in: header
          name: token
          required: true
          type: string
          description: The valid authentication token that is generated by the Authentication operation.
        - in: path
          name: errortype
          required: true
          type: string
          description: The type of errors that you want to retrieve.
          enum:
            - transaction
            - event
      x-code-samples:
      - lang: Curl
        source: |
          curl -X GET --header "Accept: application/json" --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0ODE4MywiaWF0IjoxNTA0NzQ2MzgzLCJuYmYiOjE1MDQ3NDYzODMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.k1usDPkgldj-OG9-ga-jn5B2Axx-HG4D0chytx5JPIg" --header "Authorization: Basic WklOR0FQSToxMnF3IUBRVw==" "https://yourHost/integration/v1/stage/error/transaction"
      responses:
        '200':
          description: Staging errors of the specified type are returned.
          schema:
            properties:
              Result:
                items:
                  $ref: '#/definitions/stageError'
                type: array
              status:
                default: Success
                description: Response Status
                type: string
        '400':
          description: Error occurs. 
      summary: Get staging error
      tags:
        - Stage Error
        
  '/integration/v1/upload/mapping':
    get:
      operationId: GET_FileUploadMapping
      description: Gets the field mapping information in the upload template definitions for transactions, events, or bundle configuration from Zuora Revenue.
      parameters:
        - in: header
          name: token
          required: true
          type: string
          description: The valid authentication token that is generated by the Authentication operation.
        - in: query
          name: templatename
          type: string
          description: Name of the upload template that contains the field mapping information.
      x-code-samples:
      - lang: Curl
        source: |
          curl -X GET --header "Accept: application/json" --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0ODE4MywiaWF0IjoxNTA0NzQ2MzgzLCJuYmYiOjE1MDQ3NDYzODMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.k1usDPkgldj-OG9-ga-jn5B2Axx-HG4D0chytx5JPIg" "https://yourHost/integration/v1/upload/mapping?templatename=TEST"
      responses:
        '200':
          description: Field mapping data is returned.
          schema:
            properties:
              Dateformat:
                default: DD-MON-YYYY
                description: Response Status
                type: string
              Mapping:
                items:
                  $ref: '#/definitions/uploadMapping'
                type: array
        '400':
          description: Error occurs.
      summary: Get field mapping
      tags:
        - Adapter

  '/integration/v2/biviews-status':
    get:
      operationId: GET_AllTaskStatus
      description: Gets the status information about all BI view related tasks.
      parameters:
        - in: header
          name: token
          required: true
          type: string
          description: The valid authentication token that is generated by the Authentication operation.
      responses:
        '200':
          description: The task details are returned.
          schema:
            properties:
              result:
                properties:
                  active:
                    items:
                      $ref: '#/definitions/ActivityQueueStatus'
                    type: array
                  completed:
                    items:
                      $ref: '#/definitions/ActivityQueueStatus'
                    type: array
                  draining:
                    items:
                      $ref: '#/definitions/ActivityQueueStatus'
                    type: array
                  stale:
                    items:
                      $ref: '#/definitions/ActivityQueueStatus'
                    type: array
                type: object
              status:
                default: Success
                description: Response Status
                type: string
        '204':
          description: No records are found.
      x-code-samples:
      - lang: Curl
        source: |
          curl -X GET http://tenantUrl/integration/v2/biviews-status -H 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6IlNZU0FETUlOIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImNsaWVudG5hbWUiOiJEZWZhdWx0IiwiY2xpZW50aWQiOjEsImlhdCI6MTU1ODMyODMzNSwibmJmIjoxNTU4MzI4MzM1LCJpc3MiOiJadW9yYS1SSUEiLCJleHAiOjE1NTgzMzAxMzV9.xz3O4QRR6qgT-2HgBJn9yJ9YBaXwWhl3d7ohrduTogI'

      summary: Get all task status
      tags:
        - BI Views v2

  '/integration/v2/biviews-status/{task_id}': 
    delete:
      operationId: DELETE_Task
      description: Cancels the active tasks that are associated with the specified continuation token in the path.    
      parameters:
        - in: header
          name: token
          required: true
          type: string
          description: The valid authentication token that is generated by the Authentication operation.
        - in: path
          name: task_id
          required: true 
          type: string
          description: The continuation token that is associated with the tasks to be canceled.   
      responses:
        '200':
          description: The tasks associated with the specified continuation token are canceled.
        '204':
          description: The specified continuation token is not found.
      x-code-samples:
      - lang: Curl
        source: |
          curl -X DELETE http://tenantUrl/integration/v2/biviews-status/098bda64-a53d-4e6c-960d-ffd2293b19bb -H 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6IlNZU0FETUlOIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImNsaWVudG5hbWUiOiJEZWZhdWx0IiwiY2xpZW50aWQiOjEsImlhdCI6MTU1ODMzMDIxMCwibmJmIjoxNTU4MzMwMjEwLCJpc3MiOiJadW9yYS1SSUEiLCJleHAiOjE1NTgzMzIwMTB9.Sr2oIxp7XWSJSy9bARfr7nkFvAmMbdhMaNBv9IR52Fo'

      summary: Cancel task
      tags:
        - BI Views v2

    get:
      operationId: GET_TaskDetails
      description: Gets the details of all active tasks for the specified continuation token.
      parameters:
        - in: header
          name: token
          required: true
          type: string
          description: The valid authentication token that is generated by the Authentication operation.           
        - in: path
          name: task_id
          required: true 
          type: string
          description: The continuation token that was returned in the initial request.
      responses:
        '200':
          description: The details of active tasks that are associated with the continuation token are returned.
          schema:
            properties:
              active:
                items:
                  $ref: '#/definitions/active'
                type: array
              completed:
                items:
                  $ref: '#/definitions/completed'
                type: array
              draining:
                items:
                  $ref: '#/definitions/draining'
                type: array
              stale:
                items:
                  $ref: '#/definitions/stale'
                type: array
        '204':
          description: No record is found for the specified continuation token.
      x-code-samples:
      - lang: Curl
        source: |
          curl -X GET http://tenantUrl/integration/v2/biviews-status/098bda64-a53d-4e6c-960d-ffd2293b19bb -H 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6IlNZU0FETUlOIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImNsaWVudG5hbWUiOiJEZWZhdWx0IiwiY2xpZW50aWQiOjEsImlhdCI6MTU1ODMyODMzNSwibmJmIjoxNTU4MzI4MzM1LCJpc3MiOiJadW9yYS1SSUEiLCJleHAiOjE1NTgzMzAxMzV9.xz3O4QRR6qgT-2HgBJn9yJ9YBaXwWhl3d7ohrduTogI'
      summary: Get active task details
      tags:
        - BI Views v2

  '/integration/v2/biviews/count/{tmpl_name}':
    get:
      operationId: GET_RowCount
      description: |
        Gets the row count of a BI view.


        **Note:** This operation starts a count query against the database for a full table scan.
        It is helful to know the number of rows that will be returned before data download.
        However, if the data volume is large, this operation might result in timeout responses.
      parameters:
        - in: header
          name: token
          required: true
          type: string
          description: The valid authentication token that is generated by the Authentication operation.
        - in: path
          name: tmpl_name
          required: true 
          type: string
          description: Name of the BI view.
        - default: 1
          in: query
          name: clientId
          required: true
          type: integer
          description: The ID of the Zuora Revenue application user.
        - default: '2016-07-26T00:00:00'
          in: query
          name: fromDate
          required: false
          type: string
          description: The date from which the data query begins.
        - default: '2018-07-26T00:00:00'
          in: query
          name: toDate
          required: false
          type: string
          description: The date on which the data query ends. 
      responses:
        '200':
          description: The row count of the specified BI view is returned.
        '400':
          description: Error occurs. For example, the user ID is invalid, or the specified BI view does not exist.
        '401':
          description: The provided authentication token has expired. Send the Authentication request again to get a new token. 
      x-code-samples:
      - lang: Curl
        source: |
          curl -X GET http://tenantUrl/integration/v2/biviews/count/BI3_ACCT_TYPE?=&clientId=1&fromDate=2016-07-26&toDate=2018-07-26 -H 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6IlNZU0FETUlOIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImNsaWVudG5hbWUiOiJEZWZhdWx0IiwiY2xpZW50aWQiOjEsImlhdCI6MTU1ODMzMDIxMCwibmJmIjoxNTU4MzMwMjEwLCJpc3MiOiJadW9yYS1SSUEiLCJleHAiOjE1NTgzMzIwMTB9.Sr2oIxp7XWSJSy9bARfr7nkFvAmMbdhMaNBv9IR52Fo
      summary: Get row count
      tags:
        - BI Views v2 

  '/integration/v2/biviews/{tmpl_name}':
    get:
      operationId: GET_BIView
      description: |
        Downloads data from a BI view in a CSV or gzip file. 


        If the data volume is large, it is recommended to use this operation to download Page 1 first. 
        A continuation token will be returned in the response header. After that, provide the continuation 
        token in this operation to download the subsequent pages.
      parameters:
        - in: header
          name: token
          required: true
          type: string
          description: The valid authentication token that is generated by the Authentication operation.
        - in: header
          name: continuation-token
          required: false
          type: string
          description: |
            The continuation token that was returned in the initial query for Page 1. 


            **Note:** The continuation token is returned after Page 1 of the BI view is downloaded. 
            To download the subsequent pages, you must specify the continuation token in this operation
            for Page 2 onwards.
        - in: path
          name: tmple_name
          required: true 
          type: string
          description: Name of the BI view.
        - default: 1
          in: query
          name: clientId
          required: true 
          type: integer
          description: The ID of the Zuora Revenue application user.
        - default: '2016-07-26T00:00:00'
          in: query
          name: fromDate
          required: true 
          type: string
          description: The date from which the data query begins.
        - default: '2018-07-26T00:00:00'
          in: query
          name: toDate
          required: true 
          type: string
          description: The date on which the data query ends. 
        - default: 1
          in: query
          name: pagenum
          required: false
          type: integer
          description: The number of page to be downloaded.
        - default: 1000
          in: query
          name: pageSize
          required: false
          type: integer
          description: |
            The number of rows on each page to be downloaded.


            * For CSV format, the valid range is 1 - 10,000.
            * For gzip format, the valid range is 1 - 20,000.


            **Note:** Any value that is greater than 20,000 is invalid.
        - default: csv
          in: query
          name: outputType
          type: string
          enum:
            - csv
            - gzip
          description: The output format of the download. 
        - in: body
          name: data
          required: true
          schema:
            description: A list of field names to be retrieved for the BI view.
            type: array
            items:
              type: string
      responses:
        '200':
          description: The queried BI view data is returned in the desired format.
        '204':
          description: No record is found for the specified BI view.
        '400':
          description: Error occurs. For example, the user ID is invalid, or the requested page is not cached yet.
        '401':
          description: The provided authentication token has expired. Send the Authentication request again to get a new token.
        '404':
          description: The requested page does not exist. The number of total pages and the number of total rows are returned.
      summary: Download BI view
      tags:
        - BI Views v2

    post:
      operationId: POST_BIView
      description: Fetches data in a CSV or gzip file from BI View.
      parameters:
        - in: header
          name: token
          required: true
          type: string
          description: The valid authentication token that is generated by the Authentication operation.
        - in: header
          name: continuation-token
          required: false
          type: string
          description: The continuation token that was returned in the initial request. 
        - in: path
          name: tmple_name
          required: true 
          type: string
          description: Name of the BI view.
        - default: 1
          in: query
          name: clientId
          required: true 
          type: integer
          description: The ID of the Zuora Revenue application user.
        - default: '2016-07-26T00:00:00'
          in: query
          name: fromDate
          required: true 
          type: string
          description: The date from which the data query begins.
        - default: '2018-07-26T00:00:00'
          in: query
          name: toDate
          required: true 
          type: string
          description: The date on which the data query ends. 
        - default: 1
          in: query
          name: pagenum
          required: false
          type: integer
          description: The number of page to be uploaded.
        - default: 1000
          in: query
          name: pageSize
          required: false
          type: integer
          description: The number of rows on each page to be uploaded.
        - default: 'csv'
          in: query
          name: outputType
          type: string
          enum:
            - csv
            - gzip
          description: The format of upload file. 
        - in: body
          name: fields
          required: true
          schema:
            description: A list of field names to be selected from the BI view.
            type: array
            items:
              type: string
      responses:
        '200':
          description: The BI view data is updated or created.
        '204':
          description: No record is found for the specified BI view.
        '400':
          description: Error occurs.
        '401':
          description: The provided authentication token has expired. Send the Authentication request again to get a new token.
        '404':
          description: The requested page does not exist. The number of total pages and the number of total rows are returned.
      summary: Get BI View data for selected fields
      tags:
        - BI Views v2

  '/integration/v2/biviews/{tmpl_name}/describe-columns':
    get:
      operationId: GET_ColumnList
      description: Gets a list of columns that are contained in a BI view.
      parameters:
        - in: header
          name: token
          required: true
          type: string
          description: The valid authentication token that is generated by the Authentication operation.      
        - in: path
          name: tmple_name
          required: true 
          type: string
          description: Name of the BI view.
      responses:
        '200':
          description: The list of columns is returned for the requested BI view.
        '400':
          description: Error occurs. For example, the BI view does not exist.
        '401':
          description: The provided authentication token has expired. Send the Authentication request again to get a new token.
      x-code-samples:
      - lang: Curl
        source: |
          curl -X GET http://tenantUrl/integration/v2/biviews/BI3_ACCT_TYPE/describe-columns -H 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6IlNZU0FETUlOIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImNsaWVudG5hbWUiOiJEZWZhdWx0IiwiY2xpZW50aWQiOjEsImlhdCI6MTU1ODMzMDIxMCwibmJmIjoxNTU4MzMwMjEwLCJpc3MiOiJadW9yYS1SSUEiLCJleHAiOjE1NTgzMzIwMTB9.Sr2oIxp7XWSJSy9bARfr7nkFvAmMbdhMaNBv9IR52Fo'
      summary: Get column list
      tags:
        - BI Views v2

definitions:
  ActivityQueueStatus:
    properties:
      accumulate:
        type: integer
      activity_tracker:
        properties:
          elapsed_time:
            type: string
          initated_time:
            format: date-time
            type: string
          last_activity:
            format: date-time
            type: string
        type: object
      message:
        type: string
      metric:
        type: integer
      query_config:
        properties:
          filter_param:
            properties:
              fromDate:
                format: date-time
                type: string
              toDate:
                format: date-time
                type: string
            type: object
          object_name:
            type: string
        type: object
      status:
        type: string
      task_id:
        type: string
    type: object
  Journal:
    properties:
      client_id:
        type: integer
      crtd_by:
        type: string
      crtd_dt:
        format: date-time
        type: string
      id:
        format: int32
        type: integer
      name:
        type: string
      status:
        type: string
      updt_by:
        type: string
      updt_dt:
        format: date-time
        type: string
    type: object
  Status:
    properties:
      task_state:
        properties:
          accumulate:
            type: integer
          activity_tracker:
            type: array
    type: object
  active:
    properties:
      accumulate:
        type: integer
      activity_tracker:
        properties:
          elapsed_time:
            type: string
          initated_time:
            type: string
          last_activity:
            type: string
        type: object
      message:
        type: string
      metric:
        type: string
      query_config:
        properties:
          filter_params:
            properties:
              fromDate:
                type: string
              toDate:
                type: string
            type: object
          object_name:
            type: string
        type: object
      status:
        type: string
      task_id:
        type: string
    type: object
  columns:
    properties:
      column_name:
        type: string
      data_length:
        type: integer
      data_precision:
        type: string
      data_scale:
        type: string
      data_type:
        type: string
    type: object
  completed:
    type: string
  draining:
    type: string
  reportList:
    properties:
      category:
        type: string
      file_name:
        type: string
      layout_name:
        type: string
      rep_desc:
        type: string
      rep_name:
        type: string
      report_date:
        format: date-time
        type: string
      status:
        type: string
    type: object
  stageError:
    properties:
      action:
        format: int32
        type: integer
      client_id:
        type: integer
      crtd_by:
        type: string
      crtd_dt:
        format: date-time
        type: string
      id:
        type: integer
      name:
        type: string
      status:
        type: string
      updt_by:
        type: string
      updt_dt:
        format: date-time
        type: string
    type: object
  stale:
    type: string
  uploadMapping:
    properties:
      client_id:
        type: integer
      col_name:
        type: string
      data_type:
        type: string
      id:
        type: integer
      label:
        type: string
      seq:
        type: integer
      upload_id:
        type: integer
    type: object
  uploadStatus:
    properties:
      file_log:
        type: string
      file_request_id:
        type: integer
    type: object
