{
    "swagger": "2.0",
    "info": {
        "version": "1.0",
        "description": "<h3>Refund API Documentation </h3> <b>Published Date:</b> 8-MAR-2021 <b>Author: </b> Anshika Nigam, Yashar Rahvar <b> Requirement:</b> New API added for Refund List  <b>Version History:</b> Refund List  API is added",
        "title": "Refund List "
    },
    "host": "cft-api-mgmt-demo.azure-api.net",
    "basePath": "/",
    "schemes": [
        "https"
    ],
    "securityDefinitions": {
        "apiKeyHeader": {
            "type": "apiKey",
            "name": "Ocp-Apim-Subscription-Key",
            "in": "header"
        },
        "apiKeyQuery": {
            "type": "apiKey",
            "name": "subscription-key",
            "in": "query"
        }
    },
    "security": [
        {
            "apiKeyHeader": []
        },
        {
            "apiKeyQuery": []
        }
    ],
    "paths": {
        "/refunds": {
            "get": {
                "description": "Returns all refunds that match filter criteria",
                "operationId": "retrieveRefunds",
                "summary": "Get list of refunds",
                "parameters": [
                    {
                        "name": "start_date",
                        "in": "path",
                        "description": "Format - date time (as full-date in RFC3339). The start date time to filter on. If the time is not supplied then it will be defaulted to 00:00:00",
                        "type": "string",
                        "required": true
                    },
                    {
                        "name": "end_date",
                        "in": "path",
                        "description": "Format - date time (as full-date in RFC3339). The end date to filter on. If the time is not supplied then it will be defaulted to 00:00:00",
                        "type": "string",
                        "required": true
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "200": {
                        "description": "successful operation",
                        "examples": {
                            "application/json": {
                                "refunds": [
                                    {
                                        "reference": "string",
                                        "reason": "string",
                                        "instruction_type": "SendRefund",
                                        "date_approved": "string",
                                        "total_refund_amount": 0,
                                        "fees": [
                                            {
                                                "id": 0,
                                                "code": "Unknown Type: String",
                                                "version": "Unknown Type: String",
                                                "jurisdiction1": "string",
                                                "jurisdiction2": "string",
                                                "memo_line": "string",
                                                "natural_account_code": "string",
                                                "credit": 0
                                            }
                                        ],
                                        "payment": {
                                            "reference": "string",
                                            "date_receipt_created": "string",
                                            "service_name": "string",
                                            "site_id": "string",
                                            "channel": "string",
                                            "method": "string",
                                            "ccd_case_number": "string",
                                            "case_reference": "string",
                                            "customer_reference": "string",
                                            "pba_number": "string",
                                            "gov_uk_id": "string",
                                            "bgc_number": "string",
                                            "available_funds": "string"
                                        }
                                    }
                                ]
                            },
                            "400": {
                                "description": "Bad request."
                            },
                            "404": {
                                "description": "No refund available for the given date range."
                            },
                            "413": {
                                "description": "Date range exceed the maximum supported by the system."
                            },
                            "500": {
                                "description": "Internal server error."
                            }
                        }
                    }
                }
            }
        }
    }
}
