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
Name | Type | Description |
---|---|---|
Number | Numeric | Unique number associated with the user’s Kashflow account |
FullName | String | Full name of the user which includes first, middle and last name. |
RoleNumber | Numeric | Unique number of role to be assigned to the user. |
Username | String | Unique username of the user’s KashFlow account. |
Password | String | Password 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. |
UserAccountDisabled | Boolean | Flag to indicate the user’s account status i.e. active or inactive. |
MemorableWord | String | Memorable word set by the user which will be used for loging in. However it won’t be retrieved in case of GET. |
String | Email id of the user. |
Response Elements
Name | Description |
---|---|
RoleName | Name of role to be assigned. |
NoOfLogins | Number of users who are currently logged in with same credentials. |
LastLogin | Last 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": "[email protected]",
"FullName": "rediff",
"UserAccountDisabled": false,
"LastLogin": "Never",
"NoOfLogins": 0,
"RoleNumber": 6,
"RoleName": "Full Access",
"Number": 1,
"Username": "admin"
}, {
"Email": "[email protected]",
"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": "[email protected]",
"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": "[email protected]",
"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": "[email protected]",
"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.