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

# Cancel import extract

> Cancel a running import extract by ID.



## OpenAPI

````yaml /generated/openapi-import-generated-2023-12-01.json post /import/extracts/{id}/cancel
openapi: 3.1.0
info:
  title: Prequel Data Import
  description: Data Import API spec
  version: '2023-12-01'
servers:
  - url: https://api.prequel.co
    description: Cloud-hosted server (US)
  - url: https://eu-api.prequel.co
    description: Cloud-hosted server (EU)
  - url: https://{custom_host}
    description: Self-hosted Prequel API host
security:
  - ApiKeyAuth: []
paths:
  /import/extracts/{id}/cancel:
    post:
      tags:
        - Import Extracts
      summary: Cancel import extract
      description: Cancel a running import extract by ID.
      operationId: cancel-import-extract
      parameters:
        - name: id
          in: path
          required: true
          description: Import Extract ID.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    const: success
                  data:
                    $ref: '#/components/schemas/GetExtractResponse'
                    $schema: https://json-schema.org/draft/2020-12/schema
                    $id: >-
                      https://github.com/prequel-co/datafeed/internal/import/api/models/get-extract-response
                  message:
                    type: string
                type: object
                required:
                  - status
                  - data
                  - message
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    GetExtractResponse:
      properties:
        extract:
          $ref: '#/components/schemas/ExtractResource'
      additionalProperties: false
      type: object
      required:
        - extract
    ExtractResource:
      properties:
        id:
          type: string
        dataset_id:
          type: string
        submitted_at:
          type: string
        started_at:
          type: string
          format: date-time
        ended_at:
          type: string
          format: date-time
        records_processed:
          type: integer
        records_existing_updated:
          type: integer
        records_existing_unchanged:
          type: integer
        records_existing_deleted:
          type: integer
        records_new_inserted:
          type: integer
        records_errored:
          type: integer
        error:
          $ref: '#/components/schemas/ErrorResource'
      additionalProperties: false
      type: object
      required:
        - id
        - dataset_id
        - submitted_at
    ErrorResponse:
      properties:
        status:
          type: string
          const: error
        message:
          type: string
        data:
          type: 'null'
      type: object
      required:
        - status
        - message
    ErrorResource:
      properties:
        error_code:
          type: string
        title:
          type: string
        blame:
          type: string
        documentation_url:
          type: string
        trace:
          type: string
        message:
          type: string
      additionalProperties: false
      type: object
      required:
        - error_code
        - title
        - blame
        - documentation_url
        - trace
        - message
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````