Daybook

Description :

This API endpoint is used to get the daybook report of the user.

Endpoint URL :
Request Parameters
Request Parameter Data Type Default Value Required Description Change Date Change Description
from_date Date Yes date in Y-m-d format
to_date Date Yes date in Y-m-d format, both dates must be from same month
offset integer 0 No number of records to skip before starting to return results.
limit integer 10 No determines the maximum number of records to return in the response.
Request Example
Responses (JSON)
  • Status Code 1: records fetched
    • Description: records successfully fetched.
    • status_code (integer): The status code of the response (1).
    • 'message' (string): "records successfully fetched"
    • 'recordsTotal' (integer): "number or total records"
    • 'recordsFiltered' (integer): "number or records filtered"
    • 'data' (Array): "it contains array of object"
      • 'id' (integer): "unique id of record"
      • 'service' (string): "name of the service"
      • 'total_hits' (string): "total hits for the service"
      • 'total_amount' (integer): "total amount for the service"
      • 'success_hits' (string): "total success hits for the service"
      • 'success_amount' (integer): "total success amount for the service"
      • 'failed_hits' (string): "total failed hits for the service"
      • 'failed_amount' (string): "total failed amount for the service"
      • 'pending_hits' (string): "total pending hits for the service"
      • 'pending_amount' (string): "total pending amount for the service"
      • 'total_commission' (string): "total commission amount for the service"
      • 'total_surcharge' (string): "total surcharge amount for the service"
    • 'sum_total_hits' (string): "sum of total hits for the service"
    • 'sum_total_amount' (integer): "sum of total amount for the service"
    • 'sum_total_success_count' (string): "sum of total success hits for the service"
    • 'sum_total_success_amount' (integer): "total success amount for the service"
    • 'sum_total_failed_count' (string): "sum of total failed hits for the service"
    • 'sum_total_failed_amount' (string): "sum of total failed amount for the service"
    • 'sum_total_pending_count' (string): "sum of total pending hits for the service"
    • 'sum_total_pending_amount' (string): "sum of total pending amount for the service"
    • 'sum_total_commission' (string): "sum of total commission amount for the service"
    • 'sum_total_surcharge' (string): "sum of total surcharge amount for the service"
  • Status Code 2: Validation Error
    • Description: Validation error in the input parameters.
    • 'status_code' (integer): 2
    • 'message' (string): "A specific validation error message."
  • Status Code 0: Error message
    • Description: A specific error message.
    • 'status_code' (integer): 0
    • 'message' (string): "there is no data found"
Note
  • The API endpoint should be accessed via a POST request.
  • Ensure that the request is properly validated and sanitized to prevent security vulnerabilities.
  • Implement proper error handling on the client side to display user-friendly error messages based on the 'status_code' and 'message' fields in the response.
© Redpay.
Design & Develop by Redpay Payments Private Limited