Skip to main content
POST
https://api.alguna.io
/
credit-notes
curl -X POST https://api.alguna.io/credit-notes \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "accountId": "acc_abc123",
    "description": "Service credit for downtime",
    "lineItems": [
      {
        "description": "Service credit",
        "unitPrice": "100.00",
        "quantity": "1"
      }
    ],
    "status": "draft"
  }'
{
  "id": "cn_xyz789",
  "accountId": "acc_abc123",
  "invoiceId": null,
  "status": "draft",
  "applyDate": "2024-01-20T10:00:00Z",
  "creditDate": "2024-01-20T10:00:00Z",
  "currency": "USD",
  "description": "Service credit for downtime",
  "lineItems": [
    {
      "description": "Service credit",
      "unitPrice": "100.00",
      "quantity": "1",
      "total": "100.00"
    }
  ],
  "subtotal": "100.00",
  "tax": "0.00",
  "total": "100.00",
  "isPdfAvailable": false,
  "createdAt": "2024-01-20T10:00:00Z",
  "updatedAt": "2024-01-20T10:00:00Z"
}
Create a new credit note for a customer account.
accountId
string
required
The account ID to create the credit note for.
invoiceId
string
Optional invoice ID to associate the credit note with.
billingPeriodStart
string
Optional billing period start date (ISO 8601).
billingPeriodEnd
string
Optional billing period end date (ISO 8601).
description
string
Description of the credit note.
lineItems
array
Array of line items for the credit note.
status
string
Initial status: draft or issued.
Optional legal entity ID.
curl -X POST https://api.alguna.io/credit-notes \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "accountId": "acc_abc123",
    "description": "Service credit for downtime",
    "lineItems": [
      {
        "description": "Service credit",
        "unitPrice": "100.00",
        "quantity": "1"
      }
    ],
    "status": "draft"
  }'
{
  "id": "cn_xyz789",
  "accountId": "acc_abc123",
  "invoiceId": null,
  "status": "draft",
  "applyDate": "2024-01-20T10:00:00Z",
  "creditDate": "2024-01-20T10:00:00Z",
  "currency": "USD",
  "description": "Service credit for downtime",
  "lineItems": [
    {
      "description": "Service credit",
      "unitPrice": "100.00",
      "quantity": "1",
      "total": "100.00"
    }
  ],
  "subtotal": "100.00",
  "tax": "0.00",
  "total": "100.00",
  "isPdfAvailable": false,
  "createdAt": "2024-01-20T10:00:00Z",
  "updatedAt": "2024-01-20T10:00:00Z"
}
id
string
Unique identifier for the credit note.
status
string
Status: draft, issued, applied, refunded, or voided.
subtotal
string
Subtotal before tax.
tax
string
Tax amount.
total
string
Total credit note amount.