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

# Cancel batch of company enrichments

> Cancel batch of company enrichments



## OpenAPI

````yaml patch /companies/enrichment-requests/{id}
openapi: 3.0.1
info:
  title: Amplemarket API V1 Docs
  version: v1
servers:
  - url: https://api.amplemarket.com
security:
  - bearerAuth: []
paths:
  /companies/enrichment-requests/{id}:
    parameters:
      - name: id
        in: path
        required: true
        description: Batch id
        schema:
          type: string
      - name: page[size]
        in: query
        required: false
        description: Page size
        schema:
          type: string
      - name: page[after]
        in: query
        required: false
        description: Page after
        schema:
          type: string
      - name: page[before]
        in: query
        required: false
        description: Page before
        schema:
          type: string
    patch:
      tags:
        - Companies Enrichment
      summary: Cancel batch of company enrichments
      description: Cancel batch of company enrichments
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - status
              additionalProperties: false
              properties:
                status:
                  type: string
                  enum:
                    - canceled
        required: true
        description: New batch status
      responses:
        '200':
          description: Successful
          content:
            application/json:
              examples:
                Successful:
                  value:
                    id: 5
                    object: company_enrichment
                    status: canceled
                    results: []
                    _links:
                      self:
                        href: /companies/enrichment-requests/5
              schema:
                $ref: '#/components/schemas/response_company_enrichment_object'
        '400':
          description: Bad request
          content:
            application/json:
              examples:
                Missing field:
                  value:
                    _errors:
                      - code: missing_field
                        title: Missing Field
                        detail: 'Missing field from request: status'
                        source:
                          pointer: /status
                    object: error
                Unsupported value:
                  value:
                    _errors:
                      - code: unsupported_value
                        title: Unsupported Value
                        detail: >-
                          You used status 'error' when only 'canceled' is
                          accepted.
                        source:
                          pointer: /status
                    object: error
                Cannot cancel finished batch:
                  value:
                    _errors:
                      - code: unsupported_value
                        title: Unsupported Value
                        detail: >-
                          Cannot update status of a finished company enrichment
                          batch.
                        source:
                          pointer: /status
                    object: error
              schema:
                $ref: '#/components/schemas/response_errors_object'
        '404':
          description: Not found
          content:
            application/json:
              examples:
                Not found:
                  value:
                    _errors:
                      - code: not_found
                        title: Not Found
                        detail: Could not find company enrichment batch.
                    object: error
              schema:
                $ref: '#/components/schemas/response_errors_object'
