{
  "openapi": "3.0.3",
  "info": {
    "title": "COLORJET ERP Unified API",
    "version": "2.2.0"
  },
  "servers": [
    {
      "url": "/api"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "summary": "Health check",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/auth/login": {
      "post": {
        "summary": "Login",
        "responses": {
          "200": {
            "description": "Session issued"
          }
        }
      }
    },
    "/dashboard": {
      "get": {
        "summary": "Role dashboard",
        "responses": {
          "200": {
            "description": "Dashboard KPIs"
          }
        }
      }
    },
    "/customers": {
      "get": {
        "summary": "Customer list",
        "responses": {
          "200": {
            "description": "Customers"
          }
        }
      },
      "post": {
        "summary": "Create customer",
        "responses": {
          "201": {
            "description": "Created"
          }
        }
      }
    },
    "/service-tickets": {
      "get": {
        "summary": "Ticket list",
        "responses": {
          "200": {
            "description": "Tickets"
          }
        }
      },
      "post": {
        "summary": "Create ticket",
        "responses": {
          "201": {
            "description": "Created"
          }
        }
      }
    },
    "/sync/pull": {
      "get": {
        "summary": "Pull sync events",
        "responses": {
          "200": {
            "description": "Sync events"
          }
        }
      }
    },
    "/sync/push": {
      "post": {
        "summary": "Push offline actions",
        "responses": {
          "200": {
            "description": "Accepted actions"
          }
        }
      }
    },
    "/notifications": {
      "get": {
        "summary": "List current user notifications",
        "responses": {
          "200": {
            "description": "Notifications"
          }
        }
      }
    },
    "/notifications/devices": {
      "post": {
        "summary": "Register push device token",
        "responses": {
          "200": {
            "description": "Device registered"
          }
        }
      },
      "delete": {
        "summary": "Disable push device token",
        "responses": {
          "200": {
            "description": "Device disabled"
          }
        }
      }
    },
    "/notifications/test": {
      "post": {
        "summary": "Owner/Admin test push",
        "responses": {
          "200": {
            "description": "Push dispatch result"
          }
        }
      }
    }
  }
}
