---
schema_version: "1"
id: 2401ebefbd95f34e4afb469187a4d95e30315e6da2edbc45ad5772e4f14410b8
title: Spiff Reporting API
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/sales-cloud/spiff/references/generated-api-specs/spiff-reporting-api-reference.md
canonical_url: https://developer.salesforce.com/docs/sales/spiff/references/spiff-reporting-api-reference
source_site: developer.salesforce.com
content_type: documentation
content_hash: 9d762d35a605fd753a2a257f793669abd1cd3944a78fe476df93402d45a3e41d
products:
  - Salesforce Spiff
  - Sales Cloud
---
Spiff Reporting API

# Spiff Reporting API

Access, export, and download custom report data from Salesforce Spiff for use in other systems.

Before you start an export, you can call [getExportReadiness](/docs/sales/spiff/references/spiff-reporting-api-reference?meta=getExportReadiness) to confirm that reporting data has settled.

Most endpoints in the Spiff Reporting API require OAuth 2.0 authentication with a bearer token that's scoped appropriately. To create a token, a Spiff admin creates a Client ID and Client Secret in Spiff Settings. Then, you can pass the token in the authorization header in your API calls. See [Get Started with Salesforce Spiff Reporting API](/docs/sales/spiff/guide/reporting-api-get-started.html).

**Version:** 1.0.0

## Servers

*   `https://{subdomain}.spiff.com/api/v1`

Default security: bearerAuth.

## Security

*   `bearerAuth` (http) A bearer token that you obtain from [getAccessToken](/docs/sales/spiff/references/spiff-reporting-api-reference?meta=getAccessToken) with `client_id`, `client_secret`, `audience`, and `grant_type=client_credentials` values specified. This token requires the `reportingApi.CustomReportExport` scope.
    *   HTTP scheme: bearer (JWT)

## Operations

### POST getAccessToken

`POST /oauth2/token`

Operation ID: `getAccessToken`. Tags: Authentication.

Returns an OAuth 2.0 token that's required for accessing other Spiff Reporting API endpoints.

To create a token, first generate a client ID and secret in Spiff Settings. See [Get Started with Salesforce Spiff Reporting API](/docs/sales/spiff/guide/reporting-api-get-started.html).

#### Request body (required)

Media type: `application/x-www-form-urlencoded`. Schema: `object`.

*   `client_id` (_string_, required) The OAuth client ID generated in Spiff Settings.  
    Example: `09ac18484c46fd23`.
*   `client_secret` (_string_, required) The OAuth client secret generated in Spiff Settings.  
    Example: `226d8670a81c2cc743736f15ea6c97cd`.
*   `audience` (_string_, required) The API server where the token is used. This value must match the base URL of the Spiff Reporting API.  
    Example: `http://{subdomain}.spiff.com/api/v1`.
*   `grant_type` (_string_, required) The type of OAuth access that's granted. This value must be `client_credentials`.  
    Allowed values: `client_credentials`. Example: `client_credentials`.

#### Responses

*   **201** The token was generated.
    
    Media type: `application/json`. Schema: `object`.
    
    *   `success` (_boolean_)  
        Example: `true`.
    *   `access_token` (_string_) The JWT token to use for authentication.  
        Example: `eyJhbGciOiJIUzU.eyJ1c2VyX2lkIjoxMzUxMzg2ODAsImxvZ2luX2lkIjoxMzUxMzg2ODAsImNpZCI6IjA5YWMxODQ4NGM0NmZkMjMiLCJzY3AiOlsicmVwb3J0aW5nQXBpLkN1c3RvbVJlcG9ydEV4cG9ydCJdLCJzZXJpYWwiOiI5NzE2NjA4ZWRiZDFmODJhYjM0MzQxNjIwMGRmMWJkMSIsImV4cCI6MTc0NjQ1OTEyMH0.2MgV9Q7_kG54t7KdJcCg90HM5SBnoQKzNOotKrctCXg9qlQ9x4_Wt5xPrhVC9yq-1YgTA8HNXo`.
    *   `token_type` (_string_) The type of token issued.  
        Example: `Bearer`.
    *   `expires_in` (_integer_) The number of seconds until the token expires.  
        Example: `604799`.
    *   `scope` (_string_) The space-separated scopes granted to this token.  
        Example: `reportingApi.CustomReportExport`.
