P Palmyra ERP Docs

API architecture

All data flows through REST APIs. JSON request/response; consistent conventions across modules.

REST conventions

PatternExample
ListGET /api/{module}/{resource}?page=1&pageSize=25
Get oneGET /api/{module}/{resource}/{id}
CreatePOST /api/{module}/{resource}
UpdatePUT /api/{module}/{resource}/{id}
DeleteDELETE /api/{module}/{resource}/{id}
ActionPOST /api/{module}/{resource}/{id}/{action}

Response format

{
  "data": [],
  "totalCount": 0,
  "page": 1,
  "pageSize": 25
}

Error format

{
  "status": 400,
  "message": "string",
  "errors": [
    { "field": "string", "message": "string" }
  ]
}

Headers

  • Authorization: Bearer {jwt} — Required for all API calls
  • X-Tenant-Id: {tenantId} — If not using subdomain
  • If-None-Match: {etag} — For 304 caching
  • Accept-Language: {locale} — Regional

Status codes

200 OK, 304 Not Modified, 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 500 Internal Server Error.