{"_id":"59ff87ac982e0e003a96fc15","project":"54c0e51215af820d001a38a6","version":{"_id":"54f8de4e4339bb1900c8bffb","project":"54c0e51215af820d001a38a6","forked_from":"54f8de14c6cabe23005c02a2","__v":33,"createdAt":"2015-03-05T22:53:02.044Z","releaseDate":"2015-03-05T22:53:02.044Z","categories":["54f8de4e4339bb1900c8bffc","54f8de4e4339bb1900c8bffd","54f8de4e4339bb1900c8bffe","54f8de4e4339bb1900c8bfff","54f8de4e4339bb1900c8c000","54ff6057563d7419002d666e","55007b6ecfeeea17004717dc","5501d779f2ef1e0d003116eb","55116ef89f7c7619005f853b","554bb366f245703100ddd39f","554d226b374fec0d007e64db","555e09f18ab3180d001ac605","555e0b2b4f5e5a0d00836d77","561d1f8b92a0cc350018b24f","562a956c96b5f40d0026eb60","5654c3378a26202b00c17cb8","5697a94b0b09a41900b24546","5739d89e37b52e3200a3a3cc","57ac94252c0b220e00a94570","57ac97a1ad44fc0e003be066","57ac9a3a8f312d0e00e96c75","57ac9c187ae5c60e004ba3a3","58178bee62e4500f009404f6","581a39711a63870f008b621d","581a3b4f0c65b20f00247fcb","5926e0606c729e0f00595f95","5954033ea5bbca002d27ae91","596ce53e0aeafe00157eb1ba","596ce87a8b79f4001a8f6139","598cad2e96193400190d879a","598cbcd3dc20c6000fdfb9c3","598cbd8496193400190d8955","59fcc7c9591add0026c91457","5a020b7856ea82001c8c9342","5a09bc64a91882001c56c2ed","5a71fa2de9aa84007a8bccdb","5b3a768a8a21dd0003ca080d"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"category":{"_id":"59fcc7c9591add0026c91457","project":"54c0e51215af820d001a38a6","version":"54f8de4e4339bb1900c8bffb","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-11-03T19:47:21.098Z","from_sync":false,"order":1,"slug":"webhooks","title":"Webhooks"},"user":"560000e90c703d1900952ff2","githubsync":"","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-11-05T21:50:36.137Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"Below you will find a reference of all webhook events fired from Fleetio. You may subscribe to some or all of these events from your webhook configuration. \n[block:api-header]\n{\n  \"title\": \"IMPORTANT NOTE ABOUT IMPORTS\"\n}\n[/block]\nBecause imports can generate **many** events, we will only send one `import_completed` event to your webhook when the import finishes. Inside the payload, you will find the import type, which can be one of the following:\n\n* VehicleImport\n* FuelEntryImport\n* MeterEntryImport\n* ServiceEntryImport\n* ServiceTaskImport\n* IssueImport\n* PartImport\n* ContactImport\n* VendorImport\n* GroupImport\n* ServiceReminderImport\n* VehicleRenewalReminderImport\n* ContactRenewalReminderImport\n\nAlso inside the payload, you will find an array of `created_record_ids` and `updated_record_ids` containing the IDs of the records that were created or updated during the import process.\n\nIn order to help you easily get all affected records, we've added a [new API endpoint](https://developer.fleetio.com/v1/docs/importsidrecords) that lets you retrieve all created or updated records for an import.\n\nThe exception to this is the Add Multiple Users/Vehicles feature, which **will** generate multiple creation events.\n[block:api-header]\n{\n  \"title\": \"Vehicle Events\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`vehicle_created`\",\n    \"0-1\": \"Fired when a vehicle is created.\",\n    \"1-0\": \"`vehicle_updated`\",\n    \"1-1\": \"Fired when an attribute on a vehicle is updated.\",\n    \"2-0\": \"`vehicle_status_changed`\",\n    \"2-1\": \"Fired when a vehicle's status changes.\",\n    \"3-0\": \"`vehicle_group_changed`\",\n    \"3-1\": \"Fired when a vehicle's group changes.\",\n    \"4-0\": \"`vehicle_archived`\",\n    \"4-1\": \"Fired when a vehicle is archived.\",\n    \"5-0\": \"`vehicle_deleted`\",\n    \"5-1\": \"Fired when a vehicle is deleted. The payload will contain the attributes of the vehicle before it was deleted.\",\n    \"6-0\": \"`vehicle_assigned`\",\n    \"6-1\": \"Fired when a vehicle assignment is created for a vehicle.\",\n    \"7-0\": \"`vehicle_comment_added`\",\n    \"7-1\": \"Fired when a comment is made on a vehicle\"\n  },\n  \"cols\": 2,\n  \"rows\": 8\n}\n[/block]\nExample payload for all vehicle events:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": 1,\\n  \\\"event\\\": \\\"vehicle_status_changed\\\",\\n  \\\"timestamp\\\": \\\"2017-11-08T13:03:42.089-06:00\\\",\\n  \\\"payload\\\": {\\n    \\\"id\\\": 1,\\n    \\\"current_meter_value\\\": 0.0,\\n    \\\"fuel_type_id\\\": null,\\n    \\\"fuel_type_name\\\": null,\\n    \\\"fuel_volume_units\\\": \\\"liters\\\",\\n    \\\"group_id\\\": 1,\\n    \\\"group_name\\\": \\\"Atlanta-Residential\\\",\\n    \\\"meter_unit\\\": \\\"km\\\",\\n    \\\"name\\\": \\\"rwar\\\",\\n    \\\"ownership\\\": \\\"Owned\\\",\\n    \\\"secondary_meter\\\": false,\\n    \\\"secondary_meter_unit\\\": null,\\n    \\\"secondary_meter_value\\\": 0.0,\\n    \\\"system_of_measurement\\\": \\\"imperial\\\",\\n    \\\"vehicle_status_id\\\": 1,\\n    \\\"vehicle_status_name\\\": \\\"Out of Service\\\",\\n    \\\"vehicle_status_color\\\": \\\"red\\\",\\n    \\\"vehicle_type_id\\\": 1,\\n    \\\"vehicle_type_name\\\": \\\"Car\\\",\\n    \\\"fuel_entries_count\\\": 0,\\n    \\\"service_entries_count\\\": 0,\\n    \\\"service_reminders_count\\\": 0,\\n    \\\"vehicle_renewal_reminders_count\\\": 0,\\n    \\\"comments_count\\\": 0,\\n    \\\"documents_count\\\": 0,\\n    \\\"color\\\": \\\"\\\",\\n    \\\"license_plate\\\": \\\"\\\",\\n    \\\"loan_account_number\\\": null,\\n    \\\"make\\\": \\\"\\\",\\n    \\\"model\\\": \\\"\\\",\\n    \\\"registration_expiration_month\\\": 0,\\n    \\\"registration_state\\\": \\\"\\\",\\n    \\\"trim\\\": \\\"\\\",\\n    \\\"vin\\\": null,\\n    \\\"year\\\": null,\\n    \\\"loan_ended_at\\\": null,\\n    \\\"loan_interest_rate\\\": null,\\n    \\\"loan_notes\\\": null,\\n    \\\"loan_started_at\\\": null,\\n    \\\"loan_vendor_id\\\": null,\\n    \\\"loan_vendor_name\\\": null,\\n    \\\"loan_amount\\\": null,\\n    \\\"loan_payment\\\": null,\\n    \\\"residual_value\\\": null,\\n    \\\"custom_fields\\\": {\\n      \\\"military_hold\\\": \\\"false\\\",\\n      \\\"warranty_type\\\": \\\"\\\",\\n      \\\"ownership_type\\\": \\\"\\\",\\n      \\\"telematics_subscription\\\": \\\"\\\"\\n    },\\n    \\\"issues_count\\\": 0,\\n    \\\"work_orders_count\\\": 0,\\n    \\\"type_name\\\": \\\"Car\\\",\\n    \\\"meter_name\\\": \\\"Odometer\\\",\\n    \\\"secondary_meter_name\\\": \\\"Secondary Meter\\\",\\n    \\\"default_image_url\\\": null,\\n    \\\"default_image_url_medium\\\": null,\\n    \\\"default_image_url_small\\\": null,\\n    \\\"default_image_url_large\\\": null,\\n    \\\"driver\\\": {\\n    },\\n    \\\"specs\\\": {\\n      \\\"body_type\\\": \\\"\\\",\\n      \\\"body_subtype\\\": \\\"\\\",\\n      \\\"drive_type\\\": \\\"\\\",\\n      \\\"brake_system\\\": \\\"\\\",\\n      \\\"msrp_cents\\\": null,\\n      \\\"fuel_tank_capacity\\\": null,\\n      \\\"fuel_tank_2_capacity\\\": null,\\n      \\\"front_track_width\\\": null,\\n      \\\"ground_clearance\\\": null,\\n      \\\"height\\\": null,\\n      \\\"length\\\": null,\\n      \\\"rear_track_width\\\": null,\\n      \\\"width\\\": null,\\n      \\\"wheelbase\\\": null,\\n      \\\"front_tire_psi\\\": null,\\n      \\\"rear_tire_psi\\\": null,\\n      \\\"base_towing_capacity\\\": null,\\n      \\\"curb_weight\\\": null,\\n      \\\"gross_vehicle_weight_rating\\\": null,\\n      \\\"bed_length\\\": null,\\n      \\\"max_payload\\\": null,\\n      \\\"rear_axle_type\\\": \\\"\\\",\\n      \\\"front_tire_type\\\": \\\"\\\",\\n      \\\"front_wheel_diameter\\\": \\\"\\\",\\n      \\\"rear_tire_type\\\": \\\"\\\",\\n      \\\"rear_wheel_diameter\\\": \\\"\\\",\\n      \\\"epa_city\\\": null,\\n      \\\"epa_highway\\\": null,\\n      \\\"epa_combined\\\": null,\\n      \\\"engine_description\\\": \\\"\\\",\\n      \\\"engine_brand\\\": \\\"\\\",\\n      \\\"engine_aspiration\\\": \\\"\\\",\\n      \\\"engine_block_type\\\": \\\"\\\",\\n      \\\"engine_bore\\\": null,\\n      \\\"engine_cam_type\\\": \\\"\\\",\\n      \\\"engine_compression\\\": null,\\n      \\\"engine_cylinders\\\": null,\\n      \\\"engine_displacement\\\": null,\\n      \\\"fuel_induction\\\": \\\"\\\",\\n      \\\"fuel_quality\\\": \\\"\\\",\\n      \\\"max_hp\\\": null,\\n      \\\"max_torque\\\": null,\\n      \\\"oil_capacity\\\": null,\\n      \\\"redline_rpm\\\": \\\"\\\",\\n      \\\"engine_stroke\\\": null,\\n      \\\"engine_valves\\\": null,\\n      \\\"transmission_description\\\": \\\"\\\",\\n      \\\"transmission_brand\\\": \\\"\\\",\\n      \\\"transmission_type\\\": \\\"\\\",\\n      \\\"transmission_gears\\\": null,\\n      \\\"cargo_volume\\\": null,\\n      \\\"interior_volume\\\": null,\\n      \\\"passenger_volume\\\": \\\"\\\",\\n      \\\"engine_bore_with_units\\\": null,\\n      \\\"wheelbase_with_units\\\": null,\\n      \\\"msrp\\\": null\\n    },\\n    \\\"created_at\\\": \\\"2017-11-08T11:46:34.167-06:00\\\",\\n    \\\"updated_at\\\": \\\"2017-11-08T13:03:41.980-06:00\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Contact Events\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`contact_created`\",\n    \"0-1\": \"Fired when a contact is created.\",\n    \"1-0\": \"`contact_updated`\",\n    \"1-1\": \"Fired when a contact is updated.\",\n    \"2-0\": \"`contact_deleted`\",\n    \"2-1\": \"Fired when a contact is deleted. The payload will contain the attributes of the contact before deletion.\",\n    \"3-0\": \"`contact_archived`\",\n    \"3-1\": \"Fired when a contact is archived.\",\n    \"4-0\": \"`contact_merged`\",\n    \"4-1\": \"Fired when a contact is merged into this one. The payload will contain the destination contact.\",\n    \"5-0\": \"`contact_assigned`\",\n    \"5-1\": \"Fired when a contact is assigned to a vehicle.\",\n    \"6-0\": \"`contact_comment_added`\",\n    \"6-1\": \"Fired when a comment is made on a contact.\"\n  },\n  \"cols\": 2,\n  \"rows\": 7\n}\n[/block]\nExample payload for all contact events:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": 1,\\n  \\\"event\\\": \\\"contact_updated\\\",\\n  \\\"timestamp\\\": \\\"2017-11-08T13:48:09.178-06:00\\\",\\n  \\\"payload\\\": {\\n    \\\"id\\\": 1,\\n    \\\"name\\\": \\\"Adam Price\\\",\\n    \\\"first_name\\\": \\\"Adam\\\",\\n    \\\"group_id\\\": 1,\\n    \\\"group_name\\\": \\\"Baltimore\\\",\\n    \\\"last_name\\\": \\\"Price\\\",\\n    \\\"user_id\\\": null,\\n    \\\"email\\\": \\\"Adam.Price:::at:::fleetio.com\\\",\\n    \\\"birth_date\\\": \\\"1962-01-17\\\",\\n    \\\"city\\\": \\\"Soledad\\\",\\n    \\\"country\\\": \\\"US\\\",\\n    \\\"employee\\\": true,\\n    \\\"employee_number\\\": \\\"#217\\\",\\n    \\\"home_phone_number\\\": \\\"(921) 216-3931\\\",\\n    \\\"job_title\\\": \\\"Staff Scientist\\\",\\n    \\\"leave_date\\\": null,\\n    \\\"license_class\\\": \\\"Class C\\\",\\n    \\\"license_number\\\": \\\"G8U8POQ9WQZKHOQ\\\",\\n    \\\"license_state\\\": \\\"AZ\\\",\\n    \\\"mobile_phone_number\\\": \\\"(006) 225-4642\\\",\\n    \\\"other_phone_number\\\": \\\"\\\",\\n    \\\"postal_code\\\": \\\"48466-2049\\\",\\n    \\\"region\\\": \\\"LA\\\",\\n    \\\"start_date\\\": \\\"2008-12-10\\\",\\n    \\\"street_address\\\": \\\"79 Eastwood Drive\\\",\\n    \\\"street_address_line_2\\\": \\\"\\\",\\n    \\\"technician\\\": true,\\n    \\\"vehicle_operator\\\": true,\\n    \\\"work_phone_number\\\": \\\"(123) 033-8868\\\",\\n    \\\"hourly_labor_rate\\\": 100.0,\\n    \\\"custom_fields\\\": {\\n      \\\"driver_license_class\\\": \\\"\\\",\\n      \\\"certification\\\": \\\"\\\",\\n      \\\"type_of_contact\\\": \\\"\\\",\\n      \\\"region\\\": \\\"LA\\\",\\n      \\\"vehicle_type\\\": \\\"false\\\",\\n      \\\"second_test\\\": \\\"false\\\"\\n    },\\n    \\\"default_image_url\\\": \\\"https://d3mgxxlx76tp6w.cloudfront.net/api/file/pc3SG7XwTN2sb4kFDzD6\\\",\\n    \\\"user\\\": null,\\n    \\\"created_at\\\": \\\"2013-09-12T06:15:24.922-05:00\\\",\\n    \\\"updated_at\\\": \\\"2017-11-08T13:48:09.040-06:00\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Fuel Entry Events\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`fuel_entry_created`\",\n    \"0-1\": \"Fired when a fuel entry is created.\",\n    \"1-0\": \"`fuel_entry_updated`\",\n    \"1-1\": \"Fired when a fuel entry is updated.\",\n    \"2-0\": \"`fuel_entry_deleted`\",\n    \"2-1\": \"Fired when a fuel entry is deleted. The payload will contain the fuel entry's attributes before it was deleted\",\n    \"3-1\": \"Fired when a comment is made on a fuel entry.\",\n    \"3-0\": \"`fuel_entry_comment_added`\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\nExample payload for all fuel entry events:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": 1,\\n  \\\"event\\\": \\\"fuel_entry_created\\\",\\n  \\\"timestamp\\\": \\\"2017-11-01T11:41:15.771-05:00\\\",\\n  \\\"payload\\\": {\\n    \\\"id\\\": 1,\\n    \\\"cost_per_hr\\\": null,\\n    \\\"cost_per_km\\\": 0.001,\\n    \\\"cost_per_mi\\\": 0.001,\\n    \\\"custom_fields\\\": {\\n      \\\"card_number\\\": \\\"\\\",\\n      \\\"expense_type\\\": \\\"\\\",\\n      \\\"fuel_unit_number\\\": \\\"\\\",\\n      \\\"fuel-up_state\\\": \\\"\\\",\\n      \\\"last_fill_up\\\": \\\"\\\",\\n      \\\"used_card\\\": \\\"false\\\",\\n      \\\"second_tank_gallons\\\": \\\"\\\"\\n    },\\n    \\\"date\\\": \\\"2017-10-31T11:40:00.000-05:00\\\",\\n    \\\"external_id\\\": null,\\n    \\\"fuel_type_id\\\": 1,\\n    \\\"fuel_type_name\\\": \\\"Unleaded\\\",\\n    \\\"kpl\\\": 1837.6,\\n    \\\"liters\\\": 18.927,\\n    \\\"liters_per_hr\\\": null,\\n    \\\"lp100k\\\": 0.1,\\n    \\\"mpg_uk\\\": 5191.2,\\n    \\\"mpg_us\\\": 4322.2,\\n    \\\"partial\\\": false,\\n    \\\"personal\\\": false,\\n    \\\"price_per_volume_unit\\\": 5.0,\\n    \\\"raw_transaction_data\\\": null,\\n    \\\"reference\\\": \\\"\\\",\\n    \\\"region\\\": null,\\n    \\\"reset\\\": false,\\n    \\\"uk_gallons\\\": 4.163,\\n    \\\"uk_gallons_per_hr\\\": null,\\n    \\\"us_gallons\\\": 5.0,\\n    \\\"us_gallons_per_hr\\\": null,\\n    \\\"usage_in_hr\\\": null,\\n    \\\"usage_in_km\\\": 34779.5,\\n    \\\"usage_in_mi\\\": 21611.0,\\n    \\\"vehicle_id\\\": 153,\\n    \\\"vehicle_name\\\": \\\"0M4HH0 - 2011 Ford F150\\\",\\n    \\\"vendor_id\\\": null,\\n    \\\"vendor_name\\\": null,\\n    \\\"images_count\\\": 0,\\n    \\\"documents_count\\\": 0,\\n    \\\"comments_count\\\": 0,\\n    \\\"total_amount\\\": 25.0,\\n    \\\"meter_entry\\\": {\\n      \\\"id\\\": 1,\\n      \\\"auto_voided_at\\\": null,\\n      \\\"category\\\": null,\\n      \\\"date\\\": \\\"2017-10-31\\\",\\n      \\\"meter_type\\\": null,\\n      \\\"meterable_id\\\": 1,\\n      \\\"meterable_type\\\": \\\"FuelEntry\\\",\\n      \\\"value\\\": 110111.0,\\n      \\\"vehicle_id\\\": 1,\\n      \\\"void\\\": false,\\n      \\\"type\\\": null,\\n      \\\"created_at\\\": \\\"2017-11-01T11:41:09.299-05:00\\\",\\n      \\\"updated_at\\\": \\\"2017-11-01T11:41:09.299-05:00\\\"\\n    },\\n    \\\"geolocation\\\": {\\n    },\\n    \\\"images\\\": [\\n\\n    ],\\n    \\\"map_previews\\\": {\\n      \\\"small\\\": null,\\n      \\\"large\\\": null,\\n      \\\"small_short\\\": null,\\n      \\\"large_short\\\": null\\n    },\\n    \\\"created_at\\\": \\\"2017-11-01T11:41:09.288-05:00\\\",\\n    \\\"updated_at\\\": \\\"2017-11-01T11:41:09.288-05:00\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Issue Events\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`issue_created`\",\n    \"0-1\": \"Fired when an issue is created.\",\n    \"1-0\": \"`issue_updated`\",\n    \"1-1\": \"Fired when an issue is updated.\",\n    \"2-0\": \"`issue_deleted`\",\n    \"2-1\": \"Fired when an issue is deleted. The payload will contain the issue's attributes before deletion.\",\n    \"3-0\": \"`issue_resolved`\",\n    \"3-1\": \"Fired when an issue is resolved.\",\n    \"4-0\": \"`issue_closed`\",\n    \"4-1\": \"Fired when an issue is closed.\",\n    \"5-0\": \"`issue_comment_added`\",\n    \"5-1\": \"Fired when a comment is made on an issue.\"\n  },\n  \"cols\": 2,\n  \"rows\": 6\n}\n[/block]\nExample payload for all issue events:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": 1,\\n  \\\"event\\\": \\\"issue_resolved\\\",\\n  \\\"timestamp\\\": \\\"2017-11-08T13:56:02.999-06:00\\\",\\n  \\\"payload\\\": {\\n    \\\"id\\\": 1,\\n    \\\"custom_fields\\\": {\\n    },\\n    \\\"number\\\": \\\"#138\\\",\\n    \\\"name\\\": \\\"[Inspection] Transmission\\\",\\n    \\\"summary\\\": \\\"[Inspection] Transmission\\\",\\n    \\\"description\\\": \\\"Generated by the failed inspection item \\\\\\\"Transmission\\\\\\\" on the \\\\\\\"DVIR\\\\\\\" form submitted by Demo User on Aug 7, 2017 at 12:16 PM\\\",\\n    \\\"state\\\": \\\"Resolved\\\",\\n    \\\"reported_at\\\": \\\"2017-08-07T14:16:45.861-05:00\\\",\\n    \\\"reported_by_id\\\": 1,\\n    \\\"reported_by_name\\\": \\\"Demo User\\\",\\n    \\\"due_date\\\": null,\\n    \\\"due_meter_value\\\": null,\\n    \\\"due_secondary_meter_value\\\": null,\\n    \\\"vehicle_id\\\": 1,\\n    \\\"vehicle_name\\\": \\\"1M6N90 - 2000 Toyota 4Runner\\\",\\n    \\\"images_count\\\": 0,\\n    \\\"documents_count\\\": 1,\\n    \\\"comments_count\\\": 0,\\n    \\\"assigned_contacts\\\": [\\n\\n    ],\\n    \\\"reported_by\\\": {\\n      \\\"id\\\": 1,\\n      \\\"name\\\": \\\"Demo User\\\",\\n      \\\"first_name\\\": \\\"Demo\\\",\\n      \\\"group_id\\\": null,\\n      \\\"group_name\\\": null,\\n      \\\"last_name\\\": \\\"User\\\",\\n      \\\"user_id\\\": null,\\n      \\\"default_image_url\\\": \\\"\\\",\\n      \\\"user\\\": {\\n        \\\"id\\\": 1,\\n        \\\"email\\\": \\\"demo@fleetio.com\\\",\\n        \\\"username\\\": \\\"demo\\\",\\n        \\\"time_zone\\\": \\\"Central Time (US & Canada)\\\"\\n      },\\n      \\\"created_at\\\": \\\"2017-04-22T07:18:23.153-05:00\\\",\\n      \\\"updated_at\\\": \\\"2017-06-08T11:14:14.334-05:00\\\"\\n    },\\n    \\\"labels\\\": [\\n\\n    ],\\n    \\\"images\\\": [\\n\\n    ],\\n    \\\"comments\\\": [\\n\\n    ],\\n    \\\"created_at\\\": \\\"2017-08-07T14:16:50.585-05:00\\\",\\n    \\\"updated_at\\\": \\\"2017-11-08T13:56:02.925-06:00\\\",\\n    \\\"overdue\\\": false\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"DTC Alert Events\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`dtc_alert_created`\",\n    \"0-1\": \"Fired when a DTC alert is created.\",\n    \"1-0\": \"`dtc_alert_resolved`\",\n    \"1-1\": \"Fired when a DTC alert is resolved.\"\n  },\n  \"cols\": 2,\n  \"rows\": 2\n}\n[/block]\nExample payload for all DTC alert events:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": 1,\\n  \\\"event\\\": \\\"dtc_alert_resolved\\\",\\n  \\\"timestamp\\\": \\\"2017-11-08T13:35:17.755-06:00\\\",\\n  \\\"payload\\\": {\\n    \\\"id\\\": 1,\\n    \\\"name\\\": \\\"Low Tire Pressure\\\",\\n    \\\"description\\\": \\\"Aliquam commodo dolor nec diam bibendum porta. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam commodo cursus sollicitudin. Vestibulum ac luctus enim. Sed tristique viverra pharetra. Curabitur pretium, nisi vel fermentum aliquet, mi odio laoreet metus, sodales scelerisque leo nisi in justo. Mauris quis risus nec turpis rhoncus porta. Vestibulum lobortis elit nibh, in accumsan augue maximus vitae. Curabitur gravida dolor vitae urna iaculis, at efficitur massa tempor.\\\",\\n    \\\"code\\\": \\\"P0447\\\",\\n    \\\"count\\\": 5,\\n    \\\"account_id\\\": 1,\\n    \\\"vehicle_id\\\": 1,\\n    \\\"external_id\\\": null,\\n    \\\"last_occurred_at\\\": \\\"2015-09-09T21:43:38.726-05:00\\\",\\n    \\\"status\\\": \\\"resolved\\\",\\n    \\\"archived_at\\\": null,\\n    \\\"created_at\\\": \\\"2015-09-30T14:48:08.199-05:00\\\",\\n    \\\"updated_at\\\": \\\"2017-11-08T13:28:08.094-06:00\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Service Entry Events\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`service_entry_created`\",\n    \"0-1\": \"Fired when a service entry is created.\",\n    \"1-0\": \"`service_entry_updated`\",\n    \"1-1\": \"Fired when a service entry is updated.\",\n    \"2-0\": \"`service_entry_deleted`\",\n    \"2-1\": \"Fired when a service entry is deleted. The payload will contain the attributes of the service entry before it was deleted.\",\n    \"3-0\": \"`service_entry_comment_added`\",\n    \"3-1\": \"Fired when a comment is made on a service entry.\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\nExample payload for all service entry events:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": 1,\\n  \\\"event\\\": \\\"service_entry_created\\\",\\n  \\\"timestamp\\\": \\\"2017-11-08T13:56:02.955-06:00\\\",\\n  \\\"payload\\\": {\\n    \\\"id\\\": 1,\\n    \\\"reference\\\": \\\"\\\",\\n    \\\"vendor_id\\\": null,\\n    \\\"vendor_name\\\": null,\\n    \\\"vehicle_id\\\": 1,\\n    \\\"vehicle_name\\\": \\\"1M6N90 - 2000 Toyota 4Runner\\\",\\n    \\\"images_count\\\": 0,\\n    \\\"documents_count\\\": 0,\\n    \\\"comments_count\\\": 0,\\n    \\\"work_order_id\\\": null,\\n    \\\"custom_fields\\\": {\\n      \\\"id_number\\\": \\\"\\\"\\n    },\\n    \\\"work_order_number\\\": null,\\n    \\\"date\\\": \\\"2017-11-08\\\",\\n    \\\"tax_1_type\\\": \\\"percentage\\\",\\n    \\\"tax_1_percentage\\\": 0.0,\\n    \\\"tax_2_type\\\": \\\"percentage\\\",\\n    \\\"tax_2_percentage\\\": 0.0,\\n    \\\"labor_subtotal\\\": 0.0,\\n    \\\"parts_subtotal\\\": 0.0,\\n    \\\"tax_2\\\": 0.0,\\n    \\\"total_amount\\\": 0.0,\\n    \\\"service_tasks\\\": [\\n\\n    ],\\n    \\\"issues\\\": [\\n      {\\n        \\\"id\\\": 167246,\\n        \\\"custom_fields\\\": {\\n        },\\n        \\\"number\\\": \\\"#138\\\",\\n        \\\"name\\\": \\\"[Inspection] Transmission\\\",\\n        \\\"summary\\\": \\\"[Inspection] Transmission\\\",\\n        \\\"description\\\": \\\"Generated by the failed inspection item \\\\\\\"Transmission\\\\\\\" on the \\\\\\\"DVIR\\\\\\\" form submitted by Demo User on Aug 7, 2017 at 12:16 PM\\\",\\n        \\\"state\\\": \\\"Resolved\\\",\\n        \\\"reported_at\\\": \\\"2017-08-07T14:16:45.861-05:00\\\",\\n        \\\"reported_by_id\\\": 88607,\\n        \\\"reported_by_name\\\": \\\"Demo User\\\",\\n        \\\"due_date\\\": null,\\n        \\\"due_meter_value\\\": null,\\n        \\\"due_secondary_meter_value\\\": null,\\n        \\\"vehicle_id\\\": 53793,\\n        \\\"vehicle_name\\\": \\\"1M6N90 - 2000 Toyota 4Runner\\\",\\n        \\\"images_count\\\": 0,\\n        \\\"documents_count\\\": 1,\\n        \\\"comments_count\\\": 0,\\n        \\\"assigned_contacts\\\": [\\n\\n        ],\\n        \\\"reported_by\\\": {\\n          \\\"id\\\": 1,\\n          \\\"name\\\": \\\"Demo User\\\",\\n          \\\"first_name\\\": \\\"Demo\\\",\\n          \\\"group_id\\\": null,\\n          \\\"group_name\\\": null,\\n          \\\"last_name\\\": \\\"User\\\",\\n          \\\"user_id\\\": null,\\n          \\\"default_image_url\\\": \\\"\\\",\\n          \\\"user\\\": {\\n            \\\"id\\\": 1,\\n            \\\"email\\\": \\\"demo@fleetio.com\\\",\\n            \\\"username\\\": \\\"demo\\\",\\n            \\\"time_zone\\\": \\\"Central Time (US & Canada)\\\"\\n          },\\n          \\\"created_at\\\": \\\"2017-04-22T07:18:23.153-05:00\\\",\\n          \\\"updated_at\\\": \\\"2017-06-08T11:14:14.334-05:00\\\"\\n        },\\n        \\\"labels\\\": [\\n\\n        ],\\n        \\\"images\\\": [\\n\\n        ],\\n        \\\"comments\\\": [\\n\\n        ],\\n        \\\"created_at\\\": \\\"2017-08-07T14:16:50.585-05:00\\\",\\n        \\\"updated_at\\\": \\\"2017-11-08T13:56:02.925-06:00\\\",\\n        \\\"overdue\\\": false,\\n        \\\"attachment_permissions\\\": {\\n        }\\n      }\\n    ],\\n    \\\"meter_entry\\\": {\\n      \\\"id\\\": 1,\\n      \\\"auto_voided_at\\\": null,\\n      \\\"category\\\": null,\\n      \\\"date\\\": \\\"2017-11-08\\\",\\n      \\\"meter_type\\\": null,\\n      \\\"meterable_id\\\": 1601811,\\n      \\\"meterable_type\\\": \\\"ServiceEntry\\\",\\n      \\\"value\\\": 112000.0,\\n      \\\"vehicle_id\\\": 1,\\n      \\\"void\\\": false,\\n      \\\"type\\\": null,\\n      \\\"created_at\\\": \\\"2017-11-08T13:56:02.679-06:00\\\",\\n      \\\"updated_at\\\": \\\"2017-11-08T13:56:02.679-06:00\\\"\\n    },\\n    \\\"secondary_meter_entry\\\": {\\n      \\\"id\\\": 1,\\n      \\\"auto_voided_at\\\": null,\\n      \\\"category\\\": null,\\n      \\\"date\\\": \\\"2017-11-08\\\",\\n      \\\"meter_type\\\": \\\"secondary\\\",\\n      \\\"meterable_id\\\": 1,\\n      \\\"meterable_type\\\": \\\"ServiceEntry\\\",\\n      \\\"value\\\": 28.0,\\n      \\\"vehicle_id\\\": 1,\\n      \\\"void\\\": false,\\n      \\\"type\\\": null,\\n      \\\"created_at\\\": \\\"2017-11-08T13:56:02.757-06:00\\\",\\n      \\\"updated_at\\\": \\\"2017-11-08T13:56:02.757-06:00\\\"\\n    },\\n    \\\"images\\\": [\\n\\n    ],\\n    \\\"created_at\\\": \\\"2017-11-08T13:56:02.671-06:00\\\",\\n    \\\"updated_at\\\": \\\"2017-11-08T13:56:02.671-06:00\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Inspection Submission Events\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`submitted_inspection_form_created`\",\n    \"0-1\": \"Fired when an inspection is submitted.\",\n    \"1-0\": \"`submitted_inspection_form_deleted`\",\n    \"1-1\": \"Fired when an inspection is deleted.\"\n  },\n  \"cols\": 2,\n  \"rows\": 2\n}\n[/block]\nExample payload for all inspection submission events:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": 1,\\n  \\\"event\\\": \\\"submitted_inspection_form_created\\\",\\n  \\\"timestamp\\\": \\\"2017-11-08T14:12:22.390-06:00\\\",\\n  \\\"payload\\\": {\\n    \\\"id\\\": 1,\\n    \\\"submitted_at\\\": \\\"2017-08-07T14:16:45.861-05:00\\\",\\n    \\\"failed_items\\\": 1,\\n    \\\"vehicle_id\\\": 1,\\n    \\\"duration\\\": \\\"2 minutes\\\",\\n    \\\"inspection_form\\\": {\\n      \\\"id\\\": 1,\\n      \\\"title\\\": \\\"DVIR\\\",\\n      \\\"description\\\": \\\"Standard checklist for road-readiness and safety\\\"\\n    },\\n    \\\"date\\\": \\\"August 7, 2017\\\",\\n    \\\"user\\\": \\\"Demo User\\\",\\n    \\\"comments_count\\\": 1,\\n    \\\"images_count\\\": 1,\\n    \\\"submitted_inspection_items\\\": [\\n      {\\n        \\\"result\\\": {\\n        },\\n        \\\"id\\\": 1,\\n        \\\"comments_count\\\": 0,\\n        \\\"images_count\\\": 0,\\n        \\\"submitted_inspection_form_id\\\": 383108,\\n        \\\"inspection_item\\\": {\\n          \\\"label\\\": \\\"Odometer Reading\\\",\\n          \\\"type\\\": \\\"InspectionMeterEntryItem\\\",\\n          \\\"fail_label\\\": null,\\n          \\\"pass_label\\\": null\\n        },\\n        \\\"comments\\\": [\\n\\n        ],\\n        \\\"images\\\": [\\n\\n        ],\\n        \\\"meter_entry_value\\\": 112000.0,\\n        \\\"secondary_meter_entry_value\\\": 28.0\\n      },\\n      ...\\n    ]\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Meter Entry Events\"\n}\n[/block]\nMeter entry events are only fired on **manual** meter entries (e.g. ones that are not associated with another resource, such as a fuel entry or service entry).\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`meter_entry_created`\",\n    \"0-1\": \"Fired when a manual meter entry is created.\",\n    \"1-0\": \"`meter_entry_updated`\",\n    \"1-1\": \"Fired when a manual meter entry is updated.\",\n    \"2-0\": \"`meter_entry_deleted`\",\n    \"2-1\": \"Fired when a manual meter entry is deleted. The payload will contain the meter entry's attributes before deletion.\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\nExample payload for all meter entry events:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": 1,\\n  \\\"event\\\": \\\"meter_entry_created\\\",\\n  \\\"timestamp\\\": \\\"2017-11-08T14:23:19.509-06:00\\\",\\n  \\\"payload\\\": {\\n    \\\"id\\\": 1,\\n    \\\"auto_voided_at\\\": null,\\n    \\\"category\\\": null,\\n    \\\"meter_type\\\": null,\\n    \\\"meterable_id\\\": null,\\n    \\\"meterable_type\\\": null,\\n    \\\"value\\\": 112111.0,\\n    \\\"vehicle_id\\\": 1,\\n    \\\"void\\\": false,\\n    \\\"type\\\": null,\\n    \\\"date\\\": \\\"2017-11-08\\\",\\n    \\\"created_at\\\": \\\"2017-11-08T14:23:19.366-06:00\\\",\\n    \\\"updated_at\\\": \\\"2017-11-08T14:23:19.366-06:00\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Part Events\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`part_created`\",\n    \"0-1\": \"Fired when a part is created.\",\n    \"1-0\": \"`part_updated`\",\n    \"1-1\": \"Fired when a part is updated.\",\n    \"2-0\": \"`part_deleted`\",\n    \"2-1\": \"Fired when a part is deleted. The payload will contain the part's attributes before deletion.\",\n    \"3-0\": \"`part_comment_added`\",\n    \"3-1\": \"Fired when a comment is made on a part.\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\nExample payload for all part events:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": 1,\\n  \\\"event\\\": \\\"part_created\\\",\\n  \\\"timestamp\\\": \\\"2017-11-06T08:36:04.780-06:00\\\",\\n  \\\"payload\\\": {\\n    \\\"id\\\": 1,\\n    \\\"description\\\": \\\"\\\",\\n    \\\"manufacturer_part_number\\\": \\\"\\\",\\n    \\\"measurement_unit_id\\\": null,\\n    \\\"number\\\": \\\"part\\\",\\n    \\\"part_category_id\\\": null,\\n    \\\"part_manufacturer_id\\\": null,\\n    \\\"upc\\\": \\\"\\\",\\n    \\\"total_quantity\\\": 0,\\n    \\\"custom_fields\\\": {\\n      \\\"warranty\\\": \\\"\\\",\\n      \\\"use_for_service_task\\\": \\\"\\\"\\n    },\\n    \\\"inventory_item\\\": false,\\n    \\\"part_category_name\\\": null,\\n    \\\"part_manufacturer_name\\\": null,\\n    \\\"measurement_unit_name\\\": null,\\n    \\\"default_image_url\\\": null,\\n    \\\"default_image_url_medium\\\": null,\\n    \\\"default_image_url_small\\\": null,\\n    \\\"default_image_url_large\\\": null,\\n    \\\"unit_cost\\\": null,\\n    \\\"part_locations\\\": [\\n\\n    ],\\n    \\\"created_at\\\": \\\"2017-11-06T08:36:04.584-06:00\\\",\\n    \\\"updated_at\\\": \\\"2017-11-06T08:36:04.710-06:00\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Place Events\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`place_created`\",\n    \"0-1\": \"Fired when a place is created.\",\n    \"1-0\": \"`place_updated`\",\n    \"1-1\": \"Fired when a place is updated.\",\n    \"2-0\": \"`place_deleted`\",\n    \"2-1\": \"Fired when a place is deleted. The payload will contain the place's attributes before deletion.\",\n    \"3-0\": \"`place_visited`\",\n    \"3-1\": \"Fired when a place is visited.\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\nExample payload for all place events:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": 1,\\n  \\\"event\\\": \\\"place_created\\\",\\n  \\\"timestamp\\\": \\\"2017-11-08T19:12:19.225-06:00\\\",\\n  \\\"payload\\\": {\\n    \\\"id\\\": 1,\\n    \\\"name\\\": \\\"Antarctica\\\",\\n    \\\"address\\\": \\\"Antarctica\\\",\\n    \\\"description\\\": \\\"Best place in the world\\\",\\n    \\\"place_visits_count\\\": 0,\\n    \\\"radius_in_meters\\\": 100,\\n    \\\"created_at\\\": \\\"2017-11-08T19:12:19.193-06:00\\\",\\n    \\\"updated_at\\\": \\\"2017-11-08T19:12:19.193-06:00\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Purchase Order Events\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`purchase_order_created`\",\n    \"0-1\": \"Fired when a purchase order is created.\",\n    \"1-0\": \"`purchase_order_updated`\",\n    \"1-1\": \"Fired when a purchase order is updated. This event is not fired when the purchase order state changes.\",\n    \"2-0\": \"`purchase_order_pending_approval`\",\n    \"2-1\": \"Fired when a purchase order enters the pending approval state.\",\n    \"7-0\": \"`purchase_order_deleted`\",\n    \"7-1\": \"Fired when a purchase order is deleted. The payload will contain the purchase order's attributes before deletion.\",\n    \"3-0\": \"`purchase_order_approved`\",\n    \"3-1\": \"Fired when a purchase order is approved.\",\n    \"4-0\": \"`purchase_order_purchased`\",\n    \"4-1\": \"Fired when a purchase order is marked as purchased.\",\n    \"5-0\": \"`purchase_order_received`\",\n    \"5-1\": \"Fired when a purchase order is fully received.\",\n    \"6-0\": \"`purchase_order_closed`\",\n    \"6-1\": \"Fired when a purchase order is closed.\",\n    \"8-0\": \"`purchase_order_comment_added`\",\n    \"8-1\": \"Fired when a comment is made on a purchase order.\"\n  },\n  \"cols\": 2,\n  \"rows\": 9\n}\n[/block]\nExample payload for all purchase order events:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": 1,\\n  \\\"event\\\": \\\"purchase_order_updated\\\",\\n  \\\"timestamp\\\": \\\"2017-11-06T13:43:18.788-06:00\\\",\\n  \\\"payload\\\": {\\n    \\\"id\\\": 1,\\n    \\\"number\\\": 123,\\n    \\\"custom_fields\\\": {\\n      \\\"fet\\\": \\\"\\\"\\n    },\\n    \\\"description\\\": \\\"\\\",\\n    \\\"label_list\\\": [\\n\\n    ],\\n    \\\"submitted_for_approval_at\\\": null,\\n    \\\"rejected_at\\\": null,\\n    \\\"approved_at\\\": \\\"2017-11-06T13:38:34.998-06:00\\\",\\n    \\\"purchased_at\\\": \\\"2017-11-06T13:38:37.807-06:00\\\",\\n    \\\"received_partial_at\\\": null,\\n    \\\"received_full_at\\\": \\\"2017-11-06T13:41:41.424-06:00\\\",\\n    \\\"closed_at\\\": \\\"2017-11-06T13:43:18.658-06:00\\\",\\n    \\\"state\\\": \\\"closed\\\",\\n    \\\"documents_count\\\": 0,\\n    \\\"comments_count\\\": 0,\\n    \\\"created_at\\\": \\\"2017-11-06T13:28:15.713-06:00\\\",\\n    \\\"updated_at\\\": \\\"2017-11-06T13:43:18.680-06:00\\\",\\n    \\\"discount_percentage\\\": 0.0,\\n    \\\"discount_type\\\": \\\"percentage\\\",\\n    \\\"tax_1_percentage\\\": null,\\n    \\\"tax_1_type\\\": \\\"percentage\\\",\\n    \\\"tax_2_percentage\\\": null,\\n    \\\"tax_2_type\\\": \\\"percentage\\\",\\n    \\\"discount\\\": 0.0,\\n    \\\"subtotal\\\": 275.0,\\n    \\\"shipping\\\": 0.0,\\n    \\\"tax_1\\\": 0.0,\\n    \\\"tax_2\\\": 0.0,\\n    \\\"total_amount\\\": 275.0,\\n    \\\"part_location_id\\\": 1,\\n    \\\"vendor_id\\\": 1,\\n    \\\"part_location_name\\\": \\\"Birmingham\\\",\\n    \\\"vendor_name\\\": \\\"WAYNE ENTERPRISES\\\",\\n    \\\"created_by\\\": \\\"Demo User\\\",\\n    \\\"approved_by\\\": \\\"Demo User\\\",\\n    \\\"purchased_by\\\": \\\"Demo User\\\",\\n    \\\"received_full_by\\\": \\\"Demo User\\\",\\n    \\\"closed_by\\\": \\\"Demo User\\\",\\n    \\\"purchase_order_line_items\\\": [\\n      {\\n        \\\"id\\\": 1,\\n        \\\"part_id\\\": 1,\\n        \\\"quantity\\\": 55.0,\\n        \\\"total_quantity_received\\\": 55.0,\\n        \\\"part_number\\\": \\\"Fleetio T-Shirt - Size L\\\",\\n        \\\"unit_cost\\\": 5.0,\\n        \\\"subtotal\\\": 275.0,\\n        \\\"created_at\\\": \\\"2017-11-06T13:28:15.766-06:00\\\",\\n        \\\"updated_at\\\": \\\"2017-11-06T13:41:40.923-06:00\\\"\\n      }\\n    ]\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Work Order Events\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`work_order_created`\",\n    \"0-1\": \"Fired when a work order is created.\",\n    \"1-0\": \"`work_order_updated`\",\n    \"1-1\": \"Fired when a work order is updated.\",\n    \"2-0\": \"`work_order_deleted`\",\n    \"2-1\": \"Fired when a work order is updated. The payload will contain the work order's attributes before deletion.\",\n    \"3-0\": \"`work_order_status_changed`\",\n    \"3-1\": \"Fired when the status of a work order changes.\",\n    \"4-0\": \"`work_order_comment_added`\",\n    \"4-1\": \"Fired when a comment is made on a work order.\"\n  },\n  \"cols\": 2,\n  \"rows\": 5\n}\n[/block]\nExample payload for all work order events:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": 1,\\n  \\\"event\\\": \\\"work_order_created\\\",\\n  \\\"timestamp\\\": \\\"2017-11-06T08:47:07.803-06:00\\\",\\n  \\\"payload\\\": {\\n    \\\"id\\\": 1,\\n    \\\"number\\\": \\\"#1\\\",\\n    \\\"completed_at\\\": null,\\n    \\\"custom_fields\\\": {\\n      \\\"external_wo_number\\\": \\\"\\\",\\n      \\\"gl_code\\\": \\\"\\\",\\n      \\\"third-party_repair\\\": \\\"false\\\",\\n      \\\"work_order_facility\\\": \\\"\\\"\\n    },\\n    \\\"description\\\": \\\"description\\\",\\n    \\\"downtime_in_seconds\\\": null,\\n    \\\"invoice_number\\\": \\\"\\\",\\n    \\\"issued_at\\\": \\\"2017-11-06T00:00:00.000-06:00\\\",\\n    \\\"issued_by_id\\\": null,\\n    \\\"issued_by_name\\\": null,\\n    \\\"contact_id\\\": null,\\n    \\\"contact_name\\\": null,\\n    \\\"purchase_order_number\\\": \\\"\\\",\\n    \\\"started_at\\\": \\\"2017-11-07T00:00:00.000-06:00\\\",\\n    \\\"vehicle_id\\\": 153,\\n    \\\"vehicle_name\\\": \\\"0M4HH0 - 2011 Ford F150\\\",\\n    \\\"vendor_id\\\": null,\\n    \\\"vendor_name\\\": null,\\n    \\\"work_order_status_id\\\": 1,\\n    \\\"work_order_status_name\\\": \\\"Open\\\",\\n    \\\"documents_count\\\": 0,\\n    \\\"images_count\\\": 0,\\n    \\\"comments_count\\\": 0,\\n    \\\"work_order_line_items\\\": [\\n      {\\n        \\\"id\\\": 1,\\n        \\\"description\\\": \\\"\\\",\\n        \\\"item_id\\\": 1,\\n        \\\"item_type\\\": \\\"ServiceTask\\\",\\n        \\\"work_order_line_item_id\\\": null,\\n        \\\"item_name\\\": \\\"3m sprayer inlet hose replaced\\\",\\n        \\\"created_at\\\": \\\"2017-11-06T08:47:07.764-06:00\\\",\\n        \\\"updated_at\\\": \\\"2017-11-06T08:47:07.764-06:00\\\"\\n      }\\n    ],\\n    \\\"meter_entry\\\": {\\n      \\\"id\\\": 1,\\n      \\\"auto_voided_at\\\": null,\\n      \\\"category\\\": null,\\n      \\\"date\\\": \\\"2017-11-07\\\",\\n      \\\"meter_type\\\": null,\\n      \\\"meterable_id\\\": 1,\\n      \\\"meterable_type\\\": \\\"WorkOrder\\\",\\n      \\\"value\\\": 110111.0,\\n      \\\"vehicle_id\\\": 1,\\n      \\\"void\\\": false,\\n      \\\"type\\\": null,\\n      \\\"created_at\\\": \\\"2017-11-06T08:47:07.636-06:00\\\",\\n      \\\"updated_at\\\": \\\"2017-11-06T08:47:07.636-06:00\\\"\\n    },\\n    \\\"created_at\\\": \\\"2017-11-06T08:47:07.622-06:00\\\",\\n    \\\"updated_at\\\": \\\"2017-11-06T08:47:07.622-06:00\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Trip Events\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`trip_started`\",\n    \"0-1\": \"Fired when a trip is started.\",\n    \"1-0\": \"`trip_ended`\",\n    \"1-1\": \"Fired when a trip is ended.\",\n    \"2-0\": \"`trip_scored`\",\n    \"2-1\": \"Fired when a trip is scored.\",\n    \"3-0\": \"`trip_deleted`\",\n    \"3-1\": \"Fired when a trip is deleted. The payload will contain the trip's attributes before deletion.\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\nExample payload for all trip events:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": 1,\\n  \\\"event\\\": \\\"trip_started\\\",\\n  \\\"timestamp\\\": \\\"2017-11-06T14:28:06.942-06:00\\\",\\n  \\\"payload\\\": {\\n    \\\"id\\\": 1,\\n    \\\"account_id\\\": 1,\\n    \\\"vehicle_id\\\": null,\\n    \\\"contact_id\\\": null,\\n    \\\"started_at\\\": \\\"2017-07-13T07:27:58.000-05:00\\\",\\n    \\\"ended_at\\\": \\\"2017-07-13T07:31:09.000-05:00\\\",\\n    \\\"purpose\\\": null,\\n    \\\"distance_in_mi\\\": 1.237771032,\\n    \\\"distance_in_km\\\": 1.992,\\n    \\\"average_speed_in_km\\\": 39.81863,\\n    \\\"created_at\\\": \\\"2017-07-13T07:28:08.692-05:00\\\",\\n    \\\"updated_at\\\": \\\"2017-07-13T07:33:37.582-05:00\\\",\\n    \\\"type\\\": \\\"AutomaticTrip\\\",\\n    \\\"trip_purpose_id\\\": null,\\n    \\\"classification\\\": null,\\n    \\\"start_address\\\": \\\"1020-1058 Richard Arrington Jr Blvd S, Birmingham, AL 35205, USA\\\",\\n    \\\"start_latitude\\\": 33.5013888189418,\\n    \\\"start_longitude\\\": -86.7950780125179,\\n    \\\"end_address\\\": \\\"113-175 19th St N, Birmingham, AL 35203, USA\\\",\\n    \\\"end_latitude\\\": 33.514485688231,\\n    \\\"end_longitude\\\": -86.8074786102452,\\n    \\\"account_membership_id\\\": 451,\\n    \\\"session_id\\\": \\\"NA\\\",\\n    \\\"tracking_id\\\": \\\"NA\\\",\\n    \\\"external_id\\\": \\\"1499948878052\\\",\\n    \\\"cautious_score\\\": 84,\\n    \\\"fuel_efficiency_score\\\": -1,\\n    \\\"control_score\\\": 72,\\n    \\\"focused_score\\\": 72,\\n    \\\"zendrive_score\\\": 76,\\n    \\\"speed_profile\\\": [\\n\\n    ],\\n    \\\"cancelled\\\": false,\\n    \\\"deleted_at\\\": null,\\n    \\\"phone_use_count\\\": 0,\\n    \\\"over_speeding_count\\\": 0,\\n    \\\"aggressive_acceleration_count\\\": 0,\\n    \\\"hard_brake_count\\\": 0,\\n    \\\"start_address_components\\\": {\\n      \\\"street_number\\\": \\\"1020-1058\\\",\\n      \\\"street\\\": \\\"Richard Arrington Junior Boulevard South\\\",\\n      \\\"city\\\": \\\"Birmingham\\\",\\n      \\\"state\\\": \\\"Alabama\\\",\\n      \\\"state_short\\\": \\\"AL\\\",\\n      \\\"country\\\": \\\"United States\\\",\\n      \\\"country_short\\\": \\\"US\\\",\\n      \\\"postal_code\\\": \\\"35205\\\"\\n    },\\n    \\\"end_address_components\\\": {\\n      \\\"street_number\\\": \\\"113-175\\\",\\n      \\\"street\\\": \\\"19th Street North\\\",\\n      \\\"city\\\": \\\"Birmingham\\\",\\n      \\\"state\\\": \\\"Alabama\\\",\\n      \\\"state_short\\\": \\\"AL\\\",\\n      \\\"country\\\": \\\"United States\\\",\\n      \\\"country_short\\\": \\\"US\\\",\\n      \\\"postal_code\\\": \\\"35203\\\"\\n    },\\n    \\\"max_speed_in_mi\\\": 43.20464391368,\\n    \\\"phone_use_duration_in_seconds\\\": 0,\\n    \\\"over_speeding_duration_in_seconds\\\": 0,\\n    \\\"next_trip_id\\\": null,\\n    \\\"previous_trip_id\\\": 97503,\\n    \\\"seconds_until_next_trip\\\": null,\\n    \\\"seconds_since_last_trip\\\": 620,\\n    \\\"mobile_device_id\\\": 145,\\n    \\\"app_version\\\": \\\"1.12.0\\\",\\n    \\\"os_version\\\": \\\"10.3.2\\\",\\n    \\\"max_speed_in_km\\\": 69.5311344546174,\\n    \\\"drive_type\\\": \\\"drive\\\",\\n    \\\"user_mode\\\": \\\"passenger\\\",\\n    \\\"last_location\\\": {\\n      \\\"latitude\\\": 33.51448568823102,\\n      \\\"longitude\\\": -86.80747861024521,\\n      \\\"date\\\": \\\"2017-07-13T07:31:09-05:00\\\",\\n      \\\"time_millis\\\": 1499949069998,\\n      \\\"speed_in_mph\\\": 0.02948734308,\\n      \\\"speed_limit\\\": \\\"NA\\\"\\n    },\\n    \\\"archived_at\\\": null,\\n    \\\"is_sample\\\": false,\\n    \\\"encoded_polyline\\\": \\\"ufnkEfdwpOcrAzv@gAn@N`BpExKAhAcA\\\\\\\\u@`@HA\\\",\\n    \\\"excessive_speeding_polylines\\\": [\\n\\n    ],\\n    \\\"trip_events\\\": [\\n\\n    ],\\n    \\\"image\\\": \\\"\\\",\\n    \\\"start_image\\\": \\\"\\\",\\n    \\\"end_image\\\": \\\"\\\",\\n    \\\"hard_brake_duration_in_seconds\\\": 0,\\n    \\\"aggressive_acceleration_duration_in_seconds\\\": 0,\\n    \\\"in_progress\\\": false,\\n    \\\"processing\\\": false,\\n    \\\"processing_delayed\\\": false,\\n    \\\"processing_failed\\\": false\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Vehicle Assignment Events\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`vehicle_assignment_created`\",\n    \"0-1\": \"Fired when a vehicle assignment is created.\",\n    \"2-0\": \"`vehicle_assignment_deleted`\",\n    \"2-1\": \"Fired when a vehicle assignment is deleted.\",\n    \"1-0\": \"`vehicle_assignment_updated`\",\n    \"1-1\": \"Fired when a vehicle assignment is updated.\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\nExample payload for vehicle assignment events:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": 12345,\\n  \\\"event\\\": \\\"vehicle_assignment_deleted\\\",\\n  \\\"timestamp\\\": \\\"2018-05-17T13:42:37.228-05:00\\\",\\n  \\\"payload\\\": {\\n    \\\"id\\\": 212535,\\n    \\\"vehicle_id\\\": 28848,\\n    \\\"contact_id\\\": 266,\\n    \\\"started_at\\\": \\\"2018-05-16T00:00:00.000-05:00\\\",\\n    \\\"ended_at\\\": \\\"2018-05-17T10:00:00.000-05:00\\\",\\n    \\\"starting_meter_entry_value\\\": null,\\n    \\\"ending_meter_entry_value\\\": null,\\n    \\\"created_at\\\": \\\"2018-05-17T13:40:56.145-05:00\\\",\\n    \\\"updated_at\\\": \\\"2018-05-17T13:41:10.244-05:00\\\",\\n    \\\"comments_count\\\": 0,\\n    \\\"current\\\": false,\\n    \\\"future\\\": false,\\n    \\\"contact_full_name\\\": \\\"Jorge Ninja\\\",\\n    \\\"contact_image_url\\\": null,\\n    \\\"custom_fields\\\": {\\n      \\\"purpose\\\": \\\"\\\"\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Vendor Events\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`vendor_created`\",\n    \"0-1\": \"Fired when a vendor is created.\",\n    \"1-0\": \"`vendor_updated`\",\n    \"1-1\": \"Fired when a vendor is updated.\",\n    \"2-0\": \"`vendor_deleted`\",\n    \"2-1\": \"Fired when a vendor is deleted. The payload will contain the vendor's attributes before deletion.\",\n    \"3-0\": \"`vendor_comment_added`\",\n    \"3-1\": \"Fired when a comment is made on a vendor.\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\nExample payload for all vendor events:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": 1,\\n  \\\"event\\\": \\\"vendor_updated\\\",\\n  \\\"timestamp\\\": \\\"2017-11-09T11:49:05.583-06:00\\\",\\n  \\\"payload\\\": {\\n    \\\"id\\\": 1,\\n    \\\"city\\\": \\\"\\\",\\n    \\\"contact_email\\\": \\\"\\\",\\n    \\\"contact_name\\\": \\\"\\\",\\n    \\\"contact_phone\\\": \\\"\\\",\\n    \\\"country\\\": \\\"\\\",\\n    \\\"custom_fields\\\": {\\n    },\\n    \\\"external_id\\\": null,\\n    \\\"latitude\\\": null,\\n    \\\"longitude\\\": null,\\n    \\\"name\\\": \\\"Jorge\\\",\\n    \\\"phone\\\": \\\"\\\",\\n    \\\"postal_code\\\": \\\"\\\",\\n    \\\"region\\\": \\\"\\\",\\n    \\\"street_address\\\": \\\"\\\",\\n    \\\"street_address_line_2\\\": \\\"\\\",\\n    \\\"website\\\": \\\"\\\",\\n    \\\"created_at\\\": \\\"2017-05-25T08:46:04.016-05:00\\\",\\n    \\\"updated_at\\\": \\\"2017-11-09T11:49:05.545-06:00\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Import Events\"\n}\n[/block]\nWhen importing data, regular webhook events are not fired, due to the volume of events that could potentially be generated. Instead, you must listen for the `import_completed` event and find out which objects were updated or created.\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`import_completed`\",\n    \"0-1\": \"Fired when an import is completed, whether successfully or not. You can check the `state` attribute to determine if the import was successful or not. \\n\\nA state of `complete` indicates success. A state of `failed` indicates something failed. You can then go through the `error_messages` array to see exactly what failed.\\n\\nOn success, the `created_record_ids` and `updated_record_ids` arrays will contain the IDs of the records that were either created or updated.\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\nExample payload for all import events:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": 1,\\n  \\\"event\\\": \\\"import_completed\\\",\\n  \\\"timestamp\\\": \\\"2017-11-02T18:15:56.038-05:00\\\",\\n  \\\"payload\\\": {\\n    \\\"id\\\": 1,\\n    \\\"created_record_ids\\\": [\\n      \\\"123\\\"\\n    ],\\n    \\\"updated_record_ids\\\": [\\n\\n    ],\\n    \\\"affected_record_ids\\\": [\\n      123\\n    ],\\n    \\\"completed_at\\\": null,\\n    \\\"state\\\": \\\"processing\\\",\\n    \\\"created_at\\\": \\\"2017-11-02T18:14:59.848-05:00\\\",\\n    \\\"updated_at\\\": \\\"2017-11-02T18:15:36.052-05:00\\\",\\n    \\\"error_messages\\\": [\\n\\n    ],\\n    \\\"type\\\": \\\"VehicleImport\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"events-reference","type":"basic","title":"Events Reference"}
Below you will find a reference of all webhook events fired from Fleetio. You may subscribe to some or all of these events from your webhook configuration. [block:api-header] { "title": "IMPORTANT NOTE ABOUT IMPORTS" } [/block] Because imports can generate **many** events, we will only send one `import_completed` event to your webhook when the import finishes. Inside the payload, you will find the import type, which can be one of the following: * VehicleImport * FuelEntryImport * MeterEntryImport * ServiceEntryImport * ServiceTaskImport * IssueImport * PartImport * ContactImport * VendorImport * GroupImport * ServiceReminderImport * VehicleRenewalReminderImport * ContactRenewalReminderImport Also inside the payload, you will find an array of `created_record_ids` and `updated_record_ids` containing the IDs of the records that were created or updated during the import process. In order to help you easily get all affected records, we've added a [new API endpoint](https://developer.fleetio.com/v1/docs/importsidrecords) that lets you retrieve all created or updated records for an import. The exception to this is the Add Multiple Users/Vehicles feature, which **will** generate multiple creation events. [block:api-header] { "title": "Vehicle Events" } [/block] [block:parameters] { "data": { "0-0": "`vehicle_created`", "0-1": "Fired when a vehicle is created.", "1-0": "`vehicle_updated`", "1-1": "Fired when an attribute on a vehicle is updated.", "2-0": "`vehicle_status_changed`", "2-1": "Fired when a vehicle's status changes.", "3-0": "`vehicle_group_changed`", "3-1": "Fired when a vehicle's group changes.", "4-0": "`vehicle_archived`", "4-1": "Fired when a vehicle is archived.", "5-0": "`vehicle_deleted`", "5-1": "Fired when a vehicle is deleted. The payload will contain the attributes of the vehicle before it was deleted.", "6-0": "`vehicle_assigned`", "6-1": "Fired when a vehicle assignment is created for a vehicle.", "7-0": "`vehicle_comment_added`", "7-1": "Fired when a comment is made on a vehicle" }, "cols": 2, "rows": 8 } [/block] Example payload for all vehicle events: [block:code] { "codes": [ { "code": "{\n \"id\": 1,\n \"event\": \"vehicle_status_changed\",\n \"timestamp\": \"2017-11-08T13:03:42.089-06:00\",\n \"payload\": {\n \"id\": 1,\n \"current_meter_value\": 0.0,\n \"fuel_type_id\": null,\n \"fuel_type_name\": null,\n \"fuel_volume_units\": \"liters\",\n \"group_id\": 1,\n \"group_name\": \"Atlanta-Residential\",\n \"meter_unit\": \"km\",\n \"name\": \"rwar\",\n \"ownership\": \"Owned\",\n \"secondary_meter\": false,\n \"secondary_meter_unit\": null,\n \"secondary_meter_value\": 0.0,\n \"system_of_measurement\": \"imperial\",\n \"vehicle_status_id\": 1,\n \"vehicle_status_name\": \"Out of Service\",\n \"vehicle_status_color\": \"red\",\n \"vehicle_type_id\": 1,\n \"vehicle_type_name\": \"Car\",\n \"fuel_entries_count\": 0,\n \"service_entries_count\": 0,\n \"service_reminders_count\": 0,\n \"vehicle_renewal_reminders_count\": 0,\n \"comments_count\": 0,\n \"documents_count\": 0,\n \"color\": \"\",\n \"license_plate\": \"\",\n \"loan_account_number\": null,\n \"make\": \"\",\n \"model\": \"\",\n \"registration_expiration_month\": 0,\n \"registration_state\": \"\",\n \"trim\": \"\",\n \"vin\": null,\n \"year\": null,\n \"loan_ended_at\": null,\n \"loan_interest_rate\": null,\n \"loan_notes\": null,\n \"loan_started_at\": null,\n \"loan_vendor_id\": null,\n \"loan_vendor_name\": null,\n \"loan_amount\": null,\n \"loan_payment\": null,\n \"residual_value\": null,\n \"custom_fields\": {\n \"military_hold\": \"false\",\n \"warranty_type\": \"\",\n \"ownership_type\": \"\",\n \"telematics_subscription\": \"\"\n },\n \"issues_count\": 0,\n \"work_orders_count\": 0,\n \"type_name\": \"Car\",\n \"meter_name\": \"Odometer\",\n \"secondary_meter_name\": \"Secondary Meter\",\n \"default_image_url\": null,\n \"default_image_url_medium\": null,\n \"default_image_url_small\": null,\n \"default_image_url_large\": null,\n \"driver\": {\n },\n \"specs\": {\n \"body_type\": \"\",\n \"body_subtype\": \"\",\n \"drive_type\": \"\",\n \"brake_system\": \"\",\n \"msrp_cents\": null,\n \"fuel_tank_capacity\": null,\n \"fuel_tank_2_capacity\": null,\n \"front_track_width\": null,\n \"ground_clearance\": null,\n \"height\": null,\n \"length\": null,\n \"rear_track_width\": null,\n \"width\": null,\n \"wheelbase\": null,\n \"front_tire_psi\": null,\n \"rear_tire_psi\": null,\n \"base_towing_capacity\": null,\n \"curb_weight\": null,\n \"gross_vehicle_weight_rating\": null,\n \"bed_length\": null,\n \"max_payload\": null,\n \"rear_axle_type\": \"\",\n \"front_tire_type\": \"\",\n \"front_wheel_diameter\": \"\",\n \"rear_tire_type\": \"\",\n \"rear_wheel_diameter\": \"\",\n \"epa_city\": null,\n \"epa_highway\": null,\n \"epa_combined\": null,\n \"engine_description\": \"\",\n \"engine_brand\": \"\",\n \"engine_aspiration\": \"\",\n \"engine_block_type\": \"\",\n \"engine_bore\": null,\n \"engine_cam_type\": \"\",\n \"engine_compression\": null,\n \"engine_cylinders\": null,\n \"engine_displacement\": null,\n \"fuel_induction\": \"\",\n \"fuel_quality\": \"\",\n \"max_hp\": null,\n \"max_torque\": null,\n \"oil_capacity\": null,\n \"redline_rpm\": \"\",\n \"engine_stroke\": null,\n \"engine_valves\": null,\n \"transmission_description\": \"\",\n \"transmission_brand\": \"\",\n \"transmission_type\": \"\",\n \"transmission_gears\": null,\n \"cargo_volume\": null,\n \"interior_volume\": null,\n \"passenger_volume\": \"\",\n \"engine_bore_with_units\": null,\n \"wheelbase_with_units\": null,\n \"msrp\": null\n },\n \"created_at\": \"2017-11-08T11:46:34.167-06:00\",\n \"updated_at\": \"2017-11-08T13:03:41.980-06:00\"\n }\n}", "language": "json" } ] } [/block] [block:api-header] { "title": "Contact Events" } [/block] [block:parameters] { "data": { "0-0": "`contact_created`", "0-1": "Fired when a contact is created.", "1-0": "`contact_updated`", "1-1": "Fired when a contact is updated.", "2-0": "`contact_deleted`", "2-1": "Fired when a contact is deleted. The payload will contain the attributes of the contact before deletion.", "3-0": "`contact_archived`", "3-1": "Fired when a contact is archived.", "4-0": "`contact_merged`", "4-1": "Fired when a contact is merged into this one. The payload will contain the destination contact.", "5-0": "`contact_assigned`", "5-1": "Fired when a contact is assigned to a vehicle.", "6-0": "`contact_comment_added`", "6-1": "Fired when a comment is made on a contact." }, "cols": 2, "rows": 7 } [/block] Example payload for all contact events: [block:code] { "codes": [ { "code": "{\n \"id\": 1,\n \"event\": \"contact_updated\",\n \"timestamp\": \"2017-11-08T13:48:09.178-06:00\",\n \"payload\": {\n \"id\": 1,\n \"name\": \"Adam Price\",\n \"first_name\": \"Adam\",\n \"group_id\": 1,\n \"group_name\": \"Baltimore\",\n \"last_name\": \"Price\",\n \"user_id\": null,\n \"email\": \"Adam.Price@fleetio.com\",\n \"birth_date\": \"1962-01-17\",\n \"city\": \"Soledad\",\n \"country\": \"US\",\n \"employee\": true,\n \"employee_number\": \"#217\",\n \"home_phone_number\": \"(921) 216-3931\",\n \"job_title\": \"Staff Scientist\",\n \"leave_date\": null,\n \"license_class\": \"Class C\",\n \"license_number\": \"G8U8POQ9WQZKHOQ\",\n \"license_state\": \"AZ\",\n \"mobile_phone_number\": \"(006) 225-4642\",\n \"other_phone_number\": \"\",\n \"postal_code\": \"48466-2049\",\n \"region\": \"LA\",\n \"start_date\": \"2008-12-10\",\n \"street_address\": \"79 Eastwood Drive\",\n \"street_address_line_2\": \"\",\n \"technician\": true,\n \"vehicle_operator\": true,\n \"work_phone_number\": \"(123) 033-8868\",\n \"hourly_labor_rate\": 100.0,\n \"custom_fields\": {\n \"driver_license_class\": \"\",\n \"certification\": \"\",\n \"type_of_contact\": \"\",\n \"region\": \"LA\",\n \"vehicle_type\": \"false\",\n \"second_test\": \"false\"\n },\n \"default_image_url\": \"https://d3mgxxlx76tp6w.cloudfront.net/api/file/pc3SG7XwTN2sb4kFDzD6\",\n \"user\": null,\n \"created_at\": \"2013-09-12T06:15:24.922-05:00\",\n \"updated_at\": \"2017-11-08T13:48:09.040-06:00\"\n }\n}", "language": "json" } ] } [/block] [block:api-header] { "title": "Fuel Entry Events" } [/block] [block:parameters] { "data": { "0-0": "`fuel_entry_created`", "0-1": "Fired when a fuel entry is created.", "1-0": "`fuel_entry_updated`", "1-1": "Fired when a fuel entry is updated.", "2-0": "`fuel_entry_deleted`", "2-1": "Fired when a fuel entry is deleted. The payload will contain the fuel entry's attributes before it was deleted", "3-1": "Fired when a comment is made on a fuel entry.", "3-0": "`fuel_entry_comment_added`" }, "cols": 2, "rows": 4 } [/block] Example payload for all fuel entry events: [block:code] { "codes": [ { "code": "{\n \"id\": 1,\n \"event\": \"fuel_entry_created\",\n \"timestamp\": \"2017-11-01T11:41:15.771-05:00\",\n \"payload\": {\n \"id\": 1,\n \"cost_per_hr\": null,\n \"cost_per_km\": 0.001,\n \"cost_per_mi\": 0.001,\n \"custom_fields\": {\n \"card_number\": \"\",\n \"expense_type\": \"\",\n \"fuel_unit_number\": \"\",\n \"fuel-up_state\": \"\",\n \"last_fill_up\": \"\",\n \"used_card\": \"false\",\n \"second_tank_gallons\": \"\"\n },\n \"date\": \"2017-10-31T11:40:00.000-05:00\",\n \"external_id\": null,\n \"fuel_type_id\": 1,\n \"fuel_type_name\": \"Unleaded\",\n \"kpl\": 1837.6,\n \"liters\": 18.927,\n \"liters_per_hr\": null,\n \"lp100k\": 0.1,\n \"mpg_uk\": 5191.2,\n \"mpg_us\": 4322.2,\n \"partial\": false,\n \"personal\": false,\n \"price_per_volume_unit\": 5.0,\n \"raw_transaction_data\": null,\n \"reference\": \"\",\n \"region\": null,\n \"reset\": false,\n \"uk_gallons\": 4.163,\n \"uk_gallons_per_hr\": null,\n \"us_gallons\": 5.0,\n \"us_gallons_per_hr\": null,\n \"usage_in_hr\": null,\n \"usage_in_km\": 34779.5,\n \"usage_in_mi\": 21611.0,\n \"vehicle_id\": 153,\n \"vehicle_name\": \"0M4HH0 - 2011 Ford F150\",\n \"vendor_id\": null,\n \"vendor_name\": null,\n \"images_count\": 0,\n \"documents_count\": 0,\n \"comments_count\": 0,\n \"total_amount\": 25.0,\n \"meter_entry\": {\n \"id\": 1,\n \"auto_voided_at\": null,\n \"category\": null,\n \"date\": \"2017-10-31\",\n \"meter_type\": null,\n \"meterable_id\": 1,\n \"meterable_type\": \"FuelEntry\",\n \"value\": 110111.0,\n \"vehicle_id\": 1,\n \"void\": false,\n \"type\": null,\n \"created_at\": \"2017-11-01T11:41:09.299-05:00\",\n \"updated_at\": \"2017-11-01T11:41:09.299-05:00\"\n },\n \"geolocation\": {\n },\n \"images\": [\n\n ],\n \"map_previews\": {\n \"small\": null,\n \"large\": null,\n \"small_short\": null,\n \"large_short\": null\n },\n \"created_at\": \"2017-11-01T11:41:09.288-05:00\",\n \"updated_at\": \"2017-11-01T11:41:09.288-05:00\"\n }\n}", "language": "json" } ] } [/block] [block:api-header] { "title": "Issue Events" } [/block] [block:parameters] { "data": { "0-0": "`issue_created`", "0-1": "Fired when an issue is created.", "1-0": "`issue_updated`", "1-1": "Fired when an issue is updated.", "2-0": "`issue_deleted`", "2-1": "Fired when an issue is deleted. The payload will contain the issue's attributes before deletion.", "3-0": "`issue_resolved`", "3-1": "Fired when an issue is resolved.", "4-0": "`issue_closed`", "4-1": "Fired when an issue is closed.", "5-0": "`issue_comment_added`", "5-1": "Fired when a comment is made on an issue." }, "cols": 2, "rows": 6 } [/block] Example payload for all issue events: [block:code] { "codes": [ { "code": "{\n \"id\": 1,\n \"event\": \"issue_resolved\",\n \"timestamp\": \"2017-11-08T13:56:02.999-06:00\",\n \"payload\": {\n \"id\": 1,\n \"custom_fields\": {\n },\n \"number\": \"#138\",\n \"name\": \"[Inspection] Transmission\",\n \"summary\": \"[Inspection] Transmission\",\n \"description\": \"Generated by the failed inspection item \\\"Transmission\\\" on the \\\"DVIR\\\" form submitted by Demo User on Aug 7, 2017 at 12:16 PM\",\n \"state\": \"Resolved\",\n \"reported_at\": \"2017-08-07T14:16:45.861-05:00\",\n \"reported_by_id\": 1,\n \"reported_by_name\": \"Demo User\",\n \"due_date\": null,\n \"due_meter_value\": null,\n \"due_secondary_meter_value\": null,\n \"vehicle_id\": 1,\n \"vehicle_name\": \"1M6N90 - 2000 Toyota 4Runner\",\n \"images_count\": 0,\n \"documents_count\": 1,\n \"comments_count\": 0,\n \"assigned_contacts\": [\n\n ],\n \"reported_by\": {\n \"id\": 1,\n \"name\": \"Demo User\",\n \"first_name\": \"Demo\",\n \"group_id\": null,\n \"group_name\": null,\n \"last_name\": \"User\",\n \"user_id\": null,\n \"default_image_url\": \"\",\n \"user\": {\n \"id\": 1,\n \"email\": \"demo@fleetio.com\",\n \"username\": \"demo\",\n \"time_zone\": \"Central Time (US & Canada)\"\n },\n \"created_at\": \"2017-04-22T07:18:23.153-05:00\",\n \"updated_at\": \"2017-06-08T11:14:14.334-05:00\"\n },\n \"labels\": [\n\n ],\n \"images\": [\n\n ],\n \"comments\": [\n\n ],\n \"created_at\": \"2017-08-07T14:16:50.585-05:00\",\n \"updated_at\": \"2017-11-08T13:56:02.925-06:00\",\n \"overdue\": false\n }\n}", "language": "json" } ] } [/block] [block:api-header] { "title": "DTC Alert Events" } [/block] [block:parameters] { "data": { "0-0": "`dtc_alert_created`", "0-1": "Fired when a DTC alert is created.", "1-0": "`dtc_alert_resolved`", "1-1": "Fired when a DTC alert is resolved." }, "cols": 2, "rows": 2 } [/block] Example payload for all DTC alert events: [block:code] { "codes": [ { "code": "{\n \"id\": 1,\n \"event\": \"dtc_alert_resolved\",\n \"timestamp\": \"2017-11-08T13:35:17.755-06:00\",\n \"payload\": {\n \"id\": 1,\n \"name\": \"Low Tire Pressure\",\n \"description\": \"Aliquam commodo dolor nec diam bibendum porta. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam commodo cursus sollicitudin. Vestibulum ac luctus enim. Sed tristique viverra pharetra. Curabitur pretium, nisi vel fermentum aliquet, mi odio laoreet metus, sodales scelerisque leo nisi in justo. Mauris quis risus nec turpis rhoncus porta. Vestibulum lobortis elit nibh, in accumsan augue maximus vitae. Curabitur gravida dolor vitae urna iaculis, at efficitur massa tempor.\",\n \"code\": \"P0447\",\n \"count\": 5,\n \"account_id\": 1,\n \"vehicle_id\": 1,\n \"external_id\": null,\n \"last_occurred_at\": \"2015-09-09T21:43:38.726-05:00\",\n \"status\": \"resolved\",\n \"archived_at\": null,\n \"created_at\": \"2015-09-30T14:48:08.199-05:00\",\n \"updated_at\": \"2017-11-08T13:28:08.094-06:00\"\n }\n}", "language": "json" } ] } [/block] [block:api-header] { "title": "Service Entry Events" } [/block] [block:parameters] { "data": { "0-0": "`service_entry_created`", "0-1": "Fired when a service entry is created.", "1-0": "`service_entry_updated`", "1-1": "Fired when a service entry is updated.", "2-0": "`service_entry_deleted`", "2-1": "Fired when a service entry is deleted. The payload will contain the attributes of the service entry before it was deleted.", "3-0": "`service_entry_comment_added`", "3-1": "Fired when a comment is made on a service entry." }, "cols": 2, "rows": 4 } [/block] Example payload for all service entry events: [block:code] { "codes": [ { "code": "{\n \"id\": 1,\n \"event\": \"service_entry_created\",\n \"timestamp\": \"2017-11-08T13:56:02.955-06:00\",\n \"payload\": {\n \"id\": 1,\n \"reference\": \"\",\n \"vendor_id\": null,\n \"vendor_name\": null,\n \"vehicle_id\": 1,\n \"vehicle_name\": \"1M6N90 - 2000 Toyota 4Runner\",\n \"images_count\": 0,\n \"documents_count\": 0,\n \"comments_count\": 0,\n \"work_order_id\": null,\n \"custom_fields\": {\n \"id_number\": \"\"\n },\n \"work_order_number\": null,\n \"date\": \"2017-11-08\",\n \"tax_1_type\": \"percentage\",\n \"tax_1_percentage\": 0.0,\n \"tax_2_type\": \"percentage\",\n \"tax_2_percentage\": 0.0,\n \"labor_subtotal\": 0.0,\n \"parts_subtotal\": 0.0,\n \"tax_2\": 0.0,\n \"total_amount\": 0.0,\n \"service_tasks\": [\n\n ],\n \"issues\": [\n {\n \"id\": 167246,\n \"custom_fields\": {\n },\n \"number\": \"#138\",\n \"name\": \"[Inspection] Transmission\",\n \"summary\": \"[Inspection] Transmission\",\n \"description\": \"Generated by the failed inspection item \\\"Transmission\\\" on the \\\"DVIR\\\" form submitted by Demo User on Aug 7, 2017 at 12:16 PM\",\n \"state\": \"Resolved\",\n \"reported_at\": \"2017-08-07T14:16:45.861-05:00\",\n \"reported_by_id\": 88607,\n \"reported_by_name\": \"Demo User\",\n \"due_date\": null,\n \"due_meter_value\": null,\n \"due_secondary_meter_value\": null,\n \"vehicle_id\": 53793,\n \"vehicle_name\": \"1M6N90 - 2000 Toyota 4Runner\",\n \"images_count\": 0,\n \"documents_count\": 1,\n \"comments_count\": 0,\n \"assigned_contacts\": [\n\n ],\n \"reported_by\": {\n \"id\": 1,\n \"name\": \"Demo User\",\n \"first_name\": \"Demo\",\n \"group_id\": null,\n \"group_name\": null,\n \"last_name\": \"User\",\n \"user_id\": null,\n \"default_image_url\": \"\",\n \"user\": {\n \"id\": 1,\n \"email\": \"demo@fleetio.com\",\n \"username\": \"demo\",\n \"time_zone\": \"Central Time (US & Canada)\"\n },\n \"created_at\": \"2017-04-22T07:18:23.153-05:00\",\n \"updated_at\": \"2017-06-08T11:14:14.334-05:00\"\n },\n \"labels\": [\n\n ],\n \"images\": [\n\n ],\n \"comments\": [\n\n ],\n \"created_at\": \"2017-08-07T14:16:50.585-05:00\",\n \"updated_at\": \"2017-11-08T13:56:02.925-06:00\",\n \"overdue\": false,\n \"attachment_permissions\": {\n }\n }\n ],\n \"meter_entry\": {\n \"id\": 1,\n \"auto_voided_at\": null,\n \"category\": null,\n \"date\": \"2017-11-08\",\n \"meter_type\": null,\n \"meterable_id\": 1601811,\n \"meterable_type\": \"ServiceEntry\",\n \"value\": 112000.0,\n \"vehicle_id\": 1,\n \"void\": false,\n \"type\": null,\n \"created_at\": \"2017-11-08T13:56:02.679-06:00\",\n \"updated_at\": \"2017-11-08T13:56:02.679-06:00\"\n },\n \"secondary_meter_entry\": {\n \"id\": 1,\n \"auto_voided_at\": null,\n \"category\": null,\n \"date\": \"2017-11-08\",\n \"meter_type\": \"secondary\",\n \"meterable_id\": 1,\n \"meterable_type\": \"ServiceEntry\",\n \"value\": 28.0,\n \"vehicle_id\": 1,\n \"void\": false,\n \"type\": null,\n \"created_at\": \"2017-11-08T13:56:02.757-06:00\",\n \"updated_at\": \"2017-11-08T13:56:02.757-06:00\"\n },\n \"images\": [\n\n ],\n \"created_at\": \"2017-11-08T13:56:02.671-06:00\",\n \"updated_at\": \"2017-11-08T13:56:02.671-06:00\"\n }\n}", "language": "json" } ] } [/block] [block:api-header] { "title": "Inspection Submission Events" } [/block] [block:parameters] { "data": { "0-0": "`submitted_inspection_form_created`", "0-1": "Fired when an inspection is submitted.", "1-0": "`submitted_inspection_form_deleted`", "1-1": "Fired when an inspection is deleted." }, "cols": 2, "rows": 2 } [/block] Example payload for all inspection submission events: [block:code] { "codes": [ { "code": "{\n \"id\": 1,\n \"event\": \"submitted_inspection_form_created\",\n \"timestamp\": \"2017-11-08T14:12:22.390-06:00\",\n \"payload\": {\n \"id\": 1,\n \"submitted_at\": \"2017-08-07T14:16:45.861-05:00\",\n \"failed_items\": 1,\n \"vehicle_id\": 1,\n \"duration\": \"2 minutes\",\n \"inspection_form\": {\n \"id\": 1,\n \"title\": \"DVIR\",\n \"description\": \"Standard checklist for road-readiness and safety\"\n },\n \"date\": \"August 7, 2017\",\n \"user\": \"Demo User\",\n \"comments_count\": 1,\n \"images_count\": 1,\n \"submitted_inspection_items\": [\n {\n \"result\": {\n },\n \"id\": 1,\n \"comments_count\": 0,\n \"images_count\": 0,\n \"submitted_inspection_form_id\": 383108,\n \"inspection_item\": {\n \"label\": \"Odometer Reading\",\n \"type\": \"InspectionMeterEntryItem\",\n \"fail_label\": null,\n \"pass_label\": null\n },\n \"comments\": [\n\n ],\n \"images\": [\n\n ],\n \"meter_entry_value\": 112000.0,\n \"secondary_meter_entry_value\": 28.0\n },\n ...\n ]\n }\n}", "language": "json" } ] } [/block] [block:api-header] { "title": "Meter Entry Events" } [/block] Meter entry events are only fired on **manual** meter entries (e.g. ones that are not associated with another resource, such as a fuel entry or service entry). [block:parameters] { "data": { "0-0": "`meter_entry_created`", "0-1": "Fired when a manual meter entry is created.", "1-0": "`meter_entry_updated`", "1-1": "Fired when a manual meter entry is updated.", "2-0": "`meter_entry_deleted`", "2-1": "Fired when a manual meter entry is deleted. The payload will contain the meter entry's attributes before deletion." }, "cols": 2, "rows": 3 } [/block] Example payload for all meter entry events: [block:code] { "codes": [ { "code": "{\n \"id\": 1,\n \"event\": \"meter_entry_created\",\n \"timestamp\": \"2017-11-08T14:23:19.509-06:00\",\n \"payload\": {\n \"id\": 1,\n \"auto_voided_at\": null,\n \"category\": null,\n \"meter_type\": null,\n \"meterable_id\": null,\n \"meterable_type\": null,\n \"value\": 112111.0,\n \"vehicle_id\": 1,\n \"void\": false,\n \"type\": null,\n \"date\": \"2017-11-08\",\n \"created_at\": \"2017-11-08T14:23:19.366-06:00\",\n \"updated_at\": \"2017-11-08T14:23:19.366-06:00\"\n }\n}", "language": "json" } ] } [/block] [block:api-header] { "title": "Part Events" } [/block] [block:parameters] { "data": { "0-0": "`part_created`", "0-1": "Fired when a part is created.", "1-0": "`part_updated`", "1-1": "Fired when a part is updated.", "2-0": "`part_deleted`", "2-1": "Fired when a part is deleted. The payload will contain the part's attributes before deletion.", "3-0": "`part_comment_added`", "3-1": "Fired when a comment is made on a part." }, "cols": 2, "rows": 4 } [/block] Example payload for all part events: [block:code] { "codes": [ { "code": "{\n \"id\": 1,\n \"event\": \"part_created\",\n \"timestamp\": \"2017-11-06T08:36:04.780-06:00\",\n \"payload\": {\n \"id\": 1,\n \"description\": \"\",\n \"manufacturer_part_number\": \"\",\n \"measurement_unit_id\": null,\n \"number\": \"part\",\n \"part_category_id\": null,\n \"part_manufacturer_id\": null,\n \"upc\": \"\",\n \"total_quantity\": 0,\n \"custom_fields\": {\n \"warranty\": \"\",\n \"use_for_service_task\": \"\"\n },\n \"inventory_item\": false,\n \"part_category_name\": null,\n \"part_manufacturer_name\": null,\n \"measurement_unit_name\": null,\n \"default_image_url\": null,\n \"default_image_url_medium\": null,\n \"default_image_url_small\": null,\n \"default_image_url_large\": null,\n \"unit_cost\": null,\n \"part_locations\": [\n\n ],\n \"created_at\": \"2017-11-06T08:36:04.584-06:00\",\n \"updated_at\": \"2017-11-06T08:36:04.710-06:00\"\n }\n}", "language": "json" } ] } [/block] [block:api-header] { "title": "Place Events" } [/block] [block:parameters] { "data": { "0-0": "`place_created`", "0-1": "Fired when a place is created.", "1-0": "`place_updated`", "1-1": "Fired when a place is updated.", "2-0": "`place_deleted`", "2-1": "Fired when a place is deleted. The payload will contain the place's attributes before deletion.", "3-0": "`place_visited`", "3-1": "Fired when a place is visited." }, "cols": 2, "rows": 4 } [/block] Example payload for all place events: [block:code] { "codes": [ { "code": "{\n \"id\": 1,\n \"event\": \"place_created\",\n \"timestamp\": \"2017-11-08T19:12:19.225-06:00\",\n \"payload\": {\n \"id\": 1,\n \"name\": \"Antarctica\",\n \"address\": \"Antarctica\",\n \"description\": \"Best place in the world\",\n \"place_visits_count\": 0,\n \"radius_in_meters\": 100,\n \"created_at\": \"2017-11-08T19:12:19.193-06:00\",\n \"updated_at\": \"2017-11-08T19:12:19.193-06:00\"\n }\n}", "language": "json" } ] } [/block] [block:api-header] { "title": "Purchase Order Events" } [/block] [block:parameters] { "data": { "0-0": "`purchase_order_created`", "0-1": "Fired when a purchase order is created.", "1-0": "`purchase_order_updated`", "1-1": "Fired when a purchase order is updated. This event is not fired when the purchase order state changes.", "2-0": "`purchase_order_pending_approval`", "2-1": "Fired when a purchase order enters the pending approval state.", "7-0": "`purchase_order_deleted`", "7-1": "Fired when a purchase order is deleted. The payload will contain the purchase order's attributes before deletion.", "3-0": "`purchase_order_approved`", "3-1": "Fired when a purchase order is approved.", "4-0": "`purchase_order_purchased`", "4-1": "Fired when a purchase order is marked as purchased.", "5-0": "`purchase_order_received`", "5-1": "Fired when a purchase order is fully received.", "6-0": "`purchase_order_closed`", "6-1": "Fired when a purchase order is closed.", "8-0": "`purchase_order_comment_added`", "8-1": "Fired when a comment is made on a purchase order." }, "cols": 2, "rows": 9 } [/block] Example payload for all purchase order events: [block:code] { "codes": [ { "code": "{\n \"id\": 1,\n \"event\": \"purchase_order_updated\",\n \"timestamp\": \"2017-11-06T13:43:18.788-06:00\",\n \"payload\": {\n \"id\": 1,\n \"number\": 123,\n \"custom_fields\": {\n \"fet\": \"\"\n },\n \"description\": \"\",\n \"label_list\": [\n\n ],\n \"submitted_for_approval_at\": null,\n \"rejected_at\": null,\n \"approved_at\": \"2017-11-06T13:38:34.998-06:00\",\n \"purchased_at\": \"2017-11-06T13:38:37.807-06:00\",\n \"received_partial_at\": null,\n \"received_full_at\": \"2017-11-06T13:41:41.424-06:00\",\n \"closed_at\": \"2017-11-06T13:43:18.658-06:00\",\n \"state\": \"closed\",\n \"documents_count\": 0,\n \"comments_count\": 0,\n \"created_at\": \"2017-11-06T13:28:15.713-06:00\",\n \"updated_at\": \"2017-11-06T13:43:18.680-06:00\",\n \"discount_percentage\": 0.0,\n \"discount_type\": \"percentage\",\n \"tax_1_percentage\": null,\n \"tax_1_type\": \"percentage\",\n \"tax_2_percentage\": null,\n \"tax_2_type\": \"percentage\",\n \"discount\": 0.0,\n \"subtotal\": 275.0,\n \"shipping\": 0.0,\n \"tax_1\": 0.0,\n \"tax_2\": 0.0,\n \"total_amount\": 275.0,\n \"part_location_id\": 1,\n \"vendor_id\": 1,\n \"part_location_name\": \"Birmingham\",\n \"vendor_name\": \"WAYNE ENTERPRISES\",\n \"created_by\": \"Demo User\",\n \"approved_by\": \"Demo User\",\n \"purchased_by\": \"Demo User\",\n \"received_full_by\": \"Demo User\",\n \"closed_by\": \"Demo User\",\n \"purchase_order_line_items\": [\n {\n \"id\": 1,\n \"part_id\": 1,\n \"quantity\": 55.0,\n \"total_quantity_received\": 55.0,\n \"part_number\": \"Fleetio T-Shirt - Size L\",\n \"unit_cost\": 5.0,\n \"subtotal\": 275.0,\n \"created_at\": \"2017-11-06T13:28:15.766-06:00\",\n \"updated_at\": \"2017-11-06T13:41:40.923-06:00\"\n }\n ]\n }\n}", "language": "json" } ] } [/block] [block:api-header] { "title": "Work Order Events" } [/block] [block:parameters] { "data": { "0-0": "`work_order_created`", "0-1": "Fired when a work order is created.", "1-0": "`work_order_updated`", "1-1": "Fired when a work order is updated.", "2-0": "`work_order_deleted`", "2-1": "Fired when a work order is updated. The payload will contain the work order's attributes before deletion.", "3-0": "`work_order_status_changed`", "3-1": "Fired when the status of a work order changes.", "4-0": "`work_order_comment_added`", "4-1": "Fired when a comment is made on a work order." }, "cols": 2, "rows": 5 } [/block] Example payload for all work order events: [block:code] { "codes": [ { "code": "{\n \"id\": 1,\n \"event\": \"work_order_created\",\n \"timestamp\": \"2017-11-06T08:47:07.803-06:00\",\n \"payload\": {\n \"id\": 1,\n \"number\": \"#1\",\n \"completed_at\": null,\n \"custom_fields\": {\n \"external_wo_number\": \"\",\n \"gl_code\": \"\",\n \"third-party_repair\": \"false\",\n \"work_order_facility\": \"\"\n },\n \"description\": \"description\",\n \"downtime_in_seconds\": null,\n \"invoice_number\": \"\",\n \"issued_at\": \"2017-11-06T00:00:00.000-06:00\",\n \"issued_by_id\": null,\n \"issued_by_name\": null,\n \"contact_id\": null,\n \"contact_name\": null,\n \"purchase_order_number\": \"\",\n \"started_at\": \"2017-11-07T00:00:00.000-06:00\",\n \"vehicle_id\": 153,\n \"vehicle_name\": \"0M4HH0 - 2011 Ford F150\",\n \"vendor_id\": null,\n \"vendor_name\": null,\n \"work_order_status_id\": 1,\n \"work_order_status_name\": \"Open\",\n \"documents_count\": 0,\n \"images_count\": 0,\n \"comments_count\": 0,\n \"work_order_line_items\": [\n {\n \"id\": 1,\n \"description\": \"\",\n \"item_id\": 1,\n \"item_type\": \"ServiceTask\",\n \"work_order_line_item_id\": null,\n \"item_name\": \"3m sprayer inlet hose replaced\",\n \"created_at\": \"2017-11-06T08:47:07.764-06:00\",\n \"updated_at\": \"2017-11-06T08:47:07.764-06:00\"\n }\n ],\n \"meter_entry\": {\n \"id\": 1,\n \"auto_voided_at\": null,\n \"category\": null,\n \"date\": \"2017-11-07\",\n \"meter_type\": null,\n \"meterable_id\": 1,\n \"meterable_type\": \"WorkOrder\",\n \"value\": 110111.0,\n \"vehicle_id\": 1,\n \"void\": false,\n \"type\": null,\n \"created_at\": \"2017-11-06T08:47:07.636-06:00\",\n \"updated_at\": \"2017-11-06T08:47:07.636-06:00\"\n },\n \"created_at\": \"2017-11-06T08:47:07.622-06:00\",\n \"updated_at\": \"2017-11-06T08:47:07.622-06:00\"\n }\n}", "language": "json" } ] } [/block] [block:api-header] { "title": "Trip Events" } [/block] [block:parameters] { "data": { "0-0": "`trip_started`", "0-1": "Fired when a trip is started.", "1-0": "`trip_ended`", "1-1": "Fired when a trip is ended.", "2-0": "`trip_scored`", "2-1": "Fired when a trip is scored.", "3-0": "`trip_deleted`", "3-1": "Fired when a trip is deleted. The payload will contain the trip's attributes before deletion." }, "cols": 2, "rows": 4 } [/block] Example payload for all trip events: [block:code] { "codes": [ { "code": "{\n \"id\": 1,\n \"event\": \"trip_started\",\n \"timestamp\": \"2017-11-06T14:28:06.942-06:00\",\n \"payload\": {\n \"id\": 1,\n \"account_id\": 1,\n \"vehicle_id\": null,\n \"contact_id\": null,\n \"started_at\": \"2017-07-13T07:27:58.000-05:00\",\n \"ended_at\": \"2017-07-13T07:31:09.000-05:00\",\n \"purpose\": null,\n \"distance_in_mi\": 1.237771032,\n \"distance_in_km\": 1.992,\n \"average_speed_in_km\": 39.81863,\n \"created_at\": \"2017-07-13T07:28:08.692-05:00\",\n \"updated_at\": \"2017-07-13T07:33:37.582-05:00\",\n \"type\": \"AutomaticTrip\",\n \"trip_purpose_id\": null,\n \"classification\": null,\n \"start_address\": \"1020-1058 Richard Arrington Jr Blvd S, Birmingham, AL 35205, USA\",\n \"start_latitude\": 33.5013888189418,\n \"start_longitude\": -86.7950780125179,\n \"end_address\": \"113-175 19th St N, Birmingham, AL 35203, USA\",\n \"end_latitude\": 33.514485688231,\n \"end_longitude\": -86.8074786102452,\n \"account_membership_id\": 451,\n \"session_id\": \"NA\",\n \"tracking_id\": \"NA\",\n \"external_id\": \"1499948878052\",\n \"cautious_score\": 84,\n \"fuel_efficiency_score\": -1,\n \"control_score\": 72,\n \"focused_score\": 72,\n \"zendrive_score\": 76,\n \"speed_profile\": [\n\n ],\n \"cancelled\": false,\n \"deleted_at\": null,\n \"phone_use_count\": 0,\n \"over_speeding_count\": 0,\n \"aggressive_acceleration_count\": 0,\n \"hard_brake_count\": 0,\n \"start_address_components\": {\n \"street_number\": \"1020-1058\",\n \"street\": \"Richard Arrington Junior Boulevard South\",\n \"city\": \"Birmingham\",\n \"state\": \"Alabama\",\n \"state_short\": \"AL\",\n \"country\": \"United States\",\n \"country_short\": \"US\",\n \"postal_code\": \"35205\"\n },\n \"end_address_components\": {\n \"street_number\": \"113-175\",\n \"street\": \"19th Street North\",\n \"city\": \"Birmingham\",\n \"state\": \"Alabama\",\n \"state_short\": \"AL\",\n \"country\": \"United States\",\n \"country_short\": \"US\",\n \"postal_code\": \"35203\"\n },\n \"max_speed_in_mi\": 43.20464391368,\n \"phone_use_duration_in_seconds\": 0,\n \"over_speeding_duration_in_seconds\": 0,\n \"next_trip_id\": null,\n \"previous_trip_id\": 97503,\n \"seconds_until_next_trip\": null,\n \"seconds_since_last_trip\": 620,\n \"mobile_device_id\": 145,\n \"app_version\": \"1.12.0\",\n \"os_version\": \"10.3.2\",\n \"max_speed_in_km\": 69.5311344546174,\n \"drive_type\": \"drive\",\n \"user_mode\": \"passenger\",\n \"last_location\": {\n \"latitude\": 33.51448568823102,\n \"longitude\": -86.80747861024521,\n \"date\": \"2017-07-13T07:31:09-05:00\",\n \"time_millis\": 1499949069998,\n \"speed_in_mph\": 0.02948734308,\n \"speed_limit\": \"NA\"\n },\n \"archived_at\": null,\n \"is_sample\": false,\n \"encoded_polyline\": \"ufnkEfdwpOcrAzv@gAn@N`BpExKAhAcA\\\\u@`@HA\",\n \"excessive_speeding_polylines\": [\n\n ],\n \"trip_events\": [\n\n ],\n \"image\": \"\",\n \"start_image\": \"\",\n \"end_image\": \"\",\n \"hard_brake_duration_in_seconds\": 0,\n \"aggressive_acceleration_duration_in_seconds\": 0,\n \"in_progress\": false,\n \"processing\": false,\n \"processing_delayed\": false,\n \"processing_failed\": false\n }\n}", "language": "json" } ] } [/block] [block:api-header] { "title": "Vehicle Assignment Events" } [/block] [block:parameters] { "data": { "0-0": "`vehicle_assignment_created`", "0-1": "Fired when a vehicle assignment is created.", "2-0": "`vehicle_assignment_deleted`", "2-1": "Fired when a vehicle assignment is deleted.", "1-0": "`vehicle_assignment_updated`", "1-1": "Fired when a vehicle assignment is updated." }, "cols": 2, "rows": 3 } [/block] Example payload for vehicle assignment events: [block:code] { "codes": [ { "code": "{\n \"id\": 12345,\n \"event\": \"vehicle_assignment_deleted\",\n \"timestamp\": \"2018-05-17T13:42:37.228-05:00\",\n \"payload\": {\n \"id\": 212535,\n \"vehicle_id\": 28848,\n \"contact_id\": 266,\n \"started_at\": \"2018-05-16T00:00:00.000-05:00\",\n \"ended_at\": \"2018-05-17T10:00:00.000-05:00\",\n \"starting_meter_entry_value\": null,\n \"ending_meter_entry_value\": null,\n \"created_at\": \"2018-05-17T13:40:56.145-05:00\",\n \"updated_at\": \"2018-05-17T13:41:10.244-05:00\",\n \"comments_count\": 0,\n \"current\": false,\n \"future\": false,\n \"contact_full_name\": \"Jorge Ninja\",\n \"contact_image_url\": null,\n \"custom_fields\": {\n \"purpose\": \"\"\n }\n }\n}", "language": "json" } ] } [/block] [block:api-header] { "title": "Vendor Events" } [/block] [block:parameters] { "data": { "0-0": "`vendor_created`", "0-1": "Fired when a vendor is created.", "1-0": "`vendor_updated`", "1-1": "Fired when a vendor is updated.", "2-0": "`vendor_deleted`", "2-1": "Fired when a vendor is deleted. The payload will contain the vendor's attributes before deletion.", "3-0": "`vendor_comment_added`", "3-1": "Fired when a comment is made on a vendor." }, "cols": 2, "rows": 4 } [/block] Example payload for all vendor events: [block:code] { "codes": [ { "code": "{\n \"id\": 1,\n \"event\": \"vendor_updated\",\n \"timestamp\": \"2017-11-09T11:49:05.583-06:00\",\n \"payload\": {\n \"id\": 1,\n \"city\": \"\",\n \"contact_email\": \"\",\n \"contact_name\": \"\",\n \"contact_phone\": \"\",\n \"country\": \"\",\n \"custom_fields\": {\n },\n \"external_id\": null,\n \"latitude\": null,\n \"longitude\": null,\n \"name\": \"Jorge\",\n \"phone\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street_address\": \"\",\n \"street_address_line_2\": \"\",\n \"website\": \"\",\n \"created_at\": \"2017-05-25T08:46:04.016-05:00\",\n \"updated_at\": \"2017-11-09T11:49:05.545-06:00\"\n }\n}", "language": "json" } ] } [/block] [block:api-header] { "title": "Import Events" } [/block] When importing data, regular webhook events are not fired, due to the volume of events that could potentially be generated. Instead, you must listen for the `import_completed` event and find out which objects were updated or created. [block:parameters] { "data": { "0-0": "`import_completed`", "0-1": "Fired when an import is completed, whether successfully or not. You can check the `state` attribute to determine if the import was successful or not. \n\nA state of `complete` indicates success. A state of `failed` indicates something failed. You can then go through the `error_messages` array to see exactly what failed.\n\nOn success, the `created_record_ids` and `updated_record_ids` arrays will contain the IDs of the records that were either created or updated." }, "cols": 2, "rows": 1 } [/block] Example payload for all import events: [block:code] { "codes": [ { "code": "{\n \"id\": 1,\n \"event\": \"import_completed\",\n \"timestamp\": \"2017-11-02T18:15:56.038-05:00\",\n \"payload\": {\n \"id\": 1,\n \"created_record_ids\": [\n \"123\"\n ],\n \"updated_record_ids\": [\n\n ],\n \"affected_record_ids\": [\n 123\n ],\n \"completed_at\": null,\n \"state\": \"processing\",\n \"created_at\": \"2017-11-02T18:14:59.848-05:00\",\n \"updated_at\": \"2017-11-02T18:15:36.052-05:00\",\n \"error_messages\": [\n\n ],\n \"type\": \"VehicleImport\"\n }\n}", "language": "json" } ] } [/block]