*   **401** The request was unsuccessful because your client ID and client secret aren't valid.
    
    Media type: `application/json`. Schema: `object`.
    
    *   `error` (_string_)  
        Example: `invalid_request`.
    *   `error_description` (_string_)  
        Example: `We couldn't validate your client ID and client secret credentials.`.

### GET getReports

`GET /reports`

Operation ID: `getReports`. Tags: Reports.

Returns a list of custom reports, configured for Spiff Reporting API access, that are available for export.

This endpoint allows 100 requests per minute.

#### Parameters

*   `Authorization` (header, string, required) A bearer token that you obtain from [getAccessToken](/docs/sales/spiff/references/spiff-reporting-api-reference?meta=getAccessToken) with `client_id`, `client_secret`, `audience`, and `grant_type=client_credentials` values specified. This token requires the `reportingApi.CustomReportExport` scope.
    
    _Example_
    
    ```
    Bearer {YOUR_BEARER_TOKEN}
    ```
    
*   `subdomain` (path, string, required)
    
    The subdomain for your Spiff environment.
    
    *   If you're in the US, use `us1`.
    *   If you're in the EU, use `eu1`.
    
    _Example_
    
    ```
    us1
    ```
    

#### Responses

*   **200** The request was successful. The response includes a list of API Reports.
    
    Media type: `application/json`. Schema: `array of CustomReport`.
    
    Array of `CustomReport`.
    
*   **401** The request was unsuccessful because your bearer token is missing or invalid.
*   **403** The request was unsuccessful because the user doesn't have permission to access this endpoint.
*   **429** The request was unsuccessful because you reached a rate limit for this endpoint.
    
    Headers:
    
    *   `X-Rate-Limit-Limit` (string) The maximum number of requests allowed within the time period for this endpoint.  
        Example: `100`
    *   `X-Rate-Limit-Remaining` (string) The number of requests that remain in the current time period for this endpoint. This value is `0` when throttled.  
        Example: `0`
    *   `X-Rate-Limit-Reset` (string) The string representation of the UTC epoch timestamp when the rate limit window resets.  
        Example: `1678886400`
    
    Media type: `application/json`. Schema: `object`.
    
    *   `error` (_string_)
    
    _Example_
    
    ```
    {
      "error": "You reached the throttle limit. Try again later."
    }
    ```
    
