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

# Anular remito

> El CAI y el papel se administran en Comprobantes. Requiere sales:write; un remito de preparación también requiere orders:write. La emisión fija el documento y usa una sola hoja. La anulación conserva el número y no modifica el stock.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/delivery-notes/{delivery_note_id}/void
openapi: 3.1.0
info:
  title: La Pyme API
  description: >-
    Resources and workflows for purchases, sales, inventory, contacts, products,
    reports, and settings.
  version: 1.0.0
  contact:
    name: La Pyme Support
    email: hola@lapyme.com.ar
  license:
    name: Proprietary
    url: https://lapyme.com.ar/terminos
servers:
  - url: https://api.lapyme.com.ar
    description: Servidor de producción
security:
  - bearerAuth: []
tags:
  - name: API
    description: Public API operations for La Pyme integrations.
paths:
  /api/v1/delivery-notes/{delivery_note_id}/void:
    post:
      tags:
        - API
      summary: Anular remito
      description: >-
        El CAI y el papel se administran en Comprobantes. Requiere sales:write;
        un remito de preparación también requiere orders:write. La emisión fija
        el documento y usa una sola hoja. La anulación conserva el número y no
        modifica el stock.
      operationId: voidApiDeliveryNote
      parameters:
        - name: delivery_note_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 255
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiDeliveryNoteVoidRequest'
      responses:
        '200':
          description: Remito actualizado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiDeliveryNoteDetailResponse'
        '400':
          description: Datos o Idempotency-Key inválidos
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Datos o Idempotency-Key inválidos
                      retryable: false
                      details: []
        '401':
          description: Credencial inválida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Credencial inválida
                      retryable: false
                      details: []
        '403':
          description: Sin acceso al remito
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Sin acceso al remito
                      retryable: false
                      details: []
        '404':
          description: Remito o talonario no encontrado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Remito o talonario no encontrado
                      retryable: false
                      details: []
        '409':
          description: El borrador, la hoja o la solicitud cambió
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: El borrador, la hoja o la solicitud cambió
                      retryable: false
                      details: []
        '422':
          description: CAI, fecha o capacidad del papel no válidos
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: CAI, fecha o capacidad del papel no válidos
                      retryable: false
                      details: []
        '429':
          description: Límite de solicitudes excedido para la organización
          headers:
            Retry-After:
              description: Segundos a esperar antes de volver a intentar la solicitud.
              schema:
                type: string
                example: '30'
            X-RateLimit-Limit:
              description: Límite de la ventana activa.
              schema:
                type: string
                example: '5000'
            X-RateLimit-Remaining:
              description: Solicitudes restantes en la ventana activa.
              schema:
                type: string
                example: '0'
            X-RateLimit-Reset:
              description: Segundos restantes hasta el reset de la ventana activa.
              schema:
                type: string
                example: '30'
            RateLimit-Limit:
              description: Límite de la ventana activa en formato estándar.
              schema:
                type: string
                example: '5000'
            RateLimit-Remaining:
              description: Solicitudes restantes en la ventana activa en formato estándar.
              schema:
                type: string
                example: '0'
            RateLimit-Reset:
              description: >-
                Segundos hasta el reset de la ventana activa en formato
                estándar.
              schema:
                type: string
                example: '30'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: RATE_LIMITED
                  value:
                    request_id: req_rate_limit_1
                    error:
                      type: rate_limit_error
                      code: RATE_LIMITED
                      message: >-
                        The organization request limit was reached. Try again
                        later.
                      retryable: true
                      details: []
        '500':
          description: Error del servidor
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Error del servidor
                      retryable: false
                      details: []
