### cURL Request Example Source: https://developer.fleetio.com/docs/api/charging-entries-index This example demonstrates how to make a GET request to the charging_entries endpoint using cURL, including necessary authorization and API version headers. ```curl curl -L 'https://secure.fleetio.com/api/charging_entries' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### cURL Request Example Source: https://developer.fleetio.com/docs/api/charging-entries-show This example demonstrates how to make a GET request to retrieve a specific charging entry using cURL. It includes necessary headers for authentication and API version. ```curl curl -L 'https://secure.fleetio.com/api/charging_entries/:id' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### CURL Request Example Source: https://developer.fleetio.com/docs/api/axle-configs-index This example demonstrates how to make a GET request to the axle configurations endpoint using cURL, including all necessary authorization and version headers. ```curl curl -L 'https://secure.fleetio.com/api/axle_configs' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### cURL Request Example Source: https://developer.fleetio.com/docs/api/meter-entries-show This example demonstrates how to make a GET request to retrieve meter entries using cURL. Ensure you replace placeholders like '', '', and '' with your actual credentials and desired API version. ```curl curl -L 'https://secure.fleetio.com/api/meter_entries/:id' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### cURL Request Example Source: https://developer.fleetio.com/docs/api/equipment-index This cURL command demonstrates how to make a GET request to the equipment endpoint. It includes necessary headers for authentication ('Authorization', 'Account-Token', 'X-Api-Version') and content type ('Accept'). ```curl curl -L 'https://secure.fleetio.com/api/equipment' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### cURL Request Example Source: https://developer.fleetio.com/docs/api/expense-entries-index This example demonstrates how to make a GET request to the expense entries endpoint using cURL, including necessary authorization headers and API version. ```curl curl -L 'https://secure.fleetio.com/api/expense_entries' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### cURL Request Example Source: https://developer.fleetio.com/docs/api/inventory-adjustment-reasons-index This example demonstrates how to make a GET request to the inventory_adjustment_reasons endpoint using cURL. Ensure you replace placeholders like '' and '' with your actual credentials and the desired API version. ```curl curl -L 'https://secure.fleetio.com/api/inventory_adjustment_reasons' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### cURL Request Example Source: https://developer.fleetio.com/docs/api/service-tasks-show This example demonstrates how to make a GET request to retrieve a specific service task using cURL. Ensure you replace placeholders like '', '', and '' with your actual credentials and desired API version. ```curl curl -L 'https://secure.fleetio.com/api/service_tasks/:id' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### CURL Request for Equipment Assignments Source: https://developer.fleetio.com/docs/api/equipment-assignments-index This example demonstrates how to make a GET request to retrieve equipment assignments using cURL. Ensure you replace placeholders like '' and '' with your actual credentials and the desired API version. ```curl curl -L 'https://secure.fleetio.com/api/equipment/:id/assignments' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### Example API Request using cURL Source: https://developer.fleetio.com/docs/api/v-1-issue-priority-show Demonstrates how to make a GET request to retrieve a specific issue priority using cURL. Ensure you replace placeholders like '' and '' with your actual credentials and desired API version. ```curl curl -L 'https://secure.fleetio.com/api/issue_priorities/:id' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### cURL Request Example Source: https://developer.fleetio.com/docs/api/service-tasks-index This example demonstrates how to make a GET request to the service_tasks endpoint using cURL. Ensure you replace placeholders like '' and '' with your actual credentials and the desired API version. ```curl curl -L 'https://secure.fleetio.com/api/service_tasks' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### cURL Request Example Source: https://developer.fleetio.com/docs/api/inventory-journal-entries-show This example demonstrates how to make a GET request to retrieve inventory journal entries using cURL. Ensure you replace placeholders like ':id', '', and '' with your actual values. ```curl curl -L 'https://secure.fleetio.com/api/inventory_journal_entries/:id' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### Authorization Header Example Source: https://developer.fleetio.com/docs/api/parts-index This example shows how to construct the Authorization header for API requests. Remember to prefix your API key with 'Token '. ```curl curl -L 'https://secure.fleetio.com/api/parts' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### CURL Request Example Source: https://developer.fleetio.com/docs/api/expense-entry-types-show Example of how to make a GET request to retrieve an Expense Entry Type using cURL. Remember to replace placeholders like and with your actual credentials and desired API version. ```curl curl -L 'https://secure.fleetio.com/api/expense_entry_types/:id' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### cURL Request Example Source: https://developer.fleetio.com/docs/api/vehicle-assignments-show This cURL command demonstrates how to make a GET request to retrieve vehicle assignments. Ensure you replace placeholders like '', '', and '' with your actual credentials and desired API version. ```curl curl -L 'https://secure.fleetio.com/api/vehicle_assignments/:id' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### Make a cURL Request to Users Me Endpoint Source: https://developer.fleetio.com/docs/overview/quick-start This example demonstrates how to make a GET request to the /api/v1/users/me endpoint using cURL, including the necessary Authorization and Account-Token headers. ```bash curl \ --include \ --header "Authorization: Token a43csdf3gs8gh8ifgrei823tme" \ --header "Account-Token: 08765432z" \ "https://secure.fleetio.com/api/v1/users/me" ``` ```json { "id": 1, "username": "example@example.com", "email": "example@example.com", "time_zone_name": "Central Time (US & Canada)", "time_zone_offset_in_seconds": -21600, "created_at": "2022-10-01T14:05:05.907-06:00", "updated_at": "2023-08-01T17:29:11.956-05:00", "has_multiple_accounts": false, "first_name": "Exampler", "last_name": "Testington", "default_image_url": null, "fuel_economy_units": "mpg_us", "contact_id": 2, "technician": false } ``` -------------------------------- ### Charging Entry Response Example Source: https://developer.fleetio.com/docs/api/charging-entries-show This is an example of a successful response when retrieving a Charging Entry. It includes all possible fields and their data types. ```json { "additional_fees_cents": 0, "approved_at": "2024-07-29T15:51:28.071Z", "approved_by_id": 0, "cost_per_hr": "string", "cost_per_km": "string", "cost_per_mi": "string", "discount_cents": 0, "duration_seconds": 0, "ended_at": "2023-03-14T13:46:27-06:00", "geolocation": { "gps_device": "string", "original_vendor": "string", "exception_distance_in_mi": 0, "exception_distance_in_km": 0 }, "km_per_kwh": "string", "mi_per_kwh": "string", "personal": false, "price_per_kwh_cents": "string", "reference": "string", "started_at": "2023-03-14T13:46:27-06:00", "status": "manually_completed", "total_amount_cents": 0, "total_kwh": "string", "usage_in_hr": "string", "usage_in_km": "string", "usage_in_mi": "string", "vehicle_id": 0, "vendor_id": 0, "comments_count": 0, "documents_count": 0, "images_count": 0, "comments": [ { "id": 0, "created_at": "2023-03-14T13:46:27-06:00", "updated_at": "2023-03-14T13:46:27-06:00", "commentable_type": "Contact", "commentable_id": 0 } ] } ``` -------------------------------- ### CURL Request for Equipment Location Entries Source: https://developer.fleetio.com/docs/api/equipment-location-entries-index This example demonstrates how to make a GET request to retrieve location entries for a specific piece of equipment using cURL. Ensure you replace placeholders like '', '', and '' with your actual credentials and desired API version. ```curl curl -L 'https://secure.fleetio.com/api/equipment/:id/location_entries' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### Account Creation Request Example (CURL) Source: https://developer.fleetio.com/docs/api/accounts-create This example demonstrates how to create a new account using a CURL request. Ensure you replace placeholder values like '' and '' with your actual credentials and desired API version. ```json { "user_full_name": "string", "user_email": "string", "user_password": "string", "account_name": "string", "account_industry": "Transportation & Logistics", "account_phone_number": "string", "account_date_format": "mmddyyy_slash", "account_default_meter_unit": "mi", "account_default_fuel_volume_unit": "us_gallons", "account_default_system_of_measurement": "imperial", "account_hide_getting_started": true, "account_currency": "string", "account_time_24_format": false, "account_street_address": "string", "account_city": "string", "account_region": "string", "account_postal_code": "string", "account_country": "US", "account_web_session_timeout_minutes": "60", "account_go_session_timeout_minutes": "60", "account_time_zone": "Pacific Time (US & Canada)", "plan": "professional" } ``` -------------------------------- ### cURL Request Example Source: https://developer.fleetio.com/docs/api/faults-show Example of how to make a GET request to the faults endpoint using cURL. Ensure you replace placeholders with your actual credentials and API version. ```curl curl -L 'https://secure.fleetio.com/api/faults/:id' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### Account Creation Request Example (CURL) Source: https://developer.fleetio.com/docs/api/accounts-create This example demonstrates how to create a new account using a CURL request. Ensure you replace placeholder values like '' and '' with your actual credentials and desired API version. ```curl curl -L 'https://secure.fleetio.com/api/accounts' \ -H 'Content-Type: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' \ -d '{ "user_full_name": "string", "user_email": "string", "user_password": "string", "account_name": "string", "account_industry": "Transportation & Logistics", "account_phone_number": "string", "account_date_format": "mmddyyy_slash", "account_default_meter_unit": "mi", "account_default_fuel_volume_unit": "us_gallons", "account_default_system_of_measurement": "imperial", "account_hide_getting_started": true, "account_currency": "string", "account_time_24_format": false, "account_street_address": "string", "account_city": "string", "account_region": "string", "account_postal_code": "string", "account_country": "US", "account_web_session_timeout_minutes": "60", "account_go_session_timeout_minutes": "60", "account_time_zone": "Pacific Time (US & Canada)", "plan": "professional" }' ``` -------------------------------- ### Role Creation Request Example Source: https://developer.fleetio.com/docs/api/roles-create This example demonstrates how to create a new role with specific permissions using a cURL request. Ensure you replace placeholders like , , and with your actual credentials and desired API version. ```bash curl -L 'https://secure.fleetio.com/api/roles' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' \ -d '{ "name": "string", "default": false, "description": "string", "contact_renewal_reminders_access": "none", "contacts_access": "none", "dashboards_access": "none", "documents_access": "none", "equipments_access": "none", "expense_entries_access": "none", "faults_access": "none", "fuel_entries_access": "none", "inspections_access": "none", "integrations_access": "none", "issues_access": "none", "location_entries_access": "none", "meter_entries_access": "none", "msi_access": "none", "parts_inventory_access": "none", "places_access": "none", "purchase_orders_access": "none", "recalls_access": "none", "reports_access": "none", "service_entries_access": "none", "service_programs_access": "none", "service_reminders_access": "none", "service_task_management_access": "none", "vehicle_renewal_reminders_access": "none", "vehicles_access": "none", "vendors_access": "none", "work_orders_access": "none", "vehicles_create": true, "vehicles_edit": true, "vehicles_archive_delete": true, "vehicles_update_status": true, "vehicles_manage_vehicle_assignment": true, "vehicles_view_details": true, "vehicles_view_financial_info": true, "vehicles_view_custom_fields": true, "vehicles_view_documents": true, "vehicles_manage_documents": true, "vehicles_manage_photos": true, "vehicles_export_data": true, "equipments_create": true, "equipments_view_details": true, "equipments_view_financial_info": true, "equipments_view_custom_fields": true, "equipments_export_data": true, "equipments_view_documents": true, "equipments_manage_documents": true, "equipments_manage_photos": true, "equipments_archive_delete": true, "equipments_edit": true, "equipments_update_status": true, "equipments_manage_assignments": true, "meter_entries_create": true, "meter_entries_view": true, "meter_entries_export_data": true, "meter_entries_edit": true, "meter_entries_delete": true, "fuel_entries_create": true, "fuel_entries_view": true, "fuel_entries_export_data": true, "fuel_entries_edit": true, "fuel_entries_delete": true, "issues_create": true, "issues_view_open": true, "issues_view_resolved_or_closed": true, "issues_export_data": true, "issues_edit": true, "issues_delete": true, "issues_view_documents": true, "issues_manage_documents": true, "faults_view": true, "faults_export_data": true, "faults_ignore_codes": true, "recalls_view": true, "recalls_export_data": true, "recalls_ignore": true, "service_tasks_create": true, "service_tasks_edit": true, "service_tasks_archive_delete": true, "service_entries_create": true, "service_entries_view": true, "service_entries_view_update_cost_information": true, "service_entries_export_data": true, "service_entries_edit": true, "service_entries_delete": true, "service_entries_view_documents": true, "service_entries_manage_documents": true, "work_orders_create": true, "work_orders_view_incomplete": true, "work_orders_view_completed": true, "work_orders_view_update_cost_information": true, "work_orders_export_data": true, "work_orders_edit": true, "work_orders_edit_number": true, "work_orders_manage_labor_time_entries": true, "work_orders_delete": true, "work_orders_view_documents": true, "work_orders_manage_documents": true, "inspections_manage_inspection_forms": true, "inspections_manage_schedules": true, "inspections_submit_inspections": true, "inspections_view_submissions": true, "inspections_export_data": true, "inspections_edit_submissions": true, "inspections_delete_submissions": true, "msi_manage_payment_profile": true, "msi_manage_ro_notifications": true, "msi_view_account_details": true, "msi_view_account_summary": true, "msi_view_repair_order_notifications": true, "msi_view_statements": true, "msi_view_transactions": true, "service_reminders_create": true, "service_reminders_view": true }' ``` -------------------------------- ### cURL Request Example Source: https://developer.fleetio.com/docs/api/vehicle-renewal-reminders-index This example demonstrates how to make a GET request to the vehicle renewal reminders endpoint using cURL. It includes necessary authentication and version headers. ```curl curl -L 'https://secure.fleetio.com/api/vehicle_renewal_reminders' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### Create Equipment Request (CURL) Source: https://developer.fleetio.com/docs/api/equipment-create Example of creating a new equipment entry using CURL. Ensure to replace placeholders like '' and '' with your actual credentials and desired API version. ```curl curl -L 'https://secure.fleetio.com/api/equipment' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' \ -d '{ "name": "string", "brand": "string", "model": "string", "serial_number": "string", "type_id": 0, "status_id": 0, "group_id": 0, "group_hierarchy": "string", "purchase_vendor_id": 0, "purchase_price": 0, "purchase_date": "2023-03-14", "warranty_expiration_date": "2023-03-14", "purchase_comments": "string", "in_service_date": "2023-03-14", "estimated_service_life": 0, "estimated_resale_price": 0, "out_of_service_date": "2023-03-14", "linked_vehicle_id": 0, "assignee_id": 0, "default_image": "string", "custom_fields": {}, "documents_attributes": [ { "name": "string", "file_url": "string", "file_mime_type": "string", "file_name": "string", "file_size": 0 } ], "images_attributes": [ { "name": "string", "file_url": "string", "file_mime_type": "string", "file_name": "string", "file_size": 0 } ] }' ``` -------------------------------- ### cURL Request Example Source: https://developer.fleetio.com/docs/api/vehicle-renewal-types-index This example demonstrates how to make a GET request to the vehicle renewal types endpoint using cURL. It includes necessary headers for authentication and API version. ```curl curl -L 'https://secure.fleetio.com/api/vehicle_renewal_types' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### Authorization Header Example Source: https://developer.fleetio.com/docs/api/acquisitions-show Demonstrates how to format the Authorization and Account-Token headers for API requests. The Authorization header requires a 'Token' prefix, while the Account-Token is used for account-specific authentication. ```bash curl -L 'https://secure.fleetio.com/api/acquisitions/:id' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### CURL Request Example Source: https://developer.fleetio.com/docs/api/vehicle-renewal-types-show This example demonstrates how to make a GET request to retrieve a Vehicle Renewal Type using cURL. It includes necessary headers for authentication and API versioning. ```curl curl -L 'https://secure.fleetio.com/api/vehicle_renewal_types/:id' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### Example CURL Request to Contacts API Source: https://developer.fleetio.com/docs/api/contacts-index This example demonstrates how to make a GET request to the contacts endpoint using cURL. It includes the necessary headers for authentication and specifying the API version. ```curl curl -L 'https://secure.fleetio.com/api/contacts' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### Example CURL Request Source: https://developer.fleetio.com/docs/api/contact-renewal-types-index This example demonstrates how to make a GET request to the Contact Renewal Types endpoint using cURL. Remember to replace placeholders with your specific tokens and API version. ```curl curl -L 'https://secure.fleetio.com/api/contact_renewal_types' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### Archive Equipment Request Example (CURL) Source: https://developer.fleetio.com/docs/api/equipment-archive Example of how to archive an equipment record using CURL. Replace placeholders with your actual Authorization, Account-Token, API Version, and equipment ID. ```curl curl -L -X PATCH 'https://secure.fleetio.com/api/equipment/:id/archive' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### API Request Example (CURL) Source: https://developer.fleetio.com/docs/api/vmrs-reason-for-repairs-index This example demonstrates how to make a GET request to the VMRS Reason for Repairs endpoint using cURL. Ensure you replace placeholders with your actual credentials and API version. ```curl curl -L 'https://secure.fleetio.com/api/vmrs_reason_for_repairs' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### Retrieve Vehicle Renewal Type Example Source: https://developer.fleetio.com/docs/api/vehicle-renewal-types-show This example shows how to retrieve a specific Vehicle Renewal Type by its ID using a GET request. Ensure you include the correct Authorization and Account-Token headers. ```http GET https://secure.fleetio.com/api/vehicle_renewal_types/:id ``` -------------------------------- ### Example cURL Request Source: https://developer.fleetio.com/docs/api/equipment-show This cURL command demonstrates how to fetch equipment details from the Fleetio API. It includes necessary headers for authentication, content type, and API version. ```curl curl -L 'https://secure.fleetio.com/api/equipment/:id' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### cURL Request Example Source: https://developer.fleetio.com/docs/api/contact-renewal-reminders-show Example of how to make a GET request to the contact renewal reminders endpoint using cURL. Ensure to replace placeholders like ':id', '', and '' with actual values. ```curl curl -L 'https://secure.fleetio.com/api/contact_renewal_reminders/:id' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### Create Equipment Source: https://developer.fleetio.com/docs/api/equipment Creates a new Equipment. ```APIDOC ## Create Equipment ### Description Creates a new Equipment. ### Method POST ### Endpoint /equipment ``` -------------------------------- ### Create Equipment Assignment - cURL Example Source: https://developer.fleetio.com/docs/api/equipment-assignments-create Example of how to create an equipment assignment using cURL. Ensure you replace placeholders like :id, , and with your actual values. ```curl curl -L 'https://secure.fleetio.com/api/equipment/:id/assignments' \ -H 'Content-Type: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' \ -d '{ "assignee_id": 0 }' ``` -------------------------------- ### CURL Request Example Source: https://developer.fleetio.com/docs/api/custom-fields-index An example of how to make a GET request to the custom fields endpoint using cURL. Ensure you replace placeholders like '', '', and '' with your actual credentials and desired API version. ```curl curl -L 'https://secure.fleetio.com/api/custom_fields' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ``` -------------------------------- ### Example API Request using cURL Source: https://developer.fleetio.com/docs/api/comments-index This example demonstrates how to make an API request using cURL, including the necessary authorization and API version headers. ```curl curl -L 'https://secure.fleetio.com/api/comments' \ -H 'Accept: application/json' \ -H 'Authorization: Token ' \ -H 'Account-Token: ' \ -H 'X-Api-Version: ' ```