Capex Request

Estimated reading: 7 minutes

Description :

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

URL :

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

				
			
Method : GET
Data ParametersRequiredValue
json or form-dataYes
data_from_timestampNo
URL Data ParametersNo
data_from_timestampYes1663999021
current_pageYes1

Example :

?data_from_timestamp=1663999021&current_page=1

Header Parameters:

Authorization :

Bearer <Token>

Success Response :

Code : 200

Content :

				
					{
    "code": 200,
    "message": "success",
    "data": {
        "number_of_results": "1",
        "number_of_pages": 1,
        "results_per_page": 20,
        "current_page": "1",
           "entity_name": "capex_requests",
        "resultset": [
{
            "20142": {
                "capex_request": {
                    "capex_request-name": {
                        "label": "Capex Request Name",
                        "value": "test Capex Request"
                    },
                    "capex_request-business_unit": {
                        "label": "Entity",
                        "value": "20332"
                    },
                    "capex_request-request_number": {
                        "label": "Request number",
                        "value": "AL-2022-2040"
                    },
                    "capex_request-capex_type": {
                        "label": "Category",
                        "value": "Project"
                    },
                    "capex_request-description": {
                        "label": "Description",
                        "value": "test"
                    },
                    "capex_request-sub_number": {
                        "label": "Extra Tracking Number",
                        "value": "xtra Tracking Numbe"
                    },
                    "capex_request-project_start": {
                        "label": "Anticipated Project Start",
                        "value": "10/14/2022"
                    },
                    "capex_request-project_end": {
                        "label": "Anticipated Project End",
                        "value": "10/29/2022"
                    },
                    "capex_request-amount": {
                        "label": "Amount requested",
                        "value": "$582"
                    },
                    "capex_request-priority": {
                        "label": "Priority",
                        "value": "379"
                    },
                    "capex_request-date_initiated": {
                        "label": "Date started",
                        "value": "10/19/2022"
                    },
                    "capex_request-status": {
                        "label": "Status",
                        "value": "Not yet submitted for approval"
                    },
                    "capex_request-currency": {
                        "label": "Currency",
                        "value": "USD"
                    },
                    "capex_request-budgeted_status": {
                        "label": "Is this request already budgeted",
                        "value": "No"
                    },
                    "capex_request-approval_date": {
                        "label": "Approval date",
                        "value": ""
                    },
                    "capex_request-next_approver": {
                        "label": "Next Approver",
                        "value": "Marc Lacombe"
                    },
                    "capex_request-expense_type": {
                        "label": "Subcategory",
                        "value": "Capex and Opex"
                    },
                    "capex_request-reason": {
                        "label": "Reason for Capex",
                        "value": "Maintenance"
                    },
                    "capex_request-request_type_id": {
                        "label": "Request Type",
                        "value": "Request type 1"
                    },
                    "capex_request_executive_summary-background_summary": {
                        "label": "Background Summary",
                        "value": "Background Summary"
                    },
                    "capex_request_executive_summary-current_issues": {
                        "label": "Current issue(s)",
                        "value": "Current issue(s)\t"
                    },
                    "capex_request_executive_summary-project_scope": {
                        "label": "Project Scope",
                        "value": "Project Scope"
                    },
                    "capex_request_executive_summary-benefits": {
                        "label": "Benefits",
                        "value": "Benefits"
                    },
                    "capex_request-alternatives": {
                        "label": "Alternatives considered",
                        "value": "Alternatives considered"
                    },
                    "capex_request-recommendation": {
                        "label": "Recommendation",
                        "value": "Recommendation\t"
                    },
                    "capex_request-capex_request_state_id": {
                        "label": "State",
                        "value": null
                    },
                    "capex_request-originator_id": {
                        "label": "Requested by",
                        "value": "Marc Lacombe - CapExPlan Administrator"
                    },
                    "capex_request-asset_type": {
                        "label": "Asset Type",
                        "value": "Building Structure1"
                    },
                    "capex_request-stage_type_id": {
                        "label": "Stage Type",
                        "value": "Stage 1"
                    }
                },
                "capexRequestTrackingAssignTo": {
                    "3442": {
                        "label": "Adding Assignees 1",
                        "name": "Finance team",
                        "role": "Site Controller"
                    },
                    "3441": {
                        "label": "Adding Assignees 2",
                        "name": "Andrew Joseph",
                        "role": "Project Manager"
                    },
                    "3443": {
                        "label": "If Request is Approved, Assign To 5",
                        "name": "Katia Kelly",
                        "role": ""
                    },
                    "3444": {
                        "label": "If Request is Approved, Assign To 6",
                        "name": "Serge Leonard",
                        "role": ""
                    }
                },
                "capex_request_equipment": {
                    "17710": {
                        "capex_request_eq_eq_type": {
                            "label": "Equipment Type",
                            "value": "Chiller ( refrigeration)"
                        },
                        "capex_request_eq_category": {
                            "label": "Asset Category Type",
                            "value": "Building HVAC"
                        },
                        "capex_request_eq_description": {
                            "label": "Description",
                            "value": "trtet"
                        },
                        "capex_request_eq_sub_description": {
                            "label": "Sub Description",
                            "value": "test"
                        },
                        "capex_request_eq_asset_name": {
                            "label": "Asset Name",
                            "value": "test"
                        },
                        "capex_request_eq_assetNumber": {
                            "label": "Asset Number",
                            "value": "test"
                        },
                        "capex_request_eq_useful_life": {
                            "label": "Useful Life",
                            "value": "5 years"
                        },
                        "capex_request_eq_eq_make": {
                            "label": "Make",
                            "value": "fsdf"
                        },
                        "capex_request_eq_eq_model": {
                            "label": "Model",
                            "value": "sdf"
                        },
                        "capex_request_eq_modelName": {
                            "label": "Model Name",
                            "value": "sdfsf"
                        },
                        "capex_request_eq_vendor": {
                            "label": "Vendor/Supplier",
                            "value": "sdfsf"
                        },
                        "capex_request_eq_vcode": {
                            "label": "Vendor Code",
                            "value": "sdf"
                        },
                        "capex_request_eq_buy_cost": {
                            "label": "Purchase/Lease Cost",
                            "value": "$6"
                        },
                        "capex_request_eq_transport_cost": {
                            "label": "Transport Cost",
                            "value": "$60"
                        },
                        "capex_request_eq_taxes_fees": {
                            "label": "Taxes/Fees",
                            "value": "$66"
                        },
                        "capex_request_eq_import_cost": {
                            "label": "Import and Customs",
                            "value": "$6"
                        },
                        "capex_request_eq_install_cost": {
                            "label": "Installation",
                            "value": "$6,565"
                        },
                        "capex_request_eq_startup_cost": {
                            "label": "Startup Costs",
                            "value": "$5"
                        },
                        "capex_request_eq_equipment_cost": {
                            "label": "Equipment Cost",
                            "value": "$6,708"
                        },
                        "capex_request_eq_expected_delivery": {
                            "label": "Expected Delivery",
                            "value": "10/26/2022"
                        },
                        "capex_request_eq_actual_delivery": {
                            "label": "Actual Delivery",
                            "value": ""
                        },
                        "capex_request_eq_capex_initial_investment_type": {
                            "label": "Initial Investment Type",
                            "value": ""
                        },
                        "capex_request_eq_residual_value": {
                            "label": "Residual Value",
                            "value": "$5"
                        }
                    },
                    "17711": {
                        "capex_request_eq_eq_type": {
                            "label": "Equipment Type",
                            "value": "Heating Rooftop"
                        },
                        "capex_request_eq_category": {
                            "label": "Asset Category Type",
                            "value": "Heaters"
                        },
                        "capex_request_eq_description": {
                            "label": "Description",
                            "value": "54"
                        },
                        "capex_request_eq_sub_description": {
                            "label": "Sub Description",
                            "value": "545"
                        },
                        "capex_request_eq_asset_name": {
                            "label": "Asset Name",
                            "value": "45"
                        },
                        "capex_request_eq_assetNumber": {
                            "label": "Asset Number",
                            "value": "454"
                        },
                        "capex_request_eq_useful_life": {
                            "label": "Useful Life",
                            "value": "54 years"
                        },
                        "capex_request_eq_eq_make": {
                            "label": "Make",
                            "value": "54"
                        },
                        "capex_request_eq_eq_model": {
                            "label": "Model",
                            "value": "5"
                        },
                        "capex_request_eq_modelName": {
                            "label": "Model Name",
                            "value": "45"
                        },
                        "capex_request_eq_vendor": {
                            "label": "Vendor/Supplier",
                            "value": "45"
                        },
                        "capex_request_eq_vcode": {
                            "label": "Vendor Code",
                            "value": "45"
                        },
                        "capex_request_eq_buy_cost": {
                            "label": "Purchase/Lease Cost",
                            "value": "$45"
                        },
                        "capex_request_eq_transport_cost": {
                            "label": "Transport Cost",
                            "value": "$45"
                        },
                        "capex_request_eq_taxes_fees": {
                            "label": "Taxes/Fees",
                            "value": "$45"
                        },
                        "capex_request_eq_import_cost": {
                            "label": "Import and Customs",
                            "value": "$45"
                        },
                        "capex_request_eq_install_cost": {
                            "label": "Installation",
                            "value": "$45"
                        },
                        "capex_request_eq_startup_cost": {
                            "label": "Startup Costs",
                            "value": "$45"
                        },
                        "capex_request_eq_equipment_cost": {
                            "label": "Equipment Cost",
                            "value": "$270"
                        },
                        "capex_request_eq_expected_delivery": {
                            "label": "Expected Delivery",
                            "value": "10/28/2022"
                        },
                        "capex_request_eq_actual_delivery": {
                            "label": "Actual Delivery",
                            "value": ""
                        },
                        "capex_request_eq_capex_initial_investment_type": {
                            "label": "Initial Investment Type",
                            "value": ""
                        },
                        "capex_request_eq_residual_value": {
                            "label": "Residual Value",
                            "value": "$5"
                        }
                    }
                },
                "financialDetail": [
                    {
                        "capex_request-return_amount": {
                            "label": "Capital expenditure amount (or total expense)",
                            "value": "$582"
                        },
                        "capex_request-return_discount_rate": {
                            "label": "Discount Rate",
                            "value": "9%"
                        },
                        "capex_request-sales_contribution": {
                            "label": "Sales Contribution",
                            "value": "100%"
                        },
                        "capex_request-capex_tax_rate": {
                            "label": "Tax Rate",
                            "value": "30%"
                        },
                        "capex_request-capex_interest_rate": {
                            "label": "Interest Rate",
                            "value": "9%"
                        },
                        "capex_request-period": {
                            "label": "Period",
                            "value": "3 Years\n Months"
                        },
                        "capex_request-number_of_years_to_amortize": {
                            "label": "Number of years to amortize",
                            "value": ""
                        },
                        "capex_request-residual_value": {
                            "label": "Residual Value",
                            "value": "$10"
                        },
                        "capex_request-return_npv": {
                            "label": "Net present value (NPV)",
                            "value": "$245"
                        },
                        "capex_request-return_npv_with_tax": {
                            "label": "Net present value (NPV) incl tax advantage",
                            "value": ""
                        },
                        "capex_request-return_irr": {
                            "label": "Internal rate of return (IRR)",
                            "value": "0%"
                        },
                        "capex_request-return_irr_with_tax": {
                            "label": "Internal rate of return (IRR) w/deprec. effect on tax",
                            "value": ""
                        },
                        "capex_request-return_payback": {
                            "label": "Simple payback period",
                            "value": "0.0 Years"
                        },
                        "capex_request-is_residual_value_in_paypabck": {
                            "label": "Include Residual Value",
                            "value": "No"
                        },
                        "capex_request-return_payback_with_tax": {
                            "label": "return_payback_with_tax",
                            "value": ""
                        }
                    }
                ],
                "capexRequestAttachment": {
                    "21848": {
                        "capex_request_attachments-filename": {
                            "label": "Filename",
                            "value": "test.png"
                        },
                        "capex_request_attachments-type": {
                            "label": "Attachment Type",
                            "value": "Other"
                        },
                        "capex_request_attachments-tags": {
                            "label": "Tags",
                            "value": "test\n"
                        },
                        "capex_request_attachments-description": {
                            "label": "Description",
                            "value": "test"
                        }
                    }
                },
                "capexApprovalList": [
                    {
                        "name": {
                            "label": "Name",
                            "value": "Marc Lacombe"
                        },
                        "title": {
                            "label": "Title",
                            "value": "CapExPlan Administrator"
                        },
                        "date_sent": {
                            "label": "Date Notified",
                            "value": "10/25/2022"
                        },
                        "is_observer": {
                            "label": "User Type",
                            "value": "Approver"
                        }
                    },
                    {
                        "name": {
                            "label": "Name",
                            "value": "Adrian"
                        },
                        "title": {
                            "label": "Title",
                            "value": "Regional VP"
                        },
                        "date_sent": {
                            "label": "Date Notified",
                            "value": "10/25/2022"
                        },
                        "is_observer": {
                            "label": "User Type",
                            "value": "Approver"
                        }
                    },
                    {
                        "name": {
                            "label": "Name",
                            "value": "Norm Blouin"
                        },
                        "title": {
                            "label": "Title",
                            "value": "Senior VP"
                        },
                        "date_sent": {
                            "label": "Date Notified",
                            "value": "10/25/2022"
                        },
                        "is_observer": {
                            "label": "User Type",
                            "value": "Approver"
                        }
                    }
                ]
            }
]
        }
    }
}

				
			
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_requests?data_from_timestamp=1663999021&current_page=1',
  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_requests?data_from_timestamp=1663999021&current_page=1', {
  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_requests?data_from_timestamp=1663999021&current_page=1" \
     -H "Authorization: Bearer <Token>"

				
			

This documentation should provide a comprehensive overview of the Capex Request API endpoint, including how to make requests using PHP, JavaScript, and cURL. If you have any further requirements, please let me know!

Share this Doc

Capex Request

Or copy link

CONTENTS