FLECS
HomeMarketplaceRessourcesGet started
Engineering
Engineering
  • API Docs
    • FLECS Console API
      • Welcome!
      • Quick Start
      • API Reference
        • Authentication
        • Users
        • Products
        • Device
        • Apps
    • FLECS Core API
      • API Reference
        • System
        • Device
        • Console
        • Instances
        • Apps
        • Jobs
  • App Publishing Guide
    • 💡Overview
    • 🪛How to create a FLECS app
    • 🚀How to release a FLECS app
    • 🧳App Publishing Packages
    • 📶Network
  • FLECS Core
    • Install FLECS Core Using Docker
  • White Labeling
    • Integrate views
    • On-premise hosting of apps
  • Service Mesh
    • Integrate flunder into your app
Powered by GitBook
On this page

Was this helpful?

  1. API Docs
  2. FLECS Console API
  3. API Reference

Users

PreviousAuthenticationNextProducts

Last updated 4 months ago

Was this helpful?

Get all products for a specific user

get

Get all products for a specific user

Query parameters
store_idintegerOptional
Header parameters
AuthorizationstringRequiredPattern: Bearer .+
Responses
200
All products of a user
application/json
500
Internal Server Error
application/json
get
GET /api/v2/my/products HTTP/1.1
Host: console.flecs.tech
Authorization: text
Accept: */*
{
  "statusCode": 1,
  "statusText": "text",
  "data": {
    "page": 1,
    "totalPages": 1,
    "products": [
      {
        "id": 1,
        "name": "text",
        "status": "text",
        "description": "text",
        "short_description": "text",
        "average_rating": "text",
        "rating_count": 1,
        "categories": [
          {
            "id": 1,
            "name": "text",
            "slug": "text"
          }
        ],
        "attributes": [
          {
            "id": 1,
            "name": "text",
            "options": [
              "text"
            ]
          }
        ],
        "meta_data": [
          {
            "id": 1,
            "name": "text",
            "value": {}
          }
        ],
        "stock_status": "text",
        "store": {
          "id": 1,
          "name": "text",
          "shop_name": "text",
          "url": "text",
          "address": {
            "street_1": "text",
            "street_2": "text",
            "city": "text",
            "zip": "text",
            "country": "text",
            "state": "text"
          }
        },
        "permalink": "text",
        "price": "text",
        "purchasable": true
      }
    ]
  }
}

Get all app products for a specific user

get

Get all app products for a specific user

Query parameters
store_idintegerOptional
Header parameters
AuthorizationstringRequiredPattern: Bearer .+
Responses
200
All app products of a user
application/json
500
Internal Server Error
application/json
get
GET /api/v2/my/products/apps HTTP/1.1
Host: console.flecs.tech
Authorization: text
Accept: */*
{
  "statusCode": 1,
  "statusText": "text",
  "data": {
    "page": 1,
    "totalPages": 1,
    "products": [
      {
        "id": 1,
        "name": "text",
        "status": "text",
        "description": "text",
        "short_description": "text",
        "average_rating": "text",
        "rating_count": 1,
        "categories": [
          {
            "id": 1,
            "name": "text",
            "slug": "text"
          }
        ],
        "attributes": [
          {
            "id": 1,
            "name": "text",
            "options": [
              "text"
            ]
          }
        ],
        "meta_data": [
          {
            "id": 1,
            "name": "text",
            "value": {}
          }
        ],
        "stock_status": "text",
        "store": {
          "id": 1,
          "name": "text",
          "shop_name": "text",
          "url": "text",
          "address": {
            "street_1": "text",
            "street_2": "text",
            "city": "text",
            "zip": "text",
            "country": "text",
            "state": "text"
          }
        },
        "permalink": "text",
        "price": "text",
        "purchasable": true
      }
    ]
  }
}

Get all subscriptions of a specific user

get

Get all subscriptions of a specific user

Query parameters
store_idintegerOptional
Header parameters
AuthorizationstringRequiredPattern: Bearer .+
Responses
200
All subscriptions of a user
application/json
500
Internal Server Error
application/json
get
GET /api/v2/my/subscriptions HTTP/1.1
Host: console.flecs.tech
Authorization: text
Accept: */*
{
  "statusCode": 1,
  "statusText": "text",
  "data": {
    "totalSubscriptions": 1,
    "subscriptions": [
      {
        "id": 1,
        "status": "text",
        "customer_id": 1,
        "line_items": [
          {
            "id": 1,
            "status": "text",
            "product_id": 1,
            "variation_id": 1,
            "quantity": 1,
            "image": {}
          }
        ],
        "billing": {
          "first_name": "text",
          "last_name": "text",
          "company": "text",
          "email": "text"
        }
      }
    ]
  }
}
  • POSTLog in
  • POSTCreate api validate
  • GETGet all products for a specific user
  • GETGet all app products for a specific user
  • GETGet all subscriptions of a specific user

Log in

post

Login to console as user with password

Body
issueJWTbooleanOptional
passwordstringOptional
usernamestringOptional
Responses
200
Item created
application/json
403
Password or user incorrect
application/json
post
POST /api/v2/auth/login HTTP/1.1
Host: console.flecs.tech
Content-Type: application/json
Accept: */*
Content-Length: 57

{
  "issueJWT": true,
  "password": "password",
  "username": "user"
}
{
  "data": {
    "feature_flags": {
      "isVendor": false,
      "isWhitelabeled": false
    },
    "jwt": {
      "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI...",
      "token_expires": 1704378025
    },
    "user": {
      "ID": 6,
      "display_name": "user",
      "user_email": "user@mail.com",
      "user_login": "user"
    }
  },
  "statusCode": 200,
  "statusText": "OK"
}

Create api validate

post

Validate authentication token

Body
Responses
200
Item created
application/json
post
POST /api/v2/auth/validate HTTP/1.1
Host: console.flecs.tech
Content-Type: application/json
Accept: */*
Content-Length: 54

{
  "jwt": {
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI..."
  }
}
200

Item created

{
  "data": {
    "feature_flags": {
      "ff": {
        "isVendor": false,
        "isWhitelabeled": false
      }
    },
    "isValid": true
  },
  "statusCode": 200,
  "statusText": "OK"
}