🚀 HomaNode API Documentation

High-performance REST API for database operations.

Introduction

HomaNode API provides a simple interface to perform CRUD operations on your database. All requests and responses use JSON format.

Authentication

All API requests require two parameters for authentication:

Parameter Type Description
PortalCode integer Your unique portal identifier
Token string Authentication token (UUID format)

Base URL

https://endpointplus.homais.com/homanode

Alternative endpoints:

GET - Select Data

GET /homanode?PortalCode={code}&Token={token}&table={table}

Query Parameters

Parameter Type Required Description
PortalCode integer Required Portal identifier
Token string Required Authentication token
table string Required Table name to query
pageNo integer Optional Page number (default: 1)
pageSize integer Optional Records per page (default: 100)
queryCommand string Optional SQL WHERE clause filter

Example Request

GET /homanode?PortalCode=10016025&Token=E36A7402-9FCE-4F37-94D1-66B965FAF5A9&table=product&pageSize=10

Success Response

[
  {
    "ID": 1,
    "Title": "Product Name",
    "Price": 100000,
    "PortalCode": 10016025
  },
  {
    "ID": 2,
    "Title": "Another Product",
    "Price": 200000,
    "PortalCode": 10016025
  }
]

POST - Insert Record

POST /homanode?PortalCode={code}&Token={token}&table={table}&updateCommand=true

Request Body (JSON)

{
  "Title": "New Product",
  "Price": 150000,
  "Category": 1
}

Note: Do NOT include ID field for insert operations.

Success Response

[
  {
    "success": true,
    "code": 201,
    "message": "Inserted successfully.",
    "id": 123
  }
]

POST - Update Record

POST /homanode?PortalCode={code}&Token={token}&table={table}&updateCommand=true

Request Body (JSON)

{
  "ID": 123,
  "Title": "Updated Product Name",
  "Price": 180000
}

Note: Include ID field to update an existing record.

Success Response

[
  {
    "success": true,
    "code": 200,
    "message": "Updated successfully.",
    "id": 123
  }
]

POST - Delete Record

POST /homanode?PortalCode={code}&Token={token}&table={table}&updateCommand=true

Delete by ID

{
  "ID": 123,
  "DeleteOrder": true
}

Delete by Condition

{
  "DeleteOrder": true,
  "deleteCondition": "Status = 0 AND CreatedDate < '2024-01-01'"
}

Success Response

[
  {
    "success": true,
    "code": 200,
    "message": "Record deleted successfully.",
    "id": 123
  }
]

Available Tables

Table Name Aliases Description
productware, waresingleProducts / Inventory items
warecategory-Product categories
warehouse-Warehouses
wareunit-Units of measure
contactlist-Customers / Contacts
contactcategory-Contact categories
invoiceheader-Invoice headers
invoicebody-Invoice line items
blogpost-Blog posts / Content (new portals)
blogcategory-Blog categories (new portals)
blogpost_old-Blog posts / Wiki (legacy portals)
blogcategory_old-Blog categories (legacy portals)
customeraddress-Customer addresses
cdn-Attachments / Files
warehouselogswhlogs, whlogWarehouse logs
warehousesheetswhsheets, whsheetWarehouse sheets
financedocsdocs, findocsFinancial documents
financedocitemsdocitems, findocitemsFinancial document items
urls-Short links
urlclicks-Short link visitors

cURL Examples

Get Products

curl "https://endpointplus.homais.com/homanode?PortalCode=10016025&Token=YOUR_TOKEN&table=product&pageSize=10"

Insert Product

curl -X POST "https://endpointplus.homais.com/homanode?PortalCode=10016025&Token=YOUR_TOKEN&table=product&updateCommand=true" \
  -H "Content-Type: application/json" \
  -d '{"Title": "New Product", "Price": 100000}'

Update Product

curl -X POST "https://endpointplus.homais.com/homanode?PortalCode=10016025&Token=YOUR_TOKEN&table=product&updateCommand=true" \
  -H "Content-Type: application/json" \
  -d '{"ID": 123, "Title": "Updated Title"}'

Delete Product

curl -X POST "https://endpointplus.homais.com/homanode?PortalCode=10016025&Token=YOUR_TOKEN&table=product&updateCommand=true" \
  -H "Content-Type: application/json" \
  -d '{"ID": 123, "DeleteOrder": true}'

JavaScript Example

// Fetch products
const response = await fetch(
  'https://endpointplus.homais.com/homanode?' + new URLSearchParams({
    PortalCode: '10016025',
    Token: 'YOUR_TOKEN',
    table: 'product',
    pageSize: '10'
  })
);
const products = await response.json();

// Insert product
const insertResponse = await fetch(
  'https://endpointplus.homais.com/homanode?' + new URLSearchParams({
    PortalCode: '10016025',
    Token: 'YOUR_TOKEN',
    table: 'product',
    updateCommand: 'true'
  }),
  {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ Title: 'New Product', Price: 100000 })
  }
);
const result = await insertResponse.json();

Python Example

import requests

BASE_URL = "https://endpointplus.homais.com/homanode"
PORTAL_CODE = "10016025"
TOKEN = "YOUR_TOKEN"

# Get products
response = requests.get(BASE_URL, params={
    "PortalCode": PORTAL_CODE,
    "Token": TOKEN,
    "table": "product",
    "pageSize": 10
})
products = response.json()

# Insert product
response = requests.post(BASE_URL, params={
    "PortalCode": PORTAL_CODE,
    "Token": TOKEN,
    "table": "product",
    "updateCommand": "true"
}, json={
    "Title": "New Product",
    "Price": 100000
})
result = response.json()

Error Handling

Authentication Error

[
  {
    "success": false,
    "code": 401,
    "message": "Token is not valid."
  }
]

Bad Request

[
  {
    "success": false,
    "code": 400,
    "message": "No JSON payload provided."
  }
]

Not Found

[
  {
    "success": false,
    "code": 404,
    "message": "No record found to delete."
  }
]

Server Error

[
  {
    "success": false,
    "code": 500,
    "message": "Error details..."
  }
]

Rate Limits

Currently, there are no hard rate limits. However, please be respectful and avoid excessive requests. Recommended limits:

🚀 HomaNode API - High Performance REST API

Version 1.5.0