Skip to content

Other APIs (No need for Access Token)

i. Terms and Conditions

API : BSA.APICaller.getAgreements

swift
BSA.APICaller.getAgreements(languageCode: .korean, 
							clientKey: "a1hrg2xv...",				
onSuccess: { [weak self] arrayData in

	// Successful Invocation
	self?.data.arrayAgreementData = arrayData


}, onFailed: { [weak self] rtCode, resultMessage in

	// Invocation Failure

}, onError: { [weak self] error in

	// Invocation Error

}, onTotalLog: { text in

	// Invocation Log

}, onCompleted: { 

	// invocation completed

}, disposeBag: disposeBag)

Parameters

swift
BSA.APICaller.getAgreements(languageCode: BSA.Enums.AgreementsLanguageCode,
			   clientKey: String,
			   onSuccess: @escaping ([BSA.JSONData.AgreementData]) -> (),
			   onFailed: @escaping OnFailed, 
			   onError: @escaping OnError, 
			   onTotalLog: @escaping OnTotalLog? = nil,
			   onCompleted: @escaping onCompleted? = nil,
			   disposeBag: DisposeBag )
ParameterTypeDescription
languageCodeBSA.Enums.AgreementsLanguageCodeLanguage of the terms and conditions.
clientKeyStringClient's unique key
onSuccess([BSA.Enums.AgreementData]) -> ()Callback called on success. It returns an array of data that allows you to view detailed terms and conditions.
onFailedOnFailedCallback function called on API processing failure.
onErrorOnErrorCallback function called on error.
onTotalLogOnTotalLogCallback function to receive all logs generated during API calls.
onCompletedonCompletedCalled at the end after all processes are completed.
disposeBagDisposeBagDisposeBag variable to manage RxSwift Disposable objects.

Description

  • You can get approximate information about the existing terms and conditions, and if you want detailed information about a specific term and condition, you need to call BSA.APICaller.getAgreementDetail using the seq from BSA.Enums.AgreementData.    

BSA.Enums.AgreementData

NameTypeDescription
clientKeyStringClient's unique key
langStringLanguage.
seqIntSequence.
titleStringTitle.
typeStringType of terms and conditions.

i-a. Detailed Terms and Conditions

API : BSA.APICaller.getAgreementDetail

swift
BSA.APICaller.getAgreementDetail(seq: seq, 
								 clientKey: "a1hrg2xv...",
onSuccess: { [weak self] agreementDetailData in

	// Successful Invocation
        
}, onFailed: { [weak self] rtCode, resultMessage in

	// Invocation Failure

}, onError: { [weak self] error in

	// Invocation Error

}, onTotalLog: { text in

	// Invocation Log

}, onCompleted: { 

	// invocation completed

}, disposeBag: disposeBag)

Parameters

swift
BSA.APICaller.getAgreementDetail(seq: Int, 
			  clientKey: String,
			  onSuccess: @escaping (BSA.JSONData.AgreementDetailData) -> (),
			  onFailed: @escaping OnFailed, 
			  onError: @escaping OnError, 
			  onTotalLog: @escaping OnTotalLog? = nil,
			  onCompleted: @escaping onCompleted? = nil,
			  disposeBag: DisposeBag )
ParameterTypeDescription
seqIntBSA.Enums.AgreementData's seq value
clientKeyStringClient's unique key
onSuccess(BSA.Enums.AgreementDetailData) -> ()Callback called on success. It contains detailed information about the terms and conditions.
onFailedOnFailedCallback function called on API processing failure.
onErrorOnErrorCallback function called on error.
onTotalLogOnTotalLogCallback function to receive all logs generated during API calls.
onCompletedonCompletedCalled at the end after all processes are completed.
disposeBagDisposeBagDisposeBag variable to manage RxSwift Disposable objects.

Description

  • Retrieve detailed information about the terms and conditions that match the seq.

   

BSA.Enums.AgreementDetailData
NameTypeDescription
regDtStringRegistration date.
langStringLanguage.
clientKeyStringClient's unique key
clientNameStringClient name
regUserKeyStringRegistrant's ID.
seqIntSequence.
titleStringTitle.
typeStringType of terms and conditions.
contentStringTerms and conditions text.

ii. Notice

API : BSA.APICaller.retrieveNotice

swift
BSA.APICaller.retrieveNotice(clientKey: "a1hrg2xv...",
							 pageIndex: pageIndex, 
							 pageSize: pageSize, 
 onSuccess: { arrayData, pageData in

	// Successful Invocation
 
}, onFailed: { [weak self] rtCode, resultMessage in

	// Invocation Failure

}, onError: { [weak self] error in

	// Invocation Error

}, onTotalLog: { text in

	// Invocation Log

}, onCompleted: { 

	// invocation completed

}, disposeBag: disposeBag)

Parameters

swift
BSA.APICaller.retrieveNotice(clientKey: String,
							 pageIndex: Int, 
							 pageSize: Int,
onSuccess: @escaping ([BSA.JSONData.NoticeData], BSA.JSONData.NoticePage) -> (),
							 onFailed: @escaping OnFailed, 
							 onError: @escaping OnError, 
							 onTotalLog: @escaping OnTotalLog? = nil,
							 onCompleted: @escaping onCompleted? = nil,
							 disposeBag: DisposeBag )
ParameterTypeDescription
clientKeyStringClient's unique key
pageIndexIntPage number to be queried. The value for the first page is 0.
pageSizeIntNumber of Notice entries per page.
onSuccess([BSA.JSONData.NoticeData], BSA.JSONData.NoticePage) -> ()Callback called on success. It returns an array of Notice data and page information.
onFailedOnFailedCallback function called on API processing failure.
onErrorOnErrorCallback function called on error.
onTotalLogOnTotalLogCallback function to receive all logs generated during API calls.
onCompletedonCompletedCalled at the end after all processes are completed.
disposeBagDisposeBagDisposeBag variable to manage RxSwift Disposable objects.

Description

  • The information about Notice is contained in [BSA.JSONData.NoticeData] returned on success.
  • BSA.JSONData.NoticePage contains page information such as the maximum number of entries per page.    
BSA.JSONData.NoticeData
NameTypeDescription
seqIntSequence.
versionStringApp's Version
patchTypeStringOS Type
titleStringTitle.
regUserNameStringRegistrant's ID.
contentStringContent.
deplyDtStringDistribution date.
regDtStringRegistration date.
BSA.JSONData.NoticePage
NameTypeDescription
firstBoolCheck if the current data is on the first page.
lastBoolCheck if the current data is on the last page.
currentPageIntCurrent page number.
pageSizeIntNumber of data entries per page.
totalElementsIntTotal number of data entries.
totalPagesIntTotal number of pages calculated based on (pageSize).