Slyk
  • Introduction
  • Understanding Slyk
    • Before you Start
    • Core Concepts
    • Funding/Withdrawal Methods
  • Developing with Slyk
    • Step-by-step development guide
      • Authentication
      • Wallet
      • Catalog
      • Checkout (coming soon)
      • Growth tools (coming soon)
    • SDKs
      • Server SDK (Node.js)
        • Methods
      • Third party SDK's
  • API Reference
    • Using your API Key
    • Endpoints
      • Wallet
      • Transaction
      • Address
      • Asset
      • Rate
      • PaymentMethod
      • Movement
      • User
      • Invite
      • Category
      • Order
      • Product
      • Question
      • Task
      • TaxRate
    • Webhooks
      • Store
      • Transaction
      • User
    • Models
  • Setup Guides
    • PayPal Configuration
      • Verifying webhook
      • Webhook configuration
    • Stripe Configuration
      • Verifying endpoints
    • Coinbase Configuration
Powered by GitBook
On this page
  • Module endpoints
  • GET /users
  • GET /users/:id
  • PATCH /users/:id
  • POST /users
  • POST /users/:id/approve
  • POST /users/:id/block
  • POST /users/:id/change-password
  • POST /users/:id/unblock

Was this helpful?

  1. API Reference
  2. Endpoints

User

PreviousMovementNextInvite

Last updated 6 months ago

Was this helpful?

Module endpoints

GET /users

GET https://api.slyk.io/users

Returns a paginated list of users.

Name

Type

Example

approved

=

filter[approved]=true

blocked

=

filter[blocked]=false

email

=

filter[email]=foo@bar.com

id

= in

filter[id]=in:fc78d28f-a8dd-49de-a22f-722fe3bd26c7,ba77d2f6-6a09-47ba-918c-63ef9539184f

name

like

filter[name]=foobar

phone

=

filter[phone]=+351961234567

primaryWalletId

=

filter[primaryWalletId]=d78fe2c0-7268-4796-b267-187243331efe

referralCode

=

filter[referralCode]=R12345678

referralUserId

= in

filter[referralUserId]=ba77d2f6-6a09-47ba-918c-63ef9539184f

role

=

filter[role]=user

verified

=

filter[verified]=true

The name filter performs a SQL query using the like operator.

Name

Example

createdAt

sort=createdAt sort=-createdAt

updatedAt

sort=updatedAt sort=-updatedAt

Name

Description

Example

size

Defines the number of results per page. Default = 30.

page[size]=2

number

Defines the number of the page to retrieve. Default = 1

page[number]=2

{
  "data": [
    {
      "approved": true,
      "blocked": false,
      "createdAt": "2019-07-17T11:39:26.732Z",
      "customData": {},
      "email": "waldo@fred.com",
      "id": "dcdbf851-f4db-468b-9235-37ef6e6306a1",
      "locale": "pt",
      "name": "Waldo Fred",
      "phone": "+351912345678",
      "primaryWalletId": "715a25e5-94d3-4142-afa9-b4b09193f618",
      "referralCode": "R12345678",
      "referralUserId": null,
      "roles": ["user"],
      "updatedAt": "2019-07-17T11:39:26.732Z",
      "verified": true
    },
    {
      "approved": false,
      "blocked": false,
      "createdAt": "2019-07-17T11:39:26.732Z",
      "customData": {},
      "email": "corge@garply.com",
      "id": "8d31a884-7fa3-469a-a7cb-12f95895c487",
      "locale": "en",
      "name": "Corge Garply",
      "phone": "+123456789",
      "primaryWalletId": "f90b0f21-e0a8-43ff-81c2-da42a5a6ca6e",
      "referralCode": "R87654321",
      "referralUserId": "dcdbf851-f4db-468b-9235-37ef6e6306a1",
      "roles": ["user"],
      "updatedAt": "2019-07-17T11:39:26.732Z",
      "verified": false
    }
  ],
  "total": 2
}

GET /users/:id

GET https://api.slyk.io/users/:id

