Void credit note
POST
apiKeyheader
AuthorizationBearer <token>An API key (blk_…) from Settings → API keys.
id*stringapplication/json- body
reason*stringLength
3 <= length <= 1000application/json- response
id*stringnumber*stringstatus*stringValue in
"issued""void"invoiceId*stringinvoiceNumber*string|nullclientId*stringclientName*stringissueDate*stringMatch
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$Format
datereason*stringcurrency*stringsubtotal*integerRange
-9007199254740991 <= value <= 9007199254740991taxTotal*integerRange
-9007199254740991 <= value <= 9007199254740991total*integerRange
-9007199254740991 <= value <= 9007199254740991appliedAmount*integerRange
-9007199254740991 <= value <= 9007199254740991refundAmount*integerRange
-9007199254740991 <= value <= 9007199254740991createdAt*stringMatch
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$Format
date-timelines*array<>voidedAt*|Match
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$Format
date-timevoidReason*string|nulllastSentAt*|Match
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$Format
date-timelastSentTo*string|nullclientSnapshot*|nullissuerSnapshot*|nullcurl -X POST 'https://your-billleaf-api/v1/credit-notes/string/void' \ -H 'Content-Type: application/json' \ -d '{ "reason": "string"}'Example Response201
{ "id": "string", "number": "string", "status": "issued", "invoiceId": "string", "invoiceNumber": "string", "clientId": "string", "clientName": "string", "issueDate": "2019-08-24", "reason": "string", "currency": "string", "subtotal": -9007199254740991, "taxTotal": -9007199254740991, "total": -9007199254740991, "appliedAmount": -9007199254740991, "refundAmount": -9007199254740991, "createdAt": "2019-08-24T14:15:22Z", "lines": [ { "id": "string", "position": -9007199254740991, "description": "string", "quantity": 0, "unitPrice": -9007199254740991, "taxRateBps": -9007199254740991, "amount": -9007199254740991, "taxAmount": -9007199254740991 } ], "voidedAt": "2019-08-24T14:15:22Z", "voidReason": "string", "lastSentAt": "2019-08-24T14:15:22Z", "lastSentTo": "string", "clientSnapshot": { "name": "string", "legalName": "string", "email": "string", "phone": "string", "taxId": "string", "addressLines": [ "string" ] }, "issuerSnapshot": { "name": "string", "legalName": "string", "email": "string", "phone": "string", "taxId": "string", "addressLines": [ "string" ] }}