Users

Log in

Login to console as user with password

POSThttps://console.flecs.tech/api/v2/auth/login
Body
issueJWTboolean
passwordstring
usernamestring
Response

Item created

Body
dataData
statusCodeinteger
statusTextstring
Request
const response = await fetch('https://console.flecs.tech/api/v2/auth/login', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "issueJWT": true,
      "password": "password",
      "username": "user"
    }),
});
const data = await response.json();
Response
{
  "data": {
    "feature_flags": {
      "isVendor": false,
      "isWhitelabeled": false
    },
    "jwt": {
      "token": "text",
      "token_expires": 0
    },
    "user": {
      "ID": 0,
      "display_name": "text",
      "user_email": "text",
      "user_login": "text"
    }
  },
  "statusCode": 0,
  "statusText": "text"
}

Create api validate

Validate authentication token

POSThttps://console.flecs.tech/api/v2/auth/validate
Body
jwtJwt
Response

Item created

Body
dataData
statusCodeinteger
statusTextstring
Request
const response = await fetch('https://console.flecs.tech/api/v2/auth/validate', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "jwt": {
        "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI..."
      }
    }),
});
const data = await response.json();
Response
{
  "data": {
    "feature_flags": {
      "ff": {
        "isVendor": false,
        "isWhitelabeled": false
      }
    },
    "isValid": false
  },
  "statusCode": 0,
  "statusText": "text"
}

Get all products for a specific user

Get all products for a specific user

GEThttps://console.flecs.tech/api/v2/my/products
Query parameters
Header parameters
Response

All products of a user

Body
statusCode*integer
statusTextstring
data*productResponse (object)
Request
const response = await fetch('https://console.flecs.tech/api/v2/my/products', {
    method: 'GET',
    headers: {
      "Authorization": "text"
    },
});
const data = await response.json();
Response
{
  "statusCode": 0,
  "statusText": "text",
  "data": {
    "page": 0,
    "totalPages": 0,
    "products": [
      {
        "id": 0,
        "name": "text",
        "status": "text",
        "description": "text",
        "short_description": "text",
        "average_rating": "text",
        "rating_count": 0,
        "categories": [
          {
            "id": 0,
            "name": "text",
            "slug": "text"
          }
        ],
        "attributes": [
          {
            "id": 0,
            "name": "text",
            "options": [
              "text"
            ]
          }
        ],
        "meta_data": [
          {
            "id": 0,
            "name": "text"
          }
        ],
        "stock_status": "text",
        "store": {
          "id": 0,
          "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": false
      }
    ]
  }
}

Get all app products for a specific user

Get all app products for a specific user

GEThttps://console.flecs.tech/api/v2/my/products/apps
Query parameters
Header parameters
Response

All app products of a user

Body
statusCode*integer
statusTextstring
data*productResponse (object)
Request
const response = await fetch('https://console.flecs.tech/api/v2/my/products/apps', {
    method: 'GET',
    headers: {
      "Authorization": "text"
    },
});
const data = await response.json();
Response
{
  "statusCode": 0,
  "statusText": "text",
  "data": {
    "page": 0,
    "totalPages": 0,
    "products": [
      {
        "id": 0,
        "name": "text",
        "status": "text",
        "description": "text",
        "short_description": "text",
        "average_rating": "text",
        "rating_count": 0,
        "categories": [
          {
            "id": 0,
            "name": "text",
            "slug": "text"
          }
        ],
        "attributes": [
          {
            "id": 0,
            "name": "text",
            "options": [
              "text"
            ]
          }
        ],
        "meta_data": [
          {
            "id": 0,
            "name": "text"
          }
        ],
        "stock_status": "text",
        "store": {
          "id": 0,
          "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": false
      }
    ]
  }
}

Get all subscriptions of a specific user

Get all subscriptions of a specific user

GEThttps://console.flecs.tech/api/v2/my/subscriptions
Query parameters
Header parameters
Response

All subscriptions of a user

Body
statusCode*integer
statusTextstring
data*subscriptions (object)
Request
const response = await fetch('https://console.flecs.tech/api/v2/my/subscriptions', {
    method: 'GET',
    headers: {
      "Authorization": "text"
    },
});
const data = await response.json();
Response
{
  "statusCode": 0,
  "statusText": "text",
  "data": {
    "totalSubscriptions": 0,
    "subscriptions": [
      {
        "id": 0,
        "status": "text",
        "customer_id": 0,
        "line_items": [
          {
            "id": 0,
            "status": "text",
            "product_id": 0,
            "variation_id": 0,
            "quantity": 0
          }
        ],
        "billing": {
          "first_name": "text",
          "last_name": "text",
          "company": "text",
          "email": "text"
        }
      }
    ]
  }
}

Last updated