Users
+ Parameters
Section:
Group Users. Base URL:https://instance_name.meiro.io/api/.
Users [/users{?limit,offset,order_by,order_dir}]
List All Users [GET]
-
Parameters
- limit (number, optional) - Limit of the number of records returned
- offset (number, optional) - Offset for the number of records returned
- order_by (string, optional) - Ordered column name
- order_dir (string, optional) - Ordering direction
-
Request
-
Headers
X-Access-Token: 1234567890abcdef
-
-
Response 200 (application/json)
{
"users": [
{
"id": 100,
"name": "John Doe",
"email": "john@doe.foo",
"role_id": 200,
"disabled": 0,
"deleted": 0,
"first_login": "2017-01-01 14:00:00",
"last_login": "2017-01-01 16:00:00",
"sso_enabled": 0,
"cdp_settings": {
"favourite_customers": [
{
"customer_entity_id": "1",
"note": "customer note"
}
]
},
"frontend_settings": {},
"created": "2017-01-01 15:35:00",
"modified": "2017-01-01 15:00:00",
"last_modified_by": 1
}
],
"selection_settings": {
"limit": 20,
"offset": null,
"order_by": "id",
"order_dir": "ASC"
}
}Create a User [POST]
Required feature (one of):
-
settings/users
-
Attributes
- name:
Mr. Doe(string) - email:
example@email.com(string) - password:
my-password(string) - role_id: 200 (number)
- disabled: 0 (number, optional)
- deleted: 0 (number, optional)
- segments_acl:
{200: "write"}(string) - optional (json) - cdp_settings (object, optional)
- frontend_settings:
{}(string) - optional (json)
- name:
-
Request (application/json)
-
Headers
X-Access-Token: 1234567890abcdef
-
-
Response 201 (application/json)
{
"user": {
"id": "100",
"name": "Mr. Doe",
"email": "example@email.com",
"role_id": 200,
"disabled": 0,
"deleted": 0,
"first_login": null,
"last_login": null,
"sso_enabled": 0,
"cdp_settings": {
"favourite_customers": [
{
"customer_entity_id": "1",
"note": "customer note"
}
]
},
"frontend_settings": {},
"created": "2017-01-01 15:00:00",
"modified": "2017-01-01 15:00:00",
"last_modified_by": 1
}
}User [/users/{user_id}]
Retrieve a User [GET]
Required feature (one of):
-
User's access
-
settings/users
-
Request
-
Headers
X-Access-Token: 1234567890abcdef
-
-
Response 200 (application/json)
{
"user": {
"id": "100",
"name": "Mr. Doe",
"email": "example@email.com",
"role_id": 200,
"disabled": 0,
"deleted": 0,
"first_login": "2017-01-01 14:00:00",
"last_login": "2017-01-01 16:00:00",
"sso_enabled": 0,
"cdp_settings": {
"favourite_customers": [
{
"customer_entity_id": "1",
"note": "customer note"
}
]
},
"frontend_settings": {},
"created": "2017-01-01 15:00:00",
"email_notifications_enabled": 1,
"modified": "2017-01-01 15:00:00",
"last_modified_by": 1
}
}Modify a User [PATCH]
Required feature (one of):
-
User's access
-
settings/users
-
Attributes
- email:
example@email.com(string) - optional - password:
my-password(string) - optional - name:
Mr. Doe(string) - optional - role_id: 200 (number)
- disabled: 0 (number, optional)
- deleted: 0 (number, optional)
- cdp_settings (object, optional)
- frontend_settings:
{}(string) - optional (json) - email_notifications_enabled: 0 (number, optional)
- email:
-
Request (application/json)
-
Headers
X-Access-Token: 1234567890abcdef
-
-
Response 200 (application/json)
{
"user": {
"id": "100",
"name": "Mr. Doe",
"email": "example@email.com",
"role_id": 200,
"disabled": 0,
"deleted": 0,
"first_login": "2017-01-01 14:00:00",
"last_login": "2017-01-01 16:00:00",
"sso_enabled": 0,
"cdp_settings": {
"favourite_customers": [
{
"customer_entity_id": "1",
"note": "customer note"
}
]
},
"frontend_settings": {},
"created": "2017-01-01 15:00:00",
"email_notifications_enabled": 1,
"modified": "2017-01-01 15:00:00",
"last_modified_by": 1
}
}Delete a User [DELETE]
Required feature (one of):
-
settings/users
-
Request (application/json)
-
Response 200 (application/json)
{
"message": "OK"
}Trashed users [/users/trash{?limit,offset,order_by,order_dir}]
List All Trashed Users [GET]
-
Parameters
- limit (number, optional) - Limit of the number of records returned
- offset (number, optional) - Offset for the number of records returned
- order_by (string, optional) - Ordered column name
- order_dir (string, optional) - Ordering direction
-
Request
-
Headers
X-Access-Token: 1234567890abcdef
-
-
Response 200 (application/json)
{
"trashed_users": [
{
"id": 100,
"name": "John Doe",
"email": "john@doe.foo",
"role_id": 200,
"disabled": 0,
"deleted": 1,
"cdp_settings": {
"favourite_customers": [
{
"customer_entity_id": "1",
"note": "customer note"
}
]
},
"created": "2017-01-01 15:35:00",
"modified": "2017-01-01 15:00:00",
"last_modified_by": 1
}
],
"selection_settings": {
"limit": 20,
"offset": null,
"order_by": "id",
"order_dir": "ASC"
}
}Trashed User [/users/trash/{user_id}]
Restore a Trashed User [PATCH]
Required feature: settings/users
-
Request (application/json)
-
Headers
X-Access-Token: 1234567890abcdef
-
-
Response 200 (application/json)
{
"user": {
"id": "100",
"name": "Mr. Doe",
"email": "example@email.com",
"role_id": 200,
"disabled": 0,
"deleted": 0,
"cdp_settings": {
"favourite_customers": [
{
"customer_entity_id": "1",
"note": "customer note"
}
]
},
"created": "2017-01-01 15:00:00",
"modified": "2017-01-01 15:00:00",
"last_modified_by": 1
}
}User invitation [/users/invitation]
Send user invitation [POST]
Required feature (one of):
-
settings/users
-
Attributes
- name:
Mr. Doe(string) - email:
john@doe.foo(string) - role_id: 200 (number)
- segments_acl:
{200: "write"}(string) - optional (json)
- name:
-
Request
-
Headers
X-Access-Token: 1234567890abcdef
-
-
Response 201 (application/json)
{
"user": {
"id": 100,
"name": "Mr. Doe",
"email": "john@doe.foo",
"role_id": 200,
"disabled": 0,
"deleted": 0,
"first_login": null,
"last_login": null,
"sso_enabled": 0,
"cdp_settings": null,
"frontend_settings": null,
"created": "2017-01-01 15:35:00"
}
}Re-send user invitation [PATCH]
Required feature (one of):
-
settings/users
-
Attributes
- email:
john@doe.foo(string)
- email:
-
Request
-
Headers
X-Access-Token: 1234567890abcdef
-
-
Response 200 (application/json)
{
"user": {
"id": 100,
"name": "Mr. Doe",
"email": "john@doe.foo",
"role_id": 200,
"disabled": 0,
"deleted": 0,
"first_login": null,
"last_login": null,
"sso_enabled": 0,
"cdp_settings": null,
"frontend_settings": null,
"created": "2017-01-01 15:35:00"
}
}User invitation link [/users/{user_id}/invitation_link]
Retrieve user's invitation link [GET]
Required feature (one of):
-
settings/users
-
Request
-
Headers
X-Access-Token: 1234567890abcdef
-
-
Response 200 (application/json)
{
"user_invitation_link": "INVITATION_LINK_URL"
}User's password reset [/users/password_reset]
Request user's password reset [POST]
-
Attributes
- email:
example@email.com(string)
- email:
-
Request (application/json)
-
Response 200 (application/json)
{
"message": "OK"
}Reset user's password [PATCH]
-
Attributes
- email:
example@email.com(string) - password:
my-password(string) - password_reset_token:
1234567890abcdef(string)
- email:
-
Request (application/json)
-
Response 200 (application/json)
{
"message": "OK"
}