Automile ResourceOwnerQuote API
The ResourceOwnerQuote API from Automile — 4 operation(s) for resourceownerquote.
The ResourceOwnerQuote API from Automile — 4 operation(s) for resourceownerquote.
swagger: '2.0'
info:
title: Automile ClientApi ResourceOwnerQuote API
version: v1
tags:
- name: ResourceOwnerQuote
paths:
/v1/resourceowner/quotes:
get:
tags:
- ResourceOwnerQuote
summary: Retrieve a list of quotes and their containing attachments, items and notes
description: If no time is set on the "to" parameter, then it's assumed all entries on the date should be included, and the time part will be set to 11:59:59 PM
operationId: ResourceOwnerQuote_ListQuotes
produces:
- text/plain
- application/json
- text/json
parameters:
- in: query
name: from
description: Filter on Created to be on or after from date (default is 30 days prior to todays date)
type: string
format: date-time
- in: query
name: to
description: Filter on Created to be on or after to date (default is todays date)
type: string
format: date-time
- in: query
name: quoteStatus
description: Status on quote (Incomplete = 0, Created = 1, SentToCustomerForApproval = 2, Approved = 3, ConvertedToWorkOrder = 4, Declined = 5) (default is all)
type: integer
format: int32
enum:
- 0
- 1
- 2
- 3
- 4
- 5
- in: query
name: includeDeleted
description: Include deleted quote (default is false)
type: boolean
default: false
responses:
'200':
description: Successful request
schema:
type: array
items:
$ref: '#/definitions/QuoteModelGET'
'500':
description: Internal server error
security:
- oauth2: []
post:
tags:
- ResourceOwnerQuote
summary: Create a new Quote
operationId: ResourceOwnerQuote_CreateQuote
consumes:
- application/json
- text/json
- application/*+json
parameters:
- in: body
name: body
description: Quote model
schema:
$ref: '#/definitions/QuoteModelPOST'
responses:
'200':
description: A link in the header is returned to the newly created quote.
'500':
description: Internal server error.
'400':
description: Bad request, could occur for various cases, see returned message.
'403':
description: Request is forbidden, could occur for various reasons, see returned message.
security:
- oauth2: []
put:
tags:
- ResourceOwnerQuote
summary: Update or create one or many quotes
description: "For quotes, items, attachments and notes with an id is updated. When id is not provided new objects is created. If an \r\n item, attachment or note is missing on an existing quote that item, attachment or note is removed."
operationId: ResourceOwnerWorkOrder_SaveQuoteList
consumes:
- application/json
- text/json
- application/*+json
produces:
- text/plain
- application/json
- text/json
parameters:
- in: body
name: body
description: List of quotes
schema:
type: array
items:
$ref: '#/definitions/QuoteModelSyncPUT'
responses:
'200':
description: Successful update
schema:
type: array
items:
$ref: '#/definitions/QuoteModelGET'
'500':
description: Internal server error.
security:
- oauth2: []
/v1/resourceowner/quotes/{quoteId}:
get:
tags:
- ResourceOwnerQuote
summary: Get a Quote
operationId: ResourceOwnerQuote_GetQuote
produces:
- text/plain
- application/json
- text/json
parameters:
- in: path
name: quoteId
description: Quote Id
required: true
type: integer
format: int32
responses:
'200':
description: Success
schema:
$ref: '#/definitions/QuoteModelGET'
security:
- oauth2: []
put:
tags:
- ResourceOwnerQuote
summary: Updates a quote
operationId: ResourceOwnerQuote_UpdateQuote
consumes:
- application/json
- text/json
- application/*+json
produces:
- text/plain
- application/json
- text/json
parameters:
- in: path
name: quoteId
description: Quote Id that needs to be udpated
required: true
type: integer
format: int32
- in: body
name: body
description: Quote edit model
schema:
$ref: '#/definitions/QuoteModelPUT'
responses:
'200':
description: Success
schema:
$ref: '#/definitions/HttpResponseMessage'
security:
- oauth2: []
delete:
tags:
- ResourceOwnerQuote
summary: Soft deletes the Quote
operationId: ResourceOwnerQuote_DeleteQuote
parameters:
- in: path
name: quoteId
description: Quote Id that needs to be deleted
required: true
type: integer
format: int32
responses:
'200':
description: Success
security:
- oauth2: []
/v1/resourceowner/quotes/{quoteId}/status:
put:
tags:
- ResourceOwnerQuote
summary: Update status of a quote
operationId: ResourceOwnerQuote_UpdateStatus
consumes:
- application/json
- text/json
- application/*+json
parameters:
- in: path
name: quoteId
description: The quote which the satus should be updated on
required: true
type: integer
format: int32
- in: body
name: body
description: Quote status
schema:
$ref: '#/definitions/QuoteStatusModelPUT'
responses:
'200':
description: Successful update
'403':
description: Forbidden access to resource
'500':
description: Internal server error
security:
- oauth2: []
/v1/resourceowner/quotes/referenceId:
get:
tags:
- ResourceOwnerQuote
summary: Get a new reference id for a quote (not unique)
operationId: ResourceOwnerQuote_GetNextQuoteId
produces:
- text/plain
- application/json
- text/json
responses:
'200':
description: Successful request
schema:
type: string
'500':
description: Internal server error
security:
- oauth2: []
definitions:
TimeSpan:
type: object
properties:
Ticks:
format: int64
type: integer
Days:
format: int32
type: integer
readOnly: true
Hours:
format: int32
type: integer
readOnly: true
Milliseconds:
format: int32
type: integer
readOnly: true
Microseconds:
format: int32
type: integer
readOnly: true
Nanoseconds:
format: int32
type: integer
readOnly: true
Minutes:
format: int32
type: integer
readOnly: true
Seconds:
format: int32
type: integer
readOnly: true
TotalDays:
format: double
type: number
readOnly: true
TotalHours:
format: double
type: number
readOnly: true
TotalMilliseconds:
format: double
type: number
readOnly: true
TotalMicroseconds:
format: double
type: number
readOnly: true
TotalNanoseconds:
format: double
type: number
readOnly: true
TotalMinutes:
format: double
type: number
readOnly: true
TotalSeconds:
format: double
type: number
readOnly: true
additionalProperties: false
QuoteAttachmentModelGET:
required:
- AttachmentType
- URL
type: object
properties:
URL:
minLength: 1
type: string
Description:
type: string
AttachmentType:
format: int32
enum:
- 0
- 1
- 2
type: integer
QuoteAttachmentId:
format: int32
type: integer
CreatedByContactId:
format: int32
type: integer
Created:
format: date-time
type: string
additionalProperties: false
QuoteAttachmentModelPOST:
required:
- AttachmentType
- URL
type: object
properties:
URL:
minLength: 1
type: string
Description:
type: string
AttachmentType:
format: int32
enum:
- 0
- 1
- 2
type: integer
additionalProperties: false
QuoteNoteModelPOST:
required:
- Note
type: object
properties:
Note:
minLength: 1
type: string
additionalProperties: false
StringStringIEnumerableKeyValuePair:
type: object
properties:
Key:
type: string
Value:
type: array
items:
type: string
additionalProperties: false
PositionPointModel:
type: object
properties:
Longitude:
format: double
type: number
Latitude:
format: double
type: number
additionalProperties: false
QuoteStatusHistoryModelGET:
type: object
properties:
OccuredAt:
format: date-time
type: string
ContactId:
format: int32
type: integer
Status:
format: int32
enum:
- 0
- 1
- 2
- 3
- 4
- 5
type: integer
additionalProperties: false
CustomerJobAddressModel:
type: object
properties:
Street:
type: string
Apartment:
type: string
CareOf:
type: string
ZipCode:
type: string
City:
type: string
StateOrProvince:
type: string
ISO3166CountryCode:
type: string
Position:
$ref: '#/definitions/PositionPointModel'
additionalProperties: false
HttpContent:
type: object
properties:
Headers:
type: array
items:
$ref: '#/definitions/StringStringIEnumerableKeyValuePair'
readOnly: true
additionalProperties: false
QuoteModelGET:
required:
- WorkOrderCustomerId
type: object
properties:
JobDate:
format: date-time
type: string
JobTime:
$ref: '#/definitions/TimeSpan'
EstimatedTimeInMinutes:
format: int32
type: integer
JobDescription:
type: string
ExternalId:
type: string
CustomerContactName:
type: string
CustomerEmail:
type: string
CustomerName:
type: string
CustomerCommunicationLanguageISO639_2:
type: string
CustomerPhoneNumber:
type: string
CustomerJobAddress:
$ref: '#/definitions/CustomerJobAddressModel'
CustomerBillingAddress:
$ref: '#/definitions/CustomerBillingAddressModel'
NotificationType:
format: int32
enum:
- 0
- 1
- 2
- 3
type: integer
WorkOrderCategoryId:
format: int32
type: integer
CategoryName:
type: string
AssignedToContactId:
format: int32
type: integer
WorkOrderCustomerId:
format: int32
type: integer
EstimatedTotal:
format: double
type: number
Status:
format: int32
enum:
- 0
- 1
- 2
- 3
- 4
- 5
type: integer
QuoteId:
format: int32
type: integer
IsDeleted:
type: boolean
Created:
format: date-time
type: string
RequestedByContactId:
format: int32
type: integer
StatusHistory:
type: array
items:
$ref: '#/definitions/QuoteStatusHistoryModelGET'
Notes:
type: array
items:
$ref: '#/definitions/QuoteNoteModelGET'
Items:
type: array
items:
$ref: '#/definitions/QuoteItemModelGET'
Attachments:
type: array
items:
$ref: '#/definitions/QuoteAttachmentModelGET'
additionalProperties: false
QuoteItemModelPUT:
required:
- Quantity
- WorkOrderArticleId
type: object
properties:
Quantity:
format: double
type: number
PricePerQuantityExclVAT:
format: double
type: number
DiscountInPercentage:
format: double
type: number
DiscountAmount:
format: double
type: number
TaxRate:
format: double
type: number
WorkOrderArticleId:
format: int32
type: integer
ArticleName:
type: string
UnitType:
format: int32
enum:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
type: integer
QuoteItemId:
format: int32
type: integer
additionalProperties: false
QuoteModelPOST:
required:
- WorkOrderCustomerId
type: object
properties:
JobDate:
format: date-time
type: string
JobTime:
$ref: '#/definitions/TimeSpan'
EstimatedTimeInMinutes:
format: int32
type: integer
JobDescription:
type: string
ExternalId:
type: string
CustomerContactName:
type: string
CustomerEmail:
type: string
CustomerName:
type: string
CustomerCommunicationLanguageISO639_2:
type: string
CustomerPhoneNumber:
type: string
CustomerJobAddress:
$ref: '#/definitions/CustomerJobAddressModel'
CustomerBillingAddress:
$ref: '#/definitions/CustomerBillingAddressModel'
NotificationType:
format: int32
enum:
- 0
- 1
- 2
- 3
type: integer
WorkOrderCategoryId:
format: int32
type: integer
CategoryName:
type: string
AssignedToContactId:
format: int32
type: integer
WorkOrderCustomerId:
format: int32
type: integer
EstimatedTotal:
format: double
type: number
Status:
format: int32
enum:
- 0
- 1
- 2
- 3
- 4
- 5
type: integer
Attachments:
type: array
items:
$ref: '#/definitions/QuoteAttachmentModelPOST'
Notes:
type: array
items:
$ref: '#/definitions/QuoteNoteModelPOST'
Items:
type: array
items:
$ref: '#/definitions/QuoteItemModelPOST'
additionalProperties: false
QuoteAttachmentModelPUT:
required:
- AttachmentType
- URL
type: object
properties:
URL:
minLength: 1
type: string
Description:
type: string
AttachmentType:
format: int32
enum:
- 0
- 1
- 2
type: integer
QuoteAttachmentId:
format: int32
type: integer
additionalProperties: false
QuoteItemModelGET:
required:
- Quantity
- WorkOrderArticleId
type: object
properties:
Quantity:
format: double
type: number
PricePerQuantityExclVAT:
format: double
type: number
DiscountInPercentage:
format: double
type: number
DiscountAmount:
format: double
type: number
TaxRate:
format: double
type: number
WorkOrderArticleId:
format: int32
type: integer
ArticleName:
type: string
UnitType:
format: int32
enum:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
type: integer
QuoteItemId:
format: int32
type: integer
ISO4217CurrencyCode:
type: string
Created:
format: date-time
type: string
additionalProperties: false
QuoteNoteModelPUT:
required:
- Note
type: object
properties:
Note:
minLength: 1
type: string
QuoteNoteId:
format: int32
type: integer
additionalProperties: false
HttpResponseMessage:
type: object
properties:
Version:
$ref: '#/definitions/Version'
Content:
$ref: '#/definitions/HttpContent'
StatusCode:
format: int32
enum:
- 100
- 101
- 102
- 103
- 200
- 201
- 202
- 203
- 204
- 205
- 206
- 207
- 208
- 226
- 300
- 301
- 302
- 303
- 304
- 305
- 306
- 307
- 308
- 400
- 401
- 402
- 403
- 404
- 405
- 406
- 407
- 408
- 409
- 410
- 411
- 412
- 413
- 414
- 415
- 416
- 417
- 421
- 422
- 423
- 424
- 426
- 428
- 429
- 431
- 451
- 500
- 501
- 502
- 503
- 504
- 505
- 506
- 507
- 508
- 510
- 511
type: integer
ReasonPhrase:
type: string
Headers:
type: array
items:
$ref: '#/definitions/StringStringIEnumerableKeyValuePair'
readOnly: true
TrailingHeaders:
type: array
items:
$ref: '#/definitions/StringStringIEnumerableKeyValuePair'
readOnly: true
RequestMessage:
$ref: '#/definitions/HttpRequestMessage'
IsSuccessStatusCode:
type: boolean
readOnly: true
additionalProperties: false
QuoteItemModelPOST:
required:
- Quantity
- WorkOrderArticleId
type: object
properties:
Quantity:
format: double
type: number
PricePerQuantityExclVAT:
format: double
type: number
DiscountInPercentage:
format: double
type: number
DiscountAmount:
format: double
type: number
TaxRate:
format: double
type: number
WorkOrderArticleId:
format: int32
type: integer
ArticleName:
type: string
UnitType:
format: int32
enum:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
type: integer
additionalProperties: false
QuoteModelSyncPUT:
required:
- WorkOrderCustomerId
type: object
properties:
JobDate:
format: date-time
type: string
JobTime:
$ref: '#/definitions/TimeSpan'
EstimatedTimeInMinutes:
format: int32
type: integer
JobDescription:
type: string
ExternalId:
type: string
CustomerContactName:
type: string
CustomerEmail:
type: string
CustomerName:
type: string
CustomerCommunicationLanguageISO639_2:
type: string
CustomerPhoneNumber:
type: string
CustomerJobAddress:
$ref: '#/definitions/CustomerJobAddressModel'
CustomerBillingAddress:
$ref: '#/definitions/CustomerBillingAddressModel'
NotificationType:
format: int32
enum:
- 0
- 1
- 2
- 3
type: integer
WorkOrderCategoryId:
format: int32
type: integer
CategoryName:
type: string
AssignedToContactId:
format: int32
type: integer
WorkOrderCustomerId:
format: int32
type: integer
EstimatedTotal:
format: double
type: number
Status:
format: int32
enum:
- 0
- 1
- 2
- 3
- 4
- 5
type: integer
Attachments:
type: array
items:
$ref: '#/definitions/QuoteAttachmentModelPUT'
Notes:
type: array
items:
$ref: '#/definitions/QuoteNoteModelPUT'
Items:
type: array
items:
$ref: '#/definitions/QuoteItemModelPUT'
QuoteId:
format: int32
type: integer
additionalProperties: false
CustomerBillingAddressModel:
type: object
properties:
Street:
type: string
Apartment:
type: string
CareOf:
type: string
ZipCode:
type: string
City:
type: string
StateOrProvince:
type: string
ISO3166CountryCode:
type: string
Position:
$ref: '#/definitions/PositionPointModel'
additionalProperties: false
HttpMethod:
type: object
properties:
Method:
type: string
additionalProperties: false
HttpRequestMessage:
type: object
properties:
Version:
$ref: '#/definitions/Version'
VersionPolicy:
format: int32
enum:
- 0
- 1
- 2
type: integer
Content:
$ref: '#/definitions/HttpContent'
Method:
$ref: '#/definitions/HttpMethod'
RequestUri:
format: uri
type: string
Headers:
type: array
items:
$ref: '#/definitions/StringStringIEnumerableKeyValuePair'
readOnly: true
Properties:
type: object
additionalProperties: {}
readOnly: true
Options:
type: object
additionalProperties: {}
readOnly: true
additionalProperties: false
QuoteNoteModelGET:
required:
- Note
type: object
properties:
Note:
minLength: 1
type: string
QuoteNoteId:
format: int32
type: integer
CreatedByContactId:
format: int32
type: integer
Created:
format: date-time
type: string
additionalProperties: false
QuoteModelPUT:
required:
- WorkOrderCustomerId
type: object
properties:
JobDate:
format: date-time
type: string
JobTime:
$ref: '#/definitions/TimeSpan'
EstimatedTimeInMinutes:
format: int32
type: integer
JobDescription:
type: string
ExternalId:
type: string
CustomerContactName:
type: string
CustomerEmail:
type: string
CustomerName:
type: string
CustomerCommunicationLanguageISO639_2:
type: string
CustomerPhoneNumber:
type: string
CustomerJobAddress:
$ref: '#/definitions/CustomerJobAddressModel'
CustomerBillingAddress:
$ref: '#/definitions/CustomerBillingAddressModel'
NotificationType:
format: int32
enum:
- 0
- 1
- 2
- 3
type: integer
WorkOrderCategoryId:
format: int32
type: integer
CategoryName:
type: string
AssignedToContactId:
format: int32
type: integer
WorkOrderCustomerId:
format: int32
type: integer
EstimatedTotal:
format: double
type: number
Status:
format: int32
enum:
- 0
- 1
- 2
- 3
- 4
- 5
type: integer
Attachments:
type: array
items:
$ref: '#/definitions/QuoteAttachmentModelPUT'
Notes:
type: array
items:
$ref: '#/definitions/QuoteNoteModelPUT'
Items:
type: array
items:
$ref: '#/definitions/QuoteItemModelPUT'
additionalProperties: false
QuoteStatusModelPUT:
type: object
properties:
Status:
format: int32
enum:
- 0
- 1
- 2
- 3
- 4
- 5
type: integer
additionalProperties: false
Version:
type: object
properties:
Major:
format: int32
type: integer
readOnly: true
Minor:
format: int32
type: integer
readOnly: true
Build:
format: int32
type: integer
readOnly: true
Revision:
format: int32
type: integer
readOnly: true
MajorRevision:
format: int32
type: integer
readOnly: true
MinorRevision:
format: int32
type: integer
readOnly: true
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