Skip to Content
DevelopersAPI referenceInvoices

Send credit note

POST
/v1/credit-notes/{id}/send

Authorization

apiKey
headerAuthorizationBearer <token>

An API key (blk_…) from Settings → API keys.

Path Parameters

id*string

Request Body

application/json
  1. body
to?string
Match^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
Formatemail
message?|
Lengthlength <= 5000

Response Body

application/json
  1. response
id*string
number*string
status*string
Value in"issued""void"
invoiceId*string
invoiceNumber*string|null
clientId*string
clientName*string
issueDate*string
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])))$
Formatdate
reason*string
currency*string
subtotal*integer
Range-9007199254740991 <= value <= 9007199254740991
taxTotal*integer
Range-9007199254740991 <= value <= 9007199254740991
total*integer
Range-9007199254740991 <= value <= 9007199254740991
appliedAmount*integer
Range-9007199254740991 <= value <= 9007199254740991
refundAmount*integer
Range-9007199254740991 <= value <= 9007199254740991
createdAt*string
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))$
Formatdate-time
lines*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))$
Formatdate-time
voidReason*string|null
lastSentAt*|
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))$
Formatdate-time
lastSentTo*string|null
clientSnapshot*|null
issuerSnapshot*|null
Example Request
curl -X POST 'https://your-billleaf-api/v1/credit-notes/string/send' \  -H 'Content-Type: application/json' \  -d '{}'
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"    ]  }}