openapi: 3.2.0 info: title: Keap Reporting API description: Keap Public API Documentation termsOfService: https://www.thryv.com/terms-of-use contact: name: Keap url: https://developer.keap.com/get-support email: api.keap@thryv.com license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 version: v2 servers: - url: https://api.infusionsoft.com/crm security: - oauth2: [] tags: - name: Reporting paths: /rest/v2/reporting/reports/{report_id}:run: post: tags: - Reporting summary: Run a Report description: Runs a report as defined in the application (identified as Saved Search)
Deprecated as of v2 operationId: runReport parameters: - name: report_id in: path description: The unique identifier of the report (Saved Search) to execute required: true schema: type: string example: 123 - name: runReportRequest in: query required: true schema: $ref: '#/components/schemas/RunReportRequest' responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ReportExecutionResult' /rest/v2/reporting/reports: get: tags: - Reporting summary: List Reports description: Retrieves a list of Reports as defined in the application (identified as Saved Search)
Deprecated as of v2 operationId: listReports parameters: - name: filter in: query description: "Filter to apply, allowed fields are:\n- (String) `name`\n- (DateTime) `since_created_time`\n- (DateTime) `until_created_time`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\n word, in the encoded form `%3D%3D`. For the filters listed above, here are some examples:\n- `filter=name%3D%3DMonthly%20Sales`\n- `filter=since_created_time%3D%3D2024-01-01`\n" required: false schema: type: string example: name%3D%3DMonthly%20Sales - name: page_token in: query description: Page token required: false schema: type: string - name: order_by in: query description: 'Attribute and direction to order items. One of the following fields: - `name` - `created_time` One of the following directions: - `asc` - `desc`' required: false schema: type: string example: name asc - name: page_size in: query description: Total number of items to return per page required: false schema: type: integer format: int32 maximum: 1000 minimum: 0 example: 0 responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ListReportsResponse' /rest/v2/reporting/reports/{report_id}: get: tags: - Reporting summary: Retrieve Report description: Retrieves information about a Report as defined in the application (identified as Saved Search)
Deprecated as of v2 operationId: retrieveReport parameters: - name: report_id in: path description: The unique identifier of the report (Saved Search) required: true schema: type: string example: 123 responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Report' /rest/v2/reporting/reports/{report_id}/model: get: tags: - Reporting summary: Retrieve Report Model description: Retrieves the list of fields available for a Report (Saved Search). The returned field `name` values can be used in the `fields` parameter when running the report. operationId: retrieveReportModel parameters: - name: report_id in: path description: The unique identifier of the report (Saved Search) required: true schema: type: string example: 123 responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ReportModel' components: schemas: Report: type: object properties: id: type: string description: The unique identifier of the report (Saved Search) example: 123 name: type: string description: The name of the report example: Monthly Sales Report updated_time: type: string description: The last update timestamp example: '2024-01-15T10:30:00Z' created_time: type: string description: The creation timestamp example: '2024-01-01T08:00:00Z' user_ids: type: array description: A list of Users who have access to this Saved Search, or ALL_USERS if visible to all example: - '1' - '2' - ALL_USERS items: type: string ReportEntryValue: type: object properties: field_name: type: string description: The name of the field/column example: contact_email value: type: string description: The value of the field example: john.smith@example.com ErrorDetails: type: object properties: domain: type: string resource: type: string ReportField: type: object properties: name: type: string description: The field name as accepted by the report execution `fields` parameter example: Id label: type: string description: The human-readable label for the field example: ID RunReportRequest: type: object properties: page_token: type: string order_by: type: string page_size: type: integer format: int32 fields: type: string ListReportsResponse: type: object properties: reports: type: array items: $ref: '#/components/schemas/Report' next_page_token: type: string ReportExecutionResult: type: object properties: results: type: array description: The list of report result records items: $ref: '#/components/schemas/ReportEntryRecord' page_token: type: string description: Token for retrieving the next page of results example: eyJsYXN0Um93IjoxMDB9 ReportModel: type: object properties: fields: type: array description: The list of fields available for this Report (Saved Search) items: $ref: '#/components/schemas/ReportField' ReportEntryRecord: type: object properties: columns: type: array description: The set of column values for this record items: $ref: '#/components/schemas/ReportEntryValue' uniqueItems: true Error: type: object properties: code: type: integer format: int32 message: type: string status: type: string details: type: array items: $ref: '#/components/schemas/ErrorDetails' securitySchemes: oauth2: type: oauth2 flows: authorizationCode: authorizationUrl: https://accounts.infusionsoft.com/app/oauth/authorize tokenUrl: https://api.infusionsoft.com/token scopes: {}