PowerPlatformConnectors/certified-connectors/Fleetio/apiDefinition.swagger.json

1498 строки
43 KiB
JSON

{
"swagger": "2.0",
"info": {
"title": "Fleetio",
"description": "Fleetio's connector allows you to extra data from the Fleetio API",
"version": "1.0",
"contact": {
"name": "Fleetio",
"url": "https://help.fleetio.com",
"email": "help@fleetio.com"
}
},
"host": "secure.fleetio.com",
"basePath": "/api",
"schemes": [
"https"
],
"produces": [
"application/json"
],
"paths": {
"/v2/issues": {
"get": {
"responses": {
"200": {
"description": "Success response",
"schema": {
"type": "object",
"properties": {
"asset_type": {
"type": "string"
},
"name": {
"type": "string"
},
"closed_at": {
"type": "string"
},
"closed_by": {
"properties": {
"id": {
"type": "number"
}
},
"type": "object"
},
"closed_note": {
"type": "string"
},
"comments_count": {
"type": "number"
},
"created_at": {
"type": "string"
},
"creation_type": {
"type": "string"
},
"description": {
"type": "string"
},
"documents_count": {
"type": "number"
},
"due_date": {
"type": "string"
},
"due_meter_value": {
"type": "number"
},
"due_secondary_meter_value": {
"type": "string"
},
"equipment": {
"type": "object"
},
"attachment_permissions": {
"type": "object"
},
"external_id": {
"type": "number"
},
"fault_id": {
"type": "number"
},
"fault": {
"properties": {
"id": {
"type": "number"
}
},
"type": "object"
},
"fault_rule": {
"type": "object"
},
"id": {
"type": "number"
},
"images_count": {
"type": "number"
},
"number": {
"type": "string"
},
"reported_at": {
"type": "string"
},
"reported_by": {
"properties": {
"id": {
"type": "number"
},
"name": {
"type": "string"
},
"default_image_url": {
"type": "string"
}
},
"type": "object"
},
"due_primary_meter_value": {
"type": "string"
},
"overdue": {
"type": "boolean"
},
"resolvable_id": {
"type": "number"
},
"resolvable": {
"properties": {
"id": {
"type": "number"
}
},
"type": "object"
},
"resolvable_type": {
"type": "string"
},
"resolved_at": {
"type": "string"
},
"state": {
"type": "string"
},
"submitted_inspection_form_id": {
"type": "number"
},
"submitted_inspection_form": {
"properties": {
"id": {
"type": "number"
}
},
"type": "object"
},
"summary": {
"type": "string"
},
"vehicle": {
"type": "object"
},
"updated_at": {
"type": "string"
},
"watchers_count": {
"type": "number"
}
}
}
}
},
"summary": "List Current Issues",
"operationId": "ListCurrentIssues",
"parameters": [],
"description": "Retrieves a list of current issues",
"x-ms-visibility": "internal"
}
},
"/v2/service_entries": {
"get": {
"responses": {
"200": {
"description": "Success response",
"schema": {
"type": "object",
"properties": {
"attachment_permissions": {
"type": "object"
},
"auto_integrate_repair_order_status": {
"type": "string"
},
"warranty_credits_cents": {
"type": "number"
},
"warranty_credits_percentage": {
"type": "string"
},
"warranty_credits_type": {
"type": "string"
},
"labor_subtotal_cents": {
"type": "number"
},
"parts_subtotal_cents": {
"type": "number"
},
"subtotal_cents": {
"type": "number"
},
"tax_1_cents": {
"type": "number"
},
"tax_2_cents": {
"type": "number"
},
"total_amount_cents": {
"type": "number"
},
"warrant_credits_cents": {
"type": "number"
},
"comments_count": {
"type": "number"
},
"completed_at": {
"type": "string"
},
"created_at": {
"type": "string"
},
"discount_percentage": {
"type": "string"
},
"fees_cents": {
"type": "number"
},
"discount_type": {
"type": "string"
},
"discount_cents": {
"type": "number"
},
"documents_count": {
"type": "number"
},
"general_notes": {
"type": "string"
},
"id": {
"type": "number"
},
"images_count": {
"type": "number"
},
"is_sample": {
"type": "boolean"
},
"labels": {
"items": {
"properties": {
"id": {
"type": "number"
},
"name": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"primary_meter_entry": {
"properties": {
"id": {
"type": "string"
},
"auto_voided_at": {
"type": "string"
},
"date": {
"type": "string"
},
"meter_type": {
"type": "string"
},
"meterable_id": {
"type": "number"
},
"meterable_type": {
"type": "string"
},
"value": {
"type": "string"
},
"void": {
"type": "boolean"
},
"type": {
"type": "string"
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
},
"secondary_meter_entry": {
"type": "object"
},
"reference": {
"type": "string"
},
"started_at": {
"type": "string"
},
"status": {
"type": "string"
},
"tax_1_percentage": {
"type": "string"
},
"tax_1_type": {
"type": "string"
},
"tax_2_percentage": {
"type": "string"
},
"tax_2_type": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"vehicle_id": {
"type": "number"
},
"vehicle": {
"properties": {
"id": {
"type": "number"
},
"name": {
"type": "string"
},
"color": {
"type": "string"
},
"license_plate": {
"type": "string"
},
"make": {
"type": "string"
},
"model": {
"type": "string"
},
"registration_expiration_month": {
"type": "number"
},
"registration_state": {
"type": "number"
},
"trim": {
"type": "string"
},
"vin": {
"type": "string"
},
"year": {
"type": "number"
},
"default_image_url_small": {
"type": "string"
}
},
"type": "object"
},
"vendor_id": {
"type": "number"
},
"vendor_name": {
"type": "string"
},
"vendor": {
"properties": {
"name": {
"type": "string"
},
"phone": {
"type": "string"
},
"city": {
"type": "string"
},
"region": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"country": {
"type": "string"
},
"external_id": {
"type": "string"
}
},
"type": "object"
},
"vmrs_repair_priority_class": {
"properties": {
"code": {
"type": "string"
},
"color": {
"type": "string"
},
"id": {
"type": "number"
},
"name": {
"type": "string"
}
},
"type": "object"
},
"work_order_id": {
"type": "number"
}
}
}
}
},
"summary": "List Current Service Entries",
"operationId": "ListCurrentServiceEntries",
"parameters": [],
"description": "Retrieves a list of current service entries",
"x-ms-visibility": "internal"
}
},
"/v1/submitted_inspection_forms": {
"get": {
"responses": {
"200": {
"description": "Success response",
"schema": {
"type": "object",
"properties": {
"date": {
"type": "string"
},
"failed_items": {
"type": "number"
},
"id": {
"type": "number"
},
"inspection_form": {
"properties": {
"description": {
"type": "string"
},
"id": {
"type": "number"
},
"title": {
"type": "string"
}
},
"type": "object"
},
"started_at": {
"type": "string"
},
"starting_latitude": {
"type": "number"
},
"starting_longitude": {
"type": "number"
},
"submitted_at": {
"type": "string"
},
"submitted_latitude": {
"type": "number"
},
"submitted_longitude": {
"type": "number"
},
"user": {
"properties": {
"id": {
"type": "number"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"group_id": {
"type": "number"
},
"default_image_url": {
"type": "string"
}
},
"type": "object"
},
"vehicle": {
"properties": {
"id": {
"type": "number"
},
"name": {
"type": "string"
},
"color": {
"type": "string"
},
"license_plate": {
"type": "string"
},
"make": {
"type": "string"
},
"model": {
"type": "string"
},
"registration_expiration_month": {
"type": "number"
},
"registration_state": {
"type": "number"
},
"trim": {
"type": "string"
},
"vin": {
"type": "string"
},
"year": {
"type": "number"
},
"default_image_url_small": {
"type": "string"
}
},
"type": "object"
}
}
}
}
},
"summary": "List Current Submitted Inspection Forms",
"operationId": "ListCurrentSubmittedInspectionForms",
"parameters": [],
"description": "Retrieves a list of current submitted inspection forms",
"x-ms-visibility": "internal"
}
},
"/v1/vehicles": {
"get": {
"responses": {
"200": {
"description": "Success response",
"schema": {
"properties": {
"account_id": {
"type": "number"
},
"archived_at": {
"type": "string"
},
"fuel_type_id": {
"type": "number"
},
"fuel_type_name": {
"type": "string"
},
"ai_enabled": {
"type": "boolean"
},
"assetable_type": {
"type": "string"
},
"color": {
"type": "string"
},
"comments_count": {
"type": "number"
},
"created_at": {
"type": "string"
},
"current_location_entry_id": {
"type": "number"
},
"default_image_url_small": {
"type": "string"
},
"external_ids": {
"type": "object"
},
"documents_count": {
"type": "number"
},
"estimated_replacement_mileage": {
"type": "string"
},
"estimated_resale_price_cents": {
"type": "number"
},
"estimated_service_months": {
"type": "number"
},
"fuel_entries_count": {
"type": "number"
},
"fuel_volume_units": {
"type": "string"
},
"group_ancestry": {
"type": "string"
},
"group_id": {
"type": "number"
},
"group_name": {
"type": "string"
},
"id": {
"type": "number"
},
"images_count": {
"type": "number"
},
"in_service_date": {
"type": "string"
},
"in_service_meter_value": {
"type": "string"
},
"is_sample": {
"type": "boolean"
},
"issues_count": {
"type": "number"
},
"labels": {
"type": "object"
},
"license_plate": {
"type": "string"
},
"make": {
"type": "string"
},
"model": {
"type": "string"
},
"name": {
"type": "string"
},
"out_of_service_date": {
"type": "string"
},
"out_of_service_meter_value": {
"type": "string"
},
"ownership": {
"type": "string"
},
"primary_meter_date": {
"type": "string"
},
"primary_meter_unit": {
"type": "string"
},
"primary_meter_usage_per_day": {
"type": "string"
},
"secondary_meter_unit": {
"type": "string"
},
"secondary_meter_date": {
"type": "string"
},
"primary_meter_value": {
"type": "string"
},
"registration_expiration_month": {
"type": "number"
},
"secondary_meter_usage_per_day": {
"type": "string"
},
"secondary_meter_value": {
"type": "string"
},
"service_entries_count": {
"type": "number"
},
"service_reminders_count": {
"type": "number"
},
"system_of_measurement": {
"type": "string"
},
"trim": {
"type": "string"
},
"registration_state": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"vehicle_renewal_reminders_count": {
"type": "number"
},
"vehicle_status_color": {
"type": "string"
},
"vehicle_status_id": {
"type": "number"
},
"vehicle_status_name": {
"type": "string"
},
"vehicle_type_id": {
"type": "number"
},
"vehicle_type_name": {
"type": "string"
},
"vin": {
"type": "string"
},
"work_orders_count": {
"type": "number"
},
"year": {
"type": "string"
}
},
"type": "object"
}
}
},
"summary": "List Current Vehicles",
"operationId": "ListCurrentVehicles",
"parameters": [],
"description": "Retrieves a list of current vehicles",
"x-ms-visibility": "internal"
}
},
"/v1/expense_entries": {
"get": {
"responses": {
"200": {
"description": "Success response",
"schema": {
"properties": {
"created_at": {
"type": "string"
},
"custom_fields": {
"type": "object"
},
"expense_entry_type_id": {
"type": "number"
},
"expense_entry_type_name": {
"type": "string"
},
"id": {
"type": "number"
},
"notes": {
"type": "string"
},
"occurred_at": {
"type": "string"
},
"total_amount_cents": {
"type": "number"
},
"updated_at": {
"type": "string"
},
"vehicle_id": {
"type": "number"
},
"vehicle": {
"properties": {
"id": {
"type": "number"
},
"name": {
"type": "string"
},
"color": {
"type": "string"
},
"license_plate": {
"type": "string"
},
"make": {
"type": "string"
},
"model": {
"type": "string"
},
"registration_expiration_month": {
"type": "number"
},
"registration_state": {
"type": "number"
},
"trim": {
"type": "string"
},
"vin": {
"type": "string"
},
"year": {
"type": "number"
},
"default_image_url_small": {
"type": "string"
}
},
"type": "object"
},
"vendor_id": {
"type": "number"
},
"vendor": {
"properties": {
"name": {
"type": "string"
},
"phone": {
"type": "string"
},
"city": {
"type": "string"
},
"region": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"country": {
"type": "string"
},
"external_id": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
},
"summary": "List Current Expense Entries",
"operationId": "ListCurrentExpenseEntries",
"parameters": [],
"description": "Retrieves a list of current expense entries",
"x-ms-visibility": "internal"
}
},
"/v2/contacts": {
"get": {
"responses": {
"200": {
"description": "Success response",
"schema": {
"properties": {
"comments_count": {
"type": "number"
},
"created_at": {
"type": "string"
},
"custom_fields": {
"type": "object"
},
"documents_count": {
"type": "number"
},
"email": {
"type": "string"
},
"employee": {
"type": "boolean"
},
"first_name": {
"type": "string"
},
"middle_name": {
"type": "string"
},
"group_id": {
"type": "number"
},
"group_name": {
"type": "string"
},
"group_hierarchy": {
"type": "string"
},
"id": {
"type": "number"
},
"images_count": {
"type": "number"
},
"last_name": {
"type": "string"
},
"name": {
"type": "string"
},
"technician": {
"type": "boolean"
},
"updated_at": {
"type": "string"
},
"vehicle_operator": {
"type": "boolean"
},
"birth_date": {
"type": "string"
},
"street_address": {
"type": "string"
},
"street_address_line_2": {
"type": "string"
},
"city": {
"type": "string"
},
"country": {
"type": "string"
},
"employee_number": {
"type": "string"
},
"home_phone_number": {
"type": "string"
},
"job_title": {
"type": "string"
},
"leave_date": {
"type": "string"
},
"license_class": {
"type": "string"
},
"license_number": {
"type": "string"
},
"license_state": {
"type": "string"
},
"mobile_phone_number": {
"type": "string"
},
"other_phone_number": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"region": {
"type": "string"
},
"start_date": {
"type": "string"
},
"work_phone_number": {
"type": "string"
},
"hourly_labor_rate_cents": {
"type": "string"
},
"attachment_permissions": {
"type": "object"
},
"default_image_url": {
"type": "string"
},
"account_membership_id": {
"type": "number"
}
},
"type": "object"
}
}
},
"summary": "List Current Contacts",
"operationId": "ListCurrentContacts",
"parameters": [],
"description": "Retrieves a list of current contacts",
"x-ms-visibility": "internal"
}
},
"/v1/parts": {
"get": {
"responses": {
"200": {
"description": "Success response",
"schema": {
"properties": {
"attachment_permissions": {
"type": "object"
},
"comments_count": {
"type": "number"
},
"created_at": {
"type": "string"
},
"custom_fields": {
"type": "object"
},
"default_image_url": {
"type": "string"
},
"description": {
"type": "string"
},
"documents_count": {
"type": "number"
},
"id": {
"type": "number"
},
"images_count": {
"type": "string"
},
"manufacturer_part_number": {
"type": "string"
},
"measurement_unit_id": {
"type": "string"
},
"number": {
"type": "string"
},
"part_category": {
"properties": {
"id": {
"type": "number"
},
"tire_category": {
"type": "boolean"
},
"account_id": {
"type": "number"
},
"default": {
"type": "boolean"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"tires_count": {
"type": "number"
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
},
"part_category_id": {
"type": "number"
},
"part_manufacturer": {
"properties": {
"id": {
"type": "number"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"account_id": {
"type": "number"
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
},
"part_manufacturer_id": {
"type": "string"
},
"unit_cost_cents": {
"type": "number"
},
"average_unit_cost_cents": {
"type": "number"
},
"upc": {
"type": "string"
},
"archived_at": {
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
}
}
},
"summary": "List Current Parts",
"operationId": "ListCurrentParts",
"parameters": [],
"description": "Retrieves a list of current parts",
"x-ms-visibility": "internal"
}
},
"/v1/purchase_orders": {
"get": {
"responses": {
"200": {
"description": "Success response",
"schema": {
"properties": {
"approved_at": {
"type": "string"
},
"comments_count": {
"type": "number"
},
"created_at": {
"type": "string"
},
"custom_fields": {
"type": "string"
},
"description": {
"type": "string"
},
"discount_type": {
"type": "string"
},
"documents_count": {
"type": "number"
},
"id": {
"type": "number"
},
"number": {
"type": "number"
},
"part_location_id": {
"type": "number"
},
"state": {
"type": "string"
},
"tax_1_percentage": {
"type": "string"
},
"tax_1_type": {
"type": "string"
},
"tax_2_percentage": {
"type": "string"
},
"tax_2_type": {
"type": "string"
},
"watchers_count": {
"type": "number"
},
"status_name": {
"type": "string"
},
"status_color": {
"type": "string"
},
"submitted_for_approval_at": {
"type": "string"
},
"rejected_at": {
"type": "string"
},
"purchased_at": {
"type": "string"
},
"received_partial_at": {
"type": "string"
},
"received_full_at": {
"type": "string"
},
"closed_at": {
"type": "string"
},
"discount_cents": {
"type": "number"
},
"tax_1_cents": {
"type": "number"
},
"tax_2_cents": {
"type": "number"
},
"subtotal_cents": {
"type": "number"
},
"shipping_cents": {
"type": "number"
},
"total_amount_cents": {
"type": "number"
},
"approved_by_id": {
"type": "number"
},
"created_by_id": {
"type": "number"
},
"closed_by_id": {
"type": "number"
},
"purchased_by_id": {
"type": "number"
},
"rejected_by_id": {
"type": "number"
},
"received_partial_by_id": {
"type": "number"
},
"received_full_by_id": {
"type": "number"
},
"purchase_order_status_id": {
"type": "number"
},
"submitted_for_approval_by_id": {
"type": "number"
},
"updated_at": {
"type": "string"
},
"vendor_id": {
"type": "number"
},
"vendor": {
"properties": {
"name": {
"type": "string"
},
"phone": {
"type": "string"
},
"city": {
"type": "string"
},
"region": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"country": {
"type": "string"
},
"external_id": {
"type": "string"
}
},
"type": "object"
},
"labels": {
"properties": {
"id": {
"type": "number"
},
"name": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
},
"summary": "List Current Purchase Orders",
"operationId": "ListCurrentPurchaseOrders",
"parameters": [],
"description": "Retrieves a list of current purchase orders",
"x-ms-visibility": "internal"
}
},
"/v1/vehicle_assignments": {
"get": {
"responses": {
"200": {
"description": "Success response",
"schema": {
"properties": {
"attachment_permissions": {
"type": "object"
},
"contact": {
"properties": {
"id": {
"type": "number"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"group_id": {
"type": "number"
},
"default_image_url": {
"type": "string"
}
},
"type": "object"
},
"vehicle": {
"properties": {
"id": {
"type": "number"
},
"name": {
"type": "string"
},
"color": {
"type": "string"
},
"license_plate": {
"type": "string"
},
"make": {
"type": "string"
},
"model": {
"type": "string"
},
"registration_expiration_month": {
"type": "number"
},
"registration_state": {
"type": "number"
},
"trim": {
"type": "string"
},
"vin": {
"type": "string"
},
"year": {
"type": "number"
},
"default_image_url_small": {
"type": "string"
}
},
"type": "object"
},
"comments_count": {
"type": "number"
},
"contact_id": {
"type": "number"
},
"started_at": {
"type": "string"
},
"ended_at": {
"type": "string"
},
"created_at": {
"type": "string"
},
"current": {
"type": "boolean"
},
"custom_fields": {
"type": "object"
},
"future": {
"type": "boolean"
},
"starting_meter_entry_value": {
"type": "string"
},
"ending_meter_entry_value": {
"type": "string"
},
"id": {
"type": "number"
},
"updated_at": {
"type": "string"
},
"vehicle_id": {
"type": "number"
}
},
"type": "object"
}
}
},
"summary": "List Current Vehicle Assignments",
"operationId": "ListCurrentVehicleAssignments",
"parameters": [],
"description": "Retrieves a list of current vehicle assignments",
"x-ms-visibility": "internal"
}
}
},
"parameters": {},
"responses": {},
"securityDefinitions": {
"API Key": {
"type": "apiKey",
"in": "header",
"name": "Authorization"
},
"Account Token": {
"type": "apiKey",
"in": "header",
"name": "Account-Token"
}
},
"security": [
{
"API Key": [],
"Account Token": []
}
],
"tags": [],
"x-ms-connector-metadata": [
{
"propertyName": "Website",
"propertyValue": "https://fleetio.com"
},
{
"propertyName": "Privacy policy",
"propertyValue": "https://www.fleetio.com/legal/privacy"
},
{
"propertyName": "Categories",
"propertyValue": "Productivity"
}
],
"x-ms-capabilities": {
"testConnection": {
"operationId": "ListCurrentContacts",
"parameters": {}
}
}
}