*   **500** The request was interrupted because an internal server error occurred.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "Something went wrong. Try again later."
    }
    ```
    

### GET getExportReadiness

`GET /reports/export/readiness`

Operation ID: `getExportReadiness`. Tags: Reports.

Indicates whether the company's reporting data has settled enough to start a safe export.

Call this endpoint immediately before [requestExport](/docs/sales/spiff/references/spiff-reporting-api-reference?meta=requestExport). If `ready` is `false`, wait at least 30 seconds and try again. Don't start the export yet.

Readiness is advisory. The export process re-checks calculation status and can still wait, especially if calculations start again after this check.

A `ready: true` response means company-wide calculation work that can affect report data has settled.

This check is company-level. Tenancy comes from the OAuth application's user. There are no path parameters, query parameters, or request body.

This endpoint allows 100 requests per 60 seconds per client IP. Readiness results are cached per company for 30 seconds.

#### Parameters

*   `Authorization` (header, string, required) A bearer token that you obtain from [getAccessToken](/docs/sales/spiff/references/spiff-reporting-api-reference?meta=getAccessToken) with `client_id`, `client_secret`, `audience`, and `grant_type=client_credentials` values specified. This token requires the `reportingApi.CustomReportExport` scope.
    
    _Example_
    
    ```
    Bearer {YOUR_BEARER_TOKEN}
    ```
    
*   `subdomain` (path, string, required)
    
    The subdomain for your Spiff environment.
    
    *   If you're in the US, use `us1`.
    *   If you're in the EU, use `eu1`.
    
    _Example_
    
    ```
    us1
    ```
    

#### Responses

*   **200** The request was successful. HTTP 200 is returned when the caller is authorized and the feature is enabled, including when data isn't ready yet. Use the `ready` field to determine whether to start an export.
    
    Media type: `application/json`. Schema: `ExportReadinessResponse`.
    
    _Example: ready_ Reporting data is ready
    
    ```
    {
      "ready": true,
      "message": "Reporting data is ready for export.",
      "checked_at": "2026-01-01T12:00:00Z"
    }
    ```
    
    _Example: notReady_ Reporting data is not ready
    
    ```
    {
      "ready": false,
      "message": "Reporting data is not yet ready for export.",
      "checked_at": "2026-01-01T12:00:00Z"
    }
    ```
    
*   **401** The request was unsuccessful because your bearer token is missing or invalid.
*   **403**
    
    The request was unsuccessful because of one of these conditions:
    
    *   The bearer token is missing the required scope.
    *   The user doesn't have permission to access this endpoint.
    *   The Reporting API isn't enabled for the company.
    *   Export readiness isn't enabled for the company.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example: unauthorizedUser_ User isn't authorized
    
    ```
    {
      "message": "User is not authorized to access this endpoint."
    }
    ```
    
    _Example: readinessNotEnabled_ Export readiness isn't enabled
    
    ```
    {
      "message": "Export readiness is not enabled for this company."
    }
    ```
    
*   **429** The request was unsuccessful because you reached a rate limit for this endpoint.
    
    Headers:
    
    *   `X-Rate-Limit-Limit` (string) The maximum number of requests allowed within the time period for this endpoint.  
        Example: `100`
    *   `X-Rate-Limit-Remaining` (string) The number of requests that remain in the current time period for this endpoint. This value is `0` when throttled.  
        Example: `0`
    *   `X-Rate-Limit-Reset` (string) The string representation of the UTC epoch timestamp when the rate limit window resets.  
        Example: `1678886400`
    
    Media type: `application/json`. Schema: `object`.
    
    *   `error` (_string_)
    
    _Example_
    
    ```
    {
      "error": "Throttle limit reached. Retry later."
    }
    ```
    
*   **500** The request was interrupted because an internal server error occurred.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "Something went wrong. Please try again."
    }
    ```
    

### POST requestExport

`POST /reports/export`

Operation ID: `requestExport`. Tags: Reports.

Initiates an asynchronous export job for a specified custom report.

Before you call this endpoint, call [getExportReadiness](/docs/sales/spiff/references/spiff-reporting-api-reference?meta=getExportReadiness) to confirm that reporting data is ready. If `ready` is `false`, wait and retry the readiness check instead of starting the export.

This endpoint allows 20 requests per minute or 50 requests per hour.

One pending or running export request is allowed per custom report at one time. If you request another export during this time, this endpoint returns a `409` conflict error.

#### Parameters

*   `Authorization` (header, string, required) A bearer token that you obtain from [getAccessToken](/docs/sales/spiff/references/spiff-reporting-api-reference?meta=getAccessToken) with `client_id`, `client_secret`, `audience`, and `grant_type=client_credentials` values specified. This token requires the `reportingApi.CustomReportExport` scope.
    
    _Example_
    
    ```
    Bearer {YOUR_BEARER_TOKEN}
    ```
    
*   `subdomain` (path, string, required)
    
    The subdomain for your Spiff environment.
    
    *   If you're in the US, use `us1`.
    *   If you're in the EU, use `eu1`.
    
    _Example_
    
    ```
    us1
    ```
    

#### Request body (required)

Media type: `application/json`. Schema: `object`.

*   `custom_report_id` (_string_, required) The ID of the custom report to export.  
    Example: `Q3VzdG9tUmVwb3J0LTE=`.
*   `compressed` (_boolean_) Specifies whether the report is exported as one or more compressed .csv.gz files using gzip (`true`) or as one or more uncompressed .csv files (`false`). The default is `false`.  
    Example: `true`.

#### Responses

