Users

This s a documentation page for our shiny new REST API - you weren't meant to find it. This API isn't ready for public use yet. We're chopping and changing it a LOT as we grow it. So if you build something that uses it then it's very likely to break in a future update. Don't say you weren't warned!

URL:

https://api.kashflow.com/v2/users

Method(s):

get,post,put,delete

Response Formats:

JSON, XML

Description:

This method allows you to retrieve, create, update and delete users.
The individual resource is identified by the user number. So /user/123 would return the user with number 123. Similarly a PUT to that URL would update user 123.

Parameters

NameTypeDescription
NumberNumericUnique number associated with the user’s Kashflow account
FullNameStringFull name of the user which includes first, middle and last name.
RoleNumberNumericUnique number of role to be assigned to the user.
UsernameStringUnique username of the user’s KashFlow account.
PasswordStringPassword for the user’s account. While making any PUT or POST request, it should be in plain text. However it won’t be retrieved in case of GET.
UserAccountDisabledBooleanFlag to indicate the user’s account status i.e. active or inactive.
MemorableWordStringMemorable word set by the user which will be used for loging in.
However it won’t be retrieved in case of GET.
EmailStringEmail id of the user.

Response Elements

NameDescription
RoleNameName of role to be assigned.
NoOfLoginsNumber of users who are currently logged in with same credentials.
LastLoginLast login time

GET Operation

Returns list of all users as an array or the details of a specific user.

To get list of users –

URL : /users

Example response for GET of user list


[{
  "Email": "swati_garg05@rediff.com",
  "FullName": "rediff",
  "UserAccountDisabled": false,
  "LastLogin": "Never",
  "NoOfLogins": 0,
  "RoleNumber": 6,
  "RoleName": "Full Access",
  "Number": 1,
  "Username": "admin"
}, {
  "Email": "test@test.com",
  "FullName": "TestUser",
  "UserAccountDisabled": false,
  "LastLogin": "Never",
  "NoOfLogins": 0,
  "RoleNumber": 11,
  "RoleName": "Invoices & Customers (read only)",
  "Number": 2,
  "Username": "TestUser"
}]

To get details of a particular user –

URL: /users/{number}

{number} in the URL should be replaced with the number associated with the user’s Kashflow account.

Example response for GET of user


{  
"Email": "swati_garg05@rediff.com",  
"FullName": "rediff",  
"UserAccountDisabled": false,  
"LastLogin": "Never",  
"NoOfLogins": 0,   
"RoleNumber": 6,  
"RoleName": "Full Access",  
"Number": 1,  
"Username": "admin"  
}

POST Operation

Creates a user with the given user data.

Mandatory parameters for POST of user:
1. FullName
2. RoleNumber
3. Email
4. Username
5. Password
6. MemorableWord

URL : /users

Example request for POST of user


{
"Email": "john@email.com",
"FullName": "John Smith",
"Password": "letmein",
"RoleNumber": 2,
"Username": "jsmith",
"MemorableWord": "aaaaa"
}

PUT Operation

Updates the details of the specified user.

Mandatory parameters for PUT of user:
1. FullName
2. RoleNumber
3. Email
4. Username
5. Number

URL : /users/{number}

{number} in the URL should be replaced with the number associated with the user’s Kashflow account.

Example request for PUT of user


{
 "Number": 3,
 "Email": "john@email.com",
 "FullName": "John SmithUpdated",
 "Password": "letmein",
 "RoleNumber": 2,
 "Username": "jsmith",
 "UserAccountDisabled": false
}

DELETE Operation

Deletes the user entry for the specified user number.

URL : /users/{number}

{number} in the URL should be replaced with the number associated with the user’s Kashflow account.

See how KashFlow works with your business and your books