{"openapi":"3.0.0","info":{"version":"1.5.4","title":"AAMC Integration -  Service Request","description":"Specifications for aamc integration requests. <br/> This may need some form of authentication and authorisation.<br /> Requests are processed through an apim endpoint, which will manage all the authentication and authourisation."},"servers":[{"url":"https://apim-integration-aue-p01.azure-api.net/api"}],"paths":{"/servicerequest":{"post":{"summary":"Request to create a service request.","description":"Request to create an assessment. This request will validate and forward the request to the operational system.","parameters":[{"in":"header","name":"client","schema":{"type":"string"},"required":true}],"operationId":"createassessment","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/assessment-request-def"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"type":"object","properties":{"aamcServiceId":{"type":"string"},"estimageRef":{"type":"string"},"estimageUrl":{"type":"string"}}}},"example":{"success":true,"message":"New service request successfully created.","data":{"aamcServiceId":"b6b533b5-d3cc-48b0-8639-5ee99f12d71e","estimageRef":"AAMC00002334","estimageUrl":"https://dummy.estimage.com.au/servicerequest/#AAMC00002334"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Validation Error"},"errors":{"type":"array","items":{"type":"object","properties":{"fieldname":{"type":"string"}},"example":{"claimant":"Claimant details are Required."}}}}}}}}}}},"/servicerequest/{aamcServiceId}/image":{"post":{"summary":"Receive an image as base64 encoded string","description":"Adds new image to a service request. <br/>","operationId":"createimage","parameters":[{"name":"aamcServiceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"client","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/image-form-def"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Image Created."}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"errorcode":{"type":"string"}}},"example":{"success":false,"message":"The image object did not contain binary content.","errorcode":"E0001"}}}}}}},"/servicerequest/{aamcServiceId}/document":{"post":{"summary":"Receive a document as base64 encoded string","description":"Adds new document to a service request. <br/>","operationId":"createdocument","parameters":[{"name":"aamcServiceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"client","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/document-form-def"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Document Created."}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"errorcode":{"type":"string"}},"example":{"success":false,"message":"Unable to process request"}}}}}}}}},"security":[{"ApiKeyAuth":[]},{"oAuth2Integration":["api://118e7169-d52c-4dcc-a6d4-27cde820d1d3/.default"]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Ocp-Apim-Subscription-Key"},"oAuth2Integration":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token","scopes":{"api://{clientId}/.default":"Client Scope"}}}}},"schemas":{"assessment-request-def":{"type":"object","required":["clientReferenceNumber","serviceRequest","repairAuthority","policyDetails","stakeholders","incidentDetails","claimant","vehicle"],"properties":{"serviceRequest":{"type":"string","example":"Loss Assessing"},"clientReferenceNumber":{"type":"string","example":"ref12345"},"repairAuthority":{"type":"string","enum":["Authorised","Without-Prejudice"],"example":"Authorised"},"requestQuote":{"type":"boolean","example":false},"policyDetails":{"type":"object","required":["claimNumber","policyNumber","excess","policyType","policyTypeAmount"],"properties":{"claimNumber":{"type":"string","example":"CLM-00023","nullable":true},"policyNumber":{"type":"string","example":"POL-00034","nullable":true},"excess":{"type":"number","multipleOf":0.01,"nullable":true},"additionalExcess":{"type":"number"},"policyType":{"type":"string","nullable":true,"enum":["Market Value","Agreed Value","Sum Insured"],"example":"Market Value"},"policyTypeAmount":{"type":"number"}}},"stakeholders":{"$ref":"#/components/schemas/stakeholders-def"},"serviceProviders":{"$ref":"#/components/schemas/serviceproviders-def"},"incidentDetails":{"type":"object","required":["incidentDate","incidentDescription"],"properties":{"incidentDate":{"type":"string","format":"datetime","minLength":10},"incidentAddress":{"type":"string","nullable":true,"maxLength":255},"incidentSuburb":{"type":"string","nullable":true,"maxLength":32},"incidentState":{"type":"string","nullable":true,"maxLength":32},"incidentPostcode":{"type":"string","nullable":true,"maxLength":4},"incidentDamageType":{"type":"string","nullable":true,"maxLength":255},"incidentDescription":{"type":"string","nullable":true,"maxLength":4000}},"example":{"incidentDate":"2022-05-24","incidentAddress":"23 Royal Crt","incidentSuburb":"Crest Town","incidentState":"NSW","incidentPostcode":"4502","incidentDamageType":"Impact","incidentDescription":"Did not break in time, ran into the back of car in front"}},"claimant":{"type":"object","required":["claimantType","claimantName"],"properties":{"claimantType":{"type":"string","enum":["insured","thirdparty"]},"claimantName":{"type":"string"},"claimantMobile":{"type":"string","nullable":true,"example":"","maxLength":13},"claimantWork":{"type":"string","nullable":true,"example":"","maxLength":13},"claimantHome":{"type":"string","nullable":true,"example":"","maxLength":13},"bestPhone":{"type":"string","enum":["claimantMobile","claimantHome","claimantWork"],"nullable":true,"example":"","maxLength":14},"claimantEmail":{"type":"string","nullable":true,"example":"","maxLength":128,"format":"email"},"claimantAddress":{"type":"string","nullable":true,"example":"","maxLength":255},"stakeholderCity":{"type":"string","nullable":true,"example":"","maxLength":255},"claimantState":{"type":"string","nullable":true,"example":"QLD","maxLength":5,"enum":["ACT","QLD","VIC","NSW","TAS","WA","SA","NT","NZ"]},"claimantPostcode":{"type":"string","nullable":true,"example":"","maxLength":4},"claimantCity":{"type":"string","nullable":true,"example":"","maxLength":255}},"example":{"claimantType":"insured","claimantName":"John Smith","claimantMobile":"+61488488488","claimantWork":"","claimantHome":"","bestPhone":"claimantMobile","claimantEmail":"john.smith@email.com.au","claimantAddress":"520 Fake Street","claimantCity":"Brisbane","claimantState":"QLD","claimantPostcode":"4000"}},"vehicle":{"type":"object","required":["regNum","regState"],"properties":{"make":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"colour":{"type":"string","nullable":true},"regNum":{"type":"string","nullable":true},"regState":{"type":"string","enum":["ACT","QLD","VIC","NSW","TAS","WA","SA","NT","NZ"]},"vehicleBodyType":{"type":"string","nullable":true},"vin":{"type":"string","nullable":true,"maxLength":20},"DOM":{"type":"string","format":"date","nullable":true},"repairAuthority":{"type":"string","nullable":true},"vehicleIsDrivable":{"type":"boolean"}},"example":{"make":"Ford","model":"Falcon","regNum":"413 TTK","regState":"QLD","vin":"JT1111ABCDE654321"}},"inspectionDetails":{"type":"object","properties":{"inspectionLocationType":{"type":"string","enum":["Claimant","Repairer","SalvageYard"]},"inpsectionAddress":{"type":"string","maxLength":255},"inpsectionCity":{"type":"string","maxLength":128},"inpsectionState":{"type":"string","maxLength":4,"enum":["ACT","QLD","VIC","NSW","TAS","WA","SA","NT","NZ"]},"inpsectionPostcode":{"type":"string","maxLength":4},"inpsectionLat":{"type":"string","nullable":true},"inpsectionLng":{"type":"string","nullable":true},"inspectionBooked":{"type":"boolean","nullable":true},"inspectionDateTime":{"type":"string","format":"datetime","nullable":true},"inspectionMethod":{"type":"string","enum":["desktop","onroad"],"example":"desktop"}},"example":{"inspectionLocationType":"Claimant","inpsectionAddress":"520 Fake Street","inpsectionCity":"Kalgoorlie","inpsectionState":"WA","inpsectionPostcode":"6430","inpsectionLat":"-30.7562008","inpsectionLng":"121.4619980","inspectionBooked":"true","inspectionDateTime":"2018-01-05","inspectionMethod":"desktop"}}}},"stakeholders-def":{"type":"object","required":["client"],"properties":{"intermediary":{"allOf":[{"$ref":"#/components/schemas/stakeholder-def"},{"type":"object","required":["name"],"properties":{"clientIntegrationKey":{"type":"string","nullable":false}}},{"example":{"name":"Anderson & Co","address":"Smith Fields RD","city":"Ballarat","state":"QLD","postcode":"4500","suburb":"New Farm","email":"info@anderson.com.au","phone":"0745934222","stakeholderType":"intermediary","contact":{"name":"Anderson Contact","email":"anderson-contact@anderson.com.au","phone":"04139234355"}}}]},"client":{"allOf":[{"$ref":"#/components/schemas/stakeholder-def"},{"type":"object","required":["name"],"properties":{"clientIntegrationKey":{"type":"string","nullable":false}}},{"example":{"name":"AAMC Client","address":"Aamc campus RD","city":"Banko","state":"QLD","postcode":"4501","suburb":"OldFarm","email":"info@aamc-client.com.au","phone":"0302934222","stakeholderType":"insured","contact":{"name":"Client Contact","email":"client.contact1@aamc-client.com.au","phone":"04139234355"}}}]},"broker":{"allOf":[{"$ref":"#/components/schemas/stakeholder-def"},{"type":"object","required":["name"],"properties":{"clientIntegrationKey":{"type":"string","nullable":false}}},{"example":{"name":"AAMC Broker Pty Ltd","address":"Broker Rd","city":"West Perth","state":"QLD","postcode":"4001","suburb":"Ant Stead","email":"info@aamc-broker.com.au","phone":"0645934222","stakeholderType":"broker","contact":{"name":"Broker Contact","email":"broker-contact1@aamc-broker.com.au","phone":"04139234355"}}}]}}},"stakeholder-def":{"type":"object","properties":{"name":{"type":"string","nullable":false},"address":{"type":"string","nullable":true,"example":"","maxLength":255},"city":{"type":"string","nullable":true,"example":"","maxLength":255},"state":{"type":"string","nullable":true,"example":"QLD","maxLength":5,"enum":["ACT","QLD","VIC","NSW","TAS","WA","SA","NT","NZ"]},"postcode":{"type":"string","nullable":true,"example":"","maxLength":4},"suburb":{"type":"string","nullable":true,"example":"","maxLength":255},"phone":{"type":"string","nullable":true,"example":"","maxLength":255},"email":{"type":"string","format":"email","nullable":true,"example":"","maxLength":255},"stakeholderType":{"type":"string","enum":["Insurer","Broker","Client","Intermediary"],"maxLength":8},"contacts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":128},"email":{"type":"string","format":"email"},"phone":{"type":"string","nullable":true}},"example":{"name":"Vill Barner","email":"vill.barner@aamc-intermidiary.com.au","phone":"04139234355"}}}}},"serviceproviders-def":{"type":"object","properties":{"repairer":{"allOf":[{"$ref":"#/components/schemas/stakeholder-def"},{"type":"object","required":["name"],"properties":{"abn":{"type":"string"}}},{"example":{"abn":"1112345678","name":"Body Worxs Grant Hill","address":"11 Repair Street","city":"Brisbane","state":"QLD","postcode":"4000","suburb":"Grant Hill","phone":"+61389092803","email":"repairer@email.com.au","stakeholderType":"Repairer"}}]},"towing":{"allOf":[{"$ref":"#/components/schemas/stakeholder-def"},{"type":"object","properties":{"abn":{"type":"string"}}},{"example":{"abn":"782411444445","name":"Grant Hill Towing","address":"11 Repair Street","city":"Gold Coast","state":"QLD","postcode":"4000","suburb":"Arundal","phone":"+61389092803","email":"repairer@email.com.au","stakeholderType":"Towing"}}]},"salvageprovider":{"allOf":[{"$ref":"#/components/schemas/stakeholder-def"},{"type":"object","properties":{"abn":{"type":"string"}}},{"example":{"abn":"90933434343434","name":"Grant Hill Salvage n Wreckers","address":"11 Yard Rd","city":"Tin Can Bay","state":"QLD","postcode":"4550","suburb":"Kin Kin","phone":"+61389092803","email":"salvage-wrecker@email.com.au","stakeholderType":"Salvage Company"}}]}}},"image-form-def":{"type":"object","properties":{"note":{"type":"string","description":"Description of the image","nullable":false,"example":"Look at the bumper, it seems broken."},"addedBy":{"type":"string","description":"Name of the individual who added the image.","nullable":false,"example":"Grace Hopper"},"file":{"type":"string","format":"binary","description":"Content of the file.","nullable":false},"belongsTo":{"enum":["SERVICE_PROVIDER","INSURER"],"description":"Who this document belongs to. Only considered for service providers  customers, otherwise defaults to INSURER for an insurance company.","example":"INSURER"},"visibility":{"enum":["PUBLIC_INCLUDING_REPAIRER","PUBLIC_EXCLUDING_REPAIRER","PRIVATE"],"description":"Who this document shall be visible to. PUBLIC_INCLUDING_REPAIRER: Everyone. PUBLIC_EXCLUDING_REPAIRER: The insurer and any service provider involved. PRIVATE: Only the company the document belongs to. Should a document had been uploaded on behalf of a  Insurer and the visibility is private, only users from the insurer company, part of a group with Insurer access will have access to the said document.","example":"PRIVATE"}}},"document-form-def":{"type":"object","properties":{"note":{"type":"string","description":"Description of the document","nullable":false,"example":"This is the invoice received from the insured."},"addedBy":{"type":"string","description":"Name of the individual who added the document.","nullable":false,"example":"Tim Berners-Lee"},"file":{"type":"string","format":"binary","description":"Content of the file.","nullable":false},"belongsTo":{"enum":["SERVICE_PROVIDER","INSURER"],"description":"Who this document belongs to. Only considered for service providers  customers, otherwise defaults to INSURER for an insurance company.","example":"INSURER"},"visibility":{"enum":["PUBLIC_INCLUDING_REPAIRER","PUBLIC_EXCLUDING_REPAIRER","PRIVATE"],"description":"Who this document shall be visible to. PUBLIC_INCLUDING_REPAIRER: Everyone. PUBLIC_EXCLUDING_REPAIRER: The insurer and a service provider involved. PRIVATE: Only the company the document belongs to. Should a document had been uploaded on behalf of a Insurer and the visibility is private, only users from the  insurer company, part of a group with Insurer access will have access to the said document.","example":"PRIVATE"}}}}}}