*   **202** The request was successful. The response includes an export ID, which is required for checking the export status and downloading the report later.
    
    Media type: `application/json`. Schema: `ExportRequestResponse`.
    
*   **401** The request was unsuccessful because your bearer token is missing or invalid.
*   **403** The request was unsuccessful because the user doesn't have permission to access this endpoint.
*   **404** The specified report ID doesn't exist or the report isn't an API report that's available for export.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "We couldn't find the report with the ID Q3VzdG9tUmVwb3J0LTE="
    }
    ```
    
*   **409** A conflict occurred because an export request for this report is pending or running already.
    
    Media type: `application/json`. Schema: `ExportConflictResponse`.
    
*   **429** The request was unsuccessful because you reached a rate limit for this endpoint.
    
    Headers:
    
    *   `X-Rate-Limit-Limit` (string) The maximum number of requests allowed within the time period for this endpoint.  
        Example: `100`
    *   `X-Rate-Limit-Remaining` (string) The number of requests that remain in the current time period for this endpoint. This value is `0` when throttled.  
        Example: `0`
    *   `X-Rate-Limit-Reset` (string) The string representation of the UTC epoch timestamp when the rate limit window resets.  
        Example: `1678886400`
    
    Media type: `application/json`. Schema: `object`.
    
    *   `error` (_string_)
    
    _Example_
    
    ```
    {
      "error": "You reached the throttle limit. Try again later."
    }
    ```
    
*   **500** The request was interrupted because an internal server error occurred.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "We couldn't create an export request for the report with the ID Q3VzdG9tUmVwb3J0LTE="
    }
    ```
    

### GET getExportStatus

`GET /reports/export/{export_id}/status`

Operation ID: `getExportStatus`. Tags: Reports.

Returns the status of a report export that you previously requested.

An export with the status of `pending` or `running` is considered stale after two hours of inactivity. Stale exports are marked as failed.

The export job is postponed during commission and statement calculations. The export job is retried six times within one hour. If that limit is reached, the export status is `max_retries_exceeded`.

This endpoint allows 100 requests per minute.

#### Parameters

*   `export_id` (path, string, required) The ID of the export request, which is included in the [requestExport](/docs/sales/spiff/references/spiff-reporting-api-reference?meta=requestExport) response.
    
    _Example_
    
    ```
    Q3VzdG9tUmVwb3J0RXhwb3J0LTEy
    ```
    
*   `Authorization` (header, string, required) A bearer token that you obtain from [getAccessToken](/docs/sales/spiff/references/spiff-reporting-api-reference?meta=getAccessToken) with `client_id`, `client_secret`, `audience`, and `grant_type=client_credentials` values specified. This token requires the `reportingApi.CustomReportExport` scope.
    
    _Example_
    
    ```
    Bearer {YOUR_BEARER_TOKEN}
    ```
    
*   `subdomain` (path, string, required)
    
    The subdomain for your Spiff environment.
    
    *   If you're in the US, use `us1`.
    *   If you're in the EU, use `eu1`.
    
    _Example_
    
    ```
    us1
    ```
    

#### Responses

