REST API Reference
API Reference
Section titled “API Reference”The full API reference is provided via Swagger/OpenAPI in the app at /api-docs.
Authentication
Section titled “Authentication”Use your API Key in the Authorization header as a Bearer token.
Core Endpoints
Section titled “Core Endpoints”Jobs API
Section titled “Jobs API”GET /api-jobs: List jobs (supportsstatus,customer,job_numberfilters).POST /api-jobs: Create a new job (includes parts and operations).PATCH /api-jobs?id={id}: Update job details.
Parts & Operations
Section titled “Parts & Operations”GET /api-parts: List parts.GET /api-operations: List operations (supportspart_idandcell_idfilters).POST /api-operation-lifecycle: Start, pause, resume, or complete an operation.
Production Reporting
Section titled “Production Reporting”POST /api-operation-quantities: Report good and scrap quantities with reasons.POST /api-issues: Create quality issues or Non-Conformance Reports (NCR).
ERP Sync (Bidirectional)
Section titled “ERP Sync (Bidirectional)”Sync records between Eryxon and external systems (SAP, NetSuite, etc.) using external_id mapping.
Sync Modes
Section titled “Sync Modes”- Diff (
POST /api-erp-sync/diff): Preview changes before applying. - Sync (
POST /api-erp-sync/sync): Execute the update with change detection viasync_hash. - Bulk Sync: Upsert up to 1,000 records in a single request.
Testing with cURL
Section titled “Testing with cURL”List Jobs
Section titled “List Jobs”curl -X GET "https://[URL]/functions/v1/api-jobs?limit=5" \ -H "Authorization: Bearer ery_live_YOUR_KEY"Create Job
Section titled “Create Job”curl -X POST "https://[URL]/functions/v1/api-jobs" \ -H "Authorization: Bearer ery_live_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "job_number": "EX-100", "customer_name": "Acme", "parts": [{ "part_number": "P1", "quantity": 10 }] }'Error Response Format
Section titled “Error Response Format”{ "success": false, "error": { "code": "VALIDATION_ERROR", "message": "Invalid cell ID", "details": [...] }}