Add Express Credit Note
POST
/api/v1/sales/credit-note-expressSubmit a simplified credit note. Requires only the original invoice number, reason code, and line items, you do not need to re-specify all original invoice fields. The credit note invoice number is auto-generated if not provided.
Requires x-api-key
http://localhost:8100/api/v1/sales/credit-note-express
Headers
| Field | Type | Required | Description |
|---|---|---|---|
| x-api-key | string | Required | Your Ushuru API key. |
| Content-Type | string | Required | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| orgInvcNo | number | Required | Original invoice number to reverse. |
| reason | string | Required | Credit note reason code. See Reason Codes below. |
| lineItems | array | Required | Line items being credited back. |
| creditNoteInvcNo | number | Optional | Credit note invoice number. Defaults to orgInvcNo + 10000. |
| trdInvcNo | string | Optional | Trader credit note invoice number. Defaults to CN-{orgInvcNo}. |
| pmtTyCd | string | Optional | Payment method code. Defaults to '01' (Cash). |
| custTin | string | Optional | Customer Kenya Revenue Authority PIN. |
| custNm | string | Optional | Customer name. |
| regrId | string | Optional | Registering user ID. Defaults to 'USR01'. |
| regrNm | string | Optional | Registering user name. Defaults to 'System'. |
Credit Note Reason Codes
Request
{
"orgInvcNo": 42,
"reason": "01",
"custTin": "A000000000Z",
"custNm": "BUYER COMPANY LTD",
"pmtTyCd": "09",
"regrId": "USR01",
"regrNm": "Admin",
"lineItems": [
{
"itemCd": "SV0000000Z001",
"itemNm": "Monthly SaaS Subscription",
"qtyUnitCd": "U",
"qty": 1,
"prc": 5000,
"taxTyCd": "B",
"taxblAmt": 4310.34,
"taxAmt": 689.66,
"totAmt": 5000
}
]
}Response
{
"success": true,
"data": {
"cisInvcNo": 44,
"intrlData": "AbCdEfGhIjKlMnOpQrStUvWxYz...",
"rcptSign": "XxXxXxXxXxXxXxXxXxXxXxXx...",
"sdcDateTime": "20240115110000"
}
}curl -X POST http://localhost:8100/api/v1/sales/credit-note-express \\
-H "x-api-key: YOUR_API_KEY" \\
-H "Content-Type: application/json" \\
-d '{
"orgInvcNo": 42,
"reason": "01",
"regrId": "USR01",
"regrNm": "Admin",
"lineItems": [{
"itemCd": "SV0000000Z001",
"itemNm": "Monthly SaaS Subscription",
"qtyUnitCd": "U",
"qty": 1,
"prc": 5000,
"taxTyCd": "B",
"taxblAmt": 4310.34,
"taxAmt": 689.66,
"totAmt": 5000
}]
}'