factus-js iconfactus-js
Notas de ajuste

Crear y validar

Crear y validar una nota de ajuste para un documento soporte.

Firma del método

create(
  input: CreateAdjustmentNoteInput,
  options?: RequestOptions,
): Promise<CreateAdjustmentNoteResponse>

Endpoint Factus

POST /v2/adjustment-notes/validate

Fuente oficial: Crear y validar

Campos principales

Prop

Type

Ejemplo

import {
  AdjustmentNoteReasonCode,
  PaymentFormCode,
  PaymentMethodCode,
  ProductStandardCode,
  SupportDocumentIdentityDocumentCode,
} from "factus-js";

const response = await factus.adjustmentNotes.create({
  numbering_range_id: 149,
  reference_code: "REF007",
  support_document_number: "SEDS984000085",
  correction_concept_code: AdjustmentNoteReasonCode.PriceAdjustment,
  observation: "Corrección de precio en documento soporte",
  payment_details: [
    {
      payment_form: PaymentFormCode.CashPayment,
      payment_method_code: PaymentMethodCode.Cash,
      amount: "50000.00",
    },
  ],
  provider: {
    identification_document_code: SupportDocumentIdentityDocumentCode.NIT,
    identification: "123456789",
    names: "Alan Turing",
    address: "calle 1 # 2-68",
    country_code: "CO",
    municipality_code: "11001",
  },
  items: [
    {
      code_reference: "SRV-001",
      name: "Servicio ajustado",
      quantity: "1.00",
      discount_rate: "0.00",
      price: "50000.00",
      unit_measure_code: "94",
      standard_code: ProductStandardCode.TaxpayerAdoption,
      taxes: [{ code: "01", rate: "19.00" }],
    },
  ],
});

console.log(response.data.number);

Ejemplo de respuesta

{
  "status": "Created",
  "message": "Documento con el código de referencia 2fca4b6c-638c-4bd9-bbb2-7981f99a05ba registrado y validado con éxito",
  "data": {
    "reference_code": "2fca4b6c-638c-4bd9-bbb2-7981f99a05ba",
    "number": "NA1",
    "payment_details": [
      {
        "payment_form": {
          "code": "1",
          "name": "Pago de contado"
        },
        "payment_method": {
          "code": "42",
          "name": "Consignación"
        },
        "reference_code": "pago-002",
        "amount": "100000.00",
        "due_date": null
      }
    ],
    "correction_concept": {
      "code": "5",
      "name": "Otros"
    },
    "is_validated": true,
    "validated_at": "06-05-2026 11:44:12 AM",
    "errors": [
      "Regla: NSAX04, Notificación: No se encuentra el grupo TaxSubtotal",
      "Regla: NSAJ44b, Notificación: Nit o Documento de Identificación informado No corresponde al registrado en el RUT con respecto a la razón social o nombre comercial suministrado.",
      "Regla: NSAJ43b, Notificación: Nombre informado No corresponde al registrado en el RUT con respecto al Nit suminstrado."
    ],
    "observation": null,
    "created_at": "06-05-2026 11:44:11 AM",
    "company": {
      "url_logo": "https://api-sandbox.factus.com.co/storage/images/logos/T3RWMJn0HDi6Uy4UTIOpi2vqw4qbEumeFiB5kt21.png",
      "nit": "1000789002",
      "dv": "2",
      "economic_activity": "1084",
      "establishment": {
        "name": "FACTUS V2",
        "address": "calle 11 8 84",
        "phone_number": "3161331234",
        "email": "[email protected]",
        "municipality": {
          "code": "68679",
          "name": "San Gil",
          "department": {
            "code": "68",
            "name": "Santander"
          }
        }
      }
    },
    "provider": {
      "identification_document": {
        "code": "31",
        "name": "NIT"
      },
      "identification": "2343543",
      "dv": "7",
      "graphic_representation_name": "Pepito Perez",
      "trade_name": null,
      "names": "Pepito Perez",
      "address": "calle 4",
      "email": null,
      "phone": null,
      "legal_organization": {
        "code": "2",
        "name": "Persona Natural"
      },
      "tribute": {
        "code": "ZZ",
        "name": "No aplica"
      },
      "municipality": {
        "code": "68679",
        "name": "San Gil",
        "department": {
          "code": "68",
          "name": "Santander"
        }
      }
    },
    "items": [
      {
        "code_reference": "12345",
        "name": "producto de prueba",
        "quantity": "2.00",
        "unit_measure": {
          "code": "94",
          "name": "unidad"
        },
        "standard_code": {
          "code": "999",
          "name": "Estándar de adopción del contribuyente"
        },
        "discount_rate": "0.00",
        "discount": "0.00",
        "gross_value": "50000.00",
        "withholding_taxes": [
          {
            "tribute_code": "06",
            "name": "ReteRenta",
            "value": "3500.00",
            "rates": [
              {
                "code": "06",
                "name": "ReteRenta",
                "rate": "3.50"
              }
            ]
          }
        ],
        "price": "50000.00",
        "total": "100000.00"
      }
    ],
    "withholding_taxes": [
      {
        "tribute_code": "06",
        "name": "ReteRenta",
        "value": "3500.00"
      }
    ],
    "totals": {
      "gross_amount": "100000.00",
      "total": "100000.00"
    },
    "cuds": "8cd9bd7c00cbcb0c9cc9e4299eb605efc324a2748d12abc10201bc043ed5446465abe9c94e9bd4479bb7cd09c1fcc651",
    "support_document": {
      "reference_code": "0e3579fa-207b-4d23-8858-465022677321",
      "number": "SEDS984000004",
      "cuds": "174d8d1a07a4d03bfd5c4cc6ddfc7b8abd247f959530b0fb4b9906e6eb3ed77f0918b2ea944806018168d57a7740c046"
    },
    "links": {
      "qr": "https://catalogo-vpfe-hab.dian.gov.co/document/searchqr?documentkey=8cd9bd7c00cbcb0c9cc9e4299eb605efc324a2748d12abc10201bc043ed5446465abe9c94e9bd4479bb7cd09c1fcc651"
    }
  }
}

En esta página