> ## 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 Acecf

> Generate ACECF XML, sign with the company cert and send it to DGII.



## OpenAPI

````yaml /openapi/public-v1.json post /api/v1/ecf/acecf/submit
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/acecf/submit:
    post:
      tags:
        - ACECF
      summary: Submit Acecf
      description: Generate ACECF XML, sign with the company cert and send it to DGII.
      operationId: submit_acecf_api_v1_ecf_acecf_submit_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/AcecfSubmitRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcecfResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    AcecfSubmitRequest:
      properties:
        idempotency_key:
          type: string
          maxLength: 100
          minLength: 1
          title: Idempotency Key
        encf:
          type: string
          maxLength: 13
          minLength: 13
          title: Encf
        rnc_emisor:
          type: string
          maxLength: 11
          minLength: 9
          title: Rnc Emisor
        rnc_comprador:
          type: string
          maxLength: 11
          minLength: 9
          title: Rnc Comprador
        fecha_emision:
          type: string
          maxLength: 10
          minLength: 10
          title: Fecha Emision
        monto_total:
          type: string
          title: Monto Total
        estado:
          type: string
          pattern: ^[12]$
          title: Estado
        detalle_motivo_rechazo:
          anyOf:
            - type: string
            - type: 'null'
          title: Detalle Motivo Rechazo
        fecha_hora_aprobacion:
          anyOf:
            - type: string
            - type: 'null'
          title: Fecha Hora Aprobacion
        environment:
          anyOf:
            - type: string
            - type: 'null'
          title: Environment
        ecf_type:
          type: string
          maxLength: 2
          minLength: 2
          pattern: ^(31|32|33|34|41|43|44|45|46|47)$
          title: Ecf Type
          default: '31'
      type: object
      required:
        - idempotency_key
        - encf
        - rnc_emisor
        - rnc_comprador
        - fecha_emision
        - monto_total
        - estado
      title: AcecfSubmitRequest
      description: Generate, sign and send ACECF to DGII (buyer commercial approval).
    AcecfResponse:
      properties:
        public_id:
          type: string
          title: Public Id
        status:
          type: string
          title: Status
        message:
          type: string
          title: Message
        dgii_response:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Dgii Response
      type: object
      required:
        - public_id
        - status
        - message
      title: AcecfResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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.

````