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 /invites
  • GET /invites/:code
  • GET /invites/:code/validate
  • POST /invites
  • POST /invites/:code/cancel
  • POST /invites/send

Was this helpful?

  1. API Reference
  2. Endpoints

Invite

PreviousUserNextCategory

Last updated 2 years ago

Was this helpful?

Module endpoints

GET /invites

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

Returns a paginated list of invites.

Name

Type

Example

code

= in nin

filter[code]=I12345678

expiredAt

gte lte

filter[expiredAt]=gte:2020-03-05

invitedEmail

= in nin

filter[invitedEmail]=foo@bar.com

invitedUserId

=

filter[invitedUserId]=in:fc78d28f-a8dd-49de-a22f-722fe3bd26c7,7938e446-1c77-4513-8cb0-8b1f2e9f47b9

inviterUserId

= in nin

filter[inviterUserId]=7938e446-1c77-4513-8cb0-8b1f2e9f47b9

status

= in nin

filter[status]=nin:canceled

type

=

filter[type]=invite

Name

Example

createdAt

sort=createdAt sort=-createdAt

expiredAt

sort=expiredAt sort=-expiredAt

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": [
    {
      "code": "I12345678",
      "createdAt": "2019-07-17T11:39:26.732Z",
      "expiredAt": "2019-08-16T11:39:26.732Z",
      "invitedEmail": "foo@biz.com",
      "invitedUserId": null,
      "inviterUserId": null,
      "metadata": {},
      "status": "canceled",
      "type": "invite",
      "updatedAt": "2019-07-17T11:39:26.732Z",
      "url": "https://example.slyk.io/i/I12345678"
    },
    {
      "code": "I87654321",
      "createdAt": "2019-07-17T11:39:26.732Z",
      "expiredAt": "2019-08-16T11:39:26.732Z",
      "invitedEmail": "foo@bar.com",
      "invitedUserId": null,
      "inviterUserId": null,
      "metadata": {},
      "status": "pending",
      "type": "invite",
      "updatedAt": "2019-07-17T11:39:26.732Z",
      "url": "https://example.slyk.io/i/I87654321"
    }
  ],
  "total": 2
}

GET /invites/:code

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

Gets the invite details of the given code.

{
  "data": {
    "code": "I87654321",
    "createdAt": "2019-07-17T11:39:26.732Z",
    "expiredAt": "2019-08-16T11:39:26.732Z",
    "invitedEmail": "foo@bar.com",
    "invitedUserId": null,
    "inviterUserId": null,
    "metadata": {},
    "status": "accepted",
    "type": "invite",
    "updatedAt": "2019-07-17T11:39:26.732Z",
    "url": "https://example.slyk.io/i/I87654321"
  }
}

GET /invites/:code/validate

GET https://api.slyk.io/invites/:code/validate

Validates the invite with the given code.

{
  "data": {
    "referrerName": "Waldo Fred"
  }
}

POST /invites

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

Creates a new invite.

Field

Type

Required

Description

email

string

false

Email intended for the invitation.

inviterUserId

string

false

User who generated the invitation. Format uuid.

{
  "email": "foo@biz.com"
}
{
  "data": {
    "code": "I12345678",
    "createdAt": "2019-07-17T11:39:26.732Z",
    "expiredAt": "2019-08-16T11:39:26.732Z",
    "invitedEmail": "foo@biz.com",
    "invitedUserId": null,
    "inviterUserId": null,
    "metadata": {},
    "status": "pending",
    "type": "invite",
    "updatedAt": "2019-07-17T11:39:26.732Z",
    "url": "https://early.slyk.io/i/I12345678"
  }
}

POST /invites/:code/cancel

POST https://api.slyk.io/invites/:code/cancel

Cancels the invite of the given code.

{
  "data": {
    "code": "I12345678",
    "createdAt": "2019-07-17T11:39:26.732Z",
    "expiredAt": "2019-08-16T11:39:26.732Z",
    "invitedEmail": "foo@biz.com",
    "invitedUserId": null,
    "inviterUserId": null,
    "metadata": {},
    "status": "canceled",
    "type": "invite",
    "updatedAt": "2019-07-17T11:39:26.732Z",
    "url": "https://early.slyk.io/i/I12345678"
  }
}

POST /invites/send

POST http://api.slyk.io/invites/send

Sends the invite directly to the emails to who is intended.

Field

Type

Required

Description

email

string array

true

A single or an array of emails to who is intended for invitation.

inviterUserId

string

false

User who generated the invitation. Format uuid.

{
  "email": ["corge@garply.com","foo@biz.com"],
  "inviterUserId": "174c3e0d-226f-443a-a010-12b2140de03c"
}

204 No Content

GET /invites
GET /invites/:code
GET /invites/:code/validate
POST /invites
POST /invites/:code/cancel
POST /invites/send