Automile ResourceOwnerExpenseReportV2 API
The ResourceOwnerExpenseReportV2 API from Automile — 5 operation(s) for resourceownerexpensereportv2.
The ResourceOwnerExpenseReportV2 API from Automile — 5 operation(s) for resourceownerexpensereportv2.
swagger: '2.0'
info:
title: Automile ClientApi ResourceOwnerExpenseReportV2 API
version: v1
tags:
- name: ResourceOwnerExpenseReportV2
paths:
/v1/resourceowner/expensereport:
get:
tags:
- ResourceOwnerExpenseReportV2
summary: Get a list of expense reports
description: Only expense reports that the user has access to are accessible.
operationId: GetResourceExpenseReport
produces:
- text/plain
- application/json
- text/json
parameters:
- in: query
name: tripId
type: integer
format: int32
- in: query
name: vehicleId
type: integer
format: int32
responses:
'200':
description: The expense reports are returned
schema:
type: array
items:
$ref: '#/definitions/ExpenseReportModel'
'500':
description: Internal server error
security:
- oauth2: []
post:
tags:
- ResourceOwnerExpenseReportV2
summary: Create an expense reports
description: This will create expense report
operationId: CreateExpenseReport
consumes:
- application/json
- text/json
- application/*+json
parameters:
- in: body
name: body
schema:
$ref: '#/definitions/ExpenseReportCreateModel'
responses:
'200':
description: A header link containing the URL to the newly created resource
'500':
description: Internal server error
security:
- oauth2: []
/v1/resourceowner/expensereport/{expenseReportId}:
get:
tags:
- ResourceOwnerExpenseReportV2
summary: Get an expense reports
description: Only expense reports that the user has access to are accessible.
operationId: GetResourceOwnerExpenseReportId
produces:
- text/plain
- application/json
- text/json
parameters:
- in: query
name: expenseReportId
type: integer
format: int32
responses:
'200':
description: The expense report is returned
schema:
$ref: '#/definitions/ExpenseReportModel'
'500':
description: Internal server error
security:
- oauth2: []
put:
tags:
- ResourceOwnerExpenseReportV2
summary: Updates the given expense report
description: This will update the given expense report id with a new model.
operationId: EditResourceOwnerExpenseReport
consumes:
- application/json
- text/json
- application/*+json
produces:
- text/plain
- application/json
- text/json
parameters:
- in: path
name: expenseReportId
description: The expense report id
required: true
type: integer
format: int32
- in: body
name: body
description: The new expense report model
schema:
$ref: '#/definitions/ExpenseReportEditModel'
responses:
'200':
description: The expense report was saved
'400':
description: Bad request, could occur for a number of cases, see returned message
schema:
$ref: '#/definitions/ProblemDetails'
'403':
description: Request is forbidden, could occur for a number of reasons, see returned message
schema:
$ref: '#/definitions/ProblemDetails'
'404':
description: Not found, the expense report you tried to update can't be found
schema:
$ref: '#/definitions/ProblemDetails'
'500':
description: Internal server error
security:
- oauth2: []
delete:
tags:
- ResourceOwnerExpenseReportV2
summary: Removes the given expense report
operationId: DeleteResourceOwnerExpenseReport
produces:
- text/plain
- application/json
- text/json
parameters:
- in: path
name: expenseReportId
description: The expense report id
required: true
type: integer
format: int32
responses:
'200':
description: The expense report has been deleted
'403':
description: Request is forbidden, could occur for a number of reasons, see returned message
schema:
$ref: '#/definitions/ProblemDetails'
'404':
description: Not found, the expense report you tried to remove can't be found
schema:
$ref: '#/definitions/ProblemDetails'
'500':
description: Internal server error
security:
- oauth2: []
/v1/resourceowner/expensereport/export/{expenseReportId}:
post:
tags:
- ResourceOwnerExpenseReportV2
summary: Export an expense report in pdf format
description: Only expense reports that the user has access to are accessible.
operationId: CreateExpenseReportEmailExport
consumes:
- application/json
- text/json
- application/*+json
parameters:
- in: path
name: expenseReportId
required: true
type: integer
format: int32
- in: body
name: body
schema:
$ref: '#/definitions/EmailExpenseReportModel'
responses:
'200':
description: The expense report is created and sent to the email address
'500':
description: Internal server error
security:
- oauth2: []
/v1/resourceowner/expensereport/export:
post:
tags:
- ResourceOwnerExpenseReportV2
summary: Export an expense report in pdf format
description: Only expense reports that the user has access to are accessible.
operationId: CreateExpenseReportsEmailExport
consumes:
- application/json
- text/json
- application/*+json
produces:
- text/plain
- application/json
- text/json
parameters:
- in: body
name: body
schema:
$ref: '#/definitions/EmailExpenseReportsModel'
responses:
'200':
description: The expense report is created and sent to the email address
'404':
description: No expense reports could be found with the given parameter values and access rights
schema:
$ref: '#/definitions/ProblemDetails'
'500':
description: Internal server error
security:
- oauth2: []
/v1/resourceowner/expensereport/{expenseReportId}/expenseReportItems:
delete:
tags:
- ResourceOwnerExpenseReportV2
summary: Removes the given expense report rows
operationId: DeleteResourceOwnerExpenseReportRows
produces:
- text/plain
- application/json
- text/json
parameters:
- in: path
name: expenseReportId
description: The expense report id
required: true
type: integer
format: int32
responses:
'200':
description: All expense report rows have been deleted
'403':
description: Request is forbidden, could occur for a number of reasons, see returned message
schema:
$ref: '#/definitions/ProblemDetails'
'404':
description: Not found, the expense report you tried to remove can't be found
schema:
$ref: '#/definitions/ProblemDetails'
'500':
description: Internal server error
security:
- oauth2: []
definitions:
ExpenseReportRowContentModel:
type: object
properties:
ExpenseReportRowContentId:
format: int32
type: integer
ExpenseReportRowId:
format: int32
type: integer
ContentType:
format: int32
enum:
- 0
- 1
- 2
- 3
- 4
type: integer
ContentFileName:
type: string
additionalProperties: false
ExpenseReportCreateModel:
type: object
properties:
VehicleId:
format: int32
type: integer
ContactId:
format: int32
type: integer
TripId:
format: int32
type: integer
ExpenseReportDateUtc:
format: date-time
type: string
ExpenseReportRows:
type: array
items:
$ref: '#/definitions/ExpenseReportRowCreateModel'
additionalProperties: false
EmailExpenseReportsModel:
type: object
properties:
VehicleId:
format: int32
type: integer
FromDate:
format: date-time
type: string
ToDate:
format: date-time
type: string
ToEmail:
type: string
ISO639LanguageCode:
type: string
additionalProperties: false
ExpenseReportRowContentCreateModel:
type: object
properties:
ExpenseReportRowId:
format: int32
type: integer
Data:
type: string
ContentType:
format: int32
enum:
- 0
- 1
- 2
- 3
- 4
type: integer
additionalProperties: false
ExpenseReportModel:
type: object
properties:
ExpenseReportId:
format: int32
type: integer
ContactId:
format: int32
type: integer
ContactName:
type: string
ContactImageUrl:
type: string
VehicleId:
format: int32
type: integer
TripId:
format: int32
type: integer
ExpenseReportDateUtc:
format: date-time
type: string
ExpenseReportRows:
type: array
items:
$ref: '#/definitions/ExpenseReportRowModel'
IsEditable:
type: boolean
additionalProperties: false
ExpenseReportRowCreateModel:
type: object
properties:
ExpenseReportId:
format: int32
type: integer
AmountInCurrency:
format: double
type: number
VATInCurrency:
format: double
type: number
ISO4217CurrencyCode:
type: string
Notes:
type: string
Category:
format: int32
enum:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
type: integer
ExpenseReportRowDateUtc:
format: date-time
type: string
ExpenseReportRowContent:
type: array
items:
$ref: '#/definitions/ExpenseReportRowContentCreateModel'
CustomCategory:
type: string
CategoryValue:
format: double
type: number
Merchant:
type: string
additionalProperties: false
ExpenseReportRowModel:
type: object
properties:
ExpenseReportRowId:
format: int32
type: integer
ExpenseReportId:
format: int32
type: integer
AmountInCurrency:
format: double
type: number
VATInCurrency:
format: double
type: number
ISO4217CurrencyCode:
type: string
Notes:
type: string
ExpenseReportRowDateUtc:
format: date-time
type: string
ExpenseReportRowContent:
type: array
items:
$ref: '#/definitions/ExpenseReportRowContentModel'
Category:
format: int32
enum:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
type: integer
CustomCategory:
type: string
CategoryValue:
format: double
type: number
Merchant:
type: string
additionalProperties: false
ProblemDetails:
type: object
properties:
type:
type: string
title:
type: string
status:
format: int32
type: integer
detail:
type: string
instance:
type: string
additionalProperties: {}
ExpenseReportEditModel:
type: object
properties:
VehicleId:
format: int32
type: integer
ContactId:
format: int32
type: integer
TripId:
format: int32
type: integer
ExpenseReportDateUtc:
format: date-time
type: string
additionalProperties: false
EmailExpenseReportModel:
type: object
properties:
ToEmail:
type: string
ISO639LanguageCode:
type: string
additionalProperties: false
securityDefinitions:
oauth2:
type: oauth2
flow: implicit
authorizationUrl: https://api.automile.com/login/
scopes:
read: Read access to protected resources
write: Write access to protected resources
description: OAuth2 Implicit Grant