components:
  schemas:
    response_company_enrichment_object:
      type: object
      required:
        - id
        - object
        - status
        - results
        - _links
      additionalProperties: false
      properties:
        id:
          type: integer
        object:
          type: string
          enum:
            - company_enrichment
        status:
          type: string
          enum:
            - queued
            - processing
            - completed
            - canceled
            - error
        results:
          type: array
          items:
            $ref: '#/components/schemas/response_company_enrichment_result_object'
        _errors:
          type: array
          items:
            $ref: '#/components/schemas/response_error_object'
        _links:
          $ref: '#/components/schemas/response_links_object'
    response_errors_object:
      type: object
      required:
        - object
        - _errors
      additionalProperties: false
      properties:
        object:
          type: string
          enum:
            - error
        _errors:
          type: array
          items:
            $ref: '#/components/schemas/response_error_object'
        _links:
          $ref: '#/components/schemas/response_links_object'
    response_company_enrichment_result_object:
      type: object
      additionalProperties: true
      properties:
        id:
          type: integer
        status:
          type: string
          enum:
            - found
            - not_found
            - pending
        result:
          $ref: '#/components/schemas/response_company_object'
          nullable: true
        domain:
          nullable: true
          type: string
        linkedin_url:
          nullable: true
          type: string
    response_error_object:
      type: object
      required:
        - code
        - title
        - detail
      additionalProperties: false
      properties:
        code:
          type: string
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          additionalProperties: false
          properties:
            pointer:
              type: string
    response_links_object:
      type: object
      required:
        - self
      additionalProperties: false
      properties:
        self:
          $ref: '#/components/schemas/response_link_object'
        prev:
          $ref: '#/components/schemas/response_link_object'
        next:
          $ref: '#/components/schemas/response_link_object'
    response_company_object:
      type: object
      required:
        - id
        - object
        - linkedin_url
      additionalProperties: true
      properties:
        id:
          type: string
          format: uuid
        object:
          type: string
          enum:
            - company
        linkedin_url:
          nullable: false
          type: string
        name:
          nullable: true
          type: string
        overview:
          nullable: true
          type: string
        website:
          nullable: true
          type: string
        keywords:
          nullable: true
          type: array
          items:
            type: string
        followers:
          nullable: true
          type: integer
        estimated_number_of_employees:
          nullable: true
          type: integer
        size:
          nullable: true
          type: string
          enum:
            - 10001+ employees
            - 201-500 employees
            - 51-200 employees
            - 11-50 employees
            - 1-10 employees
        location:
          nullable: true
          type: string
        location_details:
          $ref: '#/components/schemas/response_location_details_object'
        locations:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/response_location_object'
        logo_url:
          type: string
          format: uri
        founded_year:
          nullable: true
          type: integer
        traffic_rank:
          nullable: true
          type: integer
        sic_codes:
          nullable: true
          type: array
          items:
            type: integer
        naics_codes:
          nullable: true
          type: array
          items:
            type: integer
        type:
          nullable: true
          type: string
          enum:
            - Public Company
            - Educational
            - Self Employed
            - Government Agency
            - Non Profit
            - Self Owned
            - Privately Held
            - Partnership
        total_funding:
          nullable: true
          type: integer
        latest_funding_stage:
          nullable: true
          type: string
          enum:
            - seed
            - angel
            - venture_round_unknown_series
            - series_a
            - series_b
            - series_c
            - series_d
            - series_e
            - series_f
            - series_g
            - series_h
            - series_i
            - series_j
            - debt
            - equity_crowdfunding
            - convertible_note
            - ico
            - private_equity
            - other
        latest_funding_date:
          nullable: true
          type: string
          format: date
        is_b2b:
          nullable: true
          type: boolean
        is_b2c:
          nullable: true
          type: boolean
        technologies:
          nullable: true
          type: array
          items:
            type: string
        department_headcount:
          $ref: '#/components/schemas/response_department_headcount_object'
        job_function_headcount:
          $ref: '#/components/schemas/response_job_function_headcount_object'
        estimated_revenue:
          nullable: true
          type: string
          enum:
            - $0-$1M
            - $1M-$10M
            - $10M-$100M
            - $100M-$1B
            - $1B+
        revenue:
          nullable: true
          type: integer
    response_link_object:
      type: object
      required:
        - href
      additionalProperties: false
      properties:
        href:
          type: string
    response_location_details_object:
      type: object
      additionalProperties: false
      properties:
        country:
          nullable: true
          type: string
        state:
          nullable: true
          type: string
        city:
          nullable: true
          type: string
        postal_code:
          nullable: true
          type: string
        lat:
          nullable: true
          type: number
        long:
          nullable: true
          type: number
    response_location_object:
      type: object
      additionalProperties: false
      properties:
        address:
          nullable: false
          type: string
          description: Full address as a single string
        is_primary:
          nullable: false
          type: boolean
          description: Indicates if this is the primary location
        country:
          nullable: true
          type: string
          description: Country name (e.g., United States)
        state:
          nullable: true
          type: string
          description: State or subdivision name (e.g., California, New York)
        city:
          nullable: true
          type: string
          description: City name
        postal_code:
          nullable: true
          type: string
          description: Postal code
    response_department_headcount_object:
      type: object
      additionalProperties:
        type: integer
    response_job_function_headcount_object:
      type: object
      additionalProperties:
        type: object
        additionalProperties:
          type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````