Every API response includes a resultCd field. A value of 000 indicates success. All other codes indicate an error condition.
Error Code Reference
| Code | Name | Description | Suggested Action |
|---|---|---|---|
| 000 | Success | The request was processed successfully. | No action needed. |
| 001 | Invalid API Key | The x-api-key header is missing or invalid. | Check your API key in the Ushuru dashboard. |
| 002 | Missing Required Field | One or more required fields are absent from the request body. | Review the field listed in resultMsg and ensure it is included. |
| 003 | Invalid Field Value | A field contains a value outside the allowed set. | Check code tables for valid values (e.g. taxTyCd must be A, B, C, or D). |
| 004 | Duplicate Invoice | An invoice with this invcNo has already been submitted. | Use a different invoice number or retrieve the existing submission. |
| 005 | Item Not Found | The itemCd referenced in a sale or stock movement does not exist. | Register the item via POST /items before including it in a sale. |
| 006 | Kenya Revenue Authority Connection Error | The upstream Kenya Revenue Authority eTIMS service returned an error or timed out. | Retry after 30 seconds. If persistent, check Kenya Revenue Authority system status. |
| 007 | Device Not Initialized | The OSCU device has not been initialized with Kenya Revenue Authority. | Call POST /initialize first. |
| 801 | Original Invoice Not Found | The orgInvcNo for a credit note or copy does not match an approved invoice. | Verify the original invoice number and ensure it was approved (status 02). |
| 802 | Invoice Already Cancelled | The referenced invoice has already been cancelled. | No further action possible on this invoice. |
| 905 | Internal Server Error | An unexpected error occurred in the Ushuru service. | Contact support with the full request and response for investigation. |