# Archive customer credit

> Archives the given customer credit

`POST https://api.light.inc/v1/customer-credits/{customerCreditId}/archive`

## Note

From DRAFT it simply archives; from POSTED it reverses the ledger posting first. A PARTIALLY_CLEARED or CLEARED credit cannot be archived ( ACCOUNTING_DOCUMENT_CANNOT_BE_ARCHIVED ): unlink it from its invoices first.

## Authorization

- API key
- Bearer token

See https://light.inc/docs/getting-started/authentication.

## Path parameters

- `customerCreditId` (string, uuid, required)


## Response

- `amount` — The header amount available to allocate, independent of the line totals; the link validations compare against it.
- `lines.grossTransactionAmount.amount` — Unsigned integer in minor units. The direction is in `dcSign`; a negative value is rejected.
- `lines.netTransactionAmount.amount` — Unsigned integer in minor units. The direction is in `dcSign`; a negative value is rejected.
- `lines.taxTransactionAmount.amount` — Unsigned integer in minor units. The direction is in `dcSign`; a negative value is rejected.
- `linkedInvoiceReceivable` — The linked **invoice receivable** (the description says payable). Omitted when there are no links or more than one; on the list endpoint also omitted unless `include=INVOICE_RECEIVABLE`.

```json
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "companyEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "amount": 100000,
  "customerName": "string",
  "customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "DRAFT",
  "description": "string",
  "currency": "USD",
  "documentDate": "2026-01-15",
  "postingDate": "2026-01-15",
  "valuationDate": "2026-01-15",
  "areLinesWithTax": true,
  "lines": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "customerCreditId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "grossTransactionAmount": {
        "amount": 100000,
        "dcSign": "D"
      },
      "netTransactionAmount": {
        "amount": 100000,
        "dcSign": "D"
      },
      "description": "string",
      "ledgerTaxId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "taxTransactionAmount": {
        "amount": 100000,
        "dcSign": "D"
      },
      "ledgerAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "avataxCode": "string",
      "productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "quantity": 0,
      "createdAt": "2026-01-15T09:30:00Z",
      "updatedAt": "2026-01-15T09:30:00Z",
      "accrualTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "accrualStartDate": "2026-01-15",
      "accrualEndDate": "2026-01-15",
      "accrualDefaultDuration": 0
    }
  ],
  "createdAt": "2026-01-15T09:30:00Z",
  "updatedAt": "2026-01-15T09:30:00Z",
  "updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "paymentReference": "string",
  "linkedInvoiceReceivable": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "documentNumber": "string",
    "documentDate": "2026-01-15",
    "postingDate": "2026-01-15",
    "status": "DRAFT",
    "amount": 100000,
    "currency": "USD"
  }
}
```

Values above are generated from the schema: the shapes and types are real, the values are placeholders.

## Code

```bash
curl -X POST "https://api.light.inc/v1/customer-credits/3c90c3cc-0d44-4b50-8888-8dd25736052a/archive" \
  -H "Authorization: Basic YOUR_API_KEY"
```

---

Full page: https://light.inc/docs/api-reference/v1--customer-credits/archive-customer-credit · Index: https://light.inc/docs/llms.txt
