DIGIT-API's
  1. Manage
DIGIT-API's
  • Using DIGIT-PLAYGROUND
  • User
    • Manage
      • Create User
        POST
      • Search All Users
        POST
      • Search Active Users
        POST
      • Create User Without OTP Validation
        POST
      • Update User Without OTP Validation
        POST
      • Get User
        POST
      • Update Profile
        POST
    • Authenticate
      • Logout
      • Reset Password
      • Login
  • Master Data V1
    • List
      POST
    • Search
      POST
  • Master Data V2
    • Create Schema
      • Create Schema
    • Search Schema
      • Seach Schema
    • Add Data
      • Create
    • Seach Data
      • Seach Data
    • Update data
      • Updata
  • Access-control
    • Action
      • Authorize User
      • Get the list of actions based on either roles or features.
      • Create a new action.
      • Update existing action(s).
      • getAllMDMSActions
      • Validate a particular action for a given tenant and roles of the tenant
    • Role
      • Get the list of roles based on role codes.
      • Create a new role.
      • Update existing role(s).
    • Role-Action
      • Create mapping for role and action(s).
  • Workflow-v2
    • WorkFlow
      • Create new workflow entry for a given application number(businessId).
      • Process search of the applicaition
      • Get the list of workflow applications defined in the system.
      • Get the count of applications satisfying the given criteria
      • Get the nearing sla count of workflow applications defined in the system.
      • Get the list of status count workflow applications defined in the system.
    • Escalate
      • Get the list of escalate workflow applications defined in the system.
      • Get the list of workflow applications defined in the system.
    • BusinessServiceV2
      • Create new v2 BuinessService.
      • Updates a existing v2 BuinessService.
      • Get the list of v2 BusinessServices defined in the system.
    • BusinessService
      • Create new BuinessService.
      • Updates a existing BuinessService.
      • Get the list of BusinessServices defined in the system.
  • Filestore
    • Upload File
      • Uploads different kinds of files to server.
    • Search
      • Search file url based on tenantid and filestoreid.
      • Search file url based on tenantid and tag name.
      • Get metadata of file based on tenantId and filestoreId.
      • Search file url based on tenantid and filestoreid.
  • Idgen
    • IdGeneration Controller
    • Create new id.
  • Location
    • Boundary
      • Search Location
      • It Will provide the List of boundaries based on search criteria Like "Srikakulam Municipality","Zone-1","Zone-2" etc.
    • Geography
      • Handles all requests related to Geographical boundaries by providing appropriate GeoJson and other associated data
    • Tenant
      • Resolves a given latitude / longitude to the corresponding tenant Id
  • Enc-Service
    • Crypto
      • Encrypts the given input value/s OR values of the object.
      • Decrypts the given input value/s OR values of the object.
      • Provide signature for a given value.
      • Check if the signature is correct for the provided value.
      • Deactivate the keys for the given tenant and generate new keys. It will deactivate both symmetric and asymmetric keys for the provided tenant.
      • cryptoRotateAllKeys
  • PG-Service
    • transactions-api-controller
      • transactionsV1AvailableGatewaysPost
      • transactionsV1CreatePost
      • transactionsV1SearchPost
      • transactionsV1UpdatePost
  • URL-Shortening
    • egov-url-shortening service endpoints
      • shorten given url
      • redirects user to orignal url identified by id
  • Indexer
    • egov-indexer service
      • This endpoint is used to start legacy index job to reindex records from DB. The data is fetched from DB by calling api mentioned in request in batches. The is useful when some record is present in DB but missing on index.
      • This endpoint is used to start indexing job to reindex records from one index to another index.
      • This endpoint is used to index one record on a index. The information to pick correct config is provided with the data to be indexed.
      • Index data in row
  • PDF-Service
    • PDF-Service endpoints
      • Generate PDF and store output pdfs to filestore and return their filestoreids. The information is also saved into DB so that using _search endpoint we can retrieve already generated pdfs.
      • Generates pdf without storing any information on filestore or in DB. The generated pdf would be returned as binary response
      • Get filestoreids and other information about already generated pdf by searching on jobid or entityid with other optional search parameters
  • Report
    • Report Meta
      • createv1
      • getReportDatav1
      • Metadata API for report definition
    • Report
      • Search API for report data
  • eGov-OTP
    • OTPConfig
      • create OTP Configuration entry
      • validate OTP Configuration entry
      • search OTP Configuration entry using uuid
  • User-OTP
    • user otp send
  • Localization
    • Create Message
      • create massage
    • Fetch Message
      • fetch message
    • Update message
      • update message
    • Delete message
      • delete mesage
    • Upsert message
      • upsert message
  • Service Request
    • Service Defination Create
      • Create service defination
    • Service Defination search
      • Search service defination
    • Service create
      • service create
    • Service Search
      • Service search
  • Audit Service
  1. Manage

Create User

