openapi: 3.2.0 info: title: Automile Resource Owner Quote 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 parameters: - in: query name: from description: Filter on Created to be on or after from date (default is 30 days prior to todays date) schema: type: string format: date-time - in: query name: to description: Filter on Created to be on or after to date (default is todays date) schema: 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) schema: type: integer format: int32 enum: - 0 - 1 - 2 - 3 - 4 - 5 - in: query name: includeDeleted description: Include deleted quote (default is false) schema: type: boolean default: false responses: '200': description: Successful request content: text/plain: schema: type: array items: $ref: '#/components/schemas/QuoteModelGET' application/json: schema: type: array items: $ref: '#/components/schemas/QuoteModelGET' text/json: schema: type: array items: $ref: '#/components/schemas/QuoteModelGET' '500': description: Internal server error security: - oauth2: [] post: tags: - ResourceOwnerQuote summary: Create a new Quote operationId: ResourceOwnerQuote_CreateQuote 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: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/QuoteModelPOST' text/json: schema: $ref: '#/components/schemas/QuoteModelPOST' application/*+json: schema: $ref: '#/components/schemas/QuoteModelPOST' description: Quote model 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 item, attachment or note is missing on an existing quote that item, attachment or note is removed.' operationId: ResourceOwnerWorkOrder_SaveQuoteList responses: '200': description: Successful update content: text/plain: schema: type: array items: $ref: '#/components/schemas/QuoteModelGET' application/json: schema: type: array items: $ref: '#/components/schemas/QuoteModelGET' text/json: schema: type: array items: $ref: '#/components/schemas/QuoteModelGET' '500': description: Internal server error. security: - oauth2: [] requestBody: content: application/json: schema: type: array items: $ref: '#/components/schemas/QuoteModelSyncPUT' text/json: schema: type: array items: $ref: '#/components/schemas/QuoteModelSyncPUT' application/*+json: schema: type: array items: $ref: '#/components/schemas/QuoteModelSyncPUT' description: List of quotes /v1/resourceowner/quotes/{quoteId}: get: tags: - ResourceOwnerQuote summary: Get a Quote operationId: ResourceOwnerQuote_GetQuote parameters: - in: path name: quoteId description: Quote Id required: true schema: type: integer format: int32 responses: '200': description: Success content: text/plain: schema: $ref: '#/components/schemas/QuoteModelGET' application/json: schema: $ref: '#/components/schemas/QuoteModelGET' text/json: schema: $ref: '#/components/schemas/QuoteModelGET' security: - oauth2: [] put: tags: - ResourceOwnerQuote summary: Updates a quote operationId: ResourceOwnerQuote_UpdateQuote parameters: - in: path name: quoteId description: Quote Id that needs to be udpated required: true schema: type: integer format: int32 responses: '200': description: Success content: text/plain: schema: $ref: '#/components/schemas/HttpResponseMessage' application/json: schema: $ref: '#/components/schemas/HttpResponseMessage' text/json: schema: $ref: '#/components/schemas/HttpResponseMessage' security: - oauth2: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/QuoteModelPUT' text/json: schema: $ref: '#/components/schemas/QuoteModelPUT' application/*+json: schema: $ref: '#/components/schemas/QuoteModelPUT' description: Quote edit model 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 schema: 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 parameters: - in: path name: quoteId description: The quote which the satus should be updated on required: true schema: type: integer format: int32 responses: '200': description: Successful update '403': description: Forbidden access to resource '500': description: Internal server error security: - oauth2: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/QuoteStatusModelPUT' text/json: schema: $ref: '#/components/schemas/QuoteStatusModelPUT' application/*+json: schema: $ref: '#/components/schemas/QuoteStatusModelPUT' description: Quote status /v1/resourceowner/quotes/referenceId: get: tags: - ResourceOwnerQuote summary: Get a new reference id for a quote (not unique) operationId: ResourceOwnerQuote_GetNextQuoteId responses: '200': description: Successful request content: text/plain: schema: type: string application/json: schema: type: string text/json: schema: type: string '500': description: Internal server error security: - oauth2: [] components: schemas: PositionPointModel: type: object properties: Longitude: format: double type: number Latitude: format: double type: number 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 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 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: '#/components/schemas/PositionPointModel' additionalProperties: false QuoteNoteModelPOST: required: - Note type: object properties: Note: minLength: 1 type: string 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 QuoteNoteModelPUT: required: - Note type: object properties: Note: minLength: 1 type: string QuoteNoteId: format: int32 type: integer additionalProperties: false HttpResponseMessage: type: object properties: Version: $ref: '#/components/schemas/Version' Content: $ref: '#/components/schemas/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: '#/components/schemas/StringStringIEnumerableKeyValuePair' readOnly: true TrailingHeaders: type: array items: $ref: '#/components/schemas/StringStringIEnumerableKeyValuePair' readOnly: true RequestMessage: $ref: '#/components/schemas/HttpRequestMessage' IsSuccessStatusCode: type: boolean readOnly: true 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 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: '#/components/schemas/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: '#/components/schemas/CustomerJobAddressModel' CustomerBillingAddress: $ref: '#/components/schemas/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: '#/components/schemas/QuoteAttachmentModelPOST' Notes: type: array items: $ref: '#/components/schemas/QuoteNoteModelPOST' Items: type: array items: $ref: '#/components/schemas/QuoteItemModelPOST' 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: '#/components/schemas/PositionPointModel' 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 StringStringIEnumerableKeyValuePair: type: object properties: Key: type: string Value: type: array items: type: string 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 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 QuoteModelGET: required: - WorkOrderCustomerId type: object properties: JobDate: format: date-time type: string JobTime: $ref: '#/components/schemas/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: '#/components/schemas/CustomerJobAddressModel' CustomerBillingAddress: $ref: '#/components/schemas/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: '#/components/schemas/QuoteStatusHistoryModelGET' Notes: type: array items: $ref: '#/components/schemas/QuoteNoteModelGET' Items: type: array items: $ref: '#/components/schemas/QuoteItemModelGET' Attachments: type: array items: $ref: '#/components/schemas/QuoteAttachmentModelGET' additionalProperties: false HttpMethod: type: object properties: Method: type: string additionalProperties: false QuoteModelPUT: required: - WorkOrderCustomerId type: object properties: JobDate: format: date-time type: string JobTime: $ref: '#/components/schemas/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: '#/components/schemas/CustomerJobAddressModel' CustomerBillingAddress: $ref: '#/components/schemas/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: '#/components/schemas/QuoteAttachmentModelPUT' Notes: type: array items: $ref: '#/components/schemas/QuoteNoteModelPUT' Items: type: array items: $ref: '#/components/schemas/QuoteItemModelPUT' additionalProperties: false HttpContent: type: object properties: Headers: type: array items: $ref: '#/components/schemas/StringStringIEnumerableKeyValuePair' readOnly: true additionalProperties: false 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 HttpRequestMessage: type: object properties: Version: $ref: '#/components/schemas/Version' VersionPolicy: format: int32 enum: - 0 - 1 - 2 type: integer Content: $ref: '#/components/schemas/HttpContent' Method: $ref: '#/components/schemas/HttpMethod' RequestUri: format: uri type: string Headers: type: array items: $ref: '#/components/schemas/StringStringIEnumerableKeyValuePair' readOnly: true Properties: type: object additionalProperties: {} readOnly: true Options: type: object additionalProperties: {} readOnly: true additionalProperties: false QuoteModelSyncPUT: required: - WorkOrderCustomerId type: object properties: JobDate: format: date-time type: string JobTime: $ref: '#/components/schemas/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: '#/components/schemas/CustomerJobAddressModel' CustomerBillingAddress: $ref: '#/components/schemas/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: '#/components/schemas/QuoteAttachmentModelPUT' Notes: type: array items: $ref: '#/components/schemas/QuoteNoteModelPUT' Items: type: array items: $ref: '#/components/schemas/QuoteItemModelPUT' QuoteId: format: int32 type: integer additionalProperties: false securitySchemes: oauth2: type: oauth2 flows: implicit: scopes: read: Read access to protected resources write: Write access to protected resources authorizationUrl: https://api.automile.com/login/ description: OAuth2 Implicit Grant x-provenance: method: harvested publisher: Automileab source: https://api.automile.com/swagger/v1/swagger.json note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json); stamped by stamp-openapi-provenance.py (roadmap#793)