*   **200** The request was successful. To find the status of the export, check the `export_status` field in the response.
    
    Media type: `application/json`. Schema: `ReportStatus`.
    
    _Example: successful_ Successful export
    
    ```
    {
      "export_id": "CQ3VzdG9tUmVwb3J0RXhwb3J0LTEy",
      "export_status": "successful",
      "files": [
        "d4ba3a69-11b4-431a-bdae-3e11ceb8eeb2",
        "a3fb7e92-255c-46ab-9c6f-7d9f767971eb"
      ],
      "checksum": "a1b2c3d4e5f6..."
    }
    ```
    
    _Example: stillProcessing_ Still processing
    
    ```
    {
      "export_id": "CQ3VzdG9tUmVwb3J0RXhwb3J0LTEy",
      "export_status": "running",
      "message": "Your export request is still processing. Try again later."
    }
    ```
    
    _Example: filtersChanged_ Filters changed
    
    ```
    {
      "export_id": "CQ3VzdG9tUmVwb3J0RXhwb3J0LTEy",
      "export_status": "filters_changed",
      "message": "The report filters have changed since this export was requested. Request a new export with the current filters."
    }
    ```
    
    _Example: maxSizeExceeded_ Max size exceeded
    
    ```
    {
      "export_id": "CQ3VzdG9tUmVwb3J0RXhwb3J0LTEy",
      "export_status": "max_export_size_exceeded",
      "message": "You reached the 2 GB export size limit. Try again with a smaller report."
    }
    ```
    
    _Example: failed_ Failed
    
    ```
    {
      "export_id": "CQ3VzdG9tUmVwb3J0RXhwb3J0LTEy",
      "export_status": "failed",
      "message": "We couldn't generate an export file. Try again later."
    }
    ```
    
    _Example: maxRetriesExceeded_ Max retries exceeded
    
    ```
    {
      "export_id": "CQ3VzdG9tUmVwb3J0RXhwb3J0LTEy",
      "export_status": "max_retries_exceeded",
      "message": "You reached the limit for the number of export retries that the API can attempt. Try again later."
    }
    ```
    
*   **401** The request was unsuccessful because your bearer token is missing or invalid.
*   **403** The request was unsuccessful because the user doesn't have permission to access this endpoint.
*   **404** The specified export ID doesn't exist or isn't accessible.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "We couldn't find the export with the ID CQ3VzdG9tUmVwb3J0RXhwb3J0LTEy."
    }
    ```
    
*   **429** The request was unsuccessful because you reached a rate limit for this endpoint.
    
    Headers:
    
    *   `X-Rate-Limit-Limit` (string) The maximum number of requests allowed within the time period for this endpoint.  
        Example: `100`
    *   `X-Rate-Limit-Remaining` (string) The number of requests that remain in the current time period for this endpoint. This value is `0` when throttled.  
        Example: `0`
    *   `X-Rate-Limit-Reset` (string) The string representation of the UTC epoch timestamp when the rate limit window resets.  
        Example: `1678886400`
    
    Media type: `application/json`. Schema: `object`.
    
    *   `error` (_string_)
    
    _Example_
    
    ```
    {
      "error": "You reached the throttle limit. Try again later."
    }
    ```
    
*   **500** The request was interrupted because an internal server error occurred.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "Something went wrong. Try again later."
    }
    ```
    

### GET getExportSummary

`GET /reports/export/{export_id}/summary`

Operation ID: `getExportSummary`. Tags: Reports.

Returns summary metadata for a report export that you previously requested.

To access this endpoint, you require an OAuth access token from [getAccessToken](/docs/sales/spiff/references/spiff-reporting-api-reference?meta=getAccessToken) and a valid `export_id` from [requestExport](/docs/sales/spiff/references/spiff-reporting-api-reference?meta=requestExport).

**Note:** Get the export status first before calling this endpoint to make sure the export job is ready and the final request returns a successful `200` status.

#### Parameters

*   `export_id` (path, string, required) The ID of the export job, which is included in the [requestExport](/docs/sales/spiff/references/spiff-reporting-api-reference?meta=requestExport) response.
    
    _Example_
    
    ```
    Q3VzdG9tUmVwb3J0RXhwb3J0LTEzMg==
    ```
    
*   `Authorization` (header, string, required) A bearer token that you obtain from [getAccessToken](/docs/sales/spiff/references/spiff-reporting-api-reference?meta=getAccessToken) with `client_id`, `client_secret`, `audience`, and `grant_type=client_credentials` values specified. This token requires the `reportingApi.CustomReportExport` scope.
    
    _Example_
    
    ```
    Bearer {YOUR_BEARER_TOKEN}
    ```
    
*   `subdomain` (path, string, required)
    
    The subdomain for your Spiff environment.
    
    *   If you're in the US, use `us1`.
    *   If you're in the EU, use `eu1`.
    
    _Example_
    
    ```
    us1
    ```
    

#### Responses

