{"openapi":"3.0.0","info":{"title":"Albertsons Chemical Survey","description":"Interacts with SharePoint and Dynamic 365 to generate surveys","version":"1.0.0-oas3"},"servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/SUVRO2711_1/your-api/1.0.0-oas3"},{"url":"http://localhost:7071/api","description":"local"}],"paths":{"/GetSurveyDetails":{"get":{"summary":"Returns survey meta data and questions","responses":{"200":{"description":"A JSON object of survey data"},"500":{"description":"Internal server error"}},"parameters":[{"in":"query","name":"surveyInviteId","required":true,"schema":{"type":"string"},"allowReserved":true,"example":"32094a3a-80c2-4967-8feb-11a50d0fee69"}]}},"/SurveyResponse":{"post":{"summary":"Add a new pet","requestBody":{"description":"Optional description in *Markdown*","required":true,"content":{"text/plain":{"schema":{"$ref":"#/components/schemas/QuestionResponse"},"example":{"SurveyId":"576363c8-3e01-ed11-82e4-000d3a1efd01","SupplierId":"cab25399-0007-ed11-82e4-000d3a573516","CustomerId":"add3ca2b-0107-ed11-82e4-000d3a573597","CustomerName":"Blackfin Cloud","FooterText":"© 2022 Albertsons Companies, Inc.  All rights reserved","SurveyTitle":"Testing Supplier Compliance Survey","SurveyInviteId":"32094a3a-80c2-4967-8feb-11a50d0fee69","SurveyDescription":"This is the Test Compliance Survey\n","SourceSurveyIdentifier":"oAT2t6kAiEGSSELzparC6VQkSaAGM_1KnV_AaNJDMWFUQUlJNlZOUVVTOVU3VU5IQ01GWFRJTkFMMi4u","QuestionGroups":[{"Title":"PFAS","Questions":[{"Id":"08a92392-0407-ed11-82e4-0022481d9631","SurveyInviteId":"32094a3a-80c2-4967-8feb-11a50d0fee69","Required":true,"Title":"I am legally able to respond to this survey.","Type":"Choice","ResponseOptions":[{"ResponseOptionId":"\"Yes\"","ResponseOptionText":"\"Yes\""},{"ResponseOptionId":"\"Maybe\"","ResponseOptionText":"\"Maybe\""},{"ResponseOptionId":"\"Probably\"","ResponseOptionText":"\"Probably\""},{"ResponseOptionId":"\"Probably Not\"","ResponseOptionText":"\"Probably Not\""}],"Response":"Probably","Files":""},{"Id":"ae8b8a19-0407-ed11-82e4-0022481d985a","Required":false,"Title":" Please add any products you have which contain PFAS","Type":"ProductGrid","ResponseOptions":[],"Files":""},{"Id":"25c40d67-0407-ed11-82e4-0022481d9c11","Required":true,"Title":" Please upload proof of what you said your PFAS levels were.  Thanks.","Type":"Attachment","ResponseOptions":[],"Files":[{"name":"Sonar Access failur.PNG","size":17032,"type":"image/png","lastModified":1660398950493}]},{"Id":"c9d58243-0407-ed11-82e4-002248225678","Required":true,"Title":"Please indicate whether you told the truth in your response","Type":"Choice","ResponseOptions":[{"ResponseOptionId":"\"I told the truth\"","ResponseOptionText":"\"I told the truth\""},{"ResponseOptionId":"\"I actually lied\"","ResponseOptionText":"\"I actually lied\""}],"Response":"I actually lied","Files":""},{"Id":"cad58243-0407-ed11-82e4-002248225678","Required":true,"Title":"For any of the products you identified as containing PFAS, please indicate where they PFAS came from.","Type":"Text","ResponseOptions":[],"Response":"fd","Files":""}]},{"Title":"Dioxane","Questions":[{"Id":"09a92392-0407-ed11-82e4-0022481d9631","Required":false,"Title":" Please create a row for each product that contains Dioxane","Type":"ProductGrid","ResponseOptions":[],"Files":""},{"Id":"daea1dbd-0407-ed11-82e4-0022481d985a","Required":false,"Title":"I promise the responses are correct and there are no other products that contain Dioxane in our catalog","Type":"Choice","ResponseOptions":[{"ResponseOptionId":"\"I promise\"","ResponseOptionText":"\"I promise\""},{"ResponseOptionId":"\"I almost promise\"","ResponseOptionText":"\"I almost promise\""}],"Files":""},{"Id":"d70619e5-0407-ed11-82e4-0022481d98db","Required":false,"Title":" Please upload some files to prove it. Thanks.","Type":"Attachment","ResponseOptions":[],"Files":""},{"Id":"d80619e5-0407-ed11-82e4-0022481d98db","Required":false,"Title":"Are you sure you didn't miss any products?","Type":"Choice","ResponseOptions":[{"ResponseOptionId":"\"I'm sure\"","ResponseOptionText":"\"I'm sure\""},{"ResponseOptionId":"\"Not completely sure\"","ResponseOptionText":"\"Not completely sure\""}],"Files":""}]}]}}}},"responses":{"201":{"description":"Created"}}}},"/SubmitFileResponse":{"post":{"summary":"Stores Whole Survey JSON and then each question","responses":{"200":{"description":"A JSON object of survey data"},"500":{"description":"Internal server error"}},"requestBody":{"description":"Optional description in *Markdown*","required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"metadata":{"type":"string","example":"{\"CustomerId\":\"add3ca2b-0107-ed11-82e4-000d3a573597\",\"SupplierId\":\"cab25399-0007-ed11-82e4-000d3a573516\",\"SurveyId\":\"576363c8-3e01-ed11-82e4-000d3a1efd01\",\"SourceSurveyIdentifier\":\"oAT2t6kAiEGSSELzparC6VQkSaAGM_1KnV_AaNJDMWFUQUlJNlZOUVVTOVU3VU5IQ01GWFRJTkFMMi4u\",\"SurveyInviteId\":\"32094a3a-80c2-4967-8feb-11a50d0fee69\",\"QuestionResponse\":{\"QuestionId\":\"25c40d67-0407-ed11-82e4-0022481d9c11\",\"Response\":\"Please find attached.\",\"Products\":[],\"Type\":\"Attachment\",\"Files\":\"\",\"QuestionName\":\" Please upload proof of what you said your PFAS levels were.Â  Thanks.\",\"QuestionGroupName\":\"PFAS\"},\"SurveyResponseId\":\"a64ee408-f41e-ed11-b83e-000d3a11f3ff\"}"},"files":{"type":"array","items":{"type":"string","format":"binary"}}}}}}}}},"/health":{"get":{"summary":"Returns survey meta data and questions","responses":{"200":{"description":"A JSON object of survey data"},"404":{"description":"Not F0und"}}}}},"components":{"schemas":{"SurveyResponse":{"type":"object","properties":{"CustomerId":{"type":"string"},"QuestionResponse":{"$ref":"#/components/schemas/QuestionResponse"},"SourceSurveyIdentifier":{"type":"string"},"SupplierId":{"type":"string"},"SurveyId":{"type":"string"},"SurveyInviteId":{"type":"string"},"SurveyResponseId":{"type":"string"}}},"ISubmitData":{"type":"object","properties":{"CustomerId":{"type":"string"},"QuestionResponse":{"type":"object","allOf":[{"$ref":"#/components/schemas/QuestionResponseWithFile"}]},"SourceSurveyIdentifier":{"type":"string"},"SupplierId":{"type":"string"},"SurveyId":{"type":"string"},"SurveyInviteId":{"type":"string"},"SurveyResponseId":{"type":"string"}}},"QuestionResponse":{"type":"object","properties":{"Files":{"type":"string"},"Products":{"items":{"$ref":"#/components/schemas/Product"},"type":"array"},"QuestionGroupName":{"type":"string"},"QuestionId":{"type":"string"},"QuestionName":{"type":"string"},"Response":{"type":"string"},"Type":{"type":"string"}}},"Product":{"type":"object","properties":{"chemical_substance":{"type":"string"},"id":{"type":"string"},"location":{"$ref":"#/components/schemas/IOptions"},"ppm":{"type":"string"},"productName":{"type":"string"},"product_category":{"$ref":"#/components/schemas/IOptions"},"product_type":{"$ref":"#/components/schemas/IOptions"},"purpose":{"type":"string"},"states_where_manufactured":{"type":"string"},"testing_performed":{"$ref":"#/components/schemas/IOptions"},"upc":{"type":"string"}}},"IOptions":{"type":"object","properties":{"key":{"type":"string"},"text":{"type":"string"}}},"QuestionResponseWithFile":{"type":"object","properties":{"Files":{"type":"array","items":{"$ref":"#/components/schemas/IFileMetaData"}},"Products":{"items":{"$ref":"#/components/schemas/Product"},"type":"array"},"QuestionGroupName":{"type":"string"},"QuestionId":{"type":"string"},"QuestionName":{"type":"string"},"Response":{"type":"string"},"Type":{"type":"string"}}},"IFileMetaData":{"type":"object","properties":{"lastModified":{"type":"number"},"name":{"type":"string"},"size":{"type":"number"},"type":{"type":"string"}}}},"examples":{"SurveyResponse":{"summary":"An example of a SurveyResponse","value":null}}}}