Automile API
REST/JSON fleet-telematics API (Swagger 2.0, /v1, OAuth2 read/write). 454 operations across vehicles, trips, contacts, geofences, triggers, vehicle health, expense reports, inspections, work orders and publish/subscribe webhooks.
REST/JSON fleet-telematics API (Swagger 2.0, /v1, OAuth2 read/write). 454 operations across vehicles, trips, contacts, geofences, triggers, vehicle health, expense reports, inspections, work orders and publish/subscribe webhooks.
{
"swagger": "2.0",
"info": {
"title": "Automile API",
"version": "v1"
},
"paths": {
"/v1/client/api": {
"get": {
"tags": [
"ClientApi"
],
"summary": "Get the current API client that access the API",
"description": "Returns the given API Client that the token is valid for",
"produces": [
"text/plain",
"application/json",
"text/json"
],
"responses": {
"200": {
"description": "The APIClient is returned",
"schema": {
"$ref": "#/definitions/APIClientModel"
}
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/client/apiauthorizations": {
"get": {
"tags": [
"ClientApiAuthorizations"
],
"summary": "Get a list of user that has authorized the logged in API client for access",
"description": "Only users that has given authorization to the given API client will be returned",
"produces": [
"text/plain",
"application/json",
"text/json"
],
"responses": {
"200": {
"description": "The users are returned",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/APIAuthorizationModel"
}
}
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/client/apiauthorizations/{apiAuthorizationId}": {
"get": {
"tags": [
"ClientApiAuthorizations"
],
"summary": "Get the details about a specific user authorization",
"operationId": "GetByAPIAuthorizationId",
"produces": [
"text/plain",
"application/json",
"text/json"
],
"parameters": [
{
"in": "path",
"name": "apiAuthorizationId",
"description": "The id of the authorization",
"required": true,
"type": "integer",
"format": "int32"
}
],
"responses": {
"200": {
"description": "The user details are returned",
"schema": {
"$ref": "#/definitions/APIAuthorizationModel"
}
},
"403": {
"description": "Request is forbidden, meaning you dont' have access to this authorization",
"schema": {
"$ref": "#/definitions/ProblemDetails"
}
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/client/contracts": {
"get": {
"tags": [
"ClientContracts"
],
"summary": "",
"produces": [
"text/plain",
"application/json",
"text/json"
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/HttpResponseMessage"
}
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/client/contracts/journeys": {
"get": {
"tags": [
"ClientContracts"
],
"summary": "",
"produces": [
"text/plain",
"application/json",
"text/json"
],
"parameters": [
{
"in": "query",
"name": "contractId",
"type": "integer",
"format": "int32"
},
{
"in": "query",
"name": "fromDate",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "toDate",
"type": "string",
"format": "date-time"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/HttpResponseMessage"
}
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/client/contracts/confirmjourneys": {
"post": {
"tags": [
"ClientContracts"
],
"summary": "",
"parameters": [
{
"in": "query",
"name": "ids",
"type": "array",
"items": {
"format": "int32",
"type": "integer"
},
"collectionFormat": "multi"
}
],
"responses": {
"200": {
"description": ""
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/client/custom/createuser": {
"post": {
"tags": [
"ClientCustom"
],
"summary": "Creates Client Custom User",
"operationId": "CreateClientCustomUser",
"consumes": [
"application/json",
"text/json",
"application/*+json"
],
"produces": [
"text/plain",
"application/json",
"text/json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "The custom user model",
"schema": {
"$ref": "#/definitions/CustomUserCreateModel"
}
}
],
"responses": {
"200": {
"description": "Client Custom user created",
"schema": {
"$ref": "#/definitions/CreatedAtRoute"
}
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/client/custom/resetpassword": {
"post": {
"tags": [
"ClientCustom"
],
"summary": "Reset User password",
"operationId": "ResetPasswordClientCustom",
"consumes": [
"application/json",
"text/json",
"application/*+json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "The reset password model",
"schema": {
"$ref": "#/definitions/ResetPasswordUserModel"
}
}
],
"responses": {
"200": {
"description": "Password reset sent"
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/client/custom/createuserwithoutpassword": {
"post": {
"tags": [
"ClientCustom"
],
"summary": "Create User without password",
"operationId": "CreateClientCustomUserWithoutPassword",
"consumes": [
"application/json",
"text/json",
"application/*+json"
],
"produces": [
"text/plain",
"application/json",
"text/json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "The reset password model",
"schema": {
"$ref": "#/definitions/CustomUserCreateWithoutPasswordModel"
}
}
],
"responses": {
"200": {
"description": "Create User without password",
"schema": {
"$ref": "#/definitions/UserCreatedPasswordModel"
}
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/client/custom/usernametaken": {
"get": {
"tags": [
"ClientCustom"
],
"summary": "Get UserName takenmodel",
"operationId": "UsernameTaken",
"produces": [
"text/plain",
"application/json",
"text/json"
],
"parameters": [
{
"in": "query",
"name": "username",
"description": "The username",
"type": "string"
}
],
"responses": {
"200": {
"description": "The UserNametaken returned",
"schema": {
"$ref": "#/definitions/UsernameTakenModel"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/UsernameTakenModel"
}
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/client/custom/userphonenumber": {
"get": {
"tags": [
"ClientCustom"
],
"summary": "Get User assoicated to phonenumber or username",
"operationId": "UserPhoneNumber",
"produces": [
"text/plain",
"application/json",
"text/json"
],
"parameters": [
{
"in": "query",
"name": "identifier",
"description": "username or phonenumber",
"type": "string"
},
{
"in": "query",
"name": "region",
"description": "Region for phonenumber",
"type": "string"
}
],
"responses": {
"200": {
"description": "The user returned",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/UserPhoneNumberModel"
}
}
},
"400": {
"description": "Bad request, can happen when you supply values that are unacceptable",
"schema": {
"$ref": "#/definitions/ProblemDetails"
}
},
"409": {
"description": "Multiple users assoicated to the account",
"schema": {
"$ref": "#/definitions/ProblemDetails"
}
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/client/custom/usersphonenumber": {
"get": {
"tags": [
"ClientCustom"
],
"summary": "Get user guids from phonenumber",
"operationId": "UsernamesPhoneNumber",
"produces": [
"text/plain",
"application/json",
"text/json"
],
"parameters": [
{
"in": "query",
"name": "mobilePhoneNumber",
"description": "",
"type": "string"
},
{
"in": "query",
"name": "region",
"description": "Region for phonenumber",
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/UsernamesPhoneNumberModel"
}
}
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/client/custom/existingusers": {
"get": {
"tags": [
"ClientCustom"
],
"summary": "Get user guids from identifier",
"operationId": "ExistingUsersAccounts",
"produces": [
"text/plain",
"application/json",
"text/json"
],
"parameters": [
{
"in": "query",
"name": "identifier",
"description": "",
"type": "string"
},
{
"in": "query",
"name": "region",
"description": "Region for phonenumber",
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/UsernamesPhoneNumberModel"
}
}
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/client/custom/validatephonenumber": {
"get": {
"tags": [
"ClientCustom"
],
"summary": "Check if user has the phonenumber",
"operationId": "ValidatePhoneNumber",
"produces": [
"text/plain",
"application/json",
"text/json"
],
"parameters": [
{
"in": "query",
"name": "username",
"description": "",
"type": "string"
},
{
"in": "query",
"name": "mobilePhoneNumber",
"description": "",
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"type": "boolean"
}
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/client/custom/deviceregistered": {
"get": {
"tags": [
"ClientCustom"
],
"summary": "Get DeviceRegistered",
"operationId": "DeviceRegistered",
"produces": [
"text/plain",
"application/json",
"text/json"
],
"parameters": [
{
"in": "query",
"name": "imei",
"description": "The Imei",
"type": "string"
}
],
"responses": {
"200": {
"description": "The DeviceRegistered returned",
"schema": {
"$ref": "#/definitions/DeviceRegisteredModel"
}
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/client/custom/reversegeocoding": {
"get": {
"tags": [
"ClientCustom"
],
"summary": "Get DeviceRegistered",
"operationId": "ReverseGeocoding",
"produces": [
"text/plain",
"application/json",
"text/json"
],
"parameters": [
{
"in": "query",
"name": "latitude",
"description": "The latitude",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "longitude",
"description": "The longitude",
"type": "number",
"format": "double"
}
],
"responses": {
"200": {
"description": "The DeviceRegistered returned",
"schema": {
"$ref": "#/definitions/ReverseGeocodingResult"
}
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/client/onboarding/vehiclemakes": {
"get": {
"tags": [
"ClientOnboarding"
],
"summary": "Get vehicle makes",
"operationId": "VehicleMakes",
"produces": [
"text/plain",
"application/json",
"text/json"
],
"parameters": [
{
"in": "query",
"name": "region",
"type": "integer",
"format": "int32",
"enum": [
0,
1
]
}
],
"responses": {
"200": {
"description": "List of makes returned",
"schema": {
"$ref": "#/definitions/VehickeMakesModel"
}
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/client/onboarding/vehiclemodels": {
"get": {
"tags": [
"ClientOnboarding"
],
"summary": "Get vehicle models",
"operationId": "VehicleModels",
"produces": [
"text/plain",
"application/json",
"text/json"
],
"parameters": [
{
"in": "query",
"name": "make",
"type": "string"
}
],
"responses": {
"200": {
"description": "List of models returned",
"schema": {
"$ref": "#/definitions/VehicleModelsModel"
}
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/client/order/pro": {
"post": {
"tags": [
"ClientOrder"
],
"summary": "Creates a pro order",
"operationId": "CreateClientOrder",
"consumes": [
"application/json",
"text/json",
"application/*+json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "The pro order model",
"schema": {
"$ref": "#/definitions/ProOrderModel"
}
}
],
"responses": {
"200": {
"description": "A pro order is created"
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/client/order/propricing": {
"get": {
"tags": [
"ClientOrder"
],
"summary": "Get Pro PriceModel",
"operationId": "GetProPricingClientCustom",
"produces": [
"text/plain",
"application/json",
"text/json"
],
"parameters": [
{
"in": "query",
"name": "countryCode",
"type": "string"
},
{
"in": "query",
"name": "numberOfUnits",
"type": "integer",
"format": "int32"
}
],
"responses": {
"200": {
"description": "The pro price details returned",
"schema": {
"$ref": "#/definitions/ApiPriceModel"
}
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/client/textmessages/createpin": {
"post": {
"tags": [
"ClientTextMessage"
],
"summary": "Create and send pin code to login with",
"operationId": "CreatePinCode",
"consumes": [
"application/json",
"text/json",
"application/*+json"
],
"produces": [
"text/plain",
"application/json",
"text/json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "",
"schema": {
"$ref": "#/definitions/CreatePinModel"
}
}
],
"responses": {
"200": {
"description": "The Pin code have been sent"
},
"400": {
"description": "Format error on phonenumber, To many SMS or no match on phonenumber",
"schema": {
"$ref": "#/definitions/ProblemDetails"
}
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/client/textmessages/validatepin": {
"post": {
"tags": [
"ClientTextMessage"
],
"summary": "Validate Pin Code",
"operationId": "ValidatePinCode",
"consumes": [
"application/json",
"text/json",
"application/*+json"
],
"produces": [
"text/plain",
"application/json",
"text/json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "",
"schema": {
"$ref": "#/definitions/ValidatePinModel"
}
}
],
"responses": {
"200": {
"description": "User logged in/User created and a user token returned in response",
"schema": {
"$ref": "#/definitions/TokenResponse"
}
},
"400": {
"description": "Can't assoicate given username to a user",
"schema": {
"$ref": "#/definitions/ProblemDetails"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/ProblemDetails"
}
},
"403": {
"description": "Too many password attempts",
"schema": {
"$ref": "#/definitions/ProblemDetails"
}
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/client/users": {
"get": {
"tags": [
"ClientUsers"
],
"summary": "Get the users that belongs to contacts that the current user is associated with",
"description": "Get the users that the current user is associated through companies",
"operationId": "GetClientUsers",
"produces": [
"text/plain",
"application/json",
"text/json"
],
"responses": {
"200": {
"description": "The Users are returned",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/UserModel"
}
}
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"oauth2": [ ]
}
]
},
"post": {
"tags": [
"ClientUsers"
],
"summary": "Creates a new user including a contact with basic information",
"operationId": "CreateClientUser",
"consumes": [
"application/json",
"text/json",
"application/*+json"
],
"produces": [
"text/plain",
"application/json",
"text/json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "The create user model",
"schema": {
"$ref": "#/definitions/UserCreateModel"
}
}
],
"responses": {
"200": {
"description": "A link in the header is returned to the newly created users"
},
"400": {
"description": "Bad request, can happen when you supply values that are unacceptable",
"schema": {
"$ref": "#/definitions/ProblemDetails"
}
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/client/users/{userId}": {
"get": {
"tags": [
"ClientUsers"
],
"summary": "Get the specific user",
"operationId": "GetClientUserByUserId",
"produces": [
"text/plain",
"application/json",
"text/json"
],
"parameters": [
{
"in": "path",
"name": "userId",
"description": "The user id",
"required": true,
"type": "integer",
"format": "int32"
}
],
"responses": {
"200": {
"description": "The Users are returned",
"schema": {
"$ref": "#/definitions/UserModel"
}
},
"403": {
"description": "Request is forbidden, meaning you don't have access to this user",
"schema": {
"$ref": "#/definitions/ProblemDetails"
}
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/v1/echo/validatetoken": {
"get": {
"tags": [
"Echo"
],
"summary": "Validates a given token",
"description": "Simple operation to test that a valid OAuth2 Bearer token has been supplied",
"responses": {
"200": {
"description": "Success"
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/": {
"get": {
"tags": [
"Home"
],
"parameters": [
{
"in": "query",
"name": "token",
"type": "string"
}
],
"responses": {
"200": {
"description": "Success"
}
}
}
},
"/o2c": {
"get": {
"tags": [
"Home"
],
"parameters": [
{
"in": "query",
"name": "token",
"type": "string"
}
],
"responses": {
"200": {
"description": "Success"
}
}
}
},
"/login": {
"get": {
"tags": [
"Login"
],
"parameters": [
{
"in": "query",
"name": "client_id",
"type": "string"
},
{
"in": "query",
"name": "scope",
"type": "string"
},
{
"in": "query",
"name": "redirect_uri",
"type": "string"
},
{
"in": "query",
"name": "state",
"type": "string"
},
{
"in": "query",
"name": "response_type",
"type": "string",
"default": "token"
}
],
"responses": {
"200": {
"description": "Success"
}
}
},
"post": {
"tags": [
"Login"
],
"parameters": [
{
"in": "query",
"name": "UserName",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "Password",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "ClientId",
"type": "string"
},
{
"in": "query",
"name": "Scopes",
"type": "string"
},
{
"in": "query",
"name": "RedirectUri",
"type": "string"
},
{
"in": "query",
"name": "State",
"type": "string"
},
{
"in": "query",
"name": "ResponseType",
"type": "string"
}
],
"responses": {
"200": {
"description": "Success"
}
}
}
},
"/OAuth2/Token": {
"post": {
"tags": [
"OAuth"
],
"consumes": [
"multipart/form-data"
],
"parameters": [
{
"in": "formData",
"name": "grant_type",
"required": true,
"type": "string"
},
{
"in": "formData",
"name": "client_id",
"type": "string"
},
{
"in": "formData",
"name": "client_secret",
"type": "string"
},
{
"in": "formData",
"name": "username",
"type": "string"
},
{
"in": "formData",
"name": "password",
"type": "string"
},
{
"in": "formData",
"name": "scope",
"type": "string"
},
{
"in": "formData",
"name": "refresh_token",
"type": "string"
},
{
"in": "formData",
"name": "azure_access_token",
"type": "string"
},
{
"in": "formData",
"name": "azure_tenant_id",
"type": "string"
}
],
"responses": {
"200": {
"description": "Success"
}
}
}
},
"/v1/integration/order": {
"post": {
"tags": [
"Order"
],
"summary": "Creates a new order",
"operationId": "CreateOrder",
"consumes": [
"application/json",
"text/json",
"application/*+json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "The CreateOrderModel",
"schema": {
"$ref": "#/definitions/CreateOrderModel"
}
}
],
"responses": {
"200": {
"description": "Creates new order"
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/maskedphonenumber/inboundvoice": {
"get": {
"tags": [
"Phone"
],
"parameters": [
{
"in": "query",
"name": "from",
"type": "string"
},
{
"in": "query",
"name": "to",
"type": "string"
}
],
"responses": {
"200": {
"description": "Success"
}
}
}
},
"/maskedphonenumber/inboundtext": {
"get": {
"tags": [
"Phone"
],
"parameters": [
{
"in": "query",
"name": "from",
"type": "string"
},
{
"in": "query",
"name": "to",
"type": "string"
},
{
"in": "query",
"name": "body",
"type": "string"
}
],
"responses": {
"200": {
"description": "Success"
}
}
}
},
"/v1/resourceowner/companies": {
"get": {
"tags": [
"ResourceOwnerCompany"
],
"summary": "Get a list of all companies that user is associated with",
"description": "Only companies that the user is associated with will be returned by this operation.",
"operationId": "GetResourceOwnerCompanies",
"produces": [
"text/plain",
"application/json",
"text/json"
],
"responses": {
"200": {
"description": "The companies are returned",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/CompanyModel"
}
}
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"oauth2": [ ]
}
# --- truncated at 32 KB (898 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/automile/refs/heads/main/openapi/automile-openapi-original.json