Refactor AgreementFileApiModel and change AgreementApiController methods.