GET/api/v1/invoices?direction=outgoing&isCreditNote=true

List Credit Notes

Retrieves a paginated list of credit notes for the authenticated company. Credit notes are special invoices that reverse or partially reverse original invoices. They share the same endpoint as invoices but are filtered using isCreditNote=true.

Headers

NameTypeRequiredDescription
AuthorizationstringYesBearer token for authentication
X-CompanystringYesCompany UUID to scope the request

Query Parameters

NameTypeRequiredDescription
directionstringYesMust be outgoing for credit notes
isCreditNotebooleanYesMust be true to filter for credit notes
pageintegerNoPage number (default: 1)
limitintegerNoItems per page (default: 20, max: 100)
searchstringNoSearch term for credit note number or client name
statusstringNoFilter by status: draft, uploaded, validated, error
fromstringNoStart date filter (ISO 8601 format: YYYY-MM-DD)
tostringNoEnd date filter (ISO 8601 format: YYYY-MM-DD)
clientIdstringNoFilter by client UUID
parentDocumentIdstringNoFilter by parent invoice UUID

Request

cURL
curl -X GET "https://api.storno.ro/api/v1/invoices?direction=outgoing&isCreditNote=true&page=1&limit=20" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "X-Company: company-uuid-here"
JavaScript
const response = await fetch('https://api.storno.ro/api/v1/invoices?direction=outgoing&isCreditNote=true&page=1&limit=20', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'X-Company': 'company-uuid-here'
  }
});

const data = await response.json();

Response

{
  "data": [
    {
      "uuid": "850e8400-e29b-41d4-a716-446655440000",
      "number": "CN-2026-005",
      "direction": "outgoing",
      "isCreditNote": true,
      "seriesId": "750e8400-e29b-41d4-a716-446655440000",
      "series": {
        "uuid": "750e8400-e29b-41d4-a716-446655440000",
        "name": "CN",
        "nextNumber": 6,
        "prefix": "CN-",
        "year": 2026
      },
      "clientId": "750e8400-e29b-41d4-a716-446655440000",
      "client": {
        "uuid": "750e8400-e29b-41d4-a716-446655440000",
        "name": "Client SRL",
        "registrationNumber": "RO12345678",
        "address": "Str. Exemplu 123, București"
      },
      "parentDocumentId": "650e8400-e29b-41d4-a716-446655440111",
      "parentDocument": {
        "uuid": "650e8400-e29b-41d4-a716-446655440111",
        "number": "FAC-2026-045",
        "issueDate": "2026-02-18",
        "total": "8330.00"
      },
      "status": "uploaded",
      "anafStatus": "validated",
      "issueDate": "2026-02-20",
      "dueDate": "2026-03-20",
      "currency": "RON",
      "exchangeRate": 1.0,
      "subtotal": "-1000.00",
      "vatAmount": "-190.00",
      "total": "-1190.00",
      "notes": "Partial refund - hosting services cancelled",
      "anafUploadIndex": 2026000234,
      "createdAt": "2026-02-20T09:00:00Z",
      "updatedAt": "2026-02-20T10:15:00Z"
    }
  ],
  "total": 12,
  "page": 1,
  "limit": 20,
  "pages": 1
}

Response Fields

FieldTypeDescription
dataarrayArray of credit note objects
totalintegerTotal number of credit notes matching the filters
pageintegerCurrent page number
limitintegerItems per page
pagesintegerTotal number of pages

Credit Note Object

FieldTypeDescription
uuidstringUnique identifier
numberstringCredit note number (e.g., CN-2026-005)
isCreditNotebooleanAlways true for credit notes
directionstringAlways outgoing for credit notes
parentDocumentIdstringUUID of the original invoice being credited
parentDocumentobjectDetails of the original invoice
statusstringStatus: draft, uploaded, validated, error
anafStatusstringANAF validation status
issueDatestringDate of issue (YYYY-MM-DD)
dueDatestringDue date (YYYY-MM-DD)
currencystringCurrency code
subtotalstringNegative subtotal amount
vatAmountstringNegative VAT amount
totalstringNegative total amount
clientobjectClient details
seriesobjectSeries details
anafUploadIndexinteger | nullANAF upload index number

Credit Note Amounts

Credit notes have negative amounts to indicate they reverse the original invoice:

  • subtotal, vatAmount, and total are negative
  • Line item amounts are negative
  • When applied, they reduce the client's outstanding balance

Status Values

Credit notes use the same statuses as invoices:

  • draft - Created but not yet uploaded to ANAF
  • uploaded - Uploaded to ANAF, awaiting validation
  • validated - ANAF validated the credit note
  • error - ANAF validation failed

Error Codes

Status CodeError CodeDescription
401unauthorizedMissing or invalid authentication token
403forbiddenInvalid or missing X-Company header
422validation_errorInvalid query parameters
500internal_errorServer error occurred

Use Cases

Full Refund

Credit note with same amount as original invoice (negative):

  • Original invoice: 1,190.00 RON
  • Credit note: -1,190.00 RON
  • Net result: 0.00 RON

Partial Refund

Credit note with portion of original amount:

  • Original invoice: 8,330.00 RON
  • Credit note: -1,190.00 RON (one line item)
  • Net result: 7,140.00 RON

Error Correction

Credit original invoice, issue new corrected invoice:

  1. Credit note: -8,330.00 RON (reverses entire original)
  2. New invoice: 8,530.00 RON (correct amount)
  3. Net result: +200.00 RON difference

Best Practices

  1. Always reference parent - Link credit note to original invoice
  2. Include clear notes - Explain reason for credit note
  3. Upload promptly - Submit to ANAF within required timeframe
  4. Track against original - Monitor total credited amount vs original
  5. Notify client - Send credit note to client with explanation
  6. Update accounting - Sync to accounting system for proper recording