Link for Lead Activated System - https://crud.activated.digital/app/

1. Changes were made in file - https://crud.activated.digital/app/modules/api/modules/v1/resources/search/FormSubmissionResourceSearch.php :
  
    -The code that changes is:
                           // Identifying a request coming from the API based on a header or GET parameter - Added by Nikita 25.12.2024 for API Proportzia
					        $isApiRequest = Yii::$app->request->headers->get('X-Request-Type') === 'api-request' 
					                        || Yii::$app->request->get('api_request', false);

					        // Adjusting the pageSize based on the type of request - Added by Nikita 25.12.2024 for API Proportzia
					        $pageSize = $isApiRequest ? 1000 : Yii::$app->user->preferences->get('GridView.pagination.pageSize');


					        $dataProvider = new ActiveDataProvider([
					            'query' => $query,
					            'pagination' => [
					                // 'pageSize' => Yii::$app->user->preferences->get('GridView.pagination.pageSize'), - Removed by Nikita 25.12.2024 for API Proportzia
					                'pageSize' => $pageSize,
					            ],
					            'sort' => [
					                'defaultOrder' => [
					                    'updated_at' => SORT_DESC,
					                ]
					            ],
					        ]);


    -Number 1000 is max leads that can get from API.


2.Code for API get dayly leads are on - https://crud.activated.digital/Get_Leads_Every_Day_Server_Version/

	-In these files exist a request to get 1000 leads for form-id 25 (this is Proportzia form).
	-The code organize to become more organized obj.
	-Creates CSV file and insert the leads from that day (only)
	-Send via mail CSV file/