POST
/citizen/_create
Users
Last modified:2024-05-28 09:28:19
To create new User(s) in the system. API supports bulk creation with max limit as defined in the UserReq. Please note that either whole batch succeeds or fails, there's no partial batch success. To create one user, please pass array with one user object.
Users can be created based on the roles. Users with types as SYSTEM and EMPLOYEE can create other users if their RBAC mapping provides them the permission. Users with CITIZEN type can only create themselves, while EMPLOYEE and SYSTEM type users can also create other EMPLOYEES and CITIZENS.
User registration will always be a two step process, where this API will create a non authenticated user (without password) and after verification (using OTP) other user details (including password) can be updated using update user API to complete the user registration process.

Request

Header Params
Content-Type
string 
optional
Example:
application/json
Body Params text/plain
Example
Example:{ "RequestInfo": { "apiId": null, "ver": null, "ts": null, "action": "POST", "did": null, "key": null, "msgId": "5bfa85e7-dfa1-47c8-98b2-747bf552be86", "authToken": "912832f0-9d8c-49f4-a6df-964e69871db5" }, "user": { "userName": "UserCitizen", "password": "Must@123NK", "salutation": "Ms", "name": "mustak", "gender": "MALE", "mobileNumber": "9353822214", "emailId": "xyz@egovernments.org", "altContactNumber": "", "pan": "VFGGC5624P", "aadhaarNumber": "96a70", "permanentAddress": "Dawakhana", "permanentCity": "Kaikoo", "permanentPincode": "111111", "correspondenceCity": "banglore", "correspondencePincode": "123456", "correspondenceAddress": "correAddress", "active": true, "dob": "08/08/1999", "pwdExpiryDate": null, "locale": "string", "type": "CITIZEN", "signature": "", "accountLocked": false, "fatherOrHusbandName": "Palash", "bloodGroup": "O_POSITIVE", "identificationMark": "Wears spects", "photo": "a8a6cf1e-c84d-4a0c-b2d5-57ec8711ba25", "otpReference": "14856", "tenantId": "pg", "roles": [ { "code": "CITIZEN", "name": "Citizen", "tenantId": "pg" } ] } }

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://unified-dev.digit.org/user/citizen/_create' \
--header 'Content-Type: application/json' \
--data-raw '{
    "RequestInfo": {
        "apiId": null,
        "ver": null,
        "ts": null,
        "action": "POST",
        "did": null,
        "key": null,
        "msgId": "5bfa85e7-dfa1-47c8-98b2-747bf552be86",
        "authToken": "912832f0-9d8c-49f4-a6df-964e69871db5"
    },
    "user": {
        "userName": "UserCitizen",
        "password": "Must@123NK",
        "salutation": "Ms",
        "name": "mustak",
        "gender": "MALE",
        "mobileNumber": "9353822214",
        "emailId": "xyz@egovernments.org",
        "altContactNumber": "",
        "pan": "VFGGC5624P",
        "aadhaarNumber": "96a70",
        "permanentAddress": "Dawakhana",
        "permanentCity": "Kaikoo",
        "permanentPincode": "111111",
        "correspondenceCity": "banglore",
        "correspondencePincode": "123456",
        "correspondenceAddress": "correAddress",
        "active": true,
        "dob": "08/08/1999",
        "pwdExpiryDate": null,
        "locale": "string",
        "type": "CITIZEN",
        "signature": "",
        "accountLocked": false,
        "fatherOrHusbandName": "Palash",
        "bloodGroup": "O_POSITIVE",
        "identificationMark": "Wears spects",
        "photo": "a8a6cf1e-c84d-4a0c-b2d5-57ec8711ba25",
        "otpReference": "14856",
        "tenantId": "pg",
        "roles": [
            {
                "code": "CITIZEN",
                "name": "Citizen",
                "tenantId": "pg"
            }
        ]
    }
}'

Responses

🟢201User(s) created sucessfully
application/json
Body
ResponseInfo
object (ResponseInfo) 
optional
ResponseInfo should be used to carry metadata information about the response from the server. apiId, ver and msgId in ResponseInfo should always correspond to the same values in respective request's RequestInfo.
apiId
string 
required
unique API ID
<= 128 characters
ver
string 
required
API version
<= 32 characters
ts
integer <int64>
required
response time in epoch
resMsgId
string 
optional
unique response message id (UUID) - will usually be the correlation id from the server
<= 256 characters
msgId
string 
optional
message id of the request
<= 256 characters
status
enum<string> 
required
status of request processing - to be enhanced in futuer to include INPROGRESS
Allowed values:
SUCCESSFULFAILED
Users
array [object] 
optional
Example
{
  "ResponseInfo": {
    "apiId": "string",
    "ver": "string",
    "ts": 0,
    "resMsgId": "string",
    "msgId": "string",
    "status": "SUCCESSFUL"
  },
  "Users": [
    {}
  ]
}
🟠400User(s) creation failed
Modified at 2024-05-28 09:28:19
Previous
Manage
Next
Search All Users
Built with