Manage Accounts
You can manage and retrieve Accounts or subsets of an Account like Resources, Account Product and Payment Product using the Bundle APIs.
Get Accounts
Call /bundles/bundleID
endpoint to retrieve all the existing Accounts available for a bundle. The response returns an array of all available Bundles with a unique identifier, id , for each Bundle. Each of these Bundles contain the Account details within them.
Endpoint URI
Request parameters
ifiID
: Required. Unique identifier of the IFI .bundleID
: Required. Id of the bundle whose details are being retrieved .
Example
In the following example, all the details of the bundle with Bundle ID ee64c930-c06f-49cb-9443-84b132b9d4e2 and available for IFI with the ID 140827 and associated VBO are fetched. The response returns the below details:
- Account and Payment Product Bundle with the Bundle ID ee64c930-c06f-49cb-9443-84b132b9d4e2. As the name suggests, the Bundle is configured with Account Product (“id”: “9e97fc72-d692-4c0a-bccc-ba689954d9af”) and Payment Product (“id”: “86da4629-9c59-45d9-9c0e-61d78ccb196f”).
curl -X GET \
https://fusion.preprod.zeta.in/api/v1/ifi/140827/bundles/ee64c930-c06f-49cb-9443-84b132b9d4e2 \
-H 'Content-Type: application/json' \
-H 'X-Zeta-AuthToken: {{AUTH_TOKEN}}'
[
{
"id": "ee64c930-c06f-49cb-9443-84b132b9d4e2",
"ifiID": 140827,
"vboID": "zeta",
"name": "Account + Payment Product Bundle",
"accountProducts": [
{
"id": "9e97fc72-d692-4c0a-bccc-ba689954d9af",
"productID": "7706229683808022627",
"type": "ACCOUNT",
"programIDs": "",
"ifiID": 140827
}
],
"paymentProducts": [
{
"id": "86da4629-9c59-45d9-9c0e-61d78ccb196f",
"productID": "baefec67",
"type": "PAYMENT",
"programIDs": "",
"ifiID": 140827
}
],
"status": "active",
"createdAt": "Nov 9, 2019 10:19:49 AM",
"updatedAt": "Nov 28, 2019 2:01:13 PM"
},
{
"id": "31c30bca-7406-44e0-8d31-26bc3ed8a1ee",
"ifiID": 140827,
"vboID": "zeta",
"name": "Account Product Bundle",
"accountProducts": [
{
"id": "942a4cf7-3749-4919-b6cb-4a5f2d29c77c",
"productID": "4732811754742423772",
"type": "ACCOUNT",
"programIDs": "",
"ifiID": 140827
}
],
"paymentProducts": [],
"status": "active",
"createdAt": "Nov 12, 2019 11:36:32 AM",
"updatedAt": "Nov 28, 2019 2:02:06 PM"
}
]
Get Accounts Details
A Resource is responsible for digital authentication of any transaction - financial or non-financial. An Account issued to an Account Holder includes Resource, which is internally mapped to a phone number and payment card.
Fusion provides two APIs to fetch Resource details— by Resource ID, or by Vector. Each API requires different path parameters, and is explained with examples in detail below:
Get Accounts by Resource ID
When you issue a Bundle to an Account Holder, a Resource is created with a unique identifier that represents the Account Holder in Fusion’s payment ecosystem.
To get the details of the Resource, call the /bundles API and pass the identifier, Resource ID, as path parameter.
Endpoint URI
Request Parameters
-
ifiID
: Required. Unique identifier of the IFI. -
resourceID
: Required. Unique identifier of the Resource for whom the details are fetched.
Example
In the below example, we fetch details for a Resource with ID d0a21d7b-38ad-4ab1-88a4-fc17c2189244. The response returns details of a Resource Product named “Prepaid Card Resource Product” with the corresponding Form Factor details.
curl -X GET \
https://fusion.preprod.zeta.in/api/v1/ifi/140827/resources/d0a21d7b-38ad-4ab1-88a4-fc17c2189244 \
-H 'X-Zeta-AuthToken: {{AUTH_TOKEN}}' \
{
"ifi": 140827,
"id": "d0a21d7b-38ad-4ab1-88a4-fc17c2189244",
"resourceProductId": "2ac114f3",
"resourceProduct": {
"ifi": 140827,
"id": "2ac114f3",
"code": "RPABC001",
"name": "Prepaid Card Resource Product",
"description": "Prepaid RuPay card resource product for ABC",
"formFactorProducts": [
{
"ifi": 140827,
"id": "4f6ed594",
"code": "CMSFF100",
"name": "ABC Form Factor Pr100",
"description": "Mobile Form Factor Product for ABC",
"type": "phoneNumber",
"policies": {
"issuancePolicies": [],
"paymentPolicies": []
},
"provider": "PMS",
"skuID": "ABC_MS",
"tags": [],
"attributes": {},
"issuanceStatus": "ACTIVE",
"paymentStatus": "ACTIVE",
"createdAt": "Nov 15, 2019 5:28:13 PM",
"modifiedAt": "Nov 15, 2019 5:28:13 PM",
"headers": {
"tenantID": "140827",
"object": "[email protected]"
}
},
{
"ifi": 140827,
"id": "66abce21",
"code": "CMSFF001",
"name": "ABC Form Factor Product 001",
"description": "Card Form Factor Product for ABC",
"type": "card",
"policies": {
"issuancePolicies": [],
"paymentPolicies": []
},
"provider": "CMS",
"skuID": "ABC_MS",
"tags": [],
"attributes": {},
"issuanceStatus": "ACTIVE",
"paymentStatus": "ACTIVE",
"createdAt": "Nov 20, 2019 4:33:37 PM",
"modifiedAt": "Nov 20, 2019 4:33:37 PM",
"headers": {
"tenantID": "140827",
"object": "[email protected]"
}
}
],
"tags": [],
"policies": {
"issuancePolicies": [],
"paymentPolicies": []
},
"status": "ACTIVE",
"createdAt": "Nov 20, 2019 4:36:45 PM",
"modifiedAt": "Nov 28, 2019 7:20:03 PM",
"headers": {}
},
"targetURI": "account://375e2078-fd4f-4a81-ac87-b32b2b3f4e5a",
"formFactors": [
{
"id": "13c3c5d2-6c06-4187-888c-b781b0cc24de",
"ifi": 140827,
"formFactorProductID": "4f6ed594",
"formFactorID": "+919583170190",
"targetURI": "account:375e2078-fd4f-4a81-ac87-b32b2b3f4e5a",
"tags": [],
"attributes": {},
"policies": {
"issuancePolicies": [],
"paymentPolicies": []
},
"status": "ACTIVE",
"createdAt": "Jan 6, 2020 2:09:28 PM",
"modifiedAt": "Jan 6, 2020 2:09:28 PM",
"headers": {}
},
{
"id": "1dd05c2c-b9ed-4482-9191-83a2c8468c21",
"ifi": 140827,
"formFactorProductID": "66abce21",
"formFactorID": "051ca6cf-2bfa-4a9a-9353-5c3d4aae8ba8",
"targetURI": "account:375e2078-fd4f-4a81-ac87-b32b2b3f4e5a",
"tags": [],
"attributes": {},
"policies": {
"issuancePolicies": [],
"paymentPolicies": []
},
"status": "ACTIVE",
"createdAt": "Jan 6, 2020 2:09:29 PM",
"modifiedAt": "Jan 6, 2020 2:09:29 PM",
"headers": {}
}
],
"tags": [],
"policies": {
"issuancePolicies": [],
"paymentPolicies": []
},
"attributes": {},
"status": "ACTIVE",
"createdAt": "Jan 6, 2020 2:09:28 PM",
"modifiedAt": "Jan 6, 2020 2:09:28 PM",
"headers": {}
}
Get Accounts by Vector
Vectors are identifiers, like phone number and email, that can be used to fetch details of an Account Holder. Here, we call the /resourceByVector API and use Account Holder’s ID as a Vector to fetch their Resource details.
Fusion generates the Account Holder ID when you create an Account Holder. The response returns Resource details, including the Form Factors associated with the Resource.
Endpoint URI
Input Parameters
-
ifiID
: Required. Unique identifier of the IFI. -
vectorType
: Required. The type of Vector against which Resource details are fetched. Allowed value: ACCOUNTHOLDER -
vectorValue
: Required. Value of the Vector depending on thevectorType
specified. Since, only Account Holder is currently supported, hence specify Account Holder ID here. -
view
: Optional. Parameter to filter the results. The following views are supported:-
BASIC
: Default view. Returns details of all the active and inactive Form Factors associated with the Resource. -
EXPANDED
: Returns details of all the active, inactive and deleted Form Factors associated with the Resource.
-
Example
In the following example, we fetch Resource details of an Account Holder with the ID f38fccab-a84f-49e8-82f9-d0e31d92983a. Response for both BASIC and EXPANDED views are shown here:
-
BASIC view shows only the active Form Factor (“
formFactorID
”: “40323ba2-f091-4d24-bddb-cc5663501bb2”) -
EXPANDED view shows the active Form Factor (“
formFactorID
”: “40323ba2-f091-4d24-bddb-cc5663501bb2”) as well as deleted Form Factor (“formFactorID”: “+913815141711”).
curl --location --request GET 'https://fusion.preprod.zeta.in/api/v1/ifi/140793/resourceByVector?vectorType=ACCOUNTHOLDER&vectorValue=f38fccab-a84f-49e8-82f9-d0e31d92983a&view=BASIC' \
-H 'X-Zeta-AuthToken: {{AUTH_TOKEN}}' \
{
"ifi": 140827,
"requestId": "b9382c61-c365-4f3d-988e-cffa7b3f886a_4fa18593-d2d9-4bf3-bea7-7f6deb9f2ca4",
"id": "d793ba95-e92d-472b-a44d-75cf7631277c",
"resourceProductId": "2ac114f3",
"resourceProduct": {
"ifi": 140827,
"id": "2ac114f3",
"code": "RPFAM001",
"name": "Prepaid Card Resource Product",
"description": "Prepaid RuPay card resource product for ABC",
"formFactorProducts": [
{
"ifi": 140827,
"id": "4f6ed594",
"code": "CMSFF100",
"name": "ABC Form Factor Pr100",
"description": "Mobile Form Factor Product for ABC",
"type": "phoneNumber",
"policies": {
"issuancePolicies": [],
"paymentPolicies": []
},
"provider": "PMS",
"skuID": "ABC_FAMPAY_MS",
"tags": [],
"attributes": {},
"issuanceStatus": "ACTIVE",
"paymentStatus": "ACTIVE",
"createdAt": "Nov 15, 2019 5:28:13 PM",
"modifiedAt": "Nov 15, 2019 5:28:13 PM",
"headers": {
"tenantID": "140827",
"object": "[email protected]"
}
},
{
"ifi": 140827,
"id": "66abce21",
"code": "CMSFF001",
"name": "ABC Form Factor Product 001",
"description": "Card Form Factor Product for ABC",
"type": "card",
"policies": {
"issuancePolicies": [],
"paymentPolicies": []
},
"provider": "CMS",
"skuID": "ABC_FAMPAY_MS",
"tags": [],
"attributes": {},
"issuanceStatus": "ACTIVE",
"paymentStatus": "ACTIVE",
"createdAt": "Nov 20, 2019 4:33:37 PM",
"modifiedAt": "Nov 20, 2019 4:33:37 PM",
"headers": {
"tenantID": "140827",
"object": "[email protected]"
}
}
],
"tags": [],
"policies": {
"issuancePolicies": [],
"paymentPolicies": []
},
"status": "ACTIVE",
"createdAt": "Nov 20, 2019 4:36:45 PM",
"modifiedAt": "Nov 28, 2019 7:20:03 PM",
"headers": {}
},
"targetURI": "account://8780dd20-8171-4849-90e6-8752b2e5b675",
"formFactors": [
{
"id": "b3121006-f2e1-4d8c-ad64-f7d8086aa0da",
"ifi": 140827,
"formFactorProductID": "66abce21",
"formFactorID": "40323ba2-f091-4d24-bddb-cc5663501bb2",
"targetURI": "account:account://8780dd20-8171-4849-90e6-8752b2e5b675",
"tags": [],
"attributes": {},
"policies": {
"issuancePolicies": [],
"paymentPolicies": []
},
"status": "ACTIVE",
"createdAt": "May 11, 2020 8:24:07 AM",
"modifiedAt": "May 11, 2020 8:24:07 AM",
"headers": {}
}
],
"tags": [],
"vectors": [
"vector://ACCOUNTHOLDER/c99824ec-5126-43cd-a6a1-fdd2878359f5"
],
"policies": {
"issuancePolicies": [],
"paymentPolicies": []
},
"attributes": {},
"status": "ACTIVE",
"createdAt": "May 11, 2020 8:24:06 AM",
"modifiedAt": "May 11, 2020 8:24:06 AM",
"headers": {}
}
Related articles
Fusion Events
List of webhooks to subscribe to & receive event notification
Account API Error Codes
List of error codes specific to Account APIs
Generic Error Codes
List of general error codes across fusion
Account APIs
Create Accounts, manage Bundles, view transactions
Account Lifecycle
Key concepts related to the account and account types