Skip to main content
Version: 2.1

Beneficiary

To use beneficiary sdk client we need retrive from the SDK using rumsanService.client

  const beneficiaryClient =  getBeneficiaryClient(rumsanService.client);

As the mutation function or query function may contain some payload to be pass which are the parmaeter.

beneficiaryClient.create
ParameterTypeDescription
firstNamestringFirst name of the beneficiary.
lastNamestringLast name of the beneficiary.
genderGenderGender of the beneficiary (enum).
birthDateDateDate of birth of the beneficiary.
walletAddressstringBlockchain wallet address of the beneficiary.
phonestringPhone number of the beneficiary.
emailstringEmail address of the beneficiary.
locationstringCurrent location of the beneficiary.
latitudenumberLatitude coordinate of the beneficiary's location.
longitudenumberLongitude coordinate of the beneficiary's location.
govtIDNumberstringGovernment ID number of the beneficiary.
notesstringAdditional notes or comments related to the beneficiary.
bankedStatusBankedStatusStatus indicating if the beneficiary is banked (enum).
internetStatusInternetStatusStatus indicating internet connectivity (enum).
phoneStatusPhoneStatusStatus indicating phone connectivity (enum).
extrasObjectAdditional custom data or attributes
createdAtDateTimestamp indicating when the record was created.
updatedAtDateTimestamp indicating when the record was last updated.
deletedAtDateTimestamp indicating when the record was soft-deleted or marked as inactive.
Response
 success: true
data: {
id: string
uuid: string
firstName: string
lastName: string
gender: string
birthDate: string
walletAddress: string
phone: string
email: string
location: string
latitude: number
longitude: number
govtIDNumber: string
notes: string
bankedStatus: string
internetStatus: string
phoneStatus: string
extras: {}
createdAt: string
updatedAt: string
deletedAt: string
}



ParameterTypeDescription
pagenumberRequired number of page to be displayed on in
perPagenumberRequired list the number of data in a page
sortstringfor sorting the data
orderasc or desc
Response
 success: true
data: [
{
id: string
uuid: string
firstName: string
lastName: string
gender: string
birthDate: string
walletAddress: string
phone: string
email: string
location: string
latitude: number
longitude: number
govtIDNumber: string
notes: string
bankedStatus: string
internetStatus: string
phoneStatus: string
extras: {}
createdAt: string
updatedAt: string
deletedAt: string
}
]

beneficiaryClient.listById
ParameterTypeDescription
uuidstringRequired get the beneficiary by uuid
Response
 success: true
data: {
id: string
uuid: string
firstName: string
lastName: string
gender: string
birthDate: string
walletAddress: string
phone: string
email: string
location: string
latitude: number
longitude: number
govtIDNumber: string
notes: string
bankedStatus: string
internetStatus: string
phoneStatus: string
extras: {}
createdAt: string
updatedAt: string
deletedAt: string
}


beneficiaryClient.uploadBeneficiary

ParameterType
fileany
Response
 success: true
beneficiaryClient.update
ParameterTypeDescription
uuidstringuuid to upload the individual beneficiary
firstNamestringFirst name of the beneficiary.
lastNamestringLast name of the beneficiary.
genderGenderGender of the beneficiary (enum).
birthDateDateDate of birth of the beneficiary.
walletAddressstringBlockchain wallet address of the beneficiary.
phonestringPhone number of the beneficiary.
emailstringEmail address of the beneficiary.
locationstringCurrent location of the beneficiary.
latitudenumberLatitude coordinate of the beneficiary's location.
longitudenumberLongitude coordinate of the beneficiary's location.
govtIDNumberstringGovernment ID number of the beneficiary.
notesstringAdditional notes or comments related to the beneficiary.
bankedStatusBankedStatusStatus indicating if the beneficiary is banked (enum).
internetStatusInternetStatusStatus indicating internet connectivity (enum).
phoneStatusPhoneStatusStatus indicating phone connectivity (enum).
extrasObjectAdditional custom data or attributes
createdAtDateTimestamp indicating when the record was created.
updatedAtDateTimestamp indicating when the record was last updated.
deletedAtDateTimestamp indicating when the record was soft-deleted or marked as inactive.
Response
 success: true
data: {
id: string
uuid: string
firstName: string
lastName: string
gender: string
birthDate: string
walletAddress: string
phone: string
email: string
location: string
latitude: number
longitude: number
govtIDNumber: string
notes: string
bankedStatus: string
internetStatus: string
phoneStatus: string
extras: {}
createdAt: string
updatedAt: string
deletedAt: string
}

beneficiaryClient.remove

ParameterTypeDescription
uuidstringuuid to remove
Response
 success: true
data: {
id: string
uuid: string
firstName: string
lastName: string
gender: string
birthDate: string
walletAddress: string
phone: string
email: string
location: string
latitude: number
longitude: number
govtIDNumber: string
notes: string
bankedStatus: string
internetStatus: string
phoneStatus: string
extras: {}
createdAt: string
updatedAt: string
deletedAt: string
}

beneficiaryClient.importBeneficiary

ParameterTypeDescription
source_uuidstringuuid of the source
Response
 success: true
data: {
success: boolean
status: number
message: string
}

beneficiaryClient.getBeneficiaryStats

Response
 success: true
data: {
name: string
data: any
group: string
}

beneficiaryClient.listDistinctLocations
Response
 success: true
data: {
location: string
}