{"openapi":"3.0.0","info":{"title":"A2D24 to Aviro Webhook API","version":"1.0.0","description":"This webhook is called to pass information from A2D24 to Aviro when a new kit is handed out to a patient and the patients preferred communication is \"PWA\" or \"WA\". The webhook will be triggered until the receiving web service responds with a 200 status code. This operation is expected to be idempotent and the receiving web service should handle duplicate submissions using the \"id\" field. Authentication will be performed using a fixed API Key shared securly between both parties and passed as part of the Authorization header."},"servers":[{"url":"https://xxxxx.avirohealth.com","description":"A2D24 to Aviro Web Service"}],"paths":{"/self_test_kit":{"post":{"summary":"Create Self Test Kit","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelfTestKit"},"examples":{"example":{"value":{"id":"820775d5-1696-4229-a094-ddb882648c1c","cellphone_number":"+27821230000","preferred_channel":"PWA","barcode":"string"}}}}},"description":""},"responses":{"200":{"description":"OK","headers":{}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"security":[{"API Key":[]}],"description":"This endpoint is used by A2D24 to pass on a Self Test Kit to Aviro. This Self Test Kit is for a patient that selected a preferred communication channel of Progressive Web App or WhatsApp. This POST request should be asyncrhonous and the receiving web service should indicate it has successfully received the request with a 200 response. Any further operations (for example, initiating a workflow or sending a message to the user) should be done after the response has been sent. The request is assumed to have timed out if no response is received after 3 seconds and should be retried."},"parameters":[]}},"components":{"securitySchemes":{"API Key":{"name":"Authorization","type":"apiKey","in":"header","description":"API Key provided must be passed via the Authorization header"}},"schemas":{"SelfTestKit":{"title":"SelfTestKit","type":"object","x-examples":{"example":{"id":"820775d5-1696-4229-a094-ddb882648c1c","cellphone_number":"+27821230000","preferred_channel":"PWA","barcode":"A-000-000-000"}},"description":"This model represents a summary of the patient who received a self test kit","properties":{"id":{"type":"string","format":"uuid","example":"820775d5-1696-4229-a094-ddb882648c1c","description":"UUID of Event"},"cellphone_number":{"type":"string","description":"Cellphone number in E.164 format","example":"+27821230000","minLength":12,"maxLength":12,"pattern":"^\\+[0-9]{11}$"},"preferred_channel":{"type":"string","enum":["WA","PWA"],"example":"PWA","description":"Kit recipients preferred communication channel"},"barcode":{"type":"string","description":"Kit Barcode","example":"A-000-000-000","pattern":"^[a-zA-Z](-[\\d]{3}){3}$"},"metadata":{"type":"string","description":"An optional JSON Object of any additional metadata for this request."}},"required":["id","cellphone_number","preferred_channel","barcode"]}}}}