Gets the user details of the given id.

{
  "data": {
    "approved": true,
    "blocked": false,
    "createdAt": "2019-07-17T11:39:26.732Z",
    "customData": {},
    "email": "waldo@fred.com",
    "id": "dcdbf851-f4db-468b-9235-37ef6e6306a1",
    "locale": "pt",
    "name": "Waldo Fred",
    "phone": "+351912345678",
    "primaryWalletId": "715a25e5-94d3-4142-afa9-b4b09193f618",
    "referralCode": "R12345678",
    "referralUserId": null,
    "roles": ["user"],
    "updatedAt": "2019-07-17T11:39:26.732Z",
    "verified": true
  }
}

PATCH /users/:id

PATCH https://api.slyk.io/users/:id

Patches the user details of the given id.

Field

Type

Required

Description

customData

string

false

Can store any additional information about the user.

locale

string

false

User locale.

name

string

false

User name.

{
  "name": "Waldo G. Fred"
}
{
  "data": {
    "approved": true,
    "blocked": false,
    "createdAt": "2019-07-17T11:39:26.732Z",
    "customData": {},
    "email": "waldo@fred.com",
    "id": "dcdbf851-f4db-468b-9235-37ef6e6306a1",
    "locale": "pt",
    "name": "Waldo G. Fred",
    "phone": "+351912345678",
    "primaryWalletId": "715a25e5-94d3-4142-afa9-b4b09193f618",
    "referralCode": "R12345678",
    "referralUserId": null,
    "roles": ["user"],
    "updatedAt": "2019-07-17T11:39:26.732Z",
    "verified": true
  }
}

POST /users

POST https://api.slyk.io/users

Creates an user.

Field

Type

Required

Description

approved

boolean

false

If provided, user is created already approved.

blocked

boolean

false

If provided, user is created as blocked.

code

string

false

Either a referralCode or an invite code.

customData

object

false

May store any additional information about the user.

email

string

true

User email.

locale

string

false

User locale.

name

string

false

User name.

password

string

true

Login password. It must contain: 1 capital letter; 1 lower letter; 1 digit; at least 8 characters.

primaryWalletId

string

false

User main wallet. Format: uuid.

verified

boolean

false

If provided, user is created already verified.

{
  "email": "foo@bar.com",
  "code": "R87654321",
  "locale": "en",
  "name": "Sr. Foobar",
  "password": "Foobar123"
}
{
  "data": {
    "approved": false,
    "blocked": false,
    "createdAt": "2019-07-17T11:39:26.732Z",
    "customData": {},
    "email": "foo@bar.com",
    "id": "689352d2-b899-4fa3-9e64-2be481545558",
    "locale": "en",
    "name": "Sr. Foobar",
    "phone": null,
    "primaryWalletId": "4b4a25b3-407b-4a08-8283-6972b0f9cf44v",
    "referralCode": "R13243546",
    "referralUserId": "8d31a884-7fa3-469a-a7cb-12f95895c487",
    "roles": ["user"],
    "updatedAt": "2019-07-17T11:39:26.732Z",
    "verified": false
  }
}

POST /users/:id/approve

POST https://api.slyk.io/users/:id/approve

Approves the user of the given id.

A user that is not approved is unable to login.

204 No Content

POST /users/:id/block

POST https://api.slyk.io/users/:id/block

Blocks the user of the given id.

A user that is blocked is unable to login.

204 No Content

POST /users/:id/change-password

POST https://api.slyk.io/users/:id/change-password

Changes the password of the user of the given id.

Field

Type

Required

Description

password

string

true

New password. It must contain: 1 capital letter; 1 lower letter; 1 digit; at least 8 characters.

{
    "password": "Foobar321"
}

204 No Content

POST /users/:id/unblock

POST http://api.slyk.io/users/:id/unlock

Unblocks the user of the given id.

204 No Content

GET /users
GET /users/:id
PATCH /users/:id
POST /users
POST /users/:id/approve
POST /users/:id/block
POST /users/:id/change-password
POST /users/:id/unblock