openapi: 3.0.1 info: title: 'API Reference: Revenue' description: >- This is a generated connector for [Zuora Revenue API V2021-08-12](https://www.zuora.com/developer/revpro-api/) OpenAPI specification. The Revenue API provides access to Zuroa revenue related operations on BI views, reports, revenue Jobs etc. version: "2021-08-12T00:00:00.000Z" x-ballerina-init-description: >- The connector initialization requires setting the API credentials. Create a [Zuora account](https://www.zuora.com/) and obtain tokens by following [this guide](https://www.zuora.com/developer/revpro-api/#tag/Authentication). x-ballerina-display: label: Zuora Revenue iconPath: "icon.png" x-logo: url: >- https://www.zuora.com/wp-content/uploads/2016/10/zuora-dev-logo-api-ref.svg tags: - name: Authentication description: > The Authentication operation is the authentication layer when you integrate data with Zuora Revenue APIs. Use this operation to authenticate and generate a token that can be valid for a specific time period. The token is required for all the subsequent API calls. By default, a token will be valid for 30 minutes before it expires. If the issued token expires, call this operation again with valid credentials to get a new token. To acquire the token, you must provide the user role and client name as well as basic authorization in the HTTP request header. An example of basic authorization header is as follows: `Basic c3lzYWRtaW46fsDFsgsV2cHJvJTEyMw==` 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 BI Views V2 operations. - name: BI Views v2 description: > 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 Integration service (BI Views V2) 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: Revenue Jobs description: > The Revenue Jobs operations are used to submit the data collection jobs and query the status of the submitted jobs. - 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: /api/integration/v1/fileupload/status/{file_request_id}: get: tags: - File Upload summary: Get file upload status description: Gets the status information about the specified file upload request. operationId: GET_FileUploadStatus parameters: - name: file_request_id in: path description: The request ID of the file upload to be queried. required: true schema: type: integer responses: '200': description: The status information is returned for the requested file upload. content: application/json; charset=utf-8: schema: type: object '204': description: >- The status information cannot be retrieved for the specified request ID. content: {} x-code-samples: - lang: Curl source: > curl -X GET --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0NTIxMywiaWF0IjoxNTA0NzQzNDEzLCJuYmYiOjE1MDQ3NDM0MTMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.umtarSxRc0KUld5RZkrZMwzIypQYdwFYBP5-d1Cbi1Q" "https://yourHost/api/integration/v1/fileupload/status/12333" /api/integration/v1/csv/upload/status: get: tags: - Inbound summary: Get upload status description: Gets the status information about the Create upload operation. operationId: GET_UploadStatus parameters: - name: id in: query description: >- The request ID of the uploaded file for which the status information is being queried. required: true schema: type: integer responses: '200': description: The status information is returned for the requested upload. content: application/json; charset=utf-8: schema: type: object '400': description: >- The status information cannot be retrieved for the specified request ID. content: application/json; charset=utf-8: schema: type: object x-code-samples: - lang: Curl source: > curl -X GET --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0NTIxMywiaWF0IjoxNTA0NzQzNDEzLCJuYmYiOjE1MDQ3NDM0MTMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.umtarSxRc0KUld5RZkrZMwzIypQYdwFYBP5-d1Cbi1Q" "https://yourHost/api/integration/v1/csv/upload/status?id=10002" /api/integration/v1/csv/upload: post: tags: - Inbound summary: Create upload description: > Uploads the transaction, events, or bundle configuration data as a CSV (text/plain) file with UTF-8 encoding. **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 Upload file operation. operationId: POST_Upload parameters: - name: templatename in: header description: The name of the upload template that you want to use. required: true schema: type: string - name: filename in: header description: The unique file name to populate the data in the Zuora Revenue UI. required: true schema: type: string requestBody: content: text/plain: schema: type: array items: type: string description: The actual data to be uploaded. required: true responses: '200': description: Data is uploaded to the staging tables in Zuora Revenue. content: application/json; charset=utf-8: schema: type: object '400': description: >- Error occurs when data is being uploaded to Zuora Revenue staging tables. content: application/json; charset=utf-8: schema: type: object x-code-samples: - lang: Curl source: > curl -X POST --header "Content-Type: text/plain" --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/api/integration/v1/csv/upload" x-codegen-request-body-name: data /api/integration/v1/journal/batch/status/{batch_id}: put: tags: - Transfer Accounting summary: Update transfer batch status description: Updates the transfer batch status to `Transferred` in Zuora Revenue. operationId: PUT_TransferBatchStatus parameters: - name: batch_id in: path description: The batch ID of the transfer accounting batch. required: true schema: type: integer responses: '200': description: The status of the transfer batch is changed to `Transferred`. content: application/json; charset=utf-8: schema: type: object '400': description: Only the batch in Ready TO Transfer status can be updated. content: application/json; charset=utf-8: schema: type: object x-code-samples: - lang: Curl source: > curl -X PUT --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0ODE4MywiaWF0IjoxNTA0NzQ2MzgzLCJuYmYiOjE1MDQ3NDYzODMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.k1usDPkgldj-OG9-ga-jn5B2Axx-HG4D0chytx5JPIg" "https://yourHost/api/integration/v1/journal/batch/status/10110" /api/integration/v1/journal/batch/{batchid}/{pagenum}: get: tags: - Transfer Accounting summary: Get transfer batch description: >- Downloads the transfer batch data for the specified transfer batch ID and page number. operationId: GET_TransferBatch parameters: - name: batchid in: path description: The batch ID of the transfer accounting batch. required: true schema: type: integer - name: pagenum in: path description: The number of page to be downloaded. required: true schema: type: integer - name: pagesize in: header description: >- The number of records to be downloaded per request. The default is 1000 and the maximum is 10000. schema: type: integer responses: '200': description: Operation is successful. content: application/json; charset=utf-8: schema: type: object x-code-samples: - lang: Curl source: > curl -X GET --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0ODE4MywiaWF0IjoxNTA0NzQ2MzgzLCJuYmYiOjE1MDQ3NDYzODMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.k1usDPkgldj-OG9-ga-jn5B2Axx-HG4D0chytx5JPIg" "https://yourHost/api/integration/v1/journal/batch/10000/1?Output=CSV" /api/integration/v1/biviews/{tmpl_name}: get: tags: - BI Views v1 summary: Get BI Views 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. operationId: GET_BIViews parameters: - name: tmpl_name in: path description: Name of the BI view. required: true schema: type: string - name: clientId in: query description: The ID of the Zuora Revenue application user. required: true schema: type: integer default: 1 - name: fromDate in: query description: The date from which the data query begins. required: true schema: type: string default: 2016-07-26T00:00:00.000Z - name: toDate in: query description: The date on which the data query ends. required: true schema: type: string default: 2016-07-26T00:00:00.000Z - name: pagenum in: query description: The number of page to download. required: true schema: type: integer default: 1 - name: pagesize in: header description: >- The number of records to be downloaded per request. The default is 1000 and the maximum is 10000. schema: type: integer - name: count in: query 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. schema: type: boolean default: false responses: '200': description: BI view data is returned in CSV format. content: {} '204': description: No rows are found for the specified time period. content: {} '400': description: >- Error is returned. For example, the user ID is invalid, or the BI view does not exist. content: {} '401': description: >- The authentication token has expired. To solve this problem, re-generate a token by using the Authentication operation. content: {} x-code-samples: - lang: Curl source: > curl -X GET --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0ODE4MywiaWF0IjoxNTA0NzQ2MzgzLCJuYmYiOjE1MDQ3NDYzODMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.k1usDPkgldj-OG9-ga-jn5B2Axx-HG4D0chytx5JPIg" "https://yourHost/api/integration/v1/biviews/BI3_RC_POB?clientId=1&fromDate=2016-07-26T00%3A00%3A00&toDate=2016-07-26T00%3A00%3A00&pagenum=1" post: tags: - BI Views v1 summary: Get BI View data for selected fields description: | Fetches data in a CSV or gzip file from BI View. operationId: POST_BIViews parameters: - name: tmpl_name in: path description: Name of the BI view. required: true schema: type: string - name: clientId in: query description: The ID of the Zuora Revenue application user. required: true schema: type: integer default: 1 - name: fromDate in: query description: The date from which the data query begins. required: true schema: type: string default: 2016-07-26T00:00:00.000Z - name: toDate in: query description: The date on which the data query ends. required: true schema: type: string default: 2016-07-26T00:00:00.000Z - name: pagenum in: query description: The number of page to download. required: true schema: type: integer default: 1 - name: count in: query 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. schema: type: boolean default: false requestBody: content: application/json; charset=utf-8: schema: type: array description: A list of field names to be selected from the BI view. items: type: string required: true responses: '200': description: BI view data is returned in CSV format. content: {} '204': description: No rows are found for the given time period. content: {} '400': description: Error is returned. For example, Invalid User ID. content: {} '401': description: >- The authentication token has expired. To solve this problem, re-generate a token by using the Authentication operation. content: {} x-codegen-request-body-name: data /api/integration/v1/journal/list: get: tags: - Transfer Accounting summary: Get transfer batch list description: >- Gets a list of the transfer accounting batches that are available in Zuora Revenue. operationId: GET_TransferBatchList responses: '200': description: Operation is successful. content: application/json; charset=utf-8: schema: type: object '204': description: No GL Transfer batches in Ready to Transfer status are available. content: {} '400': description: Error occurs when fetching the GL batch list. content: {} x-code-samples: - lang: Curl source: > curl -X GET --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0ODE4MywiaWF0IjoxNTA0NzQ2MzgzLCJuYmYiOjE1MDQ3NDYzODMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.k1usDPkgldj-OG9-ga-jn5B2Axx-HG4D0chytx5JPIg" "https://yourHost/api/integration/v1/journal/list" /api/integration/v1/download/transferbatchfile/{batch_id}: get: tags: - Transfer Accounting Files summary: Get transfer batch file 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. operationId: GET_TransferBatchFile parameters: - name: batch_id in: path description: The batch ID of the transfer accounting batch. required: true schema: type: integer responses: '200': description: Operation is successful. content: application/json; charset=utf-8: schema: type: object '204': description: >- The batch file is not generated for the batch ID or the batch file is not found. content: {} x-code-samples: - lang: Curl source: > curl -X GET --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0ODE4MywiaWF0IjoxNTA0NzQ2MzgzLCJuYmYiOjE1MDQ3NDYzODMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.k1usDPkgldj-OG9-ga-jn5B2Axx-HG4D0chytx5JPIg" "https://yourHost/api/integration/v1/download/transferbatchfile/10110" /api/integration/v1/reports/list: get: tags: - Reports summary: Get report list description: Gets a list of available reports that are created on a specified date. operationId: GET_ReportList parameters: - name: createddate in: query description: The date when reports are created. schema: type: string format: date responses: '200': description: Operation is successful. content: application/json; charset=utf-8: schema: type: object '400': description: The specified date format is invalid. content: application/json; charset=utf-8: schema: type: object x-code-samples: - lang: Curl source: > curl -X GET --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0ODE4MywiaWF0IjoxNTA0NzQ2MzgzLCJuYmYiOjE1MDQ3NDYzODMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.k1usDPkgldj-OG9-ga-jn5B2Axx-HG4D0chytx5JPIg" "https://yourHost/api/integration/v1/reports/list?createddate=01-JAN-2012" /api/integration/v1/reports/download/{filename}: get: tags: - Reports summary: Download a report 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 report file size is 1 GB. * If the report file size exceeds 1 GB, use the Get report data operation to download the report from a signed URL. operationId: GET_DownloadReports parameters: - name: filename in: path description: The name of the report file to be downloaded. required: true schema: type: string responses: '200': description: Operation is successful. Report is downloaded. content: {} '204': description: The specified file does not exist in Zuora Revenue. content: {} x-code-samples: - lang: Curl source: > curl -X GET --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0NTIxMywiaWF0IjoxNTA0NzQzNDEzLCJuYmYiOjE1MDQ3NDM0MTMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.umtarSxRc0KUld5RZkrZMwzIypQYdwFYBP5-d1Cbi1Q" "https://yourHost/api/integration/v1/reports/download/10002.csv" /api/integration/v2/reports/signedurl/{report_id}: get: tags: - Reports summary: Get report data description: > Generates a signed URL from Zuora Revenue to download the report with the specified report ID. The returned URL will be valid for 30 minutes. **Note:** This API operation is available in Zuora Revenue 37.002.00.00 and later. The advantage of this operation is that it can provide a URL to download the report without the restriction on the file size. operationId: GET_ReportsURL parameters: - name: report_id in: path description: >- The ID of the report to be downloaded. You can get the report ID in the Get report list response. required: true schema: type: integer responses: '200': description: >- The URL to download the report file. The signed URL will be valid for 30 minutes from the time when it is generated. content: application/json; charset=utf-8: schema: type: object '400': description: The report ID is invalid. content: application/json; charset=utf-8: schema: type: object '404': description: The specified report ID is not found. content: application/json; charset=utf-8: schema: type: object x-code-samples: - lang: Curl source: > curl -X GET --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0NTIxMywiaWF0IjoxNTA0NzQzNDEzLCJuYmYiOjE1MDQ3NDM0MTMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.umtarSxRc0KUld5RZkrZMwzIypQYdwFYBP5-d1Cbi1Q" "https://yourHost/api/api/integration/v2/reports/signedurl/10002" /api/integration/v1/stage/error/{errortype}: get: tags: - Stage Error summary: Get staging error description: >- Gets the information about transaction staging errors or event staging errors. operationId: GET_StaggingError parameters: - name: errortype in: path description: The type of errors that you want to retrieve. required: true schema: type: string enum: - transaction - event responses: '200': description: Staging errors of the specified type are returned. content: application/json; charset=utf-8: schema: type: object '204': description: >- No record is found for the error type specified in the path parameter. content: {} x-code-samples: - lang: Curl source: > curl -X GET --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0ODE4MywiaWF0IjoxNTA0NzQ2MzgzLCJuYmYiOjE1MDQ3NDYzODMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.k1usDPkgldj-OG9-ga-jn5B2Axx-HG4D0chytx5JPIg" "https://yourHost/api/integration/v1/stage/error/transaction" /api/integration/v1/upload/mapping: get: tags: - Adapter summary: Get field mapping description: >- Gets the field mapping information in the upload template definitions for transactions, events, or bundle configuration from Zuora Revenue. operationId: GET_FileUploadMapping parameters: - name: templatename in: query description: >- Name of the upload template that contains the field mapping information. schema: type: string responses: '200': description: Field mapping data is returned. content: application/json; charset=utf-8: schema: type: object '400': description: Error fetching the mapping details. content: {} x-code-samples: - lang: Curl source: > curl -X GET --header "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlpJTkdBUEkiLCJpc3MiOiJSRVZQUk8gMy4wIFdlYnNlcnZpY2VzIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImV4cCI6MTUwNDc0ODE4MywiaWF0IjoxNTA0NzQ2MzgzLCJuYmYiOjE1MDQ3NDYzODMsImNsaWVudG5hbWUiOiJEZWZhdWx0In0.k1usDPkgldj-OG9-ga-jn5B2Axx-HG4D0chytx5JPIg" "https://yourHost/api/integration/v1/upload/mapping?templatename=TEST" /api/integration/v2/biviews-status: get: tags: - BI Views v2 summary: Get all task status description: Gets the status information about all BI view related tasks. operationId: GET_AllTaskStatus responses: '200': description: The task details are returned. content: application/json; charset=utf-8: schema: type: object '204': description: No records are found. content: {} x-code-samples: - lang: Curl source: > curl -X GET https://ui_url/api/integration/v2/biviews-status -H 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6IlNZU0FETUlOIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImNsaWVudG5hbWUiOiJEZWZhdWx0IiwiY2xpZW50aWQiOjEsImlhdCI6MTU1ODMyODMzNSwibmJmIjoxNTU4MzI4MzM1LCJpc3MiOiJadW9yYS1SSUEiLCJleHAiOjE1NTgzMzAxMzV9.xz3O4QRR6qgT-2HgBJn9yJ9YBaXwWhl3d7ohrduTogI' /api/integration/v2/biviews-status/{task_id}: get: tags: - BI Views v2 summary: Get active task details description: >- Gets the details of all active tasks for the specified continuation token. operationId: GET_TaskDetails parameters: - name: task_id in: path description: The continuation token that was returned in the initial request. required: true schema: type: string responses: '200': description: >- The details of active tasks that are associated with the continuation token are returned. content: application/json; charset=utf-8: schema: type: object '204': description: No record is found for the specified continuation token. content: {} x-code-samples: - lang: Curl source: > curl -X GET https://ui_url/api/integration/v2/biviews-status/098bda64-a53d-4e6c-960d-ffd2293b19bb -H 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6IlNZU0FETUlOIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImNsaWVudG5hbWUiOiJEZWZhdWx0IiwiY2xpZW50aWQiOjEsImlhdCI6MTU1ODMyODMzNSwibmJmIjoxNTU4MzI4MzM1LCJpc3MiOiJadW9yYS1SSUEiLCJleHAiOjE1NTgzMzAxMzV9.xz3O4QRR6qgT-2HgBJn9yJ9YBaXwWhl3d7ohrduTogI' delete: tags: - BI Views v2 summary: Cancel task description: >- Cancels the active tasks that are associated with the specified continuation token in the path. operationId: DELETE_Task parameters: - name: task_id in: path description: >- The continuation token that is associated with the tasks to be canceled. required: true schema: type: string responses: '200': description: >- The tasks associated with the specified continuation token are canceled. content: {} '204': description: The specified continuation token is not found. content: {} x-code-samples: - lang: Curl source: > curl -X DELETE https://ui_url/api/integration/v2/biviews-status/098bda64-a53d-4e6c-960d-ffd2293b19bb -H 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6IlNZU0FETUlOIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImNsaWVudG5hbWUiOiJEZWZhdWx0IiwiY2xpZW50aWQiOjEsImlhdCI6MTU1ODMzMDIxMCwibmJmIjoxNTU4MzMwMjEwLCJpc3MiOiJadW9yYS1SSUEiLCJleHAiOjE1NTgzMzIwMTB9.Sr2oIxp7XWSJSy9bARfr7nkFvAmMbdhMaNBv9IR52Fo' /api/integration/v2/biviews/count/{tmpl_name}: get: tags: - BI Views v2 summary: Get row count 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. operationId: GET_RowCount parameters: - name: tmpl_name in: path description: Name of the BI view. required: true schema: type: string - name: clientId in: query description: The ID of the Zuora Revenue application user. required: true schema: type: integer default: 1 - name: fromDate in: query description: The date from which the data query begins. schema: type: string default: 2016-07-26T00:00:00.000Z - name: toDate in: query description: The date on which the data query ends. schema: type: string default: 2018-07-26T00:00:00.000Z responses: '200': description: The row count of the specified BI view is returned. content: {} '400': description: >- Error occurs. For example, the user ID is invalid, or the specified BI view does not exist. content: {} '401': description: >- The provided authentication token has expired. Send the Authentication request again to get a new token. content: {} x-code-samples: - lang: Curl source: > curl -X GET https://ui_url/api/integration/v2/biviews/count/BI3_ACCT_TYPE?=&clientId=1&fromDate=2016-07-26&toDate=2018-07-26 -H 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6IlNZU0FETUlOIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImNsaWVudG5hbWUiOiJEZWZhdWx0IiwiY2xpZW50aWQiOjEsImlhdCI6MTU1ODMzMDIxMCwibmJmIjoxNTU4MzMwMjEwLCJpc3MiOiJadW9yYS1SSUEiLCJleHAiOjE1NTgzMzIwMTB9.Sr2oIxp7XWSJSy9bARfr7nkFvAmMbdhMaNBv9IR52Fo /api/integration/v2/biviews/{tmple_name}: get: tags: - BI Views v2 summary: Download BI view 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. operationId: GET_BIView parameters: - name: continuation-token in: header 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. schema: type: string - name: tmple_name in: path description: Name of the BI view. required: true schema: type: string - name: clientId in: query description: The ID of the Zuora Revenue application user. required: true schema: type: integer default: 1 - name: fromDate in: query description: The date from which the data query begins. required: true schema: type: string default: 2016-07-26T00:00:00.000Z - name: toDate in: query description: The date on which the data query ends. required: true schema: type: string default: 2018-07-26T00:00:00.000Z - name: pagenum in: query description: The number of page to be downloaded. schema: type: integer default: 1 - name: pageSize in: query description: > The number of rows on each page to be downloaded. * For CSV format, the valid range is 1 - 10,000 with default 10,000. * For gzip format, the valid range is 1 - 20,000 with default 20,000. **Note:** Any value that is greater than 20,000 is invalid. schema: type: integer - name: outputType in: query description: The output format of the download. schema: type: string default: gzip enum: - csv - gzip responses: '200': description: The queried BI view data is returned in the desired format. content: {} '204': description: No record is found for the specified BI view. content: {} '400': description: >- Error occurs. For example, the user ID is invalid, or the requested page is not cached yet. content: {} '401': description: >- The provided authentication token has expired. Send the Authentication request again to get a new token. content: {} '404': description: >- The requested page does not exist. The number of total pages and the number of total rows are returned. content: {} x-codegen-request-body-name: data /api/integration/v2/biviews/{tmple_name}/describe-columns: get: tags: - BI Views v2 summary: Get column list description: Gets a list of columns that are contained in a BI view. operationId: GET_ColumnList parameters: - name: tmple_name in: path description: Name of the BI view. required: true schema: type: string responses: '200': description: The list of columns is returned for the requested BI view. content: {} '400': description: Error occurs. For example, the BI view does not exist. content: {} '401': description: >- The provided authentication token has expired. Send the Authentication request again to get a new token. content: {} x-code-samples: - lang: Curl source: > curl -X GET https://ui_url/api/integration/v2/biviews/BI3_ACCT_TYPE/describe-columns -H 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6IlNZU0FETUlOIiwicm9sZSI6IlJldnBybyBBUEkgUm9sZSIsImNsaWVudG5hbWUiOiJEZWZhdWx0IiwiY2xpZW50aWQiOjEsImlhdCI6MTU1ODMzMDIxMCwibmJmIjoxNTU4MzMwMjEwLCJpc3MiOiJadW9yYS1SSUEiLCJleHAiOjE1NTgzMzIwMTB9.Sr2oIxp7XWSJSy9bARfr7nkFvAmMbdhMaNBv9IR52Fo' /api/integration/v1/job/collection/template: post: tags: - Revenue Jobs summary: Submit data collection job description: > Submit a data collection job based on the specified RC template. After the data collection job is submitted, the following validations are applied: * The specified RC template name must be valid. * For multi-organization tenants, the the organization ID is required and must be valid. * If there are more than 2 data collection jobs in Running/Pending/Incompatible status for the specified organization, the API request will be rejected with error message returned. operationId: POST_Collection requestBody: content: application/json; charset=utf-8: schema: $ref: '#/components/schemas/RevenueJobRequest' required: true responses: '200': description: >- The request is submitted successfully and the job ID is returned. You can use the returned ID to query the job status later. content: application/json; charset=utf-8: schema: $ref: '#/components/schemas/RevenueJobResponse' '401': description: >- The provided authentication token is invalid or the token has expired. Send the Authentication request again to get a new token. content: {} '403': description: >- You are not authorized to access this endpoint. Please contact Zuora Revenue Support. content: {} x-codegen-request-body-name: request /api/integration/v1/job/collection/template/{job_id}: get: tags: - Revenue Jobs summary: Get data collection job details description: Get the status of the data collection job. operationId: GET_CollectionDetails parameters: - name: job_id in: path description: >- The ID of the data collection job that you want to query. This is the ID that is returned when you submitted the data collection job. required: true schema: type: integer responses: '200': description: The request is submitted successfully. content: application/json; charset=utf-8: schema: $ref: '#/components/schemas/RevenueJobDetail' '401': description: >- The provided authentication token has expired. Send the Authentication request again to get a new token. content: {} '403': description: >- You are not authorized to access this endpoint. Please contact Zuora Revenue Support. content: {} security: - ApiKeyAuth: [] components: securitySchemes: ApiKeyAuth: type: apiKey in: header name: token description: Represents API Key `token` schemas: RevenueJobDetail: type: object properties: data: type: object properties: actual_start_date: type: string crtd_by: type: string crtd_dt: type: string id: type: integer status: type: string enum: - Running - Error - Pending - Completed - Warning - Failed - Cancelled - Terminated - Incompatible updt_dt: type: string success: type: boolean RevenueJobRequest: type: object properties: rc_template_name: type: string description: >- Name of the RC template that is defined in Zuora Revenue (**Policies > RC Grouping Template**). org_id: type: integer description: >- The organization ID that can be found in Zuora Revenue (**Setups > Application > Organization**). This field is required only for multi-organization tenants. RevenueJobResponse: type: object properties: message: type: string success: type: boolean ActivityQueueStatus: type: object properties: accumulate: type: integer activity_tracker: type: object properties: elapsed_time: type: string initated_time: type: string format: date-time last_activity: type: string format: date-time message: type: string metric: type: integer query_config: type: object properties: filter_param: type: object properties: fromDate: type: string format: date-time toDate: type: string format: date-time object_name: type: string status: type: string task_id: type: string Journal: type: object properties: client_id: type: integer crtd_by: type: string crtd_dt: type: string format: date-time id: type: integer format: int32 name: type: string status: type: string updt_by: type: string updt_dt: type: string format: date-time report_id: type: integer format: int32 Status: type: object properties: task_state: type: object properties: accumulate: type: integer activity_tracker: type: array items: type: string active: type: object properties: accumulate: type: integer activity_tracker: type: object properties: elapsed_time: type: string initated_time: type: string last_activity: type: string message: type: string metric: type: string query_config: type: object properties: filter_params: type: object properties: fromDate: type: string toDate: type: string object_name: type: string status: type: string task_id: type: string columns: type: object properties: column_name: type: string data_length: type: integer data_precision: type: string data_scale: type: string data_type: type: string completed: type: string draining: type: string stale: type: string reportList: type: object properties: category: type: string file_name: type: string id: type: integer layout_name: type: string rep_desc: type: string rep_name: type: string report_date: type: string format: date-time status: type: string stageError: type: object properties: client_id: type: integer crtd_by: type: string crtd_dt: type: string format: date-time err_msg: type: string id: type: integer inv_line_id: type: string inv_line_num: type: string processed_flag: type: string sec_atr_val: type: string so_line_id: type: string so_line_num: type: string so_num: type: string type: type: string updt_by: type: string updt_dt: type: string format: date-time upload_id: type: string status: type: string uploadMapping: type: object 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 uploadStatus: type: object properties: file_log: type: string file_request_id: type: integer