production
development
https://apigateway.bankalfalah.com/bankalfalah/sb
Paths
/v1
post /v1
clientIdHeader
X-IBM-Client-Id
(apiKey located in header)
clientSecretHeader
X-IBM-Client-Secret
(apiKey located in header)
OAuth
OAuth
(oauth2 application)
OAuth Authentication
Token URL
https://apigateway.bankalfalah.com/bankalfalah/sb/oauthproviderapi/oauth2/token
Scopes
GetToken
RequestBody
Required in body
object
Content-Type
Optional in header
string
application/json
Accept
Optional in header
string
application/json
200
Success
500
Error Response
Example Request
curl --request POST \
--url https://apigateway.bankalfalah.com/bankalfalah/sb/bafapi-card-get-all-cards-of-customer/v1 \
--header 'accept: application/json' \
--header 'authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--header 'x-ibm-client-id: REPLACE_THIS_KEY' \
--header 'x-ibm-client-secret: REPLACE_THIS_KEY' \
--data '{"CNIC":"4230137585053","ChannelId":"1010"}'
require 'uri'
require 'openssl'
require 'net/http'
url = URI("https://apigateway.bankalfalah.com/bankalfalah/sb/bafapi-card-get-all-cards-of-customer/v1")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
request = Net::HTTP::Post.new(url)
request["x-ibm-client-id"] = 'REPLACE_THIS_KEY'
request["x-ibm-client-secret"] = 'REPLACE_THIS_KEY'
request["authorization"] = 'Bearer REPLACE_BEARER_TOKEN'
request["content-type"] = 'application/json'
request["accept"] = 'application/json'
request.body = "{\"CNIC\":\"4230137585053\",\"ChannelId\":\"1010\"}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("apigateway.bankalfalah.com")
payload = "{\"CNIC\":\"4230137585053\",\"ChannelId\":\"1010\"}"
headers = {
'x-ibm-client-id': "REPLACE_THIS_KEY",
'x-ibm-client-secret': "REPLACE_THIS_KEY",
'authorization': "Bearer REPLACE_BEARER_TOKEN",
'content-type': "application/json",
'accept': "application/json"
}
conn.request("POST", "/bankalfalah/sb/bafapi-card-get-all-cards-of-customer/v1", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apigateway.bankalfalah.com/bankalfalah/sb/bafapi-card-get-all-cards-of-customer/v1",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"CNIC\":\"4230137585053\",\"ChannelId\":\"1010\"}",
CURLOPT_HTTPHEADER => array(
"accept: application/json",
"authorization: Bearer REPLACE_BEARER_TOKEN",
"content-type: application/json",
"x-ibm-client-id: REPLACE_THIS_KEY",
"x-ibm-client-secret: REPLACE_THIS_KEY"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
// OkHttpClient from http://square.github.io/okhttp/
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"CNIC\":\"4230137585053\",\"ChannelId\":\"1010\"}");
Request request = new Request.Builder()
.url("https://apigateway.bankalfalah.com/bankalfalah/sb/bafapi-card-get-all-cards-of-customer/v1")
.post(body)
.addHeader("x-ibm-client-id", "REPLACE_THIS_KEY")
.addHeader("x-ibm-client-secret", "REPLACE_THIS_KEY")
.addHeader("authorization", "Bearer REPLACE_BEARER_TOKEN")
.addHeader("content-type", "application/json")
.addHeader("accept", "application/json")
.build();
Response response = client.newCall(request).execute();
// Install request by running "npm install --save request"
var request = require("request");
var options = { method: 'POST',
url: 'https://apigateway.bankalfalah.com/bankalfalah/sb/bafapi-card-get-all-cards-of-customer/v1',
headers:
{ accept: 'application/json',
'content-type': 'application/json',
authorization: 'Bearer REPLACE_BEARER_TOKEN',
'x-ibm-client-secret': 'REPLACE_THIS_KEY',
'x-ibm-client-id': 'REPLACE_THIS_KEY' },
body: { CNIC: '4230137585053', ChannelId: '1010' },
json: true };
request(options, function (error, response, body) {
if (error) return console.error('Failed: %s', error.message);
console.log('Success: ', body);
});
import Foundation
let headers = [
"x-ibm-client-id": "REPLACE_THIS_KEY",
"x-ibm-client-secret": "REPLACE_THIS_KEY",
"authorization": "Bearer REPLACE_BEARER_TOKEN",
"content-type": "application/json",
"accept": "application/json"
]
let parameters = [
"CNIC": "4230137585053",
"ChannelId": "1010"
]
let postData = NSJSONSerialization.dataWithJSONObject(parameters, options: nil, error: nil)
var request = NSMutableURLRequest(URL: NSURL(string: "https://apigateway.bankalfalah.com/bankalfalah/sb/bafapi-card-get-all-cards-of-customer/v1")!,
cachePolicy: .UseProtocolCachePolicy,
timeoutInterval: 10.0)
request.HTTPMethod = "POST"
request.allHTTPHeaderFields = headers
request.HTTPBody = postData
let session = NSURLSession.sharedSession()
let dataTask = session.dataTaskWithRequest(request, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? NSHTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "https://apigateway.bankalfalah.com/bankalfalah/sb/bafapi-card-get-all-cards-of-customer/v1");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept: application/json");
headers = curl_slist_append(headers, "content-type: application/json");
headers = curl_slist_append(headers, "authorization: Bearer REPLACE_BEARER_TOKEN");
headers = curl_slist_append(headers, "x-ibm-client-secret: REPLACE_THIS_KEY");
headers = curl_slist_append(headers, "x-ibm-client-id: REPLACE_THIS_KEY");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\"CNIC\":\"4230137585053\",\"ChannelId\":\"1010\"}");
CURLcode ret = curl_easy_perform(hnd);
var client = new RestClient("https://apigateway.bankalfalah.com/bankalfalah/sb/bafapi-card-get-all-cards-of-customer/v1");
var request = new RestRequest(Method.POST);
request.AddHeader("accept", "application/json");
request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "Bearer REPLACE_BEARER_TOKEN");
request.AddHeader("x-ibm-client-secret", "REPLACE_THIS_KEY");
request.AddHeader("x-ibm-client-id", "REPLACE_THIS_KEY");
request.AddParameter("application/json", "{\"CNIC\":\"4230137585053\",\"ChannelId\":\"1010\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Example Response
POST https://apigateway.bankalfalah.com/bankalfalah/sb/bafapi-card-get-all-cards-of-customer/v1
{
"values": [
{
"customerId": "1000000045125",
"primaryCard": "",
"cardNumber": "4025830030075686",
"cardId": "15037679",
"nameOnCard": "AMMAD ISHAQUE",
"cardProduct": "MAG VISA CLASSIC",
"cardProductId": "620",
"supplementaryCards": "N/A",
"productCategory": "00",
"cardProductCode": "0201",
"cardCreationDate": "20140805",
"cardType": "Primary",
"cardCategory": "00",
"cardStatus": "Hot",
"cardStatusCode": "02",
"maxRetries": "3",
"retriesLeft": "3",
"relationshipId": "4025830030075686=1908",
"address1": "HOMEADDRESS1",
"address2": "HOMEADDRESS2",
"statusReason": "Iris Configured",
"expiryDate": "20190831",
"StatusChangeReason": ""
},
{
"customerId": "1000000045125",
"primaryCard": "",
"cardNumber": "4025830030075686",
"cardId": "15037679",
"nameOnCard": "AMMAD ISHAQUE",
"cardProduct": "MAG VISA CLASSI
{
"values": [
{
"customerId": "1000000045125",
"primaryCard": "",
"cardNumber": "4025830030075686",
"cardId": "15037679",
"nameOnCard": "AMMAD ISHAQUE",
"cardProduct": "MAG VISA CLASSIC",
"cardProductId": "620",
"supplementaryCards": "N/A",
"productCategory": "00",
"cardProductCode": "0201",
"cardCreationDate": "20140805",
"cardType": "Primary",
"cardCategory": "00",
"cardStatus": "Hot",
"cardStatusCode": "02",
"maxRetries": "3",
"retriesLeft": "3",
"relationshipId": "4025830030075686=1908",
"address1": "HOMEADDRESS1",
"address2": "HOMEADDRESS2",
"statusReason": "Iris Configured",
"expiryDate": "20190831",
"StatusChangeReason": ""
},
{
"customerId": "1000000045125",
"primaryCard": "",
"cardNumber": "4025830030075686",
"cardId": "15037679",
"nameOnCard": "AMMAD ISHAQUE",
"cardProduct": "MAG VISA CLASSIC",
"cardProductId": "620",
"supplementaryCards": "N/A",
"productCategory": "00",
"cardProductCode": "0201",
"cardCreationDate": "20140805",
"cardType": "Primary",
"cardCategory": "00",
"cardStatus": "Hot",
"cardStatusCode": "02",
"maxRetries": "3",
"retriesLeft": "3",
"relationshipId": "4025830030075686=1908",
"address1": "HOMEADDRESS1",
"address2": "HOMEADDRESS2",
"statusReason": "Iris Configured",
"expiryDate": "20190831",
"StatusChangeReason": ""
},
{
"customerId": "1000000045125",
"primaryCard": "",
"cardNumber": "4025830030075686",
"cardId": "15037679",
"nameOnCard": "AMMAD ISHAQUE",
"cardProduct": "MAG VISA CLASSIC",
"cardProductId": "620",
"supplementaryCards": "N/A",
"productCategory": "00",
"cardProductCode": "0201",
"cardCreationDate": "20140805",
"cardType": "Primary",
"cardCategory": "00",
"cardStatus": "Hot",
"cardStatusCode": "02",
"maxRetries": "3",
"retriesLeft": "3",
"relationshipId": "4025830030075686=1908",
"address1": "HOMEADDRESS1",
"address2": "HOMEADDRESS2",
"statusReason": "Iris Configured",
"expiryDate": "20190831",
"StatusChangeReason": ""
},
{
"customerId": "1000000045125",
"primaryCard": "",
"cardNumber": "4025830030075686",
"cardId": "15037679",
"nameOnCard": "AMMAD ISHAQUE",
"cardProduct": "MAG VISA CLASSIC",
"cardProductId": "620",
"supplementaryCards": "N/A",
"productCategory": "00",
"cardProductCode": "0201",
"cardCreationDate": "20140805",
"cardType": "Primary",
"cardCategory": "00",
"cardStatus": "Hot",
"cardStatusCode": "02",
"maxRetries": "3",
"retriesLeft": "3",
"relationshipId": "4025830030075686=1908",
"address1": "HOMEADDRESS1",
"address2": "HOMEADDRESS2",
"statusReason": "Iris Configured",
"expiryDate": "20190831",
"StatusChangeReason": ""
},
{
"customerId": "1000000045125",
"primaryCard": "",
"cardNumber": "4025830030075686",
"cardId": "15037679",
"nameOnCard": "AMMAD ISHAQUE",
"cardProduct": "MAG VISA CLASSIC",
"cardProductId": "620",
"supplementaryCards": "N/A",
"productCategory": "00",
"cardProductCode": "0201",
"cardCreationDate": "20140805",
"cardType": "Primary",
"cardCategory": "00",
"cardStatus": "Hot",
"cardStatusCode": "02",
"maxRetries": "3",
"retriesLeft": "3",
"relationshipId": "4025830030075686=1908",
"address1": "HOMEADDRESS1",
"address2": "HOMEADDRESS2",
"statusReason": "Iris Configured",
"expiryDate": "20190831",
"StatusChangeReason": ""
}
],
"totalSize": "5"
}
x
Try this operation
No response. This is a mixed content call. It is not possible to test HTTP APIs from an HTTPS secured Portal site and vice versa.
No response. This is a cross-origin call. Make sure the server accepts requests from this portal. Or if using self-signed SSL certificates then paste the URL above into your browser to accept the certificate before trying again (On Internet Explorer it must be the same browser tab.).
Definitions
{
"properties": {
"CNIC": {
"type": "string",
"description": "CNIC",
"example": "4230137585053"
},
"ChannelId": {
"properties": [],
"type": "string",
"description": "Channel ID",
"example": "1010"
}
},
"additionalProperties": false,
"required": [
"CNIC",
"ChannelId"
]
}
{
"type": "object",
"properties": {
"values": {
"type": "array",
"items": {
"properties": {
"customerId": {
"type": "string"
},
"primaryCard": {
"type": "string"
},
"cardNumber": {
"type": "string"
},
"cardId": {
"type": "string"
},
"nameOnCard": {
"type": "string"
},
"cardProduct": {
"type": "string"
},
"cardProductId": {
"type": "string"
},
"supplementaryCards": {
"type": "string"
},
"productCategory": {
"type": "string"
},
"cardProductCode": {
"type": "string"
},
"cardCreationDate": {
"type": "string"
},
"cardType": {
"type": "string"
},
"cardCategory": {
"type": "string"
},
"cardStatus": {
"type": "string"
},
"cardStatusCode": {
"type": "string"
},
"maxRetries": {
"type": "string"
},
"retriesLeft": {
"type": "string"
},
"relationshipId": {
"type": "string"
},
"address1": {
"type": "string"
},
"address2": {
"type": "string"
},
"statusReason": {
"type": "string"
},
"expiryDate": {
"type": "string"
},
"StatusChangeReason": {
"type": "string"
}
},
"type": "object"
}
},
"totalSize": {
"type": "string"
}
},
"example": {
"values": [
{
"customerId": "1000000045125",
"primaryCard": "",
"cardNumber": "4025830030075686",
"cardId": "15037679",
"nameOnCard": "AMMAD ISHAQUE",
"cardProduct": "MAG VISA CLASSIC",
"cardProductId": "620",
"supplementaryCards": "N\/A",
"productCategory": "00",
"cardProductCode": "0201",
"cardCreationDate": "20140805",
"cardType": "Primary",
"cardCategory": "00",
"cardStatus": "Hot",
"cardStatusCode": "02",
"maxRetries": "3",
"retriesLeft": "3",
"relationshipId": "4025830030075686=1908",
"address1": "HOMEADDRESS1",
"address2": "HOMEADDRESS2",
"statusReason": "Iris Configured",
"expiryDate": "20190831",
"StatusChangeReason": ""
},
{
"customerId": "1000000045125",
"primaryCard": "",
"cardNumber": "4025830030075686",
"cardId": "15037679",
"nameOnCard": "AMMAD ISHAQUE",
"cardProduct": "MAG VISA CLASSIC",
"cardProductId": "620",
"supplementaryCards": "N\/A",
"productCategory": "00",
"cardProductCode": "0201",
"cardCreationDate": "20140805",
"cardType": "Primary",
"cardCategory": "00",
"cardStatus": "Hot",
"cardStatusCode": "02",
"maxRetries": "3",
"retriesLeft": "3",
"relationshipId": "4025830030075686=1908",
"address1": "HOMEADDRESS1",
"address2": "HOMEADDRESS2",
"statusReason": "Iris Configured",
"expiryDate": "20190831",
"StatusChangeReason": ""
},
{
"customerId": "1000000045125",
"primaryCard": "",
"cardNumber": "4025830030075686",
"cardId": "15037679",
"nameOnCard": "AMMAD ISHAQUE",
"cardProduct": "MAG VISA CLASSIC",
"cardProductId": "620",
"supplementaryCards": "N\/A",
"productCategory": "00",
"cardProductCode": "0201",
"cardCreationDate": "20140805",
"cardType": "Primary",
"cardCategory": "00",
"cardStatus": "Hot",
"cardStatusCode": "02",
"maxRetries": "3",
"retriesLeft": "3",
"relationshipId": "4025830030075686=1908",
"address1": "HOMEADDRESS1",
"address2": "HOMEADDRESS2",
"statusReason": "Iris Configured",
"expiryDate": "20190831",
"StatusChangeReason": ""
},
{
"customerId": "1000000045125",
"primaryCard": "",
"cardNumber": "4025830030075686",
"cardId": "15037679",
"nameOnCard": "AMMAD ISHAQUE",
"cardProduct": "MAG VISA CLASSIC",
"cardProductId": "620",
"supplementaryCards": "N\/A",
"productCategory": "00",
"cardProductCode": "0201",
"cardCreationDate": "20140805",
"cardType": "Primary",
"cardCategory": "00",
"cardStatus": "Hot",
"cardStatusCode": "02",
"maxRetries": "3",
"retriesLeft": "3",
"relationshipId": "4025830030075686=1908",
"address1": "HOMEADDRESS1",
"address2": "HOMEADDRESS2",
"statusReason": "Iris Configured",
"expiryDate": "20190831",
"StatusChangeReason": ""
},
{
"customerId": "1000000045125",
"primaryCard": "",
"cardNumber": "4025830030075686",
"cardId": "15037679",
"nameOnCard": "AMMAD ISHAQUE",
"cardProduct": "MAG VISA CLASSIC",
"cardProductId": "620",
"supplementaryCards": "N\/A",
"productCategory": "00",
"cardProductCode": "0201",
"cardCreationDate": "20140805",
"cardType": "Primary",
"cardCategory": "00",
"cardStatus": "Hot",
"cardStatusCode": "02",
"maxRetries": "3",
"retriesLeft": "3",
"relationshipId": "4025830030075686=1908",
"address1": "HOMEADDRESS1",
"address2": "HOMEADDRESS2",
"statusReason": "Iris Configured",
"expiryDate": "20190831",
"StatusChangeReason": ""
}
],
"totalSize": "5"
}
}
{
"type": "object",
"properties": {
"ResponseCode": {
"type": "string"
},
"ResponseDesc": {
"type": "string"
}
},
"example": {
"ResponseCode": "99",
"ResponseDesc": "Failed"
}
}