Add BilaClient
Bila API, unlocking fast payments and rich data
Overview
The addBilaClient mutation is used to create a new client object in the Bila API. This includes the creation of a client wallet and the association of business details if applicable. The mutation returns an bilaClient object, which contains comprehensive information about the client, their associated business, and app details.
Mutation Definition
mutation addBilaClient(
$first_name: String!
$last_name: String!
$email: String!
$address: String!
$date_of_birth: String!
$account_type: AccountType!
$phone_number: String!
$identity_doc_front_image_url: String!
$identity_doc_back_image_url: String!
$proof_of_residence_url: String!
$custom_payload: String
$identification_type: String!
$identification_number: String!
$business_type: String
$business_size: String
$registered_business_name: String
$business_registration_number: String
$business_registration_doc: String
$business_email: String
$website: String
$tpin: String
) {
addBilaClient(
first_name: $first_name
last_name: $last_name
email: $email
address: $address
date_of_birth: $date_of_birth
account_type: $account_type
phone_number: $phone_number
identity_doc_front_image_url: $identity_doc_front_image_url
identity_doc_back_image_url: $identity_doc_back_image_url
proof_of_residence_url: $proof_of_residence_url
custom_payload: $custom_payload
identification_type: $identification_type
identification_number: $identification_number
business_type: $business_type
business_size: $business_size
registered_business_name: $registered_business_name
business_registration_number: $business_registration_number
business_registration_doc: $business_registration_doc
business_email: $business_email
website: $website
tpin: $tpin
) {
id
first_name
last_name
email
address
phone_number
date_of_birth
app_id
app {
id
environment
app_name
display_name
business_id
stage
created_at
updated_at
}
account_type
identification_type
identification_number
proof_of_residence
custom_payload
business {
business_type
business_size
registered_business_name
business_registration_number
business_registration_doc
business_email
website
tpin
created_at
updated_at
}
created_at
updated_at
}
}
Arguments
The mutation takes the following arguments:
- ! means the argument is required!
first_name: String! # The first name of the client.
last_name: String! # The last name of the client.
email: String! # The email address of the client.
address: String! # The physical address of the client.
date_of_birth: String! # A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
account_type: AccountType! # The type of account (Individual or Business).
phone_number: String! # The client's phone number.
identity_doc_front_image_url: String! # URL of the front side of the identity document.
identity_doc_back_image_url: String! # URL of the back side of the identity document.
proof_of_residence_url: String! # URL of the proof of residence document.
custom_payload: String # Custom data payload for additional information.
identification_type: IdentificationType! # The type of identification (e.g., National ID, Passport).
identification_number: String! # The identification number.
business_type: String # The type of business if the client is associated with one.
business_size: String # The size of the business.
registered_business_name: String # The registered name of the business.
business_registration_number: String # The business registration number.
business_registration_doc: String # URL of the business registration document.
business_email: String # The business email address.
website: String # The business website.
tpin: String # The business's Taxpayer Identification Number (TPIN).
Response Fields
The mutation returns the following fields within the ipahiveClient object:
id: ID! # Unique identifier for the client.
first_name: String! # First name of the client.
last_name: String! # Last name of the client.
email: String! # Email address of the client.
address: String # Physical address of the client.
phone_number: String! # Phone number of the client.
date_of_birth: String! # Date of birth of the client.
app_id: String # ID of the associated app.
app: App # Information about the associated app, including environment, name, display name, business ID, stage, and timestamps.
account_type: AccountType! # Type of the client account.
identification_type: IdentificationType! # Type of identification used by the client.
identification_number: String # Identification number of the client.
proof_of_residence: String # URL of the proof of residence document.
custom_payload: String # Custom data payload for additional information.
business: Business # Information about the associated business, including type, size, registered name, registration number, documents, email, website, TPIN, and timestamps.
created_at: DateTime! # Timestamp of when the client was created.
updated_at: DateTime! # Timestamp of when the client was last updated.
Headers
{
"Authorization": "Bearer YOUR_JWT_TOKEN",
"x-client-key": "YOUR_CLIENT_KEY",
"x-client-secret": "YOUR_CLIENT_SECRET"
}
Example Usage: cURL or Fetch
To use the addBilaClient mutation with cURL or fetch, you can follow this example:
Notes
- Replace <token>, <client-key>, and <client-secret> with your actual authentication credentials.