Creates a credit memo
Changed onOpens a customer credit memo that reduces receivable exposure before you allocate it to specific invoices. Capture subsidiary, customer, line-level reasons, and tax treatment so finance can audit why the balance changed.
Request
- Base URLhttps://api.rillet.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"items": [
{
"price": {
"amount_per_unit": {
"amount": "1.01",
"currency": "USD"
}
},
"revenue": {
"account_code": "11112"
},
"tax_rate": {
"percentage": "0",
"tax_amount": {
"amount": "1.01",
"currency": "USD"
},
"country": "US"
}
}
],
"external_references": [
{
"type": "xyzSystemId",
"id": "234",
"url": "https://xyzsystempage.com/ids/234"
}
],
"exchange_rate": {
"base": "USD",
"target": "USD"
}
}Response
OK
Example response
{
"credit_memo_number": "CM01",
"items": [
{
"description": "Description",
"revenue": {
"account_code": "11112"
},
"total_amount": {
"amount": "1.01",
"currency": "USD"
},
"taxed_amount": {
"amount": "1.01",
"currency": "USD"
},
"net_amount": {
"amount": "1.01",
"currency": "USD"
},
"quantity": "1.0000"
}
],
"address": {
"line1": "123 Main St",
"line2": "Apt 4B",
"city": "Nashville",
"state": "TN",
"zip_code": "37201",
"country": "US"
},
"net_amount": {
"amount": "1.01",
"currency": "USD"
},
"total": {
"amount": "1.01",
"currency": "USD"
},
"applied_amount": {
"amount": "1.01",
"currency": "USD"
},
"remaining_amount": {
"amount": "1.01",
"currency": "USD"
},
"applications": [
{
"amount": {
"amount": "1.01",
"currency": "USD"
}
}
],
"exchange_rate": {
"base": "USD",
"target": "USD"
},
"taxed_amount": {
"amount": "1.01",
"currency": "USD"
},
"external_references": [
{
"type": "xyzSystemId",
"id": "234",
"url": "https://xyzsystempage.com/ids/234"
}
]
}Changes
- breaking
added to the
//request propertyallOflist - breaking
the
//request property type changed fromobjectto no type - breaking
the response property
/became nullable for the status - breaking
the response property
/became nullable for the status - breaking
the response property
/became optional for the status - breaking
the
//response's property type changed fromnumbertostring, and format from no format tonumberfor status - warning
removed the request property
/// - warning
removed the request property
/// - warning
removed the request property
/// - warning
removed the request property
/// - warning
removed the request property
/// - warning
added the new
PROGRESSenum value to the///response property for the response status - info
added the new optional request property
/// - info
added the new
PROGRESSenum value to the request property///
- breaking