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

# Submit Anecf

> Submit an ANECF (cancellation of e-NCF sequences).



## OpenAPI

````yaml /openapi/public-v1.json post /api/v1/ecf/cancellations
openapi: 3.1.0
info:
  title: emite.do API
  description: >-
    API pública para emitir, consultar y operar e-CF ante la DGII. Autenticación
    por header X-API-Key. El POST /api/v1/ecf no promete el estado fiscal final:
    consulta o webhook.
  version: 1.0.0
servers:
  - url: https://api.emite.do
    description: Producción
security:
  - ApiKeyAuth: []
paths:
  /api/v1/ecf/cancellations:
    post:
      tags:
        - ANECF
      summary: Submit Anecf
      description: Submit an ANECF (cancellation of e-NCF sequences).
      operationId: submit_anecf_api_v1_ecf_cancellations_post
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnecfSubmitRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnecfResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    AnecfSubmitRequest:
      properties:
        idempotency_key:
          type: string
          maxLength: 100
          minLength: 1
          title: Idempotency Key
        cancellations:
          items:
            $ref: '#/components/schemas/CancellationLine'
          type: array
          maxItems: 10
          minItems: 1
          title: Cancellations
      type: object
      required:
        - idempotency_key
        - cancellations
      title: AnecfSubmitRequest
    AnecfResponse:
      properties:
        public_id:
          type: string
          title: Public Id
        status:
          type: string
          title: Status
        message:
          type: string
          title: Message
      type: object
      required:
        - public_id
        - status
        - message
      title: AnecfResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CancellationLine:
      properties:
        ecf_type:
          type: string
          maxLength: 2
          minLength: 2
          pattern: ^(31|32|33|34|41|43|44|45|46|47)$
          title: Ecf Type
        sequence_from:
          type: string
          maxLength: 13
          minLength: 13
          title: Sequence From
        sequence_to:
          type: string
          maxLength: 13
          minLength: 13
          title: Sequence To
        quantity:
          type: integer
          exclusiveMinimum: 0
          title: Quantity
      type: object
      required:
        - ecf_type
        - sequence_from
        - sequence_to
        - quantity
      title: CancellationLine
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key de la empresa. Se muestra una sola vez al crearla.

````