MahasaanMAHASAAN
ฟีเจอร์เตรียมใช้งานราคาคู่มือAPI
เข้าสู่ระบบสร้างบัญชีฟรี
MahasaanMAHASAAN

รวมงานขาย จัดซื้อ คลังสินค้า และบัญชีไว้ในพื้นที่ทำงานเดียว

ผลิตภัณฑ์

  • ฟีเจอร์
  • ราคา
  • คู่มือการใช้งาน
  • สร้างบัญชีฟรี

ติดต่อเรา

  • Kotchasaan Technology Invention Co., Ltd.
  • support@mahasaan.co.th
© 2026 Kotchasaan Technology Invention Co., Ltd. สงวนลิขสิทธิ์
ข้อกำหนดการใช้บริการนโยบายความเป็นส่วนตัว
API Documentation

Mahasaan Platform API

REST API สำหรับระบบ ERP — รองรับ Authentication, Multi-tenant และโมดูลหลักของระบบ

การเรียกใช้ API ต้องเปิดบริการเสริม API access ในแพ็กเกจหลัก และใช้ token ของผู้ใช้ที่มีสิทธิ์ในบริษัทนั้น ดูโควตาที่รวมให้และค่าบริการได้ที่หน้าราคา

Swagger UI (Interactive)ReDoc

Quick Start

1. Authentication

# Register
curl -X POST /api/v1/api/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com", "password": "Pass1234",
       "full_name": "Test User", "company_name": "My Company"}'

# Login
curl -X POST /api/v1/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com", "password": "Pass1234"}'

2. Use Bearer Token

# All authenticated requests require Bearer token
curl -X GET /api/v1/api/v1/contacts \
  -H "Authorization: Bearer <access_token>"

3. Python SDK Example

import httpx

BASE = "/api/v1/api/v1"

# Login
r = httpx.post(f"{BASE}/auth/login",
    json={"email": "user@example.com", "password": "Pass1234"})
token = r.json()["data"]["access_token"]
headers = {"Authorization": f"Bearer {token}"}

# List contacts
contacts = httpx.get(f"{BASE}/contacts", headers=headers).json()
print(contacts["data"])

4. JavaScript Example

const BASE = "/api/v1/api/v1";

// Login
const { data } = await fetch(`${BASE}/auth/login`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ email: "user@example.com", password: "Pass1234" }),
}).then(r => r.json());

const token = data.access_token;

// List invoices
const invoices = await fetch(`${BASE}/invoicing/sales`, {
  headers: { Authorization: `Bearer ${token}` },
}).then(r => r.json());

console.log(invoices.data);

API Modules

Auth

/api/v1/auth

Register, Login, Token Refresh, Password Reset

POST

Contacts

/api/v1/contacts

Customers, Vendors (CRUD)

GETPOSTPUTDELETE

Products

/api/v1/products

Products, Categories, Units of Measure

GETPOSTPUTDELETE

Invoicing

/api/v1/invoicing

Sales & Purchase Invoices, Post, Cancel

GETPOSTPUTDELETE

Sales

/api/v1/sales

Sales Orders, Delivery Orders

GETPOSTPUTDELETE

Purchasing

/api/v1/purchasing

Purchase Orders, Goods Receipts

GETPOSTPUTDELETE

Payments

/api/v1/payments

Receive & Make Payments, Allocations

GETPOSTPUTDELETE

Accounting

/api/v1/accounting

Chart of Accounts, Journal Entries, Fiscal Year

GETPOSTPUT

Inventory

/api/v1/inventory

Warehouses, Stock Movements, Counts

GETPOSTPUT

Expenses

/api/v1/expenses

Expense Vouchers, Approval Workflow

GETPOSTPUTDELETE

Reports

/api/v1/reports

Aging, Tax, Dashboard, PDF/Excel Export

GET

Demo

/api/v1/demo

1-Click Demo Account Creation

POST

Response Format

{
  "success": true,
  "data": { ... },
  "pagination": {
    "total": 100,
    "page": 1,
    "page_size": 20,
    "total_pages": 5
  },
  "message": null,
  "errors": null
}

ดู API เต็มรูปแบบได้ที่ Swagger UI หรือ ReDoc

เปิด Swagger UIสมัครใช้งาน