*   **200** The request was successful. The response includes a `summary` object with `total_lines_in_export` and `sum_by_currency` fields.
    
    Media type: `application/json`. Schema: `ExportSummaryResponse`.
    
    _Example: exportCompleted_ Export completed
    
    ```
    {
      "summary": {
        "total_lines_in_export": 150,
        "sum_by_currency": {
          "USD": 1500.75,
          "EUR": 800.25
        }
      }
    }
    ```
    
*   **403** The request was unsuccessful because the user doesn't have permission to access this endpoint.
*   **404** The specified export ID doesn't exist or isn't accessible.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "We couldn't find the export with the ID Q3VzdG9tUmVwb3J0RXhwb3J0LTEzMg==."
    }
    ```
    

### GET downloadReport

`GET /reports/export/{export_id}/download/{file_id}`

Operation ID: `downloadReport`. Tags: Reports.

Downloads an exported Salesforce Spiff report file in .csv.gz or .csv format with UTF-8 encoding, depending on the format that the [requestExport](/docs/sales/spiff/references/spiff-reporting-api-reference?meta=requestExport) endpoint specified.

The `file_id` parameter is required and corresponds to one of the file IDs returned in the `files` array by [getExportStatus](/docs/sales/spiff/references/spiff-reporting-api-reference?meta=getExportStatus) when the export is successful.

This endpoint allows 15 requests per minute or 120 requests per hour.

#### Parameters

*   `export_id` (path, string, required) The ID of the export request, which is included in the [requestExport](/docs/sales/spiff/references/spiff-reporting-api-reference?meta=requestExport) response.
    
    _Example_
    
    ```
    Q3VzdG9tUmVwb3J0RXhwb3J0LTEy
    ```
    
*   `file_id` (path, string, required) The ID of the specific export file to download. This value must match one of the IDs in the `files` array returned by the [getExportStatus](/docs/sales/spiff/references/spiff-reporting-api-reference?meta=getExportStatus) endpoint.
    
    _Example_
    
    ```
    d4ba3a69-11b4-431a-bdae-3e11ceb8eeb2
    ```
    
*   `Authorization` (header, string, required) A bearer token that you obtain from [getAccessToken](/docs/sales/spiff/references/spiff-reporting-api-reference?meta=getAccessToken) with `client_id`, `client_secret`, `audience`, and `grant_type=client_credentials` values specified. This token requires the `reportingApi.CustomReportExport` scope.
    
    _Example_
    
    ```
    Bearer {YOUR_BEARER_TOKEN}
    ```
    
*   `subdomain` (path, string, required)
    
    The subdomain for your Spiff environment.
    
    *   If you're in the US, use `us1`.
    *   If you're in the EU, use `eu1`.
    
    _Example_
    
    ```
    us1
    ```
    

#### Responses

*   **200** The download was successful. The downloaded file's name in the Content-Disposition header indicates the report name and date. If the original report was exported as multiple files, the filename also includes the part number, such as `report_name 2023-10-27 part-1.csv`.
    
    Media type: `text/csv`. Schema: `string (binary)`.
    
    Type: `string (binary)`.
    
    _Example_
    
    ```
    Statement Name,Rep Name,External ID,Commission Amount,Cumulative Draw Amount,Total Adjustment Amount
    August 2023 | Sales Engineer | Sarah Eckert,Sarah Eckert,U3RhdGVtZW50LTEyMzQ1Ng==,0.0,1250.00,0.0
    August 2023 | Business Development Rep - SaaS | Brenda D. Ramirez,Brenda D. Ramirez,U3RhdGVtZW50LTEyMzQ2Nw==,0.0,1050.00,0.0
    August 2023 | Account Executive - SaaS | Freddie Bozeman,Freddie Bozeman,U3RhdGVtZW50LTEyMzQ4OQ==,0.0,2500.00,150.00
    ```
    
*   **202** The export status is still `pending` or `running`.
    
    Media type: `application/json`. Schema: `ReportStatusPendingOrRunning`.
    
    _Example_
    
    ```
    {
      "export_id": "Q3VzdG9tUmVwb3J0RXhwb3J0LTEy",
      "export_status": "running",
      "message": "Your export request is still processing. Try again later."
    }
    ```
    
*   **401** The request was unsuccessful because your bearer token is missing or invalid.
*   **403** The request was unsuccessful because the user doesn't have permission to access this endpoint.
*   **404** The specified export ID or file ID doesn't exist or isn't accessible.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example: exportNotFound_
    
    ```
    {
      "message": "We couldn't find an export with the ID Q3VzdG9tUmVwb3J0RXhwb3J0LTEy."
    }
    ```
    
    _Example: fileNotFound_
    
    ```
    {
      "message": "We couldn't find a file with the ID storage_id_abc."
    }
    ```
    
*   **409** The request was unsuccessful because the report filters have changed since this export was requested. Request a new export with the current filters.
    
    Media type: `application/json`. Schema: `ReportStatusFiltersChanged`.
    
    _Example_
    
    ```
    {
      "export_id": "Q3VzdG9tUmVwb3J0RXhwb3J0LTEy",
      "export_status": "filters_changed",
      "message": "The report filters have changed since this export was requested. Request a new export with the current filters."
    }
    ```
    
*   **413** The request was unsuccessful because you reached the 2 GB export size limit. Try again with a smaller report.
    
    Media type: `application/json`. Schema: `ReportStatusMaxExportSizeExceeded`.
    
    _Example_
    
    ```
    {
      "export_id": "Q3VzdG9tUmVwb3J0RXhwb3J0LTEy",
      "export_status": "max_export_size_exceeded",
      "message": "You reached the 2 GB export size limit. Try again with a smaller report."
    }
    ```
    
*   **429** The request was unsuccessful because you reached a rate limit for this endpoint.
    
    Headers:
    
    *   `X-Rate-Limit-Limit` (string) The maximum number of requests allowed within the time period for this endpoint.  
        Example: `100`
    *   `X-Rate-Limit-Remaining` (string) The number of requests that remain in the current time period for this endpoint. This value is `0` when throttled.  
        Example: `0`
    *   `X-Rate-Limit-Reset` (string) The string representation of the UTC epoch timestamp when the rate limit window resets.  
        Example: `1678886400`
    
    Media type: `application/json`. Schema: `object`.
    
    *   `error` (_string_)
    
    _Example_
    
    ```
    {
      "error": "You reached the throttle limit. Try again later."
    }
    ```
    
*   **500** The request was interrupted because an internal server error occurred.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "Something went wrong. Try again later."
    }
    ```
    
