{"openapi":"3.1.0","info":{"title":"Bulk Scan Payment Processor","description":"API for all operations relating to the BS payment processor application.","license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"},"version":"1.0.0"},"externalDocs":{"description":"README","url":"https://github.com/hmcts/bulk-scan-payment-processor"},"servers":[{"url":"http://localhost","description":"Generated server url"}],"tags":[{"name":"Payment API","description":"API for managing payments"}],"paths":{"/payment/update":{"post":{"tags":["Payment API"],"summary":"Update an existing payment","description":"Updates an existing payment based on the provided details","operationId":"updatePayment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePayment"}}},"required":true},"responses":{"200":{"description":"Payment has been updated","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Missing required fields","content":{"*/*":{"schema":{"type":"string"}}}},"424":{"description":"Error back from CCD","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/payment/create":{"post":{"tags":["Payment API"],"summary":"Create a new payment","description":"Creates a new payment based on the provided details","operationId":"createPayment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePayment"}}},"required":true},"responses":{"201":{"description":"Payment has been created","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Missing required fields","content":{"*/*":{"schema":{"type":"string"}}}},"424":{"description":"Error back from CCD","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/":{"get":{"tags":["root-controller"],"summary":"Root endpoint for testing swagger and silencing azure warnings","operationId":"welcome","responses":{"200":{"description":"Successful","content":{"*/*":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"UpdatePayment":{"type":"object","properties":{"envelope_id":{"type":"string","minLength":1},"jurisdiction":{"type":"string","minLength":1},"exception_record_ref":{"type":"string","minLength":1},"new_case_ref":{"type":"string","minLength":1}},"required":["envelope_id","exception_record_ref","jurisdiction","new_case_ref"]},"CreatePayment":{"type":"object","properties":{"exceptionRecord":{"type":"boolean"},"envelope_id":{"type":"string","minLength":1},"ccd_reference":{"type":"string","minLength":1},"is_exception_record":{"type":"boolean"},"po_box":{"type":"string","minLength":1},"jurisdiction":{"type":"string","minLength":1},"service":{"type":"string","minLength":1},"payments":{"type":"array","items":{"$ref":"#/components/schemas/PaymentInfo"},"minItems":1}},"required":["ccd_reference","envelope_id","is_exception_record","jurisdiction","payments","po_box","service"]},"PaymentInfo":{"type":"object","properties":{"document_control_number":{"type":"string","minLength":1}},"required":["document_control_number"]}}}}
