To obtain the API key, log into our application at amua.co.ke. If you have an account, navigate to the side navigation bar and click on the last button labeled "API Key". This will take you to a page where you can generate an API key for use in your application.
Our API has rate limiting to prevent abuse and ensure service availability. The limits are as follows:
Full URL: https://amua.co.ke/api/v1/upload Method: POST Description: This endpoint allows users to upload statements. The statements are identified by a unique ID, which is returned in the response. Parameters: statement (JSON object): The statement to upload. Headers: Api-Key (string): The API key for this request. Responses: 200 OK: Returns a JSON object with the following properties: - id: The unique ID of the uploaded statement. - message: A message indicating the result of the operation. - status: The status of the operation. 400 Bad Request: Returns an error message if the statement is not provided. 401 Unauthorized: Returns an error message if the API key is invalid or not provided. 403 Forbidden: Returns an error message if the API key is valid but the user does not have the necessary permissions.
Full URL: https://amua.co.ke/api/v1/overview/business/<int:statement_id>/json Method: GET Description: This endpoint provides an overview of business metrics associated with a given statement. The statement is identified by its ID. Parameters: statement_id (integer): The ID of the statement to retrieve the business overview for. Headers: Api-Key (string): The API key for this request. Responses: 200 OK: Returns a JSON object with the business overview for the specified statement. 400 Bad Request: Returns an error message if the statement_id is not provided. 401 Unauthorized: Returns an error message if the API key is invalid or not provided. 403 Forbidden: Returns an error message if the API key is valid but the user does not exist.
Full URL: https://amua.co.ke/api/v1/overview/transactional/<int:statement_id>/json Method: GET Description: This endpoint provides an overview of transactions associated with a given statement. The statement is identified by its ID. Parameters: statement_id (integer): The ID of the statement to retrieve the transactional overview for. Headers: Api-Key (string): The API key for this request. Responses: 200 OK: Returns a JSON object with the transactional overview for the specified statement. 400 Bad Request: Returns an error message if the statement_id is not provided. 401 Unauthorized: Returns an error message if the API key is invalid or not provided. 403 Forbidden: Returns an error message if the API key is valid but the user does not exist.
Full URL: https://amua.co.ke/api/v1/transactions/<int:statement_id> Method: GET Description: This endpoint retrieves the transactions for a given statement. The statement is identified by its ID. Parameters: statement_id (integer): The ID of the statement to retrieve the transactions for. type_level (string, optional): The type of transactions to retrieve. If not provided, transactions of both "Paid In" and "Withdrawn" types are returned. Headers: Api-Key (string): The API key for this request. Responses: 200 OK: Returns a JSON object with the transactions for the specified statement. 400 Bad Request: Returns an error message if the statement_id is not provided or if the type_level is invalid. 401 Unauthorized: Returns an error message if the API key is invalid or not provided. 403 Forbidden: Returns an error message if the API key is valid but the user does not exist. 404 Not Found: Returns an error message if no statement is found with the provided ID.
Full URL: https://amua.co.ke/api/v1/transactions/<int:statement_id>/details Method: GET Description: This endpoint retrieves details for a specific transaction among the two transaction types in a statement.
The details include the targets of each transaction and their corresponding amounts.
Transactions are grouped by their type and target.
Please note that for some transactions, the target might not be available and will be labeled as "No target", followed by the transaction name. Parameters: statement_id (integer): The ID of the statement to retrieve the transactions for. transaction_type (string): The type of transactions to retrieve (Paid In or Withdrawn). transaction (string): The specific transaction to retrieve details for. This parameter is required. Headers: Api-Key (string): The API key for this request. Responses: 200 OK: Returns a JSON object with the details for the specified transaction. 400 Bad Request: Returns an error message if the statement_id, transaction_type or transaction is not provided or if the transaction_type is invalid. 401 Unauthorized: Returns an error message if the API key is invalid or not provided. 403 Forbidden: Returns an error message if the API key is valid but the user does not exist. 404 Not Found: Returns an error message if no statement is found with the provided ID.
Full URL: https://amua.co.ke/api/v1/business/<int:statement_id>/details Method: GET Description: This endpoint retrieves details for a specific business categorical transaction among the two transaction types in a statement.
The details include the targets of each transaction and their corresponding amounts.
Transactions are grouped by their type and target.
Please note that for some transactions, the target might not be available and will be labeled as "No target", followed by the transaction name. Parameters: statement_id (integer): The ID of the statement to retrieve the transactions for. transaction_type (string): The type of transactions to retrieve (Paid In or Withdrawn). transaction (string): The specific transaction to retrieve details for. This parameter is required. Headers: Api-Key (string): The API key for this request. Responses: 200 OK: Returns a JSON object with the details for the specified transaction. 400 Bad Request: Returns an error message if the statement_id, transaction_type or transaction is not provided or if the transaction_type is invalid. 401 Unauthorized: Returns an error message if the API key is invalid or not provided. 403 Forbidden: Returns an error message if the API key is valid but the user does not exist. 404 Not Found: Returns an error message if no statement is found with the provided ID.