*   **503** You reached the limit of six retries within one hour.
    
    Media type: `application/json`. Schema: `ReportStatusMaxRetriesExceeded`.
    
    _Example_
    
    ```
    {
      "export_id": "Q3VzdG9tUmVwb3J0RXhwb3J0LTEy",
      "export_status": "max_retries_exceeded",
      "message": "You reached the limit of six retries within one hour. Try again later."
    }
    ```
    

## Schemas

### CustomReport

*   `id` (_string_) The ID of the custom report.  
    Example: `Q3VzdG9tUmVwb3J0LTE=`.
*   `name` (_string_) The name of the custom report.  
    Example: `Monthly Sales Performance`.
*   `description` (_string_, nullable) A description of the custom report.  
    Example: `Tracks sales figures month over month.`.
*   `is_api_report` (_boolean_) Indicates whether the report type is API Report, which means that the report is accessible with the Spiff Reporting API.  
    Example: `true`.
*   `created_by` (_string_) The name of the user who created the report.  
    Example: `Admin User`.
*   `created_at` (_string (date-time)_) The timestamp when the report was created.

### Error

*   `message` (_string_)

### ExportReadinessResponse

*   `ready` (_boolean_, required)
    
    Indicates whether company-wide reporting data has settled enough to start an export.
    
    *   `true`: It's safe to call [requestExport](/docs/sales/spiff/references/spiff-reporting-api-reference?meta=requestExport).
    *   `false`: Wait and call this endpoint again. Don't start an export yet.
    
      
    Example: `true`.
*   `message` (_string_, required) A human-readable status message.  
    Example: `Reporting data is ready for export.`.
*   `checked_at` (_string (date-time)_, required) The UTC ISO-8601 timestamp when readiness was computed. Readiness is cached per company for 30 seconds, so this value reflects the computation time, not necessarily the request time.  
    Example: `2026-01-01T12:00:00Z`.

### ExportRequestResponse

*   `message` (_string_)  
    Example: `Your export request was accepted.`.
*   `export_id` (_string_) The ID of the newly created export request.  
    Example: `Q3VzdG9tUmVwb3J0RXhwb3J0LTEy`.
*   `report_id` (_string_) The ID of the report that's exported.  
    Example: `Q3VzdG9tUmVwb3J0LTE=`.

### ExportConflictResponse

*   `message` (_string_)  
    Example: `Request to export report already exists`.
*   `export_id` (_string_) The ID of the existing export request.  
    Example: `Q3VzdG9tUmVwb3J0RXhwb3J0LTEy`.

### ReportStatus

*   `export_id` (_string_) The ID of the export request.
*   `export_status` (_string_)
    
    The status of the export job.
    
    Possible enumerated values:
    
    *   `pending`: The export job is queued and waiting to be processed.
    *   `running`: The export job is currently being processed.
    *   `successful`: The export job is complete. The list of exported files and an MD5 hash are included in the response.
    *   `failed`: The export job failed due to errors or timing out.
    *   `max_export_size_exceeded`: The size of the exported report exceeds the 2 GB limit.
    *   `filters_changed`: The report configuration was modified after the export job was requested.
    *   `waiting_for_calculations`: The export job is postponed due to active back-end calculations and will retry automatically.
    *   `max_retries_exceeded`: The export job failed after the maximum number of retry attempts.
    *   `skipped`: For internal use only.
*   `message` (_string_) A message that explains the export status.
*   `files` (_array of string_)
    
    A list of IDs for the .csv.gz or .csv files that are created for the exported report, depending on the format that the [requestExport](/docs/sales/spiff/references/spiff-reporting-api-reference?meta=requestExport) endpoint specified. This field is included in the response only when the export status is `successful`.
    
    The size of a report determines how many files are exported. See [Limits for Salesforce Spiff Reporting API](/docs/sales/spiff/guide/reporting-api-limits.html).
    
    Each file ends with a newline (`\n`) character. Only the file at `files[0]` includes the header row. To reassemble the full report after export, download the separate files and combine them in the same order as they appear in this array.
    
*   `checksum` (_string_)
    
    An MD5 hash that's created for data integrity after the export is finished. This field is included in the response only when the export status is `successful`.
    
    If the report was exported as multiple files, calculate the MD5 hash of the reassembled files after you download the separate files and combine them. If you combine the files correctly, the calculated hash is the same as this checksum.
    

### ExportSummaryResponse

*   `total_lines_in_export` (_integer_) Total number of lines in the exported report. This field is included in the response only when the export job status is `successful`.  
    Example: `150`.
*   `sum_by_currency` (_object_) Total sum of each currency type in the exported report, keyed by ISO currency code.
    
    _Example_
    
    ```
    {
      "USD": 1500.75,
      "EUR": 800.25
    }
    ```
    

### ReportStatusPendingOrRunning

*   `export_id` (_string_) The ID of the export request.
*   `export_status` (_string_) The status of the export job.  
    Allowed values: `pending`, `running`.
*   `message` (_string_) A message that explains the export status.

### ReportStatusFiltersChanged

*   `export_id` (_string_) The ID of the export request.
*   `export_status` (_string_) The status of the export job.  
    Allowed values: `filters_changed`.
*   `message` (_string_) A message that explains the export status.

### ReportStatusMaxExportSizeExceeded

*   `export_id` (_string_) The ID of the export request.
*   `export_status` (_string_) The status of the export job.  
    Allowed values: `max_export_size_exceeded`.
*   `message` (_string_) A message that explains the export status.

### ReportStatusMaxRetriesExceeded

*   `export_id` (_string_) The ID of the export request.
*   `export_status` (_string_) The status of the export job.  
    Allowed values: `max_retries_exceeded`.
*   `message` (_string_) A message that explains the export status.