Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/VisualGraphxLLC/API-HUB/llms.txt

Use this file to discover all available pages before exploring further.

The health endpoint provides a single-call overview of every supplier’s sync state. It runs two optimized queries (window functions, no N+1) and returns the results in one response — useful for dashboards, alerting, and spotting suppliers that need attention.

Endpoint

GET /api/sync-jobs/health
Requires a valid auth_token cookie (admin login). Example:
curl -b "auth_token=<token>" http://localhost:8000/api/sync-jobs/health

Response

generated_at
string
ISO 8601 timestamp when the health snapshot was computed
suppliers
array
Array of SupplierSyncHealth objects — one per supplier
Example response:
{
  "generated_at": "2026-05-07T10:00:00Z",
  "suppliers": [
    {
      "supplier_id": "a1b2c3d4-5678-...",
      "supplier_name": "SanMar",
      "is_active": true,
      "last_full_sync": "2026-05-04T01:00:00Z",
      "last_delta_sync": "2026-05-07T06:00:00Z",
      "last_sync_status": "success",
      "last_sync_completed_at": "2026-05-07T06:41:10Z",
      "recent_error_count": 0,
      "consecutive_failures": 0
    },
    {
      "supplier_id": "b2c3d4e5-...",
      "supplier_name": "4Over",
      "is_active": true,
      "last_full_sync": "2026-04-28T01:00:00Z",
      "last_delta_sync": null,
      "last_sync_status": "failed",
      "last_sync_completed_at": "2026-05-06T06:42:00Z",
      "recent_error_count": 3,
      "consecutive_failures": 3
    }
  ]
}

Interpreting the results

The supplier’s last N jobs all failed. Check the supplier’s auth credentials and whether their API endpoint is reachable. For PromoStandards suppliers, SOAP fault codes 100, 104, or 110 indicate an auth problem — re-enter credentials in the supplier form.
Intermittent failures — the supplier API is unstable or rate-limiting. Review the errors JSONB in the individual job records (GET /api/sync-jobs?supplier_id={id}) to identify which products are failing.
No full sync has ever completed for this supplier. Trigger one with POST /api/suppliers/{id}/import and mode=full_sellable.
The job completed but some products failed hydration. Check failed_count and errors on the specific job record. Partial success is normal for large catalogs with occasional bad data.

Build docs developers (and LLMs) love