Skip to content

API Usage Auth System

simitben edited this page Apr 10, 2026 · 1 revision

API Usage - Auth and System

Purpose

This page explains how third-party systems should authenticate and perform basic system checks in SimBiz 6 API V3.

Base URL

  • https://<host>/api/v3

Authentication

  • POST /api/v3/token and GET /api/v3/health are public endpoints.
  • All other protected endpoints require:
    • Authorization: Bearer <token>
    • x-uid: <uid>

Date-Time Format

For date-time fields in responses (example: expires_at), use:

  • YYYY-MM-DD HH:MM:SS

Endpoint Summary

Endpoint Method Purpose
/api/v3/token POST Get access token
/api/v3/health GET Check API service health

Postman Import

Download files:

  • ../postman/SimBiz6-API-V3.postman_collection.json
  • ../postman/SimBiz6-API-V3.postman_environment.json

Import both files in Postman, set secret, then run Get Token.

Response Pattern

  • Success response uses status: "OK".
  • Business data is returned in data.
  • Additional metadata is returned in meta (or empty object for simple responses).

1) Get Token

Request

POST /api/v3/token

JSON Body

Field Type Required Notes
uid string Yes integration user id
secret string Yes integration secret
organization_code string No org context (recommended for multi-org integration)

Example cURL

curl -X POST "https://<host>/api/v3/token" \
  -H "Content-Type: application/json" \
  -d '{
    "uid": "support",
    "secret": "<api-secret>",
    "organization_code": "BHH"
  }'

Success Response Example

{
  "status": "OK",
  "data": {
    "uid": "support",
    "organization_id": "1",
    "organization_code": "BHH",
    "token": "<token-value>",
    "expires_at": "2026-04-09 15:55:00"
  },
  "meta": {}
}

2) Health Check

Request

GET /api/v3/health

Example cURL

curl -X GET "https://<host>/api/v3/health"

Success Response Example

{
  "status": "OK",
  "data": {
    "name": "SimBiz 6 API V3",
    "status": "UP"
  },
  "meta": {}
}

3) Protected Request Example

Use token from POST /api/v3/token for protected APIs.

Example cURL

curl -G "https://<host>/api/v3/business-partners" \
  -H "Authorization: Bearer <token>" \
  -H "x-uid: support" \
  --data-urlencode "page=1" \
  --data-urlencode "per_page=20"

Clone this wiki locally