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:This email address is being protected from spambots. You need JavaScript enabled to view it.
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-0"
"token": "LTPUTEFWJOAXTUKQ"
password_option: null
|
email |
"email": "This email address is being protected from spambots. You need JavaScript enabled to view it."
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": "This email address is being protected from spambots. You need JavaScript enabled to view it.",
"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": "This email address is being protected from spambots. You need JavaScript enabled to view it.",
"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:This email address is being protected from spambots. You need JavaScript enabled to view it.
View Response
GET /api/customers/search.json?query=email:This email address is being protected from spambots. You need JavaScript enabled to view it.
{
"user": {
"id": 13399,
"email": "This email address is being protected from spambots. You need JavaScript enabled to view it.",
"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": "This email address is being protected from spambots. You need JavaScript enabled to view it.",
"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": "This email address is being protected from spambots. You need JavaScript enabled to view it.",
"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
}