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" }
draft
issued
applied
refunded
voided