$kind: http-request
description: >-
  ### Endpoint Description


  This endpoint retrieves receivables ageing reports from the sales module. It
  is designed to provide insights into outstanding receivables based on a
  specified date.


  ### Request Parameters


  The request is made using the HTTP GET method and includes the following
  parameters in the query string:


  - **date** (string): The date for which the receivables ageing report is
  requested. The format should be `YYYY-MM-DD`.
      
  - **export** (string): This parameter specifies the format in which the report
  should be exported. Acceptable values include `json` for JSON format.
      

  ### Example Request


  ``` http

  GET
  {{sahara_local}}sales/reports/receivables_ageing?date=2025-01-01&export=json

   ```

  ### Response Structure


  The response to this request will be in JSON format and will contain the
  following fields:


  - **success** (boolean): Indicates whether the request was successful.
      
  - **message** (string): A message providing additional information about the
  request outcome.
      
  - **errors** (array|null): An array of error messages, if any occurred during
  the processing of the request. This will be `null` if there are no errors.
      
  - **data** (object|null): The data object containing the report details, which
  will be `null` if no data is available.
      

  ### Example Response


  ``` json

  {
    "success": true,
    "message": "",
    "errors": null,
    "data": null
  }

   ```

  ### Status Codes


  - **403 Forbidden**: This status indicates that the request was understood by
  the server, but it refuses to authorize it. This may occur due to insufficient
  permissions or invalid request parameters.
url: "{{sahara_local}}sales/reports/sales-summarry"
method: GET
headers:
  username: textugapp
  apiKey: db03834002ed60dfa53963cc66bbeeb730142a16fd1bbbb6e1ebca862a798359
body:
  type: json
  content: |-
    {
        "date":"2025-01-01",
       "export":"json"//excel,pdf,json
    }
auth:
  type: bearer
  credentials:
    token: "{{sahara_local_token}}"
order: 1000
