{"openapi":"3.0.1","servers":[{"url":"http://localhost","description":"Generated server url"}],"tags":[{"name":"PostSubmitCallbackController","description":"Handle 'SubmittedEvent' callbacks from CCD"}],"paths":{"/service-request-update":{"put":{"tags":["Update service request controller"],"summary":"Ways to pay will call this API and send the status of payment with other details","operationId":"serviceRequestUpdate","parameters":[{"name":"ServiceAuthorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"ServiceAuthorization","in":"header","description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceRequestUpdateDto"}}},"required":true},"responses":{"200":{"description":"Callback processed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitEventDetails"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitEventDetails"}}}}}}},"/payment-updates":{"put":{"tags":["Update payment status controller"],"summary":"Update payment status","operationId":"updatePaymentStatus","parameters":[{"name":"ServiceAuthorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"ServiceAuthorization","in":"header","description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentDto"}}},"required":true},"responses":{"200":{"description":"Updated payment status successfully","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"string"}}}},"403":{"description":"Calling service is not authorised to use the endpoint","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/asylum/ccdSubmitted":{"post":{"tags":["Asylum Service"],"summary":"Handles 'CcdSubmitted' callbacks from CCD","operationId":"ccdSubmitted","parameters":[{"name":"ServiceAuthorization","in":"header","description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallbackAsylumCase"}}},"required":true},"responses":{"200":{"description":"Optional confirmation text for CCD","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostSubmitCallbackResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":"An error occurred while attempting to decode the Jwt: Invalid token","content":{"application/json":{"schema":{"type":"string"}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/asylum/ccdAboutToSubmit":{"post":{"tags":["Asylum Service"],"summary":"Handles 'AboutToSubmitEvent' callbacks from CCD","operationId":"ccdAboutToSubmit","parameters":[{"name":"ServiceAuthorization","in":"header","description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallbackAsylumCase"}}},"required":true},"responses":{"200":{"description":"Transformed Asylum case data, with any identified error or warning messages","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreSubmitCallbackResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreSubmitCallbackResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreSubmitCallbackResponse"}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreSubmitCallbackResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreSubmitCallbackResponse"}}}}},"security":[{"Authorization":[]},{"ServiceAuthorization":[]}]}},"/asylum/ccdAboutToStart":{"post":{"tags":["Asylum Service"],"summary":"Handles 'AboutToStartEvent' callbacks from CCD or delegated calls from IA Case API","operationId":"ccdAboutToStart","parameters":[{"name":"ServiceAuthorization","in":"header","description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallbackAsylumCase"}}},"required":true},"responses":{"200":{"description":"Transformed Asylum case data, with any identified error or warning messages","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreSubmitCallbackResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreSubmitCallbackResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreSubmitCallbackResponse"}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreSubmitCallbackResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreSubmitCallbackResponse"}}}}},"security":[{"Authorization":[]},{"ServiceAuthorization":[]}]}},"/":{"get":{"tags":["welcome-controller"],"summary":"Welcome message for the Immigration & Asylum Case Payments Service","operationId":"welcome","parameters":[{"name":"ServiceAuthorization","in":"header","description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Welcome message","content":{"*/*":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"FeeDto":{"type":"object","properties":{"code":{"type":"string"},"version":{"type":"string"},"volume":{"type":"integer","format":"int32"},"calculated_amount":{"type":"number"},"memo_line":{"type":"string"},"ccd_case_number":{"type":"string"},"reference":{"type":"string"}}},"LinkDto":{"type":"object","properties":{"href":{"type":"string"},"method":{"type":"string"}}},"LinksDto":{"type":"object","properties":{"next_url":{"$ref":"#/components/schemas/LinkDto"},"self":{"$ref":"#/components/schemas/LinkDto"},"cancel":{"$ref":"#/components/schemas/LinkDto"}}},"PaymentDto":{"type":"object","properties":{"id":{"type":"string"},"currency":{"type":"string"},"status":{"type":"string"},"fees":{"type":"array","items":{"$ref":"#/components/schemas/FeeDto"}},"payment_amount":{"type":"number"},"case_reference":{"type":"string"},"payment_reference":{"type":"string"},"service_name":{"type":"string"},"date_created":{"type":"string","format":"date-time"},"date_updated":{"type":"string","format":"date-time"},"ccd_case_number":{"type":"string"},"account_number":{"type":"string"},"payment_method":{"type":"string"},"external_provider":{"type":"string"},"external_reference":{"type":"string"},"_links":{"$ref":"#/components/schemas/LinksDto"}}},"ServiceRequestUpdateDto":{"type":"object","properties":{"service_request_reference":{"type":"string"},"ccd_case_number":{"type":"string"},"service_request_amount":{"type":"string"},"service_request_status":{"type":"string"},"payment":{"$ref":"#/components/schemas/PaymentDto"}}},"SubmitEventDetails":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"jurisdiction":{"type":"string"},"state":{"type":"string","enum":["appealStarted","appealStartedByAdmin","appealSubmitted","pendingPayment","unknown"]},"data":{"type":"object","additionalProperties":{"type":"object"}},"callback_response_status_code":{"type":"integer","format":"int32"},"callback_response_status":{"type":"string"}}},"PostSubmitCallbackResponse":{"type":"object","properties":{"confirmation_header":{"type":"string"},"confirmation_body":{"type":"string"}}},"CallbackAsylumCase":{"type":"object","properties":{"case_details":{"$ref":"#/components/schemas/CaseDetailsAsylumCase"},"case_details_before":{"$ref":"#/components/schemas/CaseDetailsAsylumCase"},"event_id":{"type":"string","enum":["startAppeal","editAppeal","paymentAppeal","submitAppeal","payAndSubmitAppeal","payForAppeal","recordRemissionDecision","updatePaymentStatus","generateServiceRequest","unknown"]}}},"CaseDetailsAsylumCase":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"jurisdiction":{"type":"string"},"state":{"type":"string","enum":["appealStarted","appealStartedByAdmin","appealSubmitted","pendingPayment","unknown"]},"case_data":{"type":"object","properties":{"empty":{"type":"boolean"}},"additionalProperties":{"type":"object"}}}},"CaseData":{"type":"object"},"PreSubmitCallbackResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CaseData"},"errors":{"uniqueItems":true,"type":"array","items":{"type":"string"}}}}}}}
