Enkash Developer Portal
Home
Home
Login
  1. Reward Allocation
  • Back to home
  • Reward APIs
  • Token APIs
    • Authentication
    • Single Sign On (SSO)
  • Reward Allocation
    • Create And Allocate Points
      POST
    • Bulk Create And Allocate Rewards
      POST
    • Get Reward Account Details
      POST
    • Get Reward Transaction Details
      POST
    • Get User Details
      POST
    • Get User Card Details
      POST
  • Incentive Allocation
    • Incentive Create And Allocation
    • Get Incentive Transaction details
    • Get User Details
  • Redemption
    • User Authentication
    • Get Cart for User
    • Search Catalog
    • Get Product Catalog Details
    • Get Product Configs (Denominations)
    • Add to cart
    • Update Cart
    • Create Order
    • Order Search
    • create order
    • Fetch Order Info by Partner order Reference id
  • Point Management
    • Overview
    • Create Event
    • Get Event
    • Update Event
    • Allocate Coins
    • Get Balance
  1. Reward Allocation

Bulk Create And Allocate Rewards

Developing
POST
/api/v0/partner/enKashCard/bulk-create-allocate-points-json
This API facilitates the creation / allocation of points to users in bulk. Request is an array of jsons (can be seen in example)
Error messages client might expect as failure reasons in dto:-
UNPROCESSABLE_ENTITY (422): The request is semantically incorrect.
"Company Id is required if it is an Enkash User"
"Primary Enkash card is not present. So bulk upload cannot be done"
"KYC is not uploaded or under review for the primary card. So bulk upload cannot be done"
"Bin Type is not mapped on PlanMaster"
"Card Account does not exist for this partner"
NOT_FOUND (404): The requested resource was not found.
"Card account not found for companyId: [companyId] and cardAccountId: [cardAccountId]"

Request

Query Params
companyId
string 
required
Enkash Company Id
Example:
CEKBVCGMR1
cardAccountId
string 
required
Enkash Card account Id
Example:
CA1ZS96
isPointsAllocation
boolean 
required
If the flag is true, the point will be allocated to the existing user as well as the new user.
If the flag is false only new users will be created and points will be allocated to new users , no points will be allocated to the existing users.
Example:
true
Header Params
partnerId
string 
required
Example:
CRMTTTMUF
Content-Type
string 
required
Example:
application/json
Authorization
string 
required
Example:
{token}
Body Params application/json
array of:
title
string 
optional
Mr/Mrs/Ms
name
string 
required
Name of the user
email
string 
optional
Email id of user
mobile
string 
required
Mobile of user
loadAmount
integer 
required
Amount to be allocated to user
remarks
string 
optional
Remarks
uniqueReferenceNumber
string 
required
Unique Transaction Reference number provided by client
Example
[
    {
"title": "Mr" , 
"name": "John hrllo",
"email": "ojas.bisariya@kratikal.com",
"mobile": "6836111111",
"loadAmount": 100, 
"remarks" : "good",
"uniqueReferenceNumber" :"test123457"
 }
]

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://test.your-api-server.com/api/v0/partner/enKashCard/bulk-create-allocate-points-json?companyId=CEKBVCGMR1&cardAccountId=CA1ZS96&isPointsAllocation=true' \
--header 'partnerId: CRMTTTMUF' \
--header 'Authorization: {token}' \
--header 'Content-Type: application/json' \
--data-raw '[
    {
"title": "Mr" , 
"name": "John hrllo",
"email": "ojas.bisariya@kratikal.com",
"mobile": "6836111111",
"loadAmount": 100, 
"remarks" : "good",
"uniqueReferenceNumber" :"test123457"
 }
]'

Responses

🟢200Success
application/json
Body
email
string 
required
Email of the user to whom points are allocated
name
string 
required
name of user
mobile
string 
required
mobile number of user
title
string 
required
Mr / Mrs /Ms
loadAmount
number 
required
How much amount is to be loaded to user card
companyId
string 
required
ENkash Company Id
cardAccountId
string 
required
Enkash Card Account id
enkashCardId
string 
required
Enkash Card Id of the user Card
userId
string 
required
Enkash User Id
accountBalance
number 
required
Balance left in account after allocation
enkashCardTxnId
string 
required
Unique Transaction Id of EnKash
otbBalance
number 
required
User Card Balance after allocation
successCount
number 
required
number of successful allocations
failureCount
number 
required
number of failed allocations
totalCount
number 
required
total number of allocations
Example
{
    "code": 0,
    "message": "Success",
    "payload": {
        "successBulkEnKashCardCreateDTOs": [
            {
                "email": "johndee@email.com",
                "name": "John Dee",
                "mobile": "6776543210",
                "title": "Mr",
                "loadAmount": 10,
                "companyId": "CEKCDVT1UV",
                "cardAccountId": "CAF0RX8N3",
                "enkashCardId": "EKCBO72AEY",
                "userId": "EKHVPYVS",
                "accountBalance": 48681,
                "enkashCardTxnId": "ECTA72T56O2SP",
                "otbBalance": 10000
            }
        ],
        "failureBulkEnKashCardCreateDTOs": [
            {
                "email": "taylor@email.com",
                "name": "test1 testlast",
                "mobile": "6876543324",
                "title": "Mr",
                "loadAmount": 10,
                "companyId": "CEKCDVT1UV",
                "cardAccountId": "CAF0RX8N3"
            },
            {
                "email": "johndee@email.com",
                "name": "John Dee",
                "mobile": "6776543210",
                "title": "Mr",
                "loadAmount": 10,
                "companyId": "CEKCDVT1UV",
                "cardAccountId": "CAF0RX8N3",
                "uniqueReferenceNumber": "123443101",
                "failureReason": "The transaction associated with the given Unique reference Number already exists"
            }
        ],
        "successCount": 1,
        "failureCount": 2,
        "totalCount": 3
    }
}
Modified at 2025-05-24 08:10:07
Previous
Create And Allocate Points
Next
Get Reward Account Details
Built with