User
The user resource represents admin users of the shop company. It contains information about each admin user.
What can you do with User?
The FlickRocket API lets you do the following with the user resource. More detailed versions of these general actions may be available:
GET /api/users.json?updated_at_min=2016-03-16%2021:03:29
Receive a list of all admin users which have been updated after the given date.
GET /api/users/search.json?query=email:
Bob@some.com
Search for users matching supplied query
GET /api/users/#{token}.json
Receive a single admin user identified via token (User ID)
POST /api/users.json
Create a new admin user for current company
PUT /api/users/#{token}.json
Modify an existing admin user identified via token (User ID)
GET /api/users/count.json
Receive a count of all associated admin users in current company
User Properties
company_id |
"company_id": 1202
The ID of the company to which the user belongs.
|
created_at |
"updated_at": "2016-02-24T14:19:51"
Date and time of the user creation.
This field is read-only
|
default_address |
"default_address":
"language": "en"
"country": "DE"
"default": true
"id": 3124
"country_code": "DE"
"province_code": null
"name": "Max Muster"
"first_name": "Max"
"last_name": "Muster"
"zip": "44227"
"city": "Dortmund"
"country_name": "DE"
"company": "Sample LLC"
"provice_code": null
"address1": "Sample Str. 1"
"address2": ""
"phone": "+49-231-976765-20"
"token": "LTPUTEFWJOAXTUKQ"
password_option: null
|
email |
"email": "sample@johndoe.com<script type="text/javascript">
document.getElementById('cloak1c39668ed63f17c911baad56b4e68a25').innerHTML = '';
var prefix = 'ma' + 'il' + 'to';
var path = 'hr' + 'ef' + '=';
var addy1c39668ed63f17c911baad56b4e68a25 = 'sample' + '@';
addy1c39668ed63f17c911baad56b4e68a25 = addy1c39668ed63f17c911baad56b4e68a25 + 'johndoe' + '.' + 'com';
var addy_text1c39668ed63f17c911baad56b4e68a25 = 'sample' + '@' + 'johndoe' + '.' + 'com';document.getElementById('cloak1c39668ed63f17c911baad56b4e68a25').innerHTML += '<a ' + path + '\'' + prefix + ':' + addy1c39668ed63f17c911baad56b4e68a25 + '\'>'+addy_text1c39668ed63f17c911baad56b4e68a25+'<\/a>';
</script>"
The email address of the user.
|
first_name |
"first_name": "John"
First name of the user. |
id |
"id": 2103
Unique ID identifying this user.
|
language |
"language": "en"
The primary language used for this user. This language is used for communication with FlickRocket (admin interface, emails, etc.). The shop and product data might be in multiple different languages.
|
last_name |
"last_name": "Doe"
Last name of the user.
|
note |
"note": "Special sample promotion"
Optional note added to this user.
|
permissions |
"request_products": 1
"request_keyfile": 1
"request_rescue_code": 1
"request_beta_code": 1
"create_users": 1
"web_access": 1
"accounting": 1
"unlock": 1
"RepAccounting": 1 |
state |
"enabled"
Indicates that this user is enabled or disabled.
|
time_zone |
"time_zone": -120
The user's time zone offset to UTC in minutes
|
token |
"LTPUTEFWJOAXTUKQ"
This token can be used to reference the user if the password isn't known.
This field is read-only
|
updated_at |
"updated_at": "2016-02-24T14:19:51"
Date and time of the last update made to the company record.
This field is read-only
|
valid |
"valid": true
Set to true if the company is valid and operational.
This field is read-only
|
verified_email |
"verified_email": true
Is true if the user's email has been verified.
This field is read-only
|
Receive a list of all Users updated after a certain date
GET /api/users.json?updated_at_min=2016-01-16%2021:03:29
View Response
GET /api/customers.json?updated_at_min=2015-03-16T21:03:29
{
"users": [{
"id": 13399,
"email": "sample@somwhere.com<script type="text/javascript">
document.getElementById('cloak24ef48760548a38a21671b18d4590932').innerHTML = '';
var prefix = 'ma' + 'il' + 'to';
var path = 'hr' + 'ef' + '=';
var addy24ef48760548a38a21671b18d4590932 = 'sample' + '@';
addy24ef48760548a38a21671b18d4590932 = addy24ef48760548a38a21671b18d4590932 + 'somwhere' + '.' + 'com';
var addy_text24ef48760548a38a21671b18d4590932 = 'sample' + '@' + 'somwhere' + '.' + 'com';document.getElementById('cloak24ef48760548a38a21671b18d4590932').innerHTML += '<a ' + path + '\'' + prefix + ':' + addy24ef48760548a38a21671b18d4590932 + '\'>'+addy_text24ef48760548a38a21671b18d4590932+'<\/a>';
</script>",
"created_at": "2011-05-30T11:47:01",
"updated_at": "2011-05-30T11:47:01",
"first_name": "First",
"last_name": "Last",
"language": "en",
"state": "enabled",
"note": "",
"verified_email": true,
"token": "QWERTZOWJOQWERTZ",
"time_zone": 60,
"company_id": 1212,
"default_address": {
"language": "en",
"country": "Germany",
"country_name": "Germany",
"country_code": "DE",
"default": true,
"province_code": null,
"province": null,
"name": "First Last",
"id": 13399,
"first_name": "First",
"last_name": "Last",
"company": "Sample",
"address1": "Heinrich-Hertz-Str. 2",
"address2": "",
"zip": "44267",
"city": "Dortmund",
"phone": "",
"token": "QWERTZOWJOQWERTZ",
"password_option": null
},
"permissions": {
"request_products": 1,
"request_keyfile": 1,
"request_rescue_code": 1,
"request_beta_code": 1,
"create_users": 1,
"web_access": 1,
"accounting": 1,
"unlock": 1,
"RepAccounting": 1
},
{
"id": 13400,
"email": "john@doe.com<script type="text/javascript">
document.getElementById('cloak16befba1eb0070e00e3c13670d8268c2').innerHTML = '';
var prefix = 'ma' + 'il' + 'to';
var path = 'hr' + 'ef' + '=';
var addy16befba1eb0070e00e3c13670d8268c2 = 'john' + '@';
addy16befba1eb0070e00e3c13670d8268c2 = addy16befba1eb0070e00e3c13670d8268c2 + 'doe' + '.' + 'com';
var addy_text16befba1eb0070e00e3c13670d8268c2 = 'john' + '@' + 'doe' + '.' + 'com';document.getElementById('cloak16befba1eb0070e00e3c13670d8268c2').innerHTML += '<a ' + path + '\'' + prefix + ':' + addy16befba1eb0070e00e3c13670d8268c2 + '\'>'+addy_text16befba1eb0070e00e3c13670d8268c2+'<\/a>';
</script>",
"created_at": "2011-05-31T11:27:01",
"updated_at": "2011-05-31T11:27:01",
"first_name": "John",
"last_name": "Doe",
"language": "en",
"state": "enabled",
"note": "",
"verified_email": true,
"token": "YXCVBNOWJOYXCVBN",
"time_zone": 60,
"company_id": 1212,
"default_address": {
"language": "en",
"country": "Germany",
"country_name": "Germany",
"country_code": "DE",
"default": true,
"province_code": null,
"province": null,
"name": "First Last",
"id": 13400,
"first_name": "First",
"last_name": "Last",
"company": "Sample",
"address1": "Other-Str. 2",
"address2": "",
"zip": "44227",
"city": "Dortmund",
"phone": "",
"token": "YXCVBNOWJOYXCVBN",
"password_option": null
},
"permissions": {
"request_products": 1,
"request_keyfile": 0,
"request_rescue_code": 1,
"request_beta_code": 1,
"create_users": 1,
"web_access": 0,
"accounting": 1,
"unlock": 1,
"RepAccounting": 0
},
}]
}
Search for Users matching supplied query
GET /api/users/search.json?query=email:Bob@some.com<script type="text/javascript">
document.getElementById('cloak1ad4caa344a4ff2eecc359f4dc8c9c21').innerHTML = '';
var prefix = 'ma' + 'il' + 'to';
var path = 'hr' + 'ef' + '=';
var addy1ad4caa344a4ff2eecc359f4dc8c9c21 = 'Bob' + '@';
addy1ad4caa344a4ff2eecc359f4dc8c9c21 = addy1ad4caa344a4ff2eecc359f4dc8c9c21 + 'some' + '.' + 'com';
var addy_text1ad4caa344a4ff2eecc359f4dc8c9c21 = 'Bob' + '@' + 'some' + '.' + 'com';document.getElementById('cloak1ad4caa344a4ff2eecc359f4dc8c9c21').innerHTML += '<a ' + path + '\'' + prefix + ':' + addy1ad4caa344a4ff2eecc359f4dc8c9c21 + '\'>'+addy_text1ad4caa344a4ff2eecc359f4dc8c9c21+'<\/a>';
</script>
View Response
GET /api/customers/search.json?query=email:info@sample.com<script type="text/javascript">
document.getElementById('cloaka3be70da9b02a56200b6b5acbbc0c010').innerHTML = '';
var prefix = 'ma' + 'il' + 'to';
var path = 'hr' + 'ef' + '=';
var addya3be70da9b02a56200b6b5acbbc0c010 = 'info' + '@';
addya3be70da9b02a56200b6b5acbbc0c010 = addya3be70da9b02a56200b6b5acbbc0c010 + 'sample' + '.' + 'com';
var addy_texta3be70da9b02a56200b6b5acbbc0c010 = 'info' + '@' + 'sample' + '.' + 'com';document.getElementById('cloaka3be70da9b02a56200b6b5acbbc0c010').innerHTML += '<a ' + path + '\'' + prefix + ':' + addya3be70da9b02a56200b6b5acbbc0c010 + '\'>'+addy_texta3be70da9b02a56200b6b5acbbc0c010+'<\/a>';
</script>
{
"user": {
"id": 13399,
"email": "sample@somwhere.com<script type="text/javascript">
document.getElementById('cloak9c285bbbf23f640d16cd3a6992a850e4').innerHTML = '';
var prefix = 'ma' + 'il' + 'to';
var path = 'hr' + 'ef' + '=';
var addy9c285bbbf23f640d16cd3a6992a850e4 = 'sample' + '@';
addy9c285bbbf23f640d16cd3a6992a850e4 = addy9c285bbbf23f640d16cd3a6992a850e4 + 'somwhere' + '.' + 'com';
var addy_text9c285bbbf23f640d16cd3a6992a850e4 = 'sample' + '@' + 'somwhere' + '.' + 'com';document.getElementById('cloak9c285bbbf23f640d16cd3a6992a850e4').innerHTML += '<a ' + path + '\'' + prefix + ':' + addy9c285bbbf23f640d16cd3a6992a850e4 + '\'>'+addy_text9c285bbbf23f640d16cd3a6992a850e4+'<\/a>';
</script>",
"created_at": "2011-05-30T11:47:01",
"updated_at": "2011-05-30T11:47:01",
"first_name": "First",
"last_name": "Last",
"language": "en",
"state": "enabled",
"note": "",
"verified_email": true,
"token": "QWERTZOWJOQWERTZ",
"time_zone": 60,
"company_id": 1212,
"default_address": {
"language": "en",
"country": "Germany",
"country_name": "Germany",
"country_code": "DE",
"default": true,
"province_code": null,
"province": null,
"name": "First Last",
"id": 13399,
"first_name": "First",
"last_name": "Last",
"company": "Sample",
"address1": "Heinrich-Hertz-Str. 2",
"address2": "",
"zip": "44267",
"city": "Dortmund",
"phone": "",
"token": "QWERTZOWJOQWERTZ",
"password_option": null
},
"permissions": {
"request_products": 1,
"request_keyfile": 1,
"request_rescue_code": 1,
"request_beta_code": 1,
"create_users": 1,
"web_access": 1,
"accounting": 1,
"unlock": 1,
"RepAccounting": 1
},
}
}
Receive a single User identified by User ID token
GET /api/users/#{token}.json
View Response
GET /api/customers/13399.json
{
"user": {
"id": 13399,
"email": "sample@somwhere.com<script type="text/javascript">
document.getElementById('cloak340a11281d784b232c95bb0d2835a360').innerHTML = '';
var prefix = 'ma' + 'il' + 'to';
var path = 'hr' + 'ef' + '=';
var addy340a11281d784b232c95bb0d2835a360 = 'sample' + '@';
addy340a11281d784b232c95bb0d2835a360 = addy340a11281d784b232c95bb0d2835a360 + 'somwhere' + '.' + 'com';
var addy_text340a11281d784b232c95bb0d2835a360 = 'sample' + '@' + 'somwhere' + '.' + 'com';document.getElementById('cloak340a11281d784b232c95bb0d2835a360').innerHTML += '<a ' + path + '\'' + prefix + ':' + addy340a11281d784b232c95bb0d2835a360 + '\'>'+addy_text340a11281d784b232c95bb0d2835a360+'<\/a>';
</script>",
"created_at": "2011-05-30T11:47:01",
"updated_at": "2011-05-30T11:47:01",
"first_name": "First",
"last_name": "Last",
"language": "en",
"state": "enabled",
"note": "",
"verified_email": true,
"token": "QWERTZOWJOQWERTZ",
"time_zone": 60,
"company_id": 1212,
"default_address": {
"language": "en",
"country": "Germany",
"country_name": "Germany",
"country_code": "DE",
"default": true,
"province_code": null,
"province": null,
"name": "First Last",
"id": 13399,
"first_name": "First",
"last_name": "Last",
"company": "Sample",
"address1": "Heinrich-Hertz-Str. 2",
"address2": "",
"zip": "44267",
"city": "Dortmund",
"phone": "",
"token": "QWERTZOWJOQWERTZ",
"password_option": null
},
"permissions": {
"request_products": 1,
"request_keyfile": 1,
"request_rescue_code": 1,
"request_beta_code": 1,
"create_users": 1,
"web_access": 1,
"accounting": 1,
"unlock": 1,
"RepAccounting": 1
},
}
}
Modify an existing User identified by User ID token
PUT /api/users/#{token}.json
{
"user": {
"first_name": "John",
"last_name": "Doe"
}
}
View Response
PUT /api/users/13399.json
{
"user": {
"id": 13399,
"email": "sample@somwhere.com<script type="text/javascript">
document.getElementById('cloakd97cbdabe3fbe55eecbe00b18ab906e1').innerHTML = '';
var prefix = 'ma' + 'il' + 'to';
var path = 'hr' + 'ef' + '=';
var addyd97cbdabe3fbe55eecbe00b18ab906e1 = 'sample' + '@';
addyd97cbdabe3fbe55eecbe00b18ab906e1 = addyd97cbdabe3fbe55eecbe00b18ab906e1 + 'somwhere' + '.' + 'com';
var addy_textd97cbdabe3fbe55eecbe00b18ab906e1 = 'sample' + '@' + 'somwhere' + '.' + 'com';document.getElementById('cloakd97cbdabe3fbe55eecbe00b18ab906e1').innerHTML += '<a ' + path + '\'' + prefix + ':' + addyd97cbdabe3fbe55eecbe00b18ab906e1 + '\'>'+addy_textd97cbdabe3fbe55eecbe00b18ab906e1+'<\/a>';
</script>",
"created_at": "2011-05-30T11:47:01",
"updated_at": "2011-05-30T11:47:01",
"first_name": "First",
"last_name": "Last",
"language": "en",
"state": "enabled",
"note": "",
"verified_email": true,
"token": "QWERTZOWJOQWERTZ",
"time_zone": 60,
"company_id": 1212,
"default_address": {
"language": "en",
"country": "Germany",
"country_name": "Germany",
"country_code": "DE",
"default": true,
"province_code": null,
"province": null,
"name": "John Doe",
"id": 13399,
"first_name": "John",
"last_name": "Doe",
"company": "Sample",
"address1": "Heinrich-Hertz-Str. 2",
"address2": "",
"zip": "44267",
"city": "Dortmund",
"phone": "",
"token": "QWERTZOWJOQWERTZ",
"password_option": null
},
"permissions": {
"request_products": 1,
"request_keyfile": 1,
"request_rescue_code": 1,
"request_beta_code": 1,
"create_users": 1,
"web_access": 1,
"accounting": 1,
"unlock": 1,
"RepAccounting": 1
},
}
}
Receive a count of all users
GET /api/users/count.json
View Response
{
"count": 19
}