{"openapi":"3.0.3","info":{"title":"AAS Supplier API proposal","version":"v0.0.alpha"},"paths":{"/supplier/quote/{quoteId}":{"get":{"tags":["Quote"],"summary":"Method to lookup a quote","parameters":[{"name":"quoteId","in":"path","description":"The quote id being looked up","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found quote id is not valid"}},"security":[{"Bearer":[]},{"BasicAuthentication":[]}]}},"/supplier/quote":{"post":{"tags":["Quote"],"summary":"Method to quote all search types","requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"400":{"description":"Bad Request response contains indications","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"Bearer":[]},{"BasicAuthentication":[]}]}},"/supplier/order/{orderId}":{"get":{"tags":["Order"],"summary":"Method to get order details","parameters":[{"in":"path","name":"orderId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/OrderResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"security":[{"Bearer":[]},{"BasicAuthentication":[]}]}},"/supplier/order":{"post":{"tags":["Order"],"summary":"Method to order all parts quoted","parameters":[{"in":"query","name":"allOrNone","description":"FALSE: If any parts cannot be ordered, none are ordered. TRUE: If some parts cannot be ordered, the ones that can are ordered. Default is TRUE.","schema":{"type":"boolean"},"required":false}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/OrderRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/OrderResponse"}}}},"400":{"description":"Bad Request response contains indications","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/OrderResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"Bearer":[]},{"BasicAuthentication":[]}]}},"/supplier/shipping/cost":{"post":{"tags":["Shipping"],"summary":"Method to calculate Shipping Costs","requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dtoShippingCostRequestTPA"}},"text/json":{"schema":{"$ref":"#/components/schemas/dtoShippingCostRequestTPA"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V4ShippingCostResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/V4ShippingCostResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V4ShippingCostResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/V4ShippingCostResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"Bearer":[]},{"BasicAuthentication":[]}]}},"/supplier/shipping/deliveryStatus/{orderId}":{"get":{"tags":["Shipping"],"summary":"Outbound shipping information for each part on the order","parameters":[{"name":"orderId","in":"path","description":"Supplier order id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryStatusResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/DeliveryStatusResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"security":[{"Bearer":[]},{"BasicAuthentication":[]}]}}},"components":{"schemas":{"CustomerDetail":{"required":["adjuster","authorizationNumber","contractNumber","currentMileage","ownerName","vin"],"type":"object","properties":{"adjuster":{"minLength":1,"type":"string","description":"Adjuster name"},"adjusterEmail":{"type":"string","description":"Adjuster email address","nullable":true},"claimNumber":{"minLength":1,"type":"string","description":"Authorization number"},"authorizationNumber":{"minLength":1,"type":"string","description":"Authorization number"},"contractNumber":{"minLength":1,"type":"string","description":"Contract number"},"currentMileage":{"minLength":1,"type":"integer","description":"Vehicle's current mileage"},"eocDate":{"type":"string","description":"Date when the contract expires","format":"date","nullable":true},"eocMileage":{"type":"integer","description":"Mileage when the contract expires","nullable":true},"note":{"type":"string","description":"Any additional notes/messages","nullable":true},"ownerName":{"minLength":1,"type":"string","description":"Vehicle owner's name"},"repairOrderNumber":{"type":"string","description":"Repair Order number","nullable":true},"vin":{"minLength":1,"type":"string","description":"VIN of vehicle"}},"additionalProperties":false,"description":"Claim information"},"Facility":{"required":["addressDetails","contactName","facilityName","facilityPhone"],"type":"object","properties":{"addressDetails":{"$ref":"#/components/schemas/OrderAddress"},"contactCell":{"type":"string","description":"Cell phone number for the contact at the repair facility","nullable":true},"contactName":{"minLength":1,"type":"string","description":"Name of the contact at the repair facility"},"contactEmail":{"type":"string","description":"Email address of the contact at the repair facility","nullable":true},"facilityName":{"minLength":1,"type":"string","description":"Repair facility's name"},"facilityPhone":{"minLength":1,"type":"string","description":"Repair facility's phone number"},"facilityFax":{"type":"string","description":"Repair facility's fax number","nullable":true}},"additionalProperties":false,"description":"Information about the repair facility to which the parts will be delivered"},"Address1":{"type":"object","properties":{"address1":{"minLength":1,"type":"string","description":"Street address line 1"},"address2":{"type":"string","description":"Street address line 2","nullable":true}}},"Address2":{"type":"object","properties":{"city":{"minLength":1,"type":"string","description":"City"},"postalCode":{"minLength":1,"type":"string","description":"5 digit US zipcode"},"stateCode":{"minLength":1,"type":"string","description":"Two letter ANSI US state code"},"countryCode":{"type":"string","description":"Two letter country code, defaults to US if not provided","nullable":true}}},"OrderAddress":{"allOf":[{"$ref":"#/components/schemas/Address1"},{"$ref":"#/components/schemas/Address2"}]},"PartItem":{"required":["searchType"],"type":"object","properties":{"searchType":{"minLength":1,"type":"string","enum":["engine","automatictransmission","manualtransmission","frontdifferential","reardifferential","transfercase","oempartnumber"],"description":"The search type being used for the quote."},"partNumber":{"type":"string","description":"Optional. Only required and used for OEMPartNumber search.","nullable":true},"key":{"type":"string","description":"Optional. Requestor item key.","nullable":true}},"additionalProperties":false,"description":"Information on the Part Requested"},"QuoteLocation":{"$ref":"#/components/schemas/Address2"},"QuoteMessage":{"type":"object","properties":{"category":{"type":"string","description":"Category that the message belongs to. For example 'customer' for simple messages, 'includes' for any extra items that are explicitly included","nullable":true},"content":{"type":"string","description":"Message which can contain html encoded formatting tags and links","nullable":true}},"additionalProperties":false,"description":"Mesage Details Related to a Quote"},"QuoteWarning":{"type":"object","properties":{"header":{"type":"string","description":"Header information of a warning which can contain HTML encoded formatting tags and links","nullable":true,"readOnly":true},"content":{"type":"string","description":"Warning message which can contain HTML encoded formatting tags and links","nullable":true,"readOnly":true}},"additionalProperties":false,"description":"Warnings related to a quoted part"},"QuoteWarranty":{"type":"object","properties":{"warrantyId":{"type":"integer","description":"The warranty identifier used in ordering","format":"int32","readOnly":true},"warrantyDisplayName":{"type":"string","description":"The short warranty name","nullable":true,"readOnly":true},"warrantyDescription":{"type":"string","description":"The longer warranty description","nullable":true,"readOnly":true},"warrantyPrice":{"type":"number","description":"The customer price for the warranty option","format":"double","readOnly":true}},"additionalProperties":false,"description":"Information for each warranty option"},"QuoteItem":{"type":"object","properties":{"customerKey":{"type":"string","description":"Optional. Respond with same key from request.","nullable":true},"partCatalog":{"type":"string","description":"Based on search type requested, this describes the category of the part returned.","nullable":true,"readOnly":true},"coreValue":{"type":"number","description":"The value of the core if there is one. The is for reference only, not billed to customer.","format":"double","readOnly":true},"customerPrice":{"type":"number","description":"Customer price of the part","format":"double","readOnly":true},"tax":{"type":"number","description":"Tax of the part","format":"double","readOnly":true},"shipping":{"type":"number","description":"Shipping cost of the part","format":"double","readOnly":true},"coreShipping":{"type":"number","description":"Core shipping cost of the part","format":"double","readOnly":true},"deliveryDate":{"type":"string","description":"Expected delivery date if ordered prior to cutoff","format":"date","nullable":true,"readOnly":true},"deliveryDateCutoffUTC":{"type":"string","description":"The UTC date time cutoff for when the delivery date is still valid","format":"date-time","nullable":true,"readOnly":true},"description":{"type":"string","description":"Brief description of the part such as alternator or remanufactured automatic transmission","nullable":true,"readOnly":true},"stockStatus":{"enum":["No","Yes","Call"],"type":"string","description":"If value is no, part cannot be ordered. A part with the call status can still be ordered but a User must call to verify an estimated delivery date."},"listPrice":{"type":"number","description":"MSRP of part. Only provided for OEM parts. TODO","format":"double","nullable":true,"readOnly":true},"matchDetails":{"type":"string","description":"Important notes related to the part that are necessary to allow the user to select the correct part to order.","nullable":true,"readOnly":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/QuoteMessage"},"description":"Customer specific messages related to the quoted part","nullable":true,"readOnly":true},"partRequested":{"$ref":"#/components/schemas/PartItem"},"quotedPartNumber":{"type":"string","description":"The part number of the quoted part. If the requested OEM part number has been superseded, the new part number will return here.","nullable":true,"readOnly":true},"quoteId":{"type":"string","description":"The quote ID of the part to be used when ordering","nullable":true,"readOnly":true},"resourceUrls":{"type":"array","items":{"$ref":"#/components/schemas/ResourceUrl"},"description":"URLs, if available, that display more information about the part, such as pictures","nullable":true,"readOnly":true},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/QuoteWarning"},"description":"Warnings related to the quoted part that need to be shown to the end user to ensure a successful installation.","nullable":true,"readOnly":true},"warranty":{"$ref":"#/components/schemas/QuoteWarranty"}},"additionalProperties":false,"description":"Information related to a quoted part"},"QuoteResponse":{"type":"object","properties":{"partsFound":{"type":"array","items":{"$ref":"#/components/schemas/QuoteItem"},"description":"List of all the parts found","nullable":true},"errorMessage":{"type":"string","description":"Any error messages related to this request","nullable":true}},"additionalProperties":false,"description":"The quote response"},"QuoteRequest":{"required":["address","parts","vin"],"type":"object","properties":{"vin":{"minLength":1,"type":"string","description":"VIN for the vehicle for which parts are being quoted. This is a 17 character string and requires a valid VIN."},"currentMileage":{"type":"number","description":"Required to obtain Used part results","format":"double","nullable":true},"address":{"$ref":"#/components/schemas/QuoteLocation"},"parts":{"type":"array","items":{"$ref":"#/components/schemas/PartSearchItem"},"description":"The parts to quote"}},"additionalProperties":false,"description":"Request object needed for a quote"},"ResourceUrl":{"type":"object","properties":{"url":{"type":"string","description":"The resource's URL","nullable":true},"description":{"type":"string","description":"Optional, a description of the resource","nullable":true},"type":{"type":"string","description":"Optional, the type of resource","nullable":true}},"additionalProperties":false,"description":"Information that display's more information about the part, such as pictures"},"ShippingCostItem":{"type":"object","properties":{"partCatalog":{"type":"string","description":"Based on search type requested, this describes the category of the part returned. \r\nCurrent catalogs returned are RemanPowertrain, UsedPowertrain, OEMPart, and OEMAftermarket. \r\n\r\nFor example, if AutomaticTransmission is the search type requested, the partCatalog could be RemanPowertrain or UsedPowertrain. If OEMPartNumber is the search type requested, the partCatalog could be OEMPart or OEMAftermarket.","nullable":true},"shippingCost":{"type":"number","description":"Shipping Cost value {numeric, two decimals}","format":"double"},"coreShippingCost":{"type":"number","description":"Core Shipping Cost value {numeric, two decimals}","format":"double"}},"additionalProperties":false},"ShippingInformation":{"type":"object","properties":{"carrier":{"type":"string","description":"Carrier used to ship part","nullable":true},"trackingNumber":{"type":"string","description":"Tracking number for part shipment","nullable":true},"trackingUrl":{"type":"string","description":"Link to carrier's site for latest tracking information","nullable":true},"shippingStatus":{"type":"string","description":"Shorter version of current part shipment status","nullable":true},"shippingStatusDetail":{"type":"string","description":"Longer version of current part shipment status","nullable":true},"delivered":{"type":"boolean","description":"True, if part has delivered"},"customerKey":{"type":"string","description":""},"partNumber":{"type":"string","description":"OEM/Aftermarket part number shipped","nullable":true},"replacementPart":{"type":"boolean","description":"True, if a replacement part needed to be shipped"}},"additionalProperties":false},"OrderPartItem":{"required":["quantity","quoteId"],"type":"object","properties":{"quoteId":{"minLength":1,"type":"string","description":"The quote ID specific to the part being ordered"},"quantity":{"type":"integer","description":"The number of units of the specific part number being ordered","format":"int32"}},"additionalProperties":false,"description":"Required information for part being ordered"},"OrderRequest":{"required":["customerInformation","parts","repairFacility"],"type":"object","properties":{"repairFacility":{"$ref":"#/components/schemas/Facility"},"customerInformation":{"$ref":"#/components/schemas/CustomerDetail"},"parts":{"type":"array","items":{"$ref":"#/components/schemas/OrderPartItem"},"description":"The parts being ordered"}},"additionalProperties":false,"description":"Information required to order parts"},"OrderResponse":{"type":"object","properties":{"orderId":{"type":"string","description":"Supplier order ID","nullable":true},"totalOrderCost":{"type":"number","description":"Total cost of the order that will appear on the invoice.","format":"double"},"totalOrderTax":{"type":"number","description":"Total tax amount for the order","format":"double"},"partsOrdered":{"type":"array","items":{"$ref":"#/components/schemas/QuoteItem"},"description":"List of all the parts ordered","nullable":true},"partsNotOrdered":{"type":"array","items":{"$ref":"#/components/schemas/QuoteItem"},"description":"List of all the parts that could not be ordered.  Only used when allOrNone is TRUE","nullable":true},"errorMessage":{"type":"string","description":"Any error messages related to this request.","nullable":true}},"additionalProperties":false,"description":"Response returned after parts are ordered"},"V4ShippingCostResponse":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Any Error Messages","nullable":true,"readOnly":true},"shippingCosts":{"type":"array","items":{"$ref":"#/components/schemas/ShippingCostItem"},"description":"The list of shipping costs","nullable":true,"readOnly":true}},"additionalProperties":false},"DeliveryStatusResponse":{"type":"object","properties":{"orderId":{"type":"integer","description":"Supplier order id","format":"string"},"shippingInformation":{"type":"array","items":{"$ref":"#/components/schemas/ShippingInformation"},"description":"Shipping information for all parts in order","nullable":true},"errorMessage":{"type":"string","description":"Error message if any","nullable":true}},"additionalProperties":false,"description":"Shipping Status Information"},"PartSearchItem":{"required":["part","quantity"],"type":"object","properties":{"part":{"$ref":"#/components/schemas/PartItem"},"quantity":{"type":"integer","description":"The quantity needed, defaults to 1 if not sent","format":"int32"}},"additionalProperties":false,"description":"Information on the part requested"},"dtoShippingCostRequestTPA":{"type":"object","properties":{"quotes":{"type":"array","items":{"$ref":"#/components/schemas/dtoShippingRequest"},"description":"List of QuoteID's","nullable":true},"tpa":{"type":"string","description":"Third Party Administrator Code (TPA)","nullable":true,"deprecated":true}},"additionalProperties":false,"description":"Request Object to get Shipping Info for quote items"},"dtoShippingRequest":{"type":"object","properties":{"quoteID":{"type":"string","description":"Must use QuoteID value returned from checkoempart request","nullable":true}},"additionalProperties":false,"description":"Request object for each QuoteID"}},"securitySchemes":{"Bearer":{"type":"apiKey","description":"Standard Authorization header using the Bearer scheme. Example: 'bearer {token}'","name":"Authorization","in":"header"},"BasicAuthentication":{"type":"http","description":"Standard UserName Password header","scheme":"basic"}}}}