components:
  schemas:
    ApiDeliveryNoteVoidRequest:
      type: object
      properties:
        issuance_id:
          type: string
          format: uuid
        reason:
          type: string
          minLength: 3
          maxLength: 500
      required:
        - issuance_id
        - reason
      additionalProperties: false
    ApiDeliveryNoteDetailResponse:
      type: object
      properties:
        request_id:
          type: string
        data:
          type: object
          properties:
            numbering_mode:
              $ref: '#/components/schemas/ApiSharedEnum4b1b5db8e0'
            revision:
              type: integer
              exclusiveMinimum: 0
            legal_issuance:
              anyOf:
                - $ref: '#/components/schemas/ApiSharedObject5a67c4e4e1'
                - type: 'null'
            object:
              type: string
              const: delivery_note
            id:
              type: string
              format: uuid
            number:
              type:
                - string
                - 'null'
            date:
              type: string
              format: date
            customer:
              anyOf:
                - $ref: '#/components/schemas/ApiSharedObject5e70e1df84'
                - type: 'null'
            origin:
              oneOf:
                - $ref: '#/components/schemas/ApiSharedObjectc15d6ab2fa'
                - $ref: '#/components/schemas/ApiSharedObject5a978938b1'
                - $ref: '#/components/schemas/ApiSharedObject05f64e43bb'
            created_at:
              type: string
              format: date-time
            content_hash:
              anyOf:
                - type: string
                  pattern: ^[a-f0-9]{64}$
                - type: 'null'
              description: >-
                Huella de los datos de impresión revisados. Enviá este valor
                como expected_content_hash al emitir un borrador.
            issuer:
              anyOf:
                - $ref: '#/components/schemas/ApiSharedObjectd6ec566aaf'
                - type: 'null'
            eligible_talonarios:
              type: array
              items:
                $ref: '#/components/schemas/ApiSharedObjectf3b611a53b'
              description: >-
                Talonarios vigentes para el borrador y su ubicación. La hoja
                propuesta se confirma al emitir.
            delivery_note_number:
              type: integer
            point_of_sale:
              anyOf:
                - $ref: '#/components/schemas/ApiSharedObject94c0cab352'
                - type: 'null'
            carrier:
              type:
                - string
                - 'null'
            delivery_address:
              type:
                - string
                - 'null'
            scheduled_date:
              anyOf:
                - type: string
                  format: date
                - type: 'null'
            delivered_at:
              anyOf:
                - type: string
                  format: date-time
                - type: 'null'
            recipient_name:
              type:
                - string
                - 'null'
            recipient_document:
              type:
                - string
                - 'null'
            driver_id:
              anyOf:
                - type: string
                  format: uuid
                - type: 'null'
            notes:
              type:
                - string
                - 'null'
            items:
              type: array
              items:
                $ref: '#/components/schemas/ApiSharedObject912052d04a'
            updated_at:
              type: string
              format: date-time
          required:
            - numbering_mode
            - revision
            - legal_issuance
            - object
            - id
            - number
            - date
            - customer
            - origin
            - created_at
            - content_hash
            - issuer
            - eligible_talonarios
            - delivery_note_number
            - point_of_sale
            - carrier
            - delivery_address
            - scheduled_date
            - delivered_at
            - recipient_name
            - recipient_document
            - driver_id
            - notes
            - items
            - updated_at
          additionalProperties: false
      required:
        - request_id
        - data
      additionalProperties: false
    ApiErrorEnvelope:
      type: object
      properties:
        request_id:
          type: string
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - api_error
                - authentication_error
                - authorization_error
                - business_error
                - external_dependency_error
                - idempotency_error
                - invalid_request_error
                - rate_limit_error
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            details:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
                  metadata:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      type:
                        - string
                        - number
                        - boolean
                        - 'null'
                required:
                  - code
                  - message
                additionalProperties: false
          required:
            - type
            - code
            - message
            - retryable
            - details
          additionalProperties: false
      required:
        - request_id
        - error
      additionalProperties: false
    ApiSharedEnum4b1b5db8e0:
      type: string
      enum:
        - legacy
        - managed
    ApiSharedObject5a67c4e4e1:
      type: object
      properties:
        id:
          type: string
          format: uuid
        talonario_id:
          type: string
          format: uuid
        authorization_id:
          type: string
          format: uuid
        number:
          type: integer
        formatted_number:
          type: string
        emission_point:
          type: integer
        cai:
          type: string
          pattern: ^\d{14}$
        expires_on:
          type: string
          format: date
        issued_on:
          type: string
          format: date
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
          format: uuid
        delivery_revision:
          type: integer
        voided_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        voided_by:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
        void_reason:
          type:
            - string
            - 'null'
      required:
        - id
        - talonario_id
        - authorization_id
        - number
        - formatted_number
        - emission_point
        - cai
        - expires_on
        - issued_on
        - created_at
        - created_by
        - delivery_revision
        - voided_at
        - voided_by
        - void_reason
      additionalProperties: false
    ApiSharedObject5e70e1df84:
      type: object
      properties:
        object:
          type: string
          const: customer
        id:
          type: string
          format: uuid
        name:
          type:
            - string
            - 'null'
        email:
          anyOf:
            - type: string
              format: email
            - type: 'null'
        phone:
          type:
            - string
            - 'null'
        tax_id_type:
          type:
            - string
            - 'null'
        tax_id:
          type:
            - string
            - 'null'
        tax_category:
          type:
            - string
            - 'null'
      required:
        - id
        - name
      additionalProperties: false
    ApiSharedObjectc15d6ab2fa:
      type: object
      properties:
        type:
          type: string
          const: sale
        sale_id:
          type: string
          format: uuid
      required:
        - type
        - sale_id
      additionalProperties: false
    ApiSharedObject5a978938b1:
      type: object
      properties:
        type:
          type: string
          const: fulfillment
        fulfillment_id:
          type: string
          format: uuid
      required:
        - type
        - fulfillment_id
      additionalProperties: false
    ApiSharedObject05f64e43bb:
      type: object
      properties:
        type:
          type: string
          const: custom
      required:
        - type
      additionalProperties: false
    ApiSharedObjectd6ec566aaf:
      type: object
      properties:
        legal_name:
          type: string
        tax_id:
          type:
            - string
            - 'null'
        tax_id_type:
          type:
            - string
            - 'null'
        tax_category:
          type:
            - string
            - 'null'
        address:
          type:
            - string
            - 'null'
        apartment:
          type:
            - string
            - 'null'
        city:
          type:
            - string
            - 'null'
        province:
          type:
            - string
            - 'null'
        postal_code:
          type:
            - string
            - 'null'
        phone:
          type:
            - string
            - 'null'
        gross_income_tax_amount:
          type:
            - string
            - 'null'
        activities_started_at:
          type:
            - string
            - 'null'
      required:
        - legal_name
        - tax_id
        - tax_id_type
        - tax_category
        - address
        - apartment
        - city
        - province
        - postal_code
        - phone
        - gross_income_tax_amount
        - activities_started_at
      additionalProperties: false
    ApiSharedObjectf3b611a53b:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        emission_point:
          type: integer
        next_number:
          type: integer
        cai:
          type: string
          pattern: ^\d{14}$
        expires_on:
          type: string
          format: date
      required:
        - id
        - name
        - emission_point
        - next_number
        - cai
        - expires_on
      additionalProperties: false
    ApiSharedObject94c0cab352:
      type: object
      properties:
        id:
          type: string
          format: uuid
        number:
          type: integer
        name:
          type:
            - string
            - 'null'
      required:
        - id
        - number
        - name
      additionalProperties: false
    ApiSharedObject912052d04a:
      type: object
      properties:
        id:
          type: string
          format: uuid
        sale_item_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
        quantity:
          type: number
        name:
          type:
            - string
            - 'null'
        is_custom:
          type: boolean
        warehouse_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
        product:
          anyOf:
            - $ref: '#/components/schemas/ApiSharedObject0a16670526'
            - type: 'null'
      required:
        - id
        - sale_item_id
        - quantity
        - name
        - is_custom
        - warehouse_id
        - product
      additionalProperties: false
    ApiSharedObject0a16670526:
      type: object
      properties:
        object:
          type: string
          const: product
        id:
          type: string
          format: uuid
        sku:
          type:
            - string
            - 'null'
        name:
          type:
            - string
            - 'null'
        option_names:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
        variant_options:
          anyOf:
            - type: object
              propertyNames:
                type: string
              additionalProperties:
                type: string
            - type: 'null'
        product_type:
          anyOf:
            - $ref: '#/components/schemas/ApiSharedEnum5c962a8637'
            - type: 'null'
        kit_units:
          type: number
      required:
        - id
        - sku
        - name
        - option_names
        - variant_options
        - product_type
        - kit_units
      additionalProperties: false
    ApiSharedEnum5c962a8637:
      type: string
      enum:
        - product
        - combo
        - kit
        - service
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Incluí tu API key en el header Authorization con el prefijo Bearer.

````

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