Capex Request Tracking

Estimated reading: 4 minutes

Description :

Use this API to get Capex Request Tracking from various sources, such as web browsers, native applications on Android, and iOS.

URL :

				
					http://<server-ip-address>/custom_api/export_capex_details/capex_request_trackings

				
			
Method : GET
Data ParametersRequiredValue
json or form-dataYes
capex_idYes1234
URL Data ParametersNo
current_pageYes1
ExampleYes ?current_page=1

Header Parameters:

Authorization :

Bearer <Token>

Success Response :

Code : 200

Content :

				
					{
    "code": 200,
    "message": "success",
    "data": {
        "number_of_results": "6915",
        "number_of_pages": 346,
        "results_per_page": 20,
        "current_page": "1",
        "entity_name": "capex_request_trackings",
        "resultset": [
            {
                "request_id": {
                    "label": "Request ID",
                    "value": 410376
                },
                "request_number": {
                    "label": "Request number",
                    "value": "LUE-2023-100350-STD1"
                },
                "forcast_month_year": {
                    "label": "Month",
                    "value": "January 2023"
                },
                "amount": {
                    "label": "Budget Amount",
                    "value": 0
                },
                "amount_currency": {
                    "label": "Budget Amount Currency",
                    "value": "EUR"
                },
                "approved_amount": {
                    "label": "Approved Amount",
                    "value": "0.00"
                },
                "approved_amount_currency": {
                    "label": "Approved Amount Currency",
                    "value": "EUR"
                },
                "engaged_amount": {
                    "label": "Actual",
                    "value": "0.00"
                },
                "engaged_amount_currency": {
                    "label": "Actual Currency",
                    "value": "EUR"
                },
                "forecast_amount": {
                    "label": "Forecast",
                    "value": "0.00"
                },
                "forecast_amount_currency": {
                    "label": "Forecast Currency",
                    "value": "EUR"
                },
                "total_budgeted": {
                    "label": "Total Budgeted",
                    "value": ""
                },
                "total_budgeted_currency": {
                    "label": "Total Budgeted Currency",
                    "value": "EUR"
                },
                "total_approved_amount": {
                    "label": "Total Approved",
                    "value": 0
                },
                "total_approved_amount_currency": {
                    "label": "Total Approved Currency",
                    "value": "EUR"
                },
                "total_spent_actual": {
                    "label": "Total Spent (Actual)",
                    "value": 0
                },
                "total_spent_actual_currency": {
                    "label": "Total Spent Currency (Actual)",
                    "value": "EUR"
                },
                "variance": {
                    "label": "Variance",
                    "value": 0
                },
                "variance_currency": {
                    "label": "Variance Currency",
                    "value": "EUR"
                },
                "variance_percentage": {
                    "label": "% Variance",
                    "value": "0%"
                },
                "forecast_amount_total": {
                    "label": "Total Forecast",
                    "value": 0
                },
                "forecast_amount_total_currency": {
                    "label": "Total Forecast Currency",
                    "value": "EUR"
                },
                "revised_forecast_amount": {
                    "label": "Revised Forecast",
                    "value": 0
                },
                "revised_forecast_amount_currency": {
                    "label": "Revised Forecast Currency",
                    "value": "EUR"
                }
            },
            {
                "request_id": {
                    "label": "Request ID",
                    "value": 410377
                },
                "request_number": {
                    "label": "Request number",
                    "value": "LUE-2023-100350-STD1"
                },
                "forcast_month_year": {
                    "label": "Month",
                    "value": "February 2023"
                },
                "amount": {
                    "label": "Budget Amount",
                    "value": 0
                },
                "amount_currency": {
                    "label": "Budget Amount Currency",
                    "value": "EUR"
                },
                "approved_amount": {
                    "label": "Approved Amount",
                    "value": "0.00"
                },
                "approved_amount_currency": {
                    "label": "Approved Amount Currency",
                    "value": "EUR"
                },
                "engaged_amount": {
                    "label": "Actual",
                    "value": "0.00"
                },
                "engaged_amount_currency": {
                    "label": "Actual Currency",
                    "value": "EUR"
                },
                "forecast_amount": {
                    "label": "Forecast",
                    "value": "0.00"
                },
                "forecast_amount_currency": {
                    "label": "Forecast Currency",
                    "value": "EUR"
                },
                "total_budgeted": {
                    "label": "Total Budgeted",
                    "value": ""
                },
                "total_budgeted_currency": {
                    "label": "Total Budgeted Currency",
                    "value": "EUR"
                },
                "total_approved_amount": {
                    "label": "Total Approved",
                    "value": 0
                },
                "total_approved_amount_currency": {
                    "label": "Total Approved Currency",
                    "value": "EUR"
                },
                "total_spent_actual": {
                    "label": "Total Spent (Actual)",
                    "value": 0
                },
                "total_spent_actual_currency": {
                    "label": "Total Spent Currency (Actual)",
                    "value": "EUR"
                },
                "variance": {
                    "label": "Variance",
                    "value": 0
                },
                "variance_currency": {
                    "label": "Variance Currency",
                    "value": "EUR"
                },
                "variance_percentage": {
                    "label": "% Variance",
                    "value": "0%"
                },
                "forecast_amount_total": {
                    "label": "Total Forecast",
                    "value": 0
                },
                "forecast_amount_total_currency": {
                    "label": "Total Forecast Currency",
                    "value": "EUR"
                },
                "revised_forecast_amount": {
                    "label": "Revised Forecast",
                    "value": 0
                },
                "revised_forecast_amount_currency": {
                    "label": "Revised Forecast Currency",
                    "value": "EUR"
                }
            }            
        ]
    }
}

				
			
Error Response :
  • Code: 401 BAD REQUEST

Content :

				
					{
    "code": 401,
    "message": "fail",
    "data": {
        "error": "Invalid API Token"
    }
}

				
			

Note :

PHP Code :
				
					$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'http://<server-ip-address>/custom_api/export_capex_details/capex_request_trackings?current_page=1&capex_id=123456',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <Token>'
  ),
));

$response = curl_exec($curl);

$data = json_decode($response);

if ($data->code === 200) {
    // Handle success response
} else {
    // Handle error response
}

curl_close($curl);

				
			
JavaScript :
				
					fetch('http://<server-ip-address>/custom_api/export_capex_details/capex_request_trackings?current_page=1&capex_id=123456', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer <Token>'
  }
})
.then(response => response.json())
.then(data => {
  if (data.code === 200) {
    // Handle success response
  } else {
    // Handle error response
  }
});

				
			
cURL ::
				
					curl -X GET "http://<server-ip-address>/custom_api/export_capex_details/capex_request_trackings?current_page=1&capex_id=123456" \
     -H "Authorization: Bearer <Token>"

				
			

This comprehensive documentation should provide all the details related to the Capex Request Tracking API endpoint, including example code snippets for PHP, JavaScript, and cURL. If you need any further information or adjustments, please let me know!

Share this Doc

Capex Request Tracking

Or copy link

CONTENTS