> ## Documentation Index
> Fetch the complete documentation index at: https://docs.merchantspring.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get the status of a Client Report PDF generation request

> Get the status of a PDF requested with POST /clientReports/generatePDF. Keep polling while `status` is "started" or "inProgress"; once it is "done" the response includes the download link.



## OpenAPI

````yaml /api-reference/openapi.json get /clientReports/generatePDF
openapi: 3.0.1
info:
  title: MerchantSpring Public API
  version: 1.0.0
servers:
  - url: https://mm-api.merchantspring.io
    description: Production
  - url: https://mm-api-staging.merchantspring.io
    description: Staging
security: []
tags:
  - name: advertising
    x-group: Advertising
  - name: channel
    x-group: Channel
  - name: content-change
    x-group: Content Change
  - name: custom-group
    x-group: Custom Group
  - name: order
    x-group: Order
  - name: product
    x-group: Product
  - name: report
    x-group: Report
  - name: vendor
    x-group: Vendor
  - name: tag
    x-group: Tag
  - name: search-query-performance
    x-group: Search Query Performance
  - name: client-report
    x-group: Client Report
  - name: profitability
    x-group: Profitability
  - name: targets
    x-group: Targets
  - name: seller-health
    x-group: Seller Health
paths:
  /clientReports/generatePDF:
    get:
      tags:
        - client-report
      summary: Get the status of a Client Report PDF generation request
      description: >-
        Get the status of a PDF requested with POST /clientReports/generatePDF.
        Keep polling while `status` is "started" or "inProgress"; once it is
        "done" the response includes the download link.
      operationId: getClientReportStatus
      parameters:
        - name: jobId
          in: query
          description: The job ID returned by /clientReports/generatePDF
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful operation
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientReportStatus'
              examples:
                done:
                  summary: The PDF is ready
                  value:
                    reportId: 6aa7e575bae1c11111b1fc11
                    jobId: 6a7f0c1e2b3d4e5f60123456
                    status: done
                    downloadUrl: >-
                      https://marketplace-manager-presignedbucket-<env>.amazonaws.com/...
                    downloadUrlExpiresAt: '2026-10-23T04:00:10.000Z'
                    generatedAt: '2026-10-23T00:00:10.000Z'
                inProgress:
                  summary: Still generating - check again shortly
                  value:
                    reportId: 6aa7e575bae1c11111b1fc11
                    jobId: 6a7f0c1e2b3d4e5f60123456
                    status: inProgress
                reportNotAvailable:
                  summary: Errored - the report could not be displayed
                  value:
                    reportId: 6aa7e575bae1c11111b1fc11
                    jobId: 6a7f0c1e2b3d4e5f60123456
                    status: errored
                    errorReason: >-
                      The report could not be displayed - it may have been
                      deleted or is not available
                timedOut:
                  summary: Errored - the report took too long to render
                  value:
                    reportId: 6aa7e575bae1c11111b1fc11
                    jobId: 6a7f0c1e2b3d4e5f60123456
                    status: errored
                    errorReason: The report took too long to render - please try again
                interrupted:
                  summary: Errored - generation was interrupted
                  value:
                    reportId: 6aa7e575bae1c11111b1fc11
                    jobId: 6a7f0c1e2b3d4e5f60123456
                    status: errored
                    errorReason: PDF generation was interrupted - please try again
                notStarted:
                  summary: Errored - generation could not be started
                  value:
                    reportId: 6aa7e575bae1c11111b1fc11
                    jobId: 6a7f0c1e2b3d4e5f60123456
                    status: errored
                    errorReason: PDF generation could not be started - please try again
                failed:
                  summary: Errored - any other failure
                  value:
                    reportId: 6aa7e575bae1c11111b1fc11
                    jobId: 6a7f0c1e2b3d4e5f60123456
                    status: errored
                    errorReason: PDF generation failed - please try again
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                missingJobId:
                  summary: >-
                    jobId query parameter is missing, e.g.
                    /clientReports/generatePDF
                  value:
                    status: error
                    error: jobId is required
                emptyJobId:
                  summary: jobId query parameter is empty, e.g. ?jobId=
                  value:
                    status: error
                    error: jobId is required
                invalidJobId:
                  summary: jobId is not a valid job id, e.g. ?jobId=abc
                  value:
                    status: error
                    error: jobId must be a valid job id
        '403':
          description: Missing or invalid x-api-key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiGatewayForbiddenResponse'
              examples:
                invalidApiKey:
                  summary: Missing or invalid x-api-key
                  value:
                    message: Forbidden
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                jobNotFound:
                  summary: No job exists with the given jobId
                  value:
                    status: error
                    error: No report download job with jobId 6a7f0c1e2b3d4e5f88819999
      security:
        - api_key: []
components:
  schemas:
    ClientReportStatus:
      type: object
      properties:
        reportId:
          type: string
        jobId:
          type: string
        status:
          type: string
          enum:
            - started
            - inProgress
            - done
            - errored
          description: >-
            "started" / "inProgress" while the PDF is being generated - keep
            polling. "done" when downloadUrl is ready. "errored" if generation
            failed (see errorReason) - request a new PDF to try again
        downloadUrl:
          type: string
          description: Only present when status is "done"
        downloadUrlExpiresAt:
          type: string
          description: Only present when status is "done" - when downloadUrl stops working
        generatedAt:
          type: string
          description: Only present when status is "done" - when the PDF was generated
        errorReason:
          type: string
          description: >-
            Only present when status is "errored" - why the PDF could not be
            generated (see the response examples)
          example: >-
            The report could not be displayed - it may have been deleted or is
            not available
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - error
        error:
          type: string
          description: >-
            Human-readable message. Validation failures list every failing rule,
            comma-separated.
      example:
        status: error
        error: Invalid request parameters
    ApiGatewayForbiddenResponse:
      type: object
      description: Returned for a missing or invalid x-api-key.
      properties:
        message:
          type: string
          enum:
            - Forbidden
      example:
        message: Forbidden
  securitySchemes:
    api_key:
      type: apiKey
      name: x-api-key
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.