diff --git a/.github/skills/resource-details-page/SKILL.md b/.github/skills/resource-details-page/SKILL.md new file mode 100644 index 0000000..29bef07 --- /dev/null +++ b/.github/skills/resource-details-page/SKILL.md @@ -0,0 +1,583 @@ +--- +name: resource-details-page +description: "Create resource details pages with tabbed layouts, context providers, and sub-pages for the carage-erp dashboard. Use when: building a details/show page for a resource, adding tabs to a resource detail view, creating a nested [id] layout, scaffolding sub-pages (owners, documents, estimates), implementing resource context providers, or adding actions menus to detail headers." +--- + +# Resource Details Page + +Create fully structured resource details pages with tabbed navigation, shared context, and reusable sub-page patterns. This skill covers: layout → context provider → general-info component → actions component → tab sub-pages. + +## When to Use + +- User asks to create a details/show page for a resource (e.g. "create a customer details page") +- User asks to add tabs to a resource (e.g. "add an invoices tab to the vehicle page") +- User asks to scaffold a `[id]` layout with nested pages +- User wants sub-pages that share parent resource data (e.g. vehicle → estimates) +- User wants an actions dropdown (edit/delete) on a resource header + +## Reference Implementation + +The canonical implementation is the **vehicle details page** at: +``` +app/(authenticated)/sales/vehicles/[id]/ +├── layout.tsx ← Server component: fetches resource, renders DashboardDetailsPage +├── page.tsx ← Details tab: server component, read-only info display +├── owners/page.tsx ← Sub-tab: client component, manual DataTable +├── documents/page.tsx ← Sub-tab: client component, manual DataTable + upload +├── estimates/page.tsx ← Sub-tab: client component, ResourcePage with extraParams +``` + +Module files at: +``` +modules/vehicles/ +├── vehicle.schema.ts +├── vehicle-form.tsx +├── vehicle-general-info.tsx ← Read-only info cards for Details tab +├── vehicle-actions.tsx ← Dropdown menu (Edit/Delete) +├── vehicle-context.tsx ← React context for sharing resource data to sub-pages +└── vehicle-document-form.tsx ← Document-specific form (optional) +``` + +## Procedure + +### Step 1: Create the Resource Context + +Create `modules//-context.tsx`: + +This context allows child tab pages to access the parent resource's identity (id + display label) without re-fetching. This is essential for sub-pages that create related records (e.g. creating an estimate pre-populated with the parent vehicle). + +```tsx +"use client" + +import { createContext, useContext } from "react" + +type ContextValue = { + id: string + label: string +} + +const Context = createContext<ContextValue | null>(null) + +export function Provider({ + , + children, +}: { + : ContextValue + children: React.ReactNode +}) { + return ( + <Context.Provider value={}> + {children} + Context.Provider> + ) +} + +export function use() { + return useContext(Context) +} +``` + +**Key rules:** +- Always a `"use client"` component (context requires client React) +- Keep the context value minimal — only `id` and `label` +- `label` is a human-readable display string built from the resource's key fields +- The hook returns `null` when used outside the provider (no throw — graceful fallback) +- Do NOT store the full resource object — only identity data needed by sub-pages + +### Step 2: Create the Actions Component + +Create `modules//-actions.tsx`: + +This is a dropdown menu rendered in the `DashboardDetailsPage` header for resource-level actions. + +```tsx +"use client" + +import { useAuthApi } from "@/shared/useApi" +import { useRouter } from "next/navigation" +import { Button } from "@/shared/components/ui/button" +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from "@/shared/components/ui/dropdown-menu" +import { Ellipsis, Pencil, Trash2 } from "lucide-react" + +type ActionsProps = { + Id: string +} + +export function Actions({ Id }: ActionsProps) { + const api = useAuthApi() + const router = useRouter() + + const handleEdit = () => { + router.push(`/
//${Id}/edit`) + } + + const handleDelete = async () => { + await api..destroy(Id) + router.push("/
/") + } + + return ( + + + + + + + + Edit + + + + Delete + + + + ) +} +``` + +**Key rules:** +- Always a `"use client"` component +- Accepts `Id: string` as the only required prop +- Uses `useAuthApi()` for API calls, `useRouter()` for navigation +- `handleDelete` navigates back to the list page after deletion +- Add confirmation dialog for destructive actions when appropriate + +### Step 3: Create the General Info Component + +Create `modules//-general-info.tsx`: + +A read-only display component for the **Details tab** (the default `page.tsx`). Uses Card-based layout with icon-labeled fields. + +```tsx +import { Card, CardContent, CardHeader, CardTitle } from "@/shared/components/ui/card" +import { Badge } from "@/shared/components/ui/badge" +import { Separator } from "@/shared/components/ui/separator" +// Import relevant icons from lucide-react + +type Data = { + // Type all fields from the API response + id?: number + name?: string + // ... +} + +type GeneralInfoProps = { + : Data +} + +function InfoItem({ + icon: Icon, + label, + value, +}: { + icon: React.ComponentType<{ className?: string }> + label: string + value?: string | null +}) { + return ( +
+
+ +
+
+ {label} + + {value || } + +
+
+ ) +} + +export function GeneralInfo({ }: GeneralInfoProps) { + return ( +
+ + + + {/* Icon */} Section Title + + + +
+ .field} /> + {/* More InfoItems */} +
+
+
+ {/* More Cards for other field groups */} +
+ ) +} +``` + +**Key rules:** +- This is a **server component** (no `"use client"`) — it receives data as props +- Group related fields into separate `Card` sections +- Use the `InfoItem` helper for consistent icon+label+value layout +- Show `"—"` dash for missing/null values +- Use `Badge` for status-like fields, `Separator` between groups + +### Step 4: Create the Layout (Server Component) + +Create `app/(authenticated)/
//[id]/layout.tsx`: + +This is the **central orchestrator** — it fetches the resource, renders the tabbed shell, and wraps children with the context provider. + +```tsx +import { DashboardDetailsPage } from '@/base/components/layout/dashboard' +import { getServerApi } from '@garage/api/server' +import { Actions } from '@/modules//-actions' +import { Provider } from '@/modules//-context' +import React from 'react' + +export default async function layout(props: { + params: Promise<{ id: string }> + children: React.ReactNode +}) { + const { id } = await props.params + const api = await getServerApi() + const = await api..getById(id) + + const title = /* Build display title from resource fields */ '' + const Label = /* Build label for context, e.g. combining key fields */ '' + + return ( + <> + <Provider ={{ id, label: Label || title }}> + .data?.image_url || ""} + title={title} + description={/* subtitle text */} + backHref="/
/" + actions={<Actions Id={id} />} + tabs={[ + { href: `/
//${id}`, label: 'Details' }, + { href: `/
//${id}/`, label: '' }, + // More tabs... + ]} + > + {props.children} + + Provider> + + ) +} +``` + +**Key rules:** +- **Server component** (no `"use client"`) — uses `await` for data fetching +- Params are `Promise<{ id: string }>` in Next.js 15+ (use `await props.params`) +- Uses `getServerApi()` from `@garage/api/server` for server-side API calls +- `Provider` wraps the entire `DashboardDetailsPage` so all tab children can access context +- `backHref` points to the resource list page +- `tabs[0].href` is always the base `/
//${id}` (Details tab) +- `className="p-0 lg:p-0"` removes default padding — sub-pages handle their own spacing + +**`DashboardDetailsPage` props:** + +| Prop | Type | Purpose | +|---|---|---| +| `title` | `string` | Primary heading in the header | +| `description` | `string?` | Subtitle text below the title | +| `avatarSrc` | `string?` | Avatar image URL | +| `avatarFallback` | `string?` | Fallback text for avatar (e.g. initials) | +| `icon` | `ReactNode?` | Icon instead of avatar | +| `actions` | `ReactNode?` | Action buttons in header (right side) | +| `backHref` | `string?` | Back navigation URL | +| `tabs` | `{ href, label }[]?` | Route-based tab navigation | +| `className` | `string?` | Additional classes for content area | +| `children` | `ReactNode` | Active tab content (Next.js route children) | + +### Step 5: Create the Details Tab (Default Page) + +Create `app/(authenticated)/
//[id]/page.tsx`: + +```tsx +import { getServerApi } from '@garage/api/server' +import { GeneralInfo } from '@/modules//-general-info' +import DashboardPage from '@/base/components/layout/dashboard/dashboard-page' + +export default async function page(props: { params: Promise<{ id: string }> }) { + const { id } = await props.params + const api = await getServerApi() + const = await api..getById(id) + + if (!.data) { + return
not found.
+ } + + return ( + + <GeneralInfo ={.data} /> + + ) +} +``` + +**Key rules:** +- **Server component** — fetches resource data on the server +- Uses `DashboardPage` wrapper with `header={null}` (the layout already has the header) +- Renders the general-info component with the full resource data +- Shows a fallback message if the resource is not found + +### Step 6: Create Sub-Tab Pages + +Choose the appropriate pattern based on the sub-tab's requirements: + +#### Pattern A: ResourcePage with `extraParams` (Preferred for CRUD sub-tabs) + +Use when the sub-tab needs full CRUD for a **related** resource filtered by the parent ID. + +```tsx +"use client" + +import { use } from "react" +import { ResourcePage } from '@/shared/data-view/resource-page' +import { ColumnHeader } from '@/shared/data-view/table-view' +import FormDialog from '@/shared/components/form-dialog' +import { Form } from '@/modules//-form' +import { _ROUTES } from '@garage/api' +import type { Client } from '@garage/api' +import { use } from '@/modules//-context' + +export default function Page({ params }: { params: Promise<{ id: string }> }) { + const { id: Id } = use(params) + const = use() + + return ( + Client> + toolbar={({ invalidateQuery, selectedItem, closeDialog }) => ( + + {(resourceId) => ( + <Form + resourceId={resourceId} + initialData={{ + : + ? { value: .id, label: .label } + : null, + }} + onSuccess={() => { + closeDialog(); + invalidateQuery(); + }} + /> + )} + + )} + pageTitle=" s" + routeKey={_ROUTES.INDEX} + getClient={(api) => api.s} + extraParams={{ _id: Id }} + header={null} + columns={({ actionsColumn }) => [ + // Column definitions... + actionsColumn(), + ]} + /> + ) +} +``` + +**Key rules:** +- `"use client"` — uses hooks (`use()`, `use()`) +- Uses `use(params)` (React 19) to unwrap the params Promise +- Consumes the parent context via `use()` to pre-populate the form's relation field +- `extraParams={{ _id: Id }}` filters the list to only show related records +- `header={null}` — the layout already provides the header +- Pass `initialData` with the parent resource as a relation field `{ value, label }` + +#### Pattern B: Manual DataTable (For custom interactions) + +Use when the sub-tab needs non-standard behavior (link/unlink, file uploads, custom mutations). + +```tsx +"use client" + +import { useParams } from "next/navigation" +import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query" +import { useAuthApi } from "@/shared/useApi" +import { DataTable, ColumnHeader } from "@/shared/data-view/table-view" +import DashboardPage from "@/base/components/layout/dashboard/dashboard-page" + +export default function Page() { + const { id: Id } = useParams<{ id: string }>() + const api = useAuthApi() + const queryClient = useQueryClient() + + const queryKey = ["-", Id] + + const { data, isLoading } = useQuery({ + queryKey, + queryFn: () => api..get(Id), + }) + + // Custom mutations (link, unlink, upload, etc.) + + return ( + + + + ) +} +``` + +**Key rules:** +- Use `useParams()` or `use(params)` to get the parent resource ID +- Custom query key includes the parent resource ID +- Use `DashboardPage header={null}` as wrapper +- Implement custom mutations with `useMutation` + `useQueryClient` for cache invalidation + +## API Integration + +### Server-Side (Layout + Details Tab) + +```tsx +import { getServerApi } from '@garage/api/server' + +// In an async server component: +const api = await getServerApi() +const resource = await api..getById(id) +``` + +- `getServerApi()` reads auth cookies server-side — no token passing needed +- Returns typed responses based on OpenAPI schema +- Used in `layout.tsx` and the default `page.tsx` (Details tab) + +### Client-Side (Sub-Tab Pages) + +```tsx +import { useAuthApi } from "@/shared/useApi" + +// In a client component: +const api = useAuthApi() +// Then use with React Query: +useQuery({ queryFn: () => api..list() }) +``` + +- `useAuthApi()` returns the API client with the auth token from the store +- Always use with React Query (`useQuery`, `useMutation`) for caching and state management +- `ResourcePage` handles this internally — only needed for manual DataTable pages + +### Client Types + +API clients live in `packages/api/src/clients/.ts`. Each exports: +- `_ROUTES` — route constants (`INDEX`, `BY_ID`, etc.) +- `Client` — class with typed methods + +These are re-exported from `@garage/api` for use in the dashboard. + +## Component Reusability + +### Reusable Across Resources + +| Component | Location | Reuse Pattern | +|---|---|---| +| `DashboardDetailsPage` | `@/base/components/layout/dashboard` | Used by every `[id]/layout.tsx` | +| `DashboardPage` | `@/base/components/layout/dashboard` | Used by every tab `page.tsx` with `header={null}` | +| `ResourcePage` | `@/shared/data-view/resource-page` | Used by CRUD sub-tabs with `extraParams` | +| `FormDialog` | `@/shared/components/form-dialog` | Used for create/edit dialogs in sub-tabs | +| `DataTable` | `@/shared/data-view/table-view` | Used for custom sub-tabs (non-CRUD) | +| `ColumnHeader` | `@/shared/data-view/table-view` | Used in all column definitions | +| `InfoItem` pattern | Copy per resource | Icon+label+value display for general-info | + +### Resource-Specific (Create Per Resource) + +| Component | Location | Purpose | +|---|---|---| +| `-context.tsx` | `modules//` | Context provider for parent resource identity | +| `-actions.tsx` | `modules//` | Header dropdown menu (edit/delete) | +| `-general-info.tsx` | `modules//` | Read-only details display for Details tab | +| `-form.tsx` | `modules//` | CRUD form (shared with list page creation) | +| `.schema.ts` | `modules//` | Zod schema (shared with form) | + +## File Structure Convention + +``` +app/(authenticated)/
//[id]/ +├── layout.tsx ← Server: fetch + DashboardDetailsPage + Provider +├── page.tsx ← Server: Details tab (GeneralInfo) +├── /page.tsx ← Client: ResourcePage or manual DataTable +├── /page.tsx ← Client: ResourcePage or manual DataTable +└── ... + +modules// +├── .schema.ts ← Zod form schema +├── -form.tsx ← CRUD form component +├── -context.tsx ← Context provider (id + label) +├── -actions.tsx ← Actions dropdown +├── -general-info.tsx ← Read-only info cards +└── / ← e.g. document upload forms +``` + +## Naming Conventions + +| Item | Pattern | Example | +|---|---|---| +| Layout file | `app/...//[id]/layout.tsx` | `vehicles/[id]/layout.tsx` | +| Details page | `app/...//[id]/page.tsx` | `vehicles/[id]/page.tsx` | +| Sub-tab page | `app/...//[id]//page.tsx` | `vehicles/[id]/estimates/page.tsx` | +| Context file | `modules//-context.tsx` | `vehicles/vehicle-context.tsx` | +| Context type | `ContextValue` | `VehicleContextValue` | +| Provider | `Provider` | `VehicleProvider` | +| Hook | `use()` | `useVehicle()` | +| Actions file | `modules//-actions.tsx` | `vehicles/vehicle-actions.tsx` | +| Actions component | `Actions` | `VehicleActions` | +| General info file | `modules//-general-info.tsx` | `vehicles/vehicle-general-info.tsx` | +| General info component | `GeneralInfo` | `VehicleGeneralInfo` | + +## Imports Cheat Sheet + +```tsx +// Layout +import { DashboardDetailsPage } from '@/base/components/layout/dashboard' +import { getServerApi } from '@garage/api/server' +import { Actions } from '@/modules//-actions' +import { Provider } from '@/modules//-context' + +// Details tab +import { getServerApi } from '@garage/api/server' +import { GeneralInfo } from '@/modules//-general-info' +import DashboardPage from '@/base/components/layout/dashboard/dashboard-page' + +// Sub-tab (ResourcePage pattern) +import { ResourcePage } from '@/shared/data-view/resource-page' +import { ColumnHeader } from '@/shared/data-view/table-view' +import FormDialog from '@/shared/components/form-dialog' +import { use } from '@/modules//-context' +import type { Client } from '@garage/api' +import { _ROUTES } from '@garage/api' + +// Sub-tab (Manual DataTable pattern) +import { useAuthApi } from "@/shared/useApi" +import { DataTable, ColumnHeader } from "@/shared/data-view/table-view" +import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query" +import DashboardPage from '@/base/components/layout/dashboard/dashboard-page' + +// Context provider +import { createContext, useContext } from "react" + +// Actions +import { useAuthApi } from "@/shared/useApi" +import { useRouter } from "next/navigation" +import { Button } from "@/shared/components/ui/button" +import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@/shared/components/ui/dropdown-menu" + +// General Info +import { Card, CardContent, CardHeader, CardTitle } from "@/shared/components/ui/card" +import { Badge } from "@/shared/components/ui/badge" +import { Separator } from "@/shared/components/ui/separator" +``` diff --git a/apps/dashboard/app/(authenticated)/items/parts/page.tsx b/apps/dashboard/app/(authenticated)/items/parts/page.tsx index c3bdaf4..76a5bd0 100644 --- a/apps/dashboard/app/(authenticated)/items/parts/page.tsx +++ b/apps/dashboard/app/(authenticated)/items/parts/page.tsx @@ -2,6 +2,7 @@ import { ResourcePage } from "@/shared/data-view/resource-page" import { ColumnHeader } from "@/shared/data-view/table-view" +import FormDialog from "@/shared/components/form-dialog" import { PartForm } from "@/modules/parts/part-form" import { Badge } from "@/shared/components/ui/badge" import { PARTS_ROUTES } from "@garage/api" @@ -11,9 +12,21 @@ export default function PartsPage() { return ( pageTitle="Parts" - title="Part" routeKey={PARTS_ROUTES.INDEX} getClient={(api) => api.parts} + headerProps={({ selectedItem, invalidateQuery }) => ({ + actions: ( + + {(resourceId) => ( + + )} + + ), + })} columns={({ actionsColumn }) => [ { accessorKey: "title", @@ -78,13 +91,6 @@ export default function PartsPage() { }, actionsColumn(), ]} - renderForm={({ resourceId, initialData, onSuccess }) => ( - - )} /> ) } diff --git a/apps/dashboard/app/(authenticated)/items/service-group/page.tsx b/apps/dashboard/app/(authenticated)/items/service-group/page.tsx index 1a5bdf4..0a8d5db 100644 --- a/apps/dashboard/app/(authenticated)/items/service-group/page.tsx +++ b/apps/dashboard/app/(authenticated)/items/service-group/page.tsx @@ -2,6 +2,7 @@ import { ResourcePage } from "@/shared/data-view/resource-page" import { ColumnHeader } from "@/shared/data-view/table-view" +import FormDialog from "@/shared/components/form-dialog" import { ServiceGroupForm } from "@/modules/service-groups/service-group-form" import { Badge } from "@/shared/components/ui/badge" import { SERVICE_GROUP_ROUTES } from "@garage/api" @@ -11,9 +12,21 @@ export default function ServiceGroupPage() { return ( pageTitle="Service Groups" - title="Service Group" routeKey={SERVICE_GROUP_ROUTES.INDEX} getClient={(api) => api.serviceGroups} + headerProps={({ selectedItem, invalidateQuery }) => ({ + actions: ( + + {(resourceId) => ( + + )} + + ), + })} columns={({ actionsColumn }) => [ { accessorKey: "name", @@ -60,13 +73,6 @@ export default function ServiceGroupPage() { }, actionsColumn(), ]} - renderForm={({ resourceId, initialData, onSuccess }) => ( - - )} /> ) } diff --git a/apps/dashboard/app/(authenticated)/items/services/page.tsx b/apps/dashboard/app/(authenticated)/items/services/page.tsx index 0ccc839..703e02d 100644 --- a/apps/dashboard/app/(authenticated)/items/services/page.tsx +++ b/apps/dashboard/app/(authenticated)/items/services/page.tsx @@ -2,6 +2,7 @@ import { ResourcePage } from "@/shared/data-view/resource-page" import { ColumnHeader } from "@/shared/data-view/table-view" +import FormDialog from "@/shared/components/form-dialog" import { ServiceForm } from "@/modules/services/service-form" import { SERVICE_ROUTES } from "@garage/api" import type { ServicesClient } from "@garage/api" @@ -10,9 +11,21 @@ export default function ServicesPage() { return ( pageTitle="Services" - title="Service" routeKey={SERVICE_ROUTES.INDEX} getClient={(api) => api.services} + headerProps={({ selectedItem, invalidateQuery }) => ({ + actions: ( + + {(resourceId) => ( + + )} + + ), + })} columns={({ actionsColumn }) => [ { accessorKey: "labor_name", @@ -57,13 +70,6 @@ export default function ServicesPage() { }, actionsColumn(), ]} - renderForm={({ resourceId, initialData, onSuccess }) => ( - - )} /> ) } diff --git a/apps/dashboard/app/(authenticated)/layout.tsx b/apps/dashboard/app/(authenticated)/layout.tsx index bce734b..3d92a2a 100644 --- a/apps/dashboard/app/(authenticated)/layout.tsx +++ b/apps/dashboard/app/(authenticated)/layout.tsx @@ -1,218 +1,44 @@ -"use client" import { Suspense } from "react" -import type { NavGroup } from "@/base/types/navigation" -import { - AlarmClockIcon, - AwardIcon, - BanknoteArrowDownIcon, - BarChart3Icon, - BellRingIcon, - BookIcon, - BriefcaseBusinessIcon, - Building2Icon, - CalendarCheck2Icon, - CalendarDaysIcon, - LayoutDashboardIcon, - ClipboardListIcon, - UsersIcon, - CalendarIcon, - CarIcon, - ClipboardCheckIcon, - Clock3Icon, - ClockIcon, - GemIcon, - GitBranchIcon, - HandCoinsIcon, - ListIcon, - ListTodoIcon, - MegaphoneIcon, - PackageIcon, - PhoneCallIcon, - PlugZapIcon, - ReceiptIcon, - ReceiptTextIcon, - SettingsIcon, - ShoppingBasketIcon, - CircleDollarSign, - StarIcon, - StoreIcon, - TimerIcon, - UserCogIcon, - WalletIcon, - WrenchIcon, - ShoppingCartIcon, -} from "lucide-react" + import Image from "next/image" import { DashboardLayout } from "@/base/components/layout/dashboard" import { useAuth } from "@/shared/hooks/use-auth" - -const navGroups: NavGroup[] = [ - { - items: [ - { - title: "Dashboard", - href: "/", - icon: , - }, - { - title: "Job Cards", - href: "/sales/workorder/list", - icon: , - }, - { - title: "Customer & Vehicles", - href: "/customer-vehicles", - icon: , - }, - { - title: "Reports", - href: "/reports", - icon: , - }, - ], - }, - { - label: "Management", - items: [ - { - title: "Calendars", - href: "/calendars", - icon: , - items: [ - { title: "Work Schedule", href: "/calendar/work-schedule/list", icon: }, - { title: "Appointments", href: "/calendar/appointment/list", icon: }, - ], - }, - { - title: "Sales", - href: "/sales", - icon: , - items: [ - { title: "Customers", href: "/sales/customers", icon: }, - { title: "Vehicles", href: "/sales/vehicles", icon: }, - { title: "Inspections", href: "/sales/inspections", icon: }, - { title: "Estimates", href: "/sales/estimate", icon: }, - { title: "Job Cards", href: "/sales/workorder/list", icon: }, - { title: "Invoices", href: "/sales/invoice", icon: }, - { title: "Payments Received", href: "/sales/payment-received", icon: }, - { title: "Credit Notes", href: "/sales/credit-notes", icon: }, - ], - }, - { - title: "Purchases", - href: "/purchases", - icon: , - items: [ - { title: "Vendors", href: "/purchase/vendor", icon: }, - { title: "Expenses", href: "/purchase/expense", icon: }, - { title: "Purchase Orders", href: "/purchase/purchase-order", icon: }, - { title: "Bills", href: "/purchase/bill", icon: }, - { title: "Payments Made", href: "/purchase/payments-made", icon: }, - { title: "Vendor Credits", href: "/purchase/vendor-credit", icon: }, - ], - }, - { - title: "CRM", - href: "/crm", - icon: , - items: [ - { title: "Leads", href: "/crm/leads/list", icon: }, - { title: "Calls", href: "/crm/calls-follow-up/list", icon: }, - { title: "Tasks", href: "/crm/tasks/list", icon: }, - ], - }, - { - title: "Marketing", - href: "/marketing", - icon: , - items: [ - { title: "Service Reminders", href: "/marketing/service-reminder/list", icon: }, - { title: "Rating & Reviews", href: "/marketing/rating-review", icon: }, - { title: "Google Business Reviews", href: "/marketing/google-rating-review", icon: }, - ], - }, - { - title: "Accountants", - href: "/accountants", - icon: , - items: [ - { title: "Manual Journals", href: "/accountants/manual-journal", icon: }, - { title: "Chart of Accounts", href: "/accountants/chart-of-account", icon: }, - ], - }, - { - title: "Employees", - href: "/productivity", - icon: , - items: [ - { title: "Employees", href: "/productivity/employees", icon: }, - { title: "Time Clocks", href: "/productivity/time-clocks", icon: }, - { title: "Time Sheets", href: "/productivity/timesheet", icon: }, - { title: "Payroll", href: "/productivity/payroll", icon: }, - { title: "Payments Made", href: "/productivity/employee-payments-made", icon: }, - { title: "Shop Calendars", href: "/productivity/shop-calendars", icon: }, - { title: "Shop Timing", href: "/productivity/shop-timings", icon: }, - { title: "Holidays", href: "/productivity/holidays", icon: }, - ], - }, - { - title: "Items", - href: "/items", - icon: , - items: [ - { title: "Services", href: "/items/services", icon: }, - { title: "Parts", href: "/items/parts", icon: }, - { title: "Expense Item", href: "/items/expense-item", icon: }, - { title: "Service Group", href: "/items/service-group", icon: }, - { title: "Inspections", href: "/items/inspection", icon: }, - { title: "Inventory Adjustments", href: "/items/adjustment", icon: }, - ], - }, - { - title: "Settings", - href: "/setting", - icon: , - items: [ - { title: "Company", href: "/setting/company", icon: }, - { title: "Shop Types", href: "/setting/shop-type", icon: }, - { title: "Tax & Rates", href: "/setting/tax-rates", icon: }, - { title: "Configurations", href: "/setting/configurations/preferences/sales", icon: }, - { title: "Templates", href: "/setting/templates", icon: }, - { title: "Integrations", href: "/setting/integrations/providers", icon: }, - { title: "Master", href: "/setting/master/body-type", icon: }, - ], - }, - ], - }, -] +import { navGroups } from "@/config/navGroups" +import { getAuthCookies } from "@/modules/auth/auth.actions" +import { redirect } from "next/navigation" + function Logo() { return (
- Logo + Logo
) } -export default function AuthenticatedLayout({ +export default async function AuthenticatedLayout({ children, }: { children: React.ReactNode }) { - const { user } = useAuth() + const { token, user } = await getAuthCookies() + + if(!token || !user ) { + redirect('/login'); + } const userInfo = user ? { - name: user.name, - email: user.email, - initials: user.name.charAt(0).toUpperCase(), - } + name: user.name, + email: user.email, + initials: user.name.charAt(0).toUpperCase(), + } : undefined return ( } user={userInfo}> - {children} + {children} ) } diff --git a/apps/dashboard/app/(authenticated)/page.tsx b/apps/dashboard/app/(authenticated)/page.tsx index 69396b0..25bb63b 100644 --- a/apps/dashboard/app/(authenticated)/page.tsx +++ b/apps/dashboard/app/(authenticated)/page.tsx @@ -1,14 +1,11 @@ import { DashboardHeader } from "@/base/components/layout/dashboard"; import DashboardPage from "@/base/components/layout/dashboard/dashboard-page"; +import { DashboardContent } from "@/modules/home/dashboard-content"; + export default function page() { return ( - } > -
-

Dashboard

-

- Welcome to your dashboard. Select an item from the sidebar to get started. -

-
+ } title="Dashboard"> + ) } diff --git a/apps/dashboard/app/(authenticated)/productivity/employees/page.tsx b/apps/dashboard/app/(authenticated)/productivity/employees/page.tsx index 2751d08..82ae50e 100644 --- a/apps/dashboard/app/(authenticated)/productivity/employees/page.tsx +++ b/apps/dashboard/app/(authenticated)/productivity/employees/page.tsx @@ -2,6 +2,7 @@ import { ResourcePage } from "@/shared/data-view/resource-page" import { ColumnHeader } from "@/shared/data-view/table-view" +import FormDialog from "@/shared/components/form-dialog" import { EmployeeForm } from "@/modules/employees/employee-form" import { EMPLOYEE_ROUTES } from "@garage/api" import type { EmployeesClient } from "@garage/api" @@ -10,9 +11,21 @@ export default function EmployeesPage() { return ( pageTitle="Employees" - title="Employee" routeKey={EMPLOYEE_ROUTES.INDEX} getClient={(api) => api.employees} + headerProps={({ selectedItem, invalidateQuery }) => ({ + actions: ( + + {(resourceId) => ( + + )} + + ), + })} columns={({ actionsColumn }) => [ { accessorKey: "first_name", @@ -53,13 +66,6 @@ export default function EmployeesPage() { }, actionsColumn(), ]} - renderForm={({ resourceId, initialData, onSuccess }) => ( - - )} /> ) } diff --git a/apps/dashboard/app/(authenticated)/productivity/holidays/page.tsx b/apps/dashboard/app/(authenticated)/productivity/holidays/page.tsx new file mode 100644 index 0000000..398a769 --- /dev/null +++ b/apps/dashboard/app/(authenticated)/productivity/holidays/page.tsx @@ -0,0 +1,46 @@ +"use client" + +import { ResourcePage } from "@/shared/data-view/resource-page" +import { ColumnHeader } from "@/shared/data-view/table-view" +import FormDialog from "@/shared/components/form-dialog" +import { HolidayYearForm } from "@/modules/settings/holiday-year/holiday-year-form" +import { HOLIDAY_YEAR_ROUTES } from "@garage/api" +import type { HolidayYearsClient } from "@garage/api" + +export default function HolidayYearsPage() { + return ( + + pageTitle="Holiday Years" + routeKey={HOLIDAY_YEAR_ROUTES.INDEX} + getClient={(api) => api.holidayYears} + headerProps={({ selectedItem, invalidateQuery }) => ({ + actions: ( + + {(resourceId) => ( + + )} + + ), + })} + columns={({ actionsColumn }) => [ + { + accessorKey: "year", + header: ({ column }) => , + }, + { + accessorKey: "created_at", + header: ({ column }) => , + cell: ({ row }) => { + const date = (row.original as any).created_at + return date ? new Date(date).toLocaleDateString() : "—" + }, + }, + actionsColumn({ onEdit: undefined }), + ]} + /> + ) +} diff --git a/apps/dashboard/app/(authenticated)/productivity/shop-calendars/page.tsx b/apps/dashboard/app/(authenticated)/productivity/shop-calendars/page.tsx index c9dcf13..8742647 100644 --- a/apps/dashboard/app/(authenticated)/productivity/shop-calendars/page.tsx +++ b/apps/dashboard/app/(authenticated)/productivity/shop-calendars/page.tsx @@ -2,6 +2,7 @@ import { ResourcePage } from "@/shared/data-view/resource-page" import { ColumnHeader } from "@/shared/data-view/table-view" +import FormDialog from "@/shared/components/form-dialog" import { ShopCalendarForm } from "@/modules/shop-calendars/shop-calendar-form" import { SHOP_CALENDAR_ROUTES } from "@garage/api" import type { ShopCalendarsClient } from "@garage/api" @@ -11,9 +12,21 @@ export default function ShopCalendarsPage() { return ( pageTitle="Shop Calendars" - title="Shop Calendar" routeKey={SHOP_CALENDAR_ROUTES.INDEX} getClient={(api) => api.shopCalendars} + headerProps={({ selectedItem, invalidateQuery }) => ({ + actions: ( + + {(resourceId) => ( + + )} + + ), + })} columns={({ actionsColumn }) => [ { accessorKey: "title", @@ -38,13 +51,6 @@ export default function ShopCalendarsPage() { }, actionsColumn({ onEdit: undefined }), ]} - renderForm={({ resourceId, initialData, onSuccess }) => ( - - )} /> ) } diff --git a/apps/dashboard/app/(authenticated)/productivity/shop-timings/page.tsx b/apps/dashboard/app/(authenticated)/productivity/shop-timings/page.tsx index 46b7150..ca97435 100644 --- a/apps/dashboard/app/(authenticated)/productivity/shop-timings/page.tsx +++ b/apps/dashboard/app/(authenticated)/productivity/shop-timings/page.tsx @@ -2,6 +2,7 @@ import { ResourcePage } from "@/shared/data-view/resource-page" import { ColumnHeader } from "@/shared/data-view/table-view" +import FormDialog from "@/shared/components/form-dialog" import { ShopTimingForm } from "@/modules/shop-timings/shop-timing-form" import { SHOP_TIMING_ROUTES } from "@garage/api" import type { ShopTimingsClient } from "@garage/api" @@ -11,9 +12,21 @@ export default function ShopTimingsPage() { return ( pageTitle="Shop Timings" - title="Shop Timing" routeKey={SHOP_TIMING_ROUTES.INDEX} getClient={(api) => api.shopTimings} + headerProps={({ selectedItem, invalidateQuery }) => ({ + actions: ( + + {(resourceId) => ( + + )} + + ), + })} columns={({ actionsColumn }) => [ { accessorKey: "title", @@ -45,13 +58,6 @@ export default function ShopTimingsPage() { }, actionsColumn(), ]} - renderForm={({ resourceId, initialData, onSuccess }) => ( - - )} /> ) } diff --git a/apps/dashboard/app/(authenticated)/purchase/expense/page.tsx b/apps/dashboard/app/(authenticated)/purchase/expense/page.tsx new file mode 100644 index 0000000..573d092 --- /dev/null +++ b/apps/dashboard/app/(authenticated)/purchase/expense/page.tsx @@ -0,0 +1,77 @@ +"use client" + +import { ResourcePage } from "@/shared/data-view/resource-page" +import { ColumnHeader } from "@/shared/data-view/table-view" +import FormDialog from "@/shared/components/form-dialog" +import { ExpenseForm } from "@/modules/expenses/expense-form" +import { Badge } from "@/shared/components/ui/badge" +import { EXPENSE_ROUTES } from "@garage/api" +import type { ExpensesClient } from "@garage/api" + +export default function ExpensesPage() { + return ( + + pageTitle="Expenses" + routeKey={EXPENSE_ROUTES.INDEX} + getClient={(api) => api.expenses} + headerProps={({ selectedItem, invalidateQuery }) => ({ + actions: ( + + {(resourceId) => ( + + )} + + ), + })} + columns={({ actionsColumn }) => [ + { + accessorKey: "title", + header: ({ column }) => , + }, + { + accessorKey: "invoice_number", + header: ({ column }) => , + cell: ({ row }) => (row.original as any).invoice_number || "—", + }, + { + accessorKey: "vendor_name", + header: ({ column }) => , + cell: ({ row }) => (row.original as any).vendor_name || "—", + }, + { + accessorKey: "expense_date", + header: ({ column }) => , + cell: ({ row }) => { + const val = (row.original as any).expense_date + return val ? new Date(val).toLocaleDateString() : "—" + }, + }, + { + accessorKey: "status", + header: ({ column }) => , + cell: ({ row }) => { + const status = (row.original as any).status + return ( + + {status || "—"} + + ) + }, + }, + { + accessorKey: "created_at", + header: ({ column }) => , + cell: ({ row }) => { + const val = (row.original as any).created_at + return val ? new Date(val).toLocaleDateString() : "—" + }, + }, + actionsColumn(), + ]} + /> + ) +} diff --git a/apps/dashboard/app/(authenticated)/purchase/vendor/page.tsx b/apps/dashboard/app/(authenticated)/purchase/vendor/page.tsx new file mode 100644 index 0000000..5d9bda3 --- /dev/null +++ b/apps/dashboard/app/(authenticated)/purchase/vendor/page.tsx @@ -0,0 +1,61 @@ +"use client" + +import { ResourcePage } from "@/shared/data-view/resource-page" +import { ColumnHeader } from "@/shared/data-view/table-view" +import FormDialog from "@/shared/components/form-dialog" +import { VendorForm } from "@/modules/vendors/vendor-form" +import { VENDOR_ROUTES } from "@garage/api" +import type { VendorsClient } from "@garage/api" + +export default function VendorsPage() { + return ( + + pageTitle="Vendors" + routeKey={VENDOR_ROUTES.INDEX} + getClient={(api) => api.vendors} + headerProps={({ selectedItem, invalidateQuery }) => ({ + actions: ( + + {(resourceId) => ( + + )} + + ), + })} + columns={({ actionsColumn }) => [ + { + accessorKey: "first_name", + header: ({ column }) => , + cell: ({ row }) => { + const r = row.original as any + const name = [r.first_name, r.last_name].filter(Boolean).join(" ") + return name || "—" + }, + }, + { + accessorKey: "company_name", + header: ({ column }) => , + cell: ({ row }) => (row.original as any).company_name || "—", + }, + { + accessorKey: "email", + header: ({ column }) => , + cell: ({ row }) => (row.original as any).email || "—", + }, + { + accessorKey: "created_at", + header: ({ column }) => , + cell: ({ row }) => { + const val = (row.original as any).created_at + return val ? new Date(val).toLocaleDateString() : "—" + }, + }, + actionsColumn(), + ]} + /> + ) +} diff --git a/apps/dashboard/app/(authenticated)/sales/customers/page.tsx b/apps/dashboard/app/(authenticated)/sales/customers/page.tsx index 0be2ff7..1f54166 100644 --- a/apps/dashboard/app/(authenticated)/sales/customers/page.tsx +++ b/apps/dashboard/app/(authenticated)/sales/customers/page.tsx @@ -2,6 +2,7 @@ import { ResourcePage } from '@/shared/data-view/resource-page' import { ColumnHeader } from '@/shared/data-view/table-view' +import FormDialog from '@/shared/components/form-dialog' import { CustomerForm } from '@/modules/customers/customer-form' import { CUSTOMER_ROUTES } from '@garage/api' import type { CustomersClient } from '@garage/api' @@ -11,9 +12,21 @@ export default function CustomersPage() { return ( pageTitle='Customers' - title="Customer" routeKey={CUSTOMER_ROUTES.INDEX} getClient={(api) => api.customers} + headerProps={({ selectedItem, invalidateQuery }) => ({ + actions: ( + + {(resourceId) => ( + + )} + + ), + })} columns={({ actionsColumn }) => [ { @@ -42,13 +55,6 @@ export default function CustomersPage() { }, actionsColumn(), ]} - renderForm={({ resourceId, initialData, onSuccess }) => ( - - )} /> ) } \ No newline at end of file diff --git a/apps/dashboard/app/(authenticated)/sales/estimates/page.tsx b/apps/dashboard/app/(authenticated)/sales/estimates/page.tsx new file mode 100644 index 0000000..ab7c3ab --- /dev/null +++ b/apps/dashboard/app/(authenticated)/sales/estimates/page.tsx @@ -0,0 +1,91 @@ +"use client" + +import { ResourcePage } from '@/shared/data-view/resource-page' +import { ColumnHeader } from '@/shared/data-view/table-view' +import FormDialog from '@/shared/components/form-dialog' +import { EstimateForm } from '@/modules/estimates/estimate-form' +import { ESTIMATE_ROUTES } from '@garage/api' +import type { EstimatesClient } from '@garage/api' +import { FileTextIcon } from 'lucide-react' + +type EstimateItem = { + id: number + title?: string + estimate_number?: string + date?: string + customer_name?: string + vehicle_name?: string + has_insurance?: boolean + created_at?: string +} + +export default function EstimatesPage({ vehicleId }: { vehicleId: string }) { + return ( + + pageTitle="Estimates" + routeKey={ESTIMATE_ROUTES.INDEX} + getClient={(api) => api.estimates} + headerProps={({ selectedItem, invalidateQuery }) => ({ + actions: ( + + {(resourceId) => ( + + )} + + ), + })} + columns={({ actionsColumn }) => [ + { + accessorKey: "title", + header: ({ column }) => , + cell: ({ row }) => { + const item = row.original as unknown as EstimateItem + return ( +
+ + {item.title} +
+ ) + }, + }, + { + accessorKey: "estimate_number", + header: ({ column }) => , + }, + { + accessorKey: "customer_name", + header: ({ column }) => , + }, + { + accessorKey: "vehicle_name", + header: ({ column }) => , + }, + { + accessorKey: "date", + header: ({ column }) => , + }, + { + accessorKey: "has_insurance", + header: ({ column }) => , + cell: ({ row }) => { + const item = row.original as unknown as EstimateItem + return item.has_insurance ? "Yes" : "No" + }, + }, + { + accessorKey: "created_at", + header: ({ column }) => , + cell: ({ row }) => { + const item = row.original as unknown as EstimateItem + return item.created_at ? new Date(item.created_at).toLocaleDateString() : "—" + }, + }, + actionsColumn(), + ]} + /> + ) +} \ No newline at end of file diff --git a/apps/dashboard/app/(authenticated)/sales/inspections/page.tsx b/apps/dashboard/app/(authenticated)/sales/inspections/page.tsx index 58417c2..706efb8 100644 --- a/apps/dashboard/app/(authenticated)/sales/inspections/page.tsx +++ b/apps/dashboard/app/(authenticated)/sales/inspections/page.tsx @@ -2,6 +2,7 @@ import { ResourcePage } from "@/shared/data-view/resource-page" import { ColumnHeader } from "@/shared/data-view/table-view" +import FormDialog from "@/shared/components/form-dialog" import { InspectionForm } from "@/modules/inspections/inspection-form" import { INSPECTION_ROUTES } from "@garage/api" import type { InspectionsClient } from "@garage/api" @@ -10,9 +11,21 @@ export default function InspectionsPage() { return ( pageTitle="Inspections" - title="Inspection" routeKey={INSPECTION_ROUTES.INDEX} getClient={(api) => api.inspections} + headerProps={({ selectedItem, invalidateQuery }) => ({ + actions: ( + + {(resourceId) => ( + + )} + + ), + })} columns={({ actionsColumn }) => [ { accessorKey: "title", @@ -53,13 +66,6 @@ export default function InspectionsPage() { }, actionsColumn(), ]} - renderForm={({ resourceId, initialData, onSuccess }) => ( - - )} /> ) } diff --git a/apps/dashboard/app/(authenticated)/sales/invoice/[id]/documents/page.tsx b/apps/dashboard/app/(authenticated)/sales/invoice/[id]/documents/page.tsx new file mode 100644 index 0000000..dd26342 --- /dev/null +++ b/apps/dashboard/app/(authenticated)/sales/invoice/[id]/documents/page.tsx @@ -0,0 +1,162 @@ +"use client" + +import { useParams } from "next/navigation" +import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query" +import { type ColumnDef } from "@tanstack/react-table" +import { useState } from "react" +import { Plus, Trash2 } from "lucide-react" +import { toast } from "sonner" + +import { useAuthApi } from "@/shared/useApi" +import { DataTable, ColumnHeader } from "@/shared/data-view/table-view" +import { confirm } from "@/shared/components/confirm-dialog" +import { Button } from "@/shared/components/ui/button" +import { Card, CardContent } from "@/shared/components/ui/card" +import { + Dialog, + DialogContent, + DialogHeader, + DialogTitle, +} from "@/shared/components/ui/dialog" +import { InvoiceDocumentForm } from "@/modules/invoices/invoice-document-form" + +type InvoiceDocument = { + id: number + document_number?: string + show_in_invoice?: boolean + show_in_estimate?: boolean + show_in_statement?: boolean + created_at: string + updated_at: string +} + +export default function InvoiceDocumentsPage() { + const { id: invoiceId } = useParams<{ id: string }>() + const api = useAuthApi() + const queryClient = useQueryClient() + const [dialogOpen, setDialogOpen] = useState(false) + + const queryKey = ["invoice-documents", invoiceId] + + const { data, isLoading } = useQuery({ + queryKey, + queryFn: () => api.invoices.listDocuments({ invoice_id: invoiceId }), + }) + + const deleteMutation = useMutation({ + mutationFn: (id: number) => api.invoices.destroyDocument(String(id)), + onSuccess: () => { + toast.success("Document deleted successfully.") + queryClient.invalidateQueries({ queryKey }) + }, + onError: () => { + toast.error("Failed to delete document.") + }, + }) + + const handleDelete = async (doc: InvoiceDocument) => { + const confirmed = await confirm({ + title: "Delete Document", + description: `Are you sure you want to delete "${doc.document_number || "this document"}"?`, + confirmLabel: "Delete", + variant: "destructive", + }) + if (confirmed) { + deleteMutation.mutate(doc.id) + } + } + + const columns: ColumnDef[] = [ + { + accessorKey: "document_number", + header: ({ column }) => , + }, + { + accessorKey: "show_in_invoice", + header: ({ column }) => , + cell: ({ getValue }) => (getValue() ? "Yes" : "No"), + }, + { + accessorKey: "show_in_estimate", + header: ({ column }) => , + cell: ({ getValue }) => (getValue() ? "Yes" : "No"), + }, + { + accessorKey: "show_in_statement", + header: ({ column }) => , + cell: ({ getValue }) => (getValue() ? "Yes" : "No"), + }, + { + accessorKey: "created_at", + header: ({ column }) => , + cell: ({ getValue }) => { + const val = getValue() + return val ? new Date(val).toLocaleDateString() : "—" + }, + }, + { + id: "actions", + header: () => Actions, + cell: ({ row }) => ( + + ), + enableSorting: false, + }, + ] + + const documents = (data as any)?.data ?? [] + const meta = (data as any)?.meta + + const pagination = { + page: meta?.current_page ?? 1, + pageSize: meta?.per_page ?? 15, + pageCount: meta?.last_page ?? 1, + total: meta?.total ?? 0, + } + + return ( +
+
+ +
+ + + + {}} + isLoading={isLoading} + /> + + + + + + + Add Document + + { + setDialogOpen(false) + queryClient.invalidateQueries({ queryKey }) + }} + /> + + +
+ ) +} diff --git a/apps/dashboard/app/(authenticated)/sales/invoice/[id]/layout.tsx b/apps/dashboard/app/(authenticated)/sales/invoice/[id]/layout.tsx new file mode 100644 index 0000000..7f2322b --- /dev/null +++ b/apps/dashboard/app/(authenticated)/sales/invoice/[id]/layout.tsx @@ -0,0 +1,43 @@ +import { DashboardDetailsPage } from '@/base/components/layout/dashboard' +import { getServerApi } from '@garage/api/server' +import { InvoiceActions } from '@/modules/invoices/invoice-actions' +import { InvoiceProvider } from '@/modules/invoices/invoice-context' +import { ReceiptIcon } from 'lucide-react' +import React from 'react' + +export default async function InvoiceDetailLayout(props: { params: Promise<{ id: string }>, children: React.ReactNode }) { + const { id } = await props.params + const api = await getServerApi() + const invoice = await api.invoices.show(id) + const data = (invoice as any)?.data ?? invoice + const title = data?.subject || data?.invoice_number || 'Invoice Details' + + return ( + + } + backHref="/sales/invoice" + actions={} + tabs={[ + { + href: `/sales/invoice/${id}`, + label: 'Details' + }, + { + href: `/sales/invoice/${id}/documents`, + label: 'Documents' + }, + { + href: `/sales/invoice/${id}/notes`, + label: 'Notes' + }, + ]} + > + {props.children} + + + ) +} diff --git a/apps/dashboard/app/(authenticated)/sales/invoice/[id]/notes/page.tsx b/apps/dashboard/app/(authenticated)/sales/invoice/[id]/notes/page.tsx new file mode 100644 index 0000000..c2db5ce --- /dev/null +++ b/apps/dashboard/app/(authenticated)/sales/invoice/[id]/notes/page.tsx @@ -0,0 +1,148 @@ +"use client" + +import { useParams } from "next/navigation" +import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query" +import { type ColumnDef } from "@tanstack/react-table" +import { useState } from "react" +import { Plus, Trash2 } from "lucide-react" +import { toast } from "sonner" + +import { useAuthApi } from "@/shared/useApi" +import { DataTable, ColumnHeader } from "@/shared/data-view/table-view" +import { confirm } from "@/shared/components/confirm-dialog" +import { Button } from "@/shared/components/ui/button" +import { Card, CardContent } from "@/shared/components/ui/card" +import { + Dialog, + DialogContent, + DialogHeader, + DialogTitle, +} from "@/shared/components/ui/dialog" +import { InvoiceNoteForm } from "@/modules/invoices/invoice-note-form" + +type InvoiceNote = { + id: number + note?: string + created_at: string + updated_at: string +} + +export default function InvoiceNotesPage() { + const { id: invoiceId } = useParams<{ id: string }>() + const api = useAuthApi() + const queryClient = useQueryClient() + const [dialogOpen, setDialogOpen] = useState(false) + + const queryKey = ["invoice-notes", invoiceId] + + const { data, isLoading } = useQuery({ + queryKey, + queryFn: () => api.invoices.listNotes({ invoice_id: invoiceId }), + }) + + const deleteMutation = useMutation({ + mutationFn: (id: number) => api.invoices.destroyNote(String(id)), + onSuccess: () => { + toast.success("Note deleted successfully.") + queryClient.invalidateQueries({ queryKey }) + }, + onError: () => { + toast.error("Failed to delete note.") + }, + }) + + const handleDelete = async (note: InvoiceNote) => { + const confirmed = await confirm({ + title: "Delete Note", + description: "Are you sure you want to delete this note?", + confirmLabel: "Delete", + variant: "destructive", + }) + if (confirmed) { + deleteMutation.mutate(note.id) + } + } + + const columns: ColumnDef[] = [ + { + accessorKey: "note", + header: ({ column }) => , + cell: ({ getValue }) => { + const val = getValue() + return val || "—" + }, + }, + { + accessorKey: "created_at", + header: ({ column }) => , + cell: ({ getValue }) => { + const val = getValue() + return val ? new Date(val).toLocaleDateString() : "—" + }, + }, + { + id: "actions", + header: () => Actions, + cell: ({ row }) => ( + + ), + enableSorting: false, + }, + ] + + const notes = (data as any)?.data ?? [] + const meta = (data as any)?.meta + + const pagination = { + page: meta?.current_page ?? 1, + pageSize: meta?.per_page ?? 15, + pageCount: meta?.last_page ?? 1, + total: meta?.total ?? 0, + } + + return ( +
+
+ +
+ + + + {}} + isLoading={isLoading} + /> + + + + + + + Add Note + + { + setDialogOpen(false) + queryClient.invalidateQueries({ queryKey }) + }} + /> + + +
+ ) +} diff --git a/apps/dashboard/app/(authenticated)/sales/invoice/[id]/page.tsx b/apps/dashboard/app/(authenticated)/sales/invoice/[id]/page.tsx new file mode 100644 index 0000000..362593d --- /dev/null +++ b/apps/dashboard/app/(authenticated)/sales/invoice/[id]/page.tsx @@ -0,0 +1,20 @@ +import { getServerApi } from '@garage/api/server' +import { InvoiceGeneralInfo } from '@/modules/invoices/invoice-general-info' +import DashboardPage from '@/base/components/layout/dashboard/dashboard-page' + +export default async function InvoiceDetailPage(props: { params: Promise<{ id: string }> }) { + const { id } = await props.params + const api = await getServerApi() + const invoice = await api.invoices.show(id) + const data = (invoice as any)?.data ?? invoice + + if (!data) { + return
Invoice not found.
+ } + + return ( + + + + ) +} diff --git a/apps/dashboard/app/(authenticated)/sales/invoice/page.tsx b/apps/dashboard/app/(authenticated)/sales/invoice/page.tsx new file mode 100644 index 0000000..ae182e7 --- /dev/null +++ b/apps/dashboard/app/(authenticated)/sales/invoice/page.tsx @@ -0,0 +1,89 @@ +"use client" + +import { useRouter } from "next/navigation" +import { ResourcePage } from "@/shared/data-view/resource-page" +import { ColumnHeader } from "@/shared/data-view/table-view" +import FormDialog from "@/shared/components/form-dialog" +import { InvoiceForm } from "@/modules/invoices/invoice-form" +import { INVOICE_ROUTES } from "@garage/api" +import type { InvoicesClient } from "@garage/api" + +type InvoiceItem = { + id: number + subject?: string + invoice_number?: string + customer_name?: string + status?: string + invoice_date?: string + due_date?: string + created_at?: string +} + +export default function InvoicesPage() { + const router = useRouter() + + return ( + + pageTitle="Invoices" + routeKey={INVOICE_ROUTES.INDEX} + getClient={(api) => api.invoices} + onRowClick={(row) => router.push(`/sales/invoice/${(row as any).id}`)} + headerProps={({ selectedItem, invalidateQuery }) => ({ + actions: ( + + {(resourceId) => ( + + )} + + ), + })} + columns={({ actionsColumn }) => [ + { + accessorKey: "subject", + header: ({ column }) => , + }, + { + accessorKey: "invoice_number", + header: ({ column }) => , + }, + { + accessorKey: "customer_name", + header: ({ column }) => , + }, + { + accessorKey: "status", + header: ({ column }) => , + cell: ({ row }) => { + const item = row.original as unknown as InvoiceItem + const status = item.status + const colorMap: Record = { + draft: "text-muted-foreground", + open: "text-blue-600", + paid: "text-green-600", + overdue: "text-red-600", + void: "text-gray-400", + } + return ( + + {status ? status.charAt(0).toUpperCase() + status.slice(1) : "—"} + + ) + }, + }, + { + accessorKey: "invoice_date", + header: ({ column }) => , + }, + { + accessorKey: "due_date", + header: ({ column }) => , + }, + actionsColumn(), + ]} + /> + ) +} diff --git a/apps/dashboard/app/(authenticated)/sales/job-cards/[id]/attachments/page.tsx b/apps/dashboard/app/(authenticated)/sales/job-cards/[id]/attachments/page.tsx new file mode 100644 index 0000000..be4275e --- /dev/null +++ b/apps/dashboard/app/(authenticated)/sales/job-cards/[id]/attachments/page.tsx @@ -0,0 +1,166 @@ +"use client" + +import { useParams } from "next/navigation" +import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query" +import { useState, useRef } from "react" +import { Plus, Trash2, FileIcon, ImageIcon, FileTextIcon } from "lucide-react" +import { toast } from "sonner" + +import { useAuthApi } from "@/shared/useApi" +import { confirm } from "@/shared/components/confirm-dialog" +import { Button } from "@/shared/components/ui/button" +import { Card, CardContent } from "@/shared/components/ui/card" +import { JOB_CARD_ROUTES } from "@garage/api" + +type Attachment = { + id: number + file_name: string + url: string + mime_type?: string + created_at?: string +} + +function getFileIcon(mimeType?: string) { + if (mimeType?.startsWith("image/")) return ImageIcon + if (mimeType?.includes("pdf")) return FileTextIcon + return FileIcon +} + +export default function JobCardAttachmentsPage() { + const { id: jobCardId } = useParams<{ id: string }>() + const api = useAuthApi() + const queryClient = useQueryClient() + const fileInputRef = useRef(null) + const [isUploading, setIsUploading] = useState(false) + + const queryKey = [JOB_CARD_ROUTES.INDEX, jobCardId, "attachments"] + + const { data, isLoading } = useQuery({ + queryKey, + queryFn: () => api.jobCards.show(jobCardId), + }) + + const jobCard = (data as any)?.data ?? data + const attachments: Attachment[] = jobCard?.documents ?? jobCard?.attachments ?? [] + + const deleteMutation = useMutation({ + mutationFn: (attachmentId: number) => + api.jobCards.deleteAttachment(jobCardId, attachmentId), + onSuccess: () => { + toast.success("Attachment deleted successfully.") + queryClient.invalidateQueries({ queryKey }) + }, + onError: () => { + toast.error("Failed to delete attachment.") + }, + }) + + const handleDelete = async (attachment: Attachment) => { + const confirmed = await confirm({ + title: "Delete Attachment", + description: `Are you sure you want to delete "${attachment.file_name}"?`, + confirmLabel: "Delete", + variant: "destructive", + }) + if (confirmed) { + deleteMutation.mutate(attachment.id) + } + } + + const handleUpload = async (e: React.ChangeEvent) => { + const files = e.target.files + if (!files || files.length === 0) return + + setIsUploading(true) + const promise = api.jobCards.addAttachment(jobCardId, Array.from(files)) + toast.promise(promise, { + loading: "Uploading attachment(s)...", + success: "Attachment(s) uploaded successfully", + error: "Failed to upload attachment(s)", + }) + + try { + await promise + queryClient.invalidateQueries({ queryKey }) + } finally { + setIsUploading(false) + if (fileInputRef.current) { + fileInputRef.current.value = "" + } + } + } + + return ( +
+
+ + +
+ + {isLoading ? ( + + + Loading attachments... + + + ) : attachments.length === 0 ? ( + + + No attachments yet. Click "Upload Attachment" to add files. + + + ) : ( +
+ {attachments.map((attachment) => { + const Icon = getFileIcon(attachment.mime_type) + return ( + + +
+ +
+
+ + {attachment.file_name} + + {attachment.created_at && ( + + {new Date(attachment.created_at).toLocaleDateString()} + + )} +
+ +
+
+ ) + })} +
+ )} +
+ ) +} diff --git a/apps/dashboard/app/(authenticated)/sales/job-cards/[id]/customer-remarks/page.tsx b/apps/dashboard/app/(authenticated)/sales/job-cards/[id]/customer-remarks/page.tsx new file mode 100644 index 0000000..37e8f04 --- /dev/null +++ b/apps/dashboard/app/(authenticated)/sales/job-cards/[id]/customer-remarks/page.tsx @@ -0,0 +1,152 @@ +"use client" + +import { useParams } from "next/navigation" +import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query" +import { type ColumnDef } from "@tanstack/react-table" +import { useState } from "react" +import { Plus, Trash2 } from "lucide-react" +import { toast } from "sonner" + +import { useAuthApi } from "@/shared/useApi" +import { DataTable, ColumnHeader } from "@/shared/data-view/table-view" +import { confirm } from "@/shared/components/confirm-dialog" +import { Button } from "@/shared/components/ui/button" +import { Card, CardContent } from "@/shared/components/ui/card" +import { + Dialog, + DialogContent, + DialogHeader, + DialogTitle, +} from "@/shared/components/ui/dialog" +import { JobCardRemarkForm } from "@/modules/job-cards/job-card-remark-form" + +type CustomerRemark = { + id: number + job_card_id?: number + remark?: string + created_at: string + updated_at: string +} + +export default function CustomerRemarksPage() { + const { id: jobCardId } = useParams<{ id: string }>() + const api = useAuthApi() + const queryClient = useQueryClient() + const [dialogOpen, setDialogOpen] = useState(false) + + const queryKey = ["job-card-remarks", jobCardId] + + const { data, isLoading } = useQuery({ + queryKey, + queryFn: async () => { + const result = await api.jobCards.show(jobCardId) + const d = (result as any)?.data ?? result + return d?.customer_remarks ?? [] + }, + }) + + const deleteMutation = useMutation({ + mutationFn: () => api.jobCards.deleteCustomerRemark(jobCardId), + onSuccess: () => { + toast.success("Customer remark deleted successfully.") + queryClient.invalidateQueries({ queryKey }) + }, + onError: () => { + toast.error("Failed to delete customer remark.") + }, + }) + + const handleDelete = async (remark: CustomerRemark) => { + const confirmed = await confirm({ + title: "Delete Customer Remark", + description: "Are you sure you want to delete this remark?", + confirmLabel: "Delete", + variant: "destructive", + }) + if (confirmed) { + deleteMutation.mutate() + } + } + + const columns: ColumnDef[] = [ + { + accessorKey: "remark", + header: ({ column }) => , + cell: ({ getValue }) => { + const val = getValue() + return val || "—" + }, + }, + { + accessorKey: "created_at", + header: ({ column }) => , + cell: ({ getValue }) => { + const val = getValue() + return val ? new Date(val).toLocaleDateString() : "—" + }, + }, + { + id: "actions", + header: () => Actions, + cell: ({ row }) => ( + + ), + enableSorting: false, + }, + ] + + const remarks = Array.isArray(data) ? data : [] + + const pagination = { + page: 1, + pageSize: 100, + pageCount: 1, + total: remarks.length, + } + + return ( +
+
+ +
+ + + + {}} + isLoading={isLoading} + /> + + + + + + + Add Customer Remark + + { + setDialogOpen(false) + queryClient.invalidateQueries({ queryKey }) + }} + /> + + +
+ ) +} diff --git a/apps/dashboard/app/(authenticated)/sales/job-cards/[id]/layout.tsx b/apps/dashboard/app/(authenticated)/sales/job-cards/[id]/layout.tsx new file mode 100644 index 0000000..5f18a57 --- /dev/null +++ b/apps/dashboard/app/(authenticated)/sales/job-cards/[id]/layout.tsx @@ -0,0 +1,50 @@ +import { DashboardDetailsPage } from '@/base/components/layout/dashboard' +import { getServerApi } from '@garage/api/server' +import { JobCardActions } from '@/modules/job-cards/job-card-actions' +import { JobCardProvider } from '@/modules/job-cards/job-card-context' +import { JobCardStatusStepper } from '@/modules/job-cards/job-card-status-stepper' +import { ClipboardListIcon } from 'lucide-react' +import React from 'react' + +export default async function JobCardDetailLayout(props: { params: Promise<{ id: string }>, children: React.ReactNode }) { + const { id } = await props.params + const api = await getServerApi() + const jobCard = await api.jobCards.show(id) + const data = (jobCard as any)?.data ?? jobCard + const title = data?.title || 'Job Card Details' + const status = data?.status || 'draft' + + return ( + + w.charAt(0).toUpperCase() + w.slice(1)).join(" ")}` : undefined} + icon={} + backHref="/sales/job-cards" + actions={} + subHeader={} + tabs={[ + { + href: `/sales/job-cards/${id}`, + label: 'Details' + }, + { + href: `/sales/job-cards/${id}/customer-remarks`, + label: 'Customer Remarks' + }, + { + href: `/sales/job-cards/${id}/shop-recommendations`, + label: 'Shop Recommendations' + }, + { + href: `/sales/job-cards/${id}/attachments`, + label: 'Attachments' + }, + ]} + > + {props.children} + + + ) +} diff --git a/apps/dashboard/app/(authenticated)/sales/job-cards/[id]/page.tsx b/apps/dashboard/app/(authenticated)/sales/job-cards/[id]/page.tsx new file mode 100644 index 0000000..9f4ce3b --- /dev/null +++ b/apps/dashboard/app/(authenticated)/sales/job-cards/[id]/page.tsx @@ -0,0 +1,20 @@ +import { getServerApi } from '@garage/api/server' +import { JobCardGeneralInfo } from '@/modules/job-cards/job-card-general-info' +import DashboardPage from '@/base/components/layout/dashboard/dashboard-page' + +export default async function JobCardDetailPage(props: { params: Promise<{ id: string }> }) { + const { id } = await props.params + const api = await getServerApi() + const jobCard = await api.jobCards.show(id) + const data = (jobCard as any)?.data ?? jobCard + + if (!data) { + return
Job card not found.
+ } + + return ( + + + + ) +} diff --git a/apps/dashboard/app/(authenticated)/sales/job-cards/[id]/shop-recommendations/page.tsx b/apps/dashboard/app/(authenticated)/sales/job-cards/[id]/shop-recommendations/page.tsx new file mode 100644 index 0000000..030cf47 --- /dev/null +++ b/apps/dashboard/app/(authenticated)/sales/job-cards/[id]/shop-recommendations/page.tsx @@ -0,0 +1,152 @@ +"use client" + +import { useParams } from "next/navigation" +import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query" +import { type ColumnDef } from "@tanstack/react-table" +import { useState } from "react" +import { Plus, Trash2 } from "lucide-react" +import { toast } from "sonner" + +import { useAuthApi } from "@/shared/useApi" +import { DataTable, ColumnHeader } from "@/shared/data-view/table-view" +import { confirm } from "@/shared/components/confirm-dialog" +import { Button } from "@/shared/components/ui/button" +import { Card, CardContent } from "@/shared/components/ui/card" +import { + Dialog, + DialogContent, + DialogHeader, + DialogTitle, +} from "@/shared/components/ui/dialog" +import { JobCardRecommendationForm } from "@/modules/job-cards/job-card-recommendation-form" + +type ShopRecommendation = { + id: number + job_card_id?: number + recommendation?: string + created_at: string + updated_at: string +} + +export default function ShopRecommendationsPage() { + const { id: jobCardId } = useParams<{ id: string }>() + const api = useAuthApi() + const queryClient = useQueryClient() + const [dialogOpen, setDialogOpen] = useState(false) + + const queryKey = ["job-card-recommendations", jobCardId] + + const { data, isLoading } = useQuery({ + queryKey, + queryFn: async () => { + const result = await api.jobCards.show(jobCardId) + const d = (result as any)?.data ?? result + return d?.shop_recommendations ?? [] + }, + }) + + const deleteMutation = useMutation({ + mutationFn: () => api.jobCards.deleteShopRecommendation(jobCardId), + onSuccess: () => { + toast.success("Shop recommendation deleted successfully.") + queryClient.invalidateQueries({ queryKey }) + }, + onError: () => { + toast.error("Failed to delete shop recommendation.") + }, + }) + + const handleDelete = async (rec: ShopRecommendation) => { + const confirmed = await confirm({ + title: "Delete Shop Recommendation", + description: "Are you sure you want to delete this recommendation?", + confirmLabel: "Delete", + variant: "destructive", + }) + if (confirmed) { + deleteMutation.mutate() + } + } + + const columns: ColumnDef[] = [ + { + accessorKey: "recommendation", + header: ({ column }) => , + cell: ({ getValue }) => { + const val = getValue() + return val || "—" + }, + }, + { + accessorKey: "created_at", + header: ({ column }) => , + cell: ({ getValue }) => { + const val = getValue() + return val ? new Date(val).toLocaleDateString() : "—" + }, + }, + { + id: "actions", + header: () => Actions, + cell: ({ row }) => ( + + ), + enableSorting: false, + }, + ] + + const recommendations = Array.isArray(data) ? data : [] + + const pagination = { + page: 1, + pageSize: 100, + pageCount: 1, + total: recommendations.length, + } + + return ( +
+
+ +
+ + + + {}} + isLoading={isLoading} + /> + + + + + + + Add Shop Recommendation + + { + setDialogOpen(false) + queryClient.invalidateQueries({ queryKey }) + }} + /> + + +
+ ) +} diff --git a/apps/dashboard/app/(authenticated)/sales/job-cards/page.tsx b/apps/dashboard/app/(authenticated)/sales/job-cards/page.tsx new file mode 100644 index 0000000..7eaadd2 --- /dev/null +++ b/apps/dashboard/app/(authenticated)/sales/job-cards/page.tsx @@ -0,0 +1,111 @@ +"use client" + +import { ResourcePage } from '@/shared/data-view/resource-page' +import { ColumnHeader } from '@/shared/data-view/table-view' +import FormDialog from '@/shared/components/form-dialog' +import { JobCardForm } from '@/modules/job-cards/job-card-form' +import { JOB_CARD_ROUTES } from '@garage/api' +import type { JobCardsClient } from '@garage/api' +import { ClipboardListIcon } from 'lucide-react' +import { Badge } from '@/shared/components/ui/badge' +import { useRouter } from 'next/navigation' + +type JobCardItem = { + id: number + title?: string + status?: string + check_in_date?: string + km_in?: number + created_at?: string +} + +const statusColorMap: Record = { + draft: "secondary", + check_in: "default", + in_progress: "default", + completed: "default", + invoiced: "outline", + cancelled: "destructive", +} + +const formatStatus = (status?: string) => { + if (!status) return "—" + return status + .split("_") + .map((w) => w.charAt(0).toUpperCase() + w.slice(1)) + .join(" ") +} + +export default function JobCardsPage() { + const router = useRouter() + + return ( + + pageTitle="Job Cards" + routeKey={JOB_CARD_ROUTES.INDEX} + getClient={(api) => api.jobCards} + onRowClick={(row) => router.push(`/sales/job-cards/${row.id}`)} + headerProps={({ selectedItem, invalidateQuery }) => ({ + actions: ( + + {(resourceId) => ( + + )} + + ), + })} + columns={({ actionsColumn }) => [ + { + accessorKey: "title", + header: ({ column }) => , + cell: ({ row }) => { + const item = row.original as unknown as JobCardItem + return ( +
+ + {item.title} +
+ ) + }, + }, + { + accessorKey: "status", + header: ({ column }) => , + cell: ({ row }) => { + const item = row.original as unknown as JobCardItem + return ( + + {formatStatus(item.status)} + + ) + }, + }, + { + accessorKey: "check_in_date", + header: ({ column }) => , + }, + { + accessorKey: "km_in", + header: ({ column }) => , + cell: ({ row }) => { + const item = row.original as unknown as JobCardItem + return item.km_in ? Number(item.km_in).toLocaleString() : "—" + }, + }, + { + accessorKey: "created_at", + header: ({ column }) => , + cell: ({ row }) => { + const item = row.original as unknown as JobCardItem + return item.created_at ? new Date(item.created_at).toLocaleDateString() : "—" + }, + }, + actionsColumn(), + ]} + /> + ) +} diff --git a/apps/dashboard/app/(authenticated)/sales/payment-received/page.tsx b/apps/dashboard/app/(authenticated)/sales/payment-received/page.tsx new file mode 100644 index 0000000..05c48b0 --- /dev/null +++ b/apps/dashboard/app/(authenticated)/sales/payment-received/page.tsx @@ -0,0 +1,166 @@ +"use client" + +import { ResourcePage } from "@/shared/data-view/resource-page" +import { ColumnHeader } from "@/shared/data-view/table-view" +import FormDialog from "@/shared/components/form-dialog" +import { PaymentReceivedForm } from "@/modules/payment-received/payment-received-form" +import { PAYMENT_ROUTES } from "@garage/api" +import { + BadgeDollarSignIcon, + CalendarIcon, + CreditCardIcon, + HashIcon, + UserIcon, + ClipboardListIcon, +} from "lucide-react" + +type PaymentReceivedItem = { + id: number + payment_number?: string + customer_name?: string + job_card_name?: string + job_card_number?: string + payment_mode_name?: string + amount_received?: string | number + payment_date?: string + note?: string + status?: string + created_at?: string +} + +export default function PaymentReceivedPage() { + return ( + ; destroy(id: string): Promise }> + pageTitle="Payments Received" + routeKey={PAYMENT_ROUTES.RECEIVED} + getClient={(api) => ({ + list: (query?: any) => api.payments.listReceived(query), + destroy: (id: string) => api.payments.destroyReceived(id), + })} + headerProps={({ invalidateQuery }) => ({ + actions: ( + + {(resourceId) => ( + + )} + + ), + })} + columns={({ actionsColumn }) => [ + { + accessorKey: "payment_number", + header: ({ column }) => , + cell: ({ row }) => { + const item = row.original as unknown as PaymentReceivedItem + return ( +
+ + {item.payment_number || "—"} +
+ ) + }, + }, + { + accessorKey: "customer_name", + header: ({ column }) => , + cell: ({ row }) => { + const item = row.original as unknown as PaymentReceivedItem + return ( +
+ + {item.customer_name || "—"} +
+ ) + }, + }, + { + accessorKey: "job_card_name", + header: ({ column }) => , + cell: ({ row }) => { + const item = row.original as unknown as PaymentReceivedItem + const label = item.job_card_number || item.job_card_name + return ( +
+ + {label || "—"} +
+ ) + }, + }, + { + accessorKey: "amount_received", + header: ({ column }) => , + cell: ({ row }) => { + const item = row.original as unknown as PaymentReceivedItem + const amount = item.amount_received + ? Number(item.amount_received).toLocaleString(undefined, { + minimumFractionDigits: 2, + maximumFractionDigits: 2, + }) + : "—" + return ( +
+ + + {amount} + +
+ ) + }, + }, + { + accessorKey: "payment_mode_name", + header: ({ column }) => , + cell: ({ row }) => { + const item = row.original as unknown as PaymentReceivedItem + return ( +
+ + {item.payment_mode_name || "—"} +
+ ) + }, + }, + { + accessorKey: "payment_date", + header: ({ column }) => , + cell: ({ row }) => { + const item = row.original as unknown as PaymentReceivedItem + const formatted = item.payment_date + ? new Date(item.payment_date).toLocaleDateString(undefined, { + year: "numeric", + month: "short", + day: "numeric", + }) + : "—" + return ( +
+ + {formatted} +
+ ) + }, + }, + { + accessorKey: "note", + header: () => Note, + enableSorting: false, + cell: ({ row }) => { + const item = row.original as unknown as PaymentReceivedItem + const note = item.note + if (!note) return + return ( + + {note} + + ) + }, + }, + actionsColumn(), + ]} + /> + ) +} diff --git a/apps/dashboard/app/(authenticated)/sales/vehicles/[id]/documents/page.tsx b/apps/dashboard/app/(authenticated)/sales/vehicles/[id]/documents/page.tsx new file mode 100644 index 0000000..7313a03 --- /dev/null +++ b/apps/dashboard/app/(authenticated)/sales/vehicles/[id]/documents/page.tsx @@ -0,0 +1,144 @@ +"use client" + +import { useParams } from "next/navigation" +import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query" +import { type ColumnDef } from "@tanstack/react-table" +import { useState } from "react" +import { Plus, Trash2 } from "lucide-react" +import { toast } from "sonner" + +import { useAuthApi } from "@/shared/useApi" +import { DataTable, ColumnHeader } from "@/shared/data-view/table-view" +import { confirm } from "@/shared/components/confirm-dialog" +import { Button } from "@/shared/components/ui/button" +import { Card, CardContent } from "@/shared/components/ui/card" +import { + Dialog, + DialogContent, + DialogHeader, + DialogTitle, +} from "@/shared/components/ui/dialog" +import { VehicleDocumentForm } from "@/modules/vehicles/vehicle-document-form" + +type VehicleDocument = { + id: number + name: string + created_at: string + updated_at: string +} + +export default function VehicleDocumentsPage() { + const { id: vehicleId } = useParams<{ id: string }>() + const api = useAuthApi() + const queryClient = useQueryClient() + const [dialogOpen, setDialogOpen] = useState(false) + + const queryKey = ["vehicle-documents", vehicleId] + + const { data, isLoading } = useQuery({ + queryKey, + queryFn: () => api.vehicleDocuments.listDocuments({ vehicle_id: vehicleId }), + }) + + const deleteMutation = useMutation({ + mutationFn: (id: number) => api.vehicleDocuments.destroyDocument(String(id)), + onSuccess: () => { + toast.success("Document deleted successfully.") + queryClient.invalidateQueries({ queryKey }) + }, + onError: () => { + toast.error("Failed to delete document.") + }, + }) + + const handleDelete = async (doc: VehicleDocument) => { + const confirmed = await confirm({ + title: "Delete Document", + description: `Are you sure you want to delete "${doc.name}"?`, + confirmLabel: "Delete", + variant: "destructive", + }) + if (confirmed) { + deleteMutation.mutate(doc.id) + } + } + + const columns: ColumnDef[] = [ + { + accessorKey: "name", + header: ({ column }) => , + }, + { + accessorKey: "created_at", + header: ({ column }) => , + cell: ({ getValue }) => { + const val = getValue() + return val ? new Date(val).toLocaleDateString() : "—" + }, + }, + { + id: "actions", + header: () => Actions, + cell: ({ row }) => ( + + ), + enableSorting: false, + }, + ] + + const documents = (data as any)?.data ?? [] + const meta = (data as any)?.meta + + const pagination = { + page: meta?.current_page ?? 1, + pageSize: meta?.per_page ?? 15, + pageCount: meta?.last_page ?? 1, + total: meta?.total ?? 0, + } + + return ( +
+
+ +
+ + + + {}} + isLoading={isLoading} + /> + + + + + + + Upload Document + + { + queryClient.invalidateQueries({ queryKey }) + setDialogOpen(false) + }} + /> + + +
+ ) +} diff --git a/apps/dashboard/app/(authenticated)/sales/vehicles/[id]/estimates/page.tsx b/apps/dashboard/app/(authenticated)/sales/vehicles/[id]/estimates/page.tsx new file mode 100644 index 0000000..bf944e0 --- /dev/null +++ b/apps/dashboard/app/(authenticated)/sales/vehicles/[id]/estimates/page.tsx @@ -0,0 +1,102 @@ + +"use client" + +import { use } from "react" +import { ResourcePage } from '@/shared/data-view/resource-page' +import { ColumnHeader } from '@/shared/data-view/table-view' +import FormDialog from '@/shared/components/form-dialog' +import { EstimateForm } from '@/modules/estimates/estimate-form' +import { ESTIMATE_ROUTES } from '@garage/api' +import type { EstimatesClient } from '@garage/api' +import { FileTextIcon } from 'lucide-react' +import { useVehicle } from '@/modules/vehicles/vehicle-context' + +type EstimateItem = { + id: number + title?: string + estimate_number?: string + date?: string + customer_name?: string + has_insurance?: boolean + created_at?: string +} + +export default function VehicleEstimatesPage({ params }: { params: Promise<{ id: string }> }) { + const { id: vehicleId } = use(params) + const vehicle = useVehicle() + + return ( + <> + + toolbar={({ invalidateQuery, selectedItem, closeDialog }) => ( + + {(resourceId) => ( + { + closeDialog(); + invalidateQuery(); + }} + /> + )} + + ) + } + pageTitle="Vehicle Estimates" + routeKey={ESTIMATE_ROUTES.INDEX} + getClient={(api) => api.estimates} + extraParams={{ vehicle_id: vehicleId }} + header={ + null + } + columns={({ actionsColumn }) => [ + { + accessorKey: "title", + header: ({ column }) => , + cell: ({ row }) => { + const item = row.original as unknown as EstimateItem + return ( +
+ + {item.title} +
+ ) + }, + }, + { + accessorKey: "estimate_number", + header: ({ column }) => , + }, + { + accessorKey: "customer_name", + header: ({ column }) => , + }, + { + accessorKey: "date", + header: ({ column }) => , + }, + { + accessorKey: "has_insurance", + header: ({ column }) => , + cell: ({ row }) => { + const item = row.original as unknown as EstimateItem + return item.has_insurance ? "Yes" : "No" + }, + }, + { + accessorKey: "created_at", + header: ({ column }) => , + cell: ({ row }) => { + const item = row.original as unknown as EstimateItem + return item.created_at ? new Date(item.created_at).toLocaleDateString() : "—" + }, + }, + actionsColumn(), + ]} + /> + + ) +} diff --git a/apps/dashboard/app/(authenticated)/sales/vehicles/[id]/layout.tsx b/apps/dashboard/app/(authenticated)/sales/vehicles/[id]/layout.tsx new file mode 100644 index 0000000..fbcc34f --- /dev/null +++ b/apps/dashboard/app/(authenticated)/sales/vehicles/[id]/layout.tsx @@ -0,0 +1,50 @@ +import { DashboardDetailsPageLayoutProps, DashboardDetailsPage } from '@/base/components/layout/dashboard' +import { getServerApi } from '@garage/api/server' +import { VehicleActions } from '@/modules/vehicles/vehicle-actions' +import { Car } from 'lucide-react' +import React from 'react' +import { CONSTANTS } from '@/config/constants' + +export default async function layout(props: { params: Promise<{ id: string }>, children: React.ReactNode }) { + const { id } = await props.params + const api = await getServerApi() + const vehicle = await api.vehicles.getById(id) + const title = `${vehicle.data?.make || ''} ${vehicle.data?.model || ''}`.trim() || 'Vehicle Details' + return ( + <> + } + tabs={[ + { + href: `/sales/vehicles/${id}`, + label: 'Details' + }, + { + href: `/sales/vehicles/${id}/owners`, + label: 'Owners' + }, + { + href: `/sales/vehicles/${id}/documents`, + label: "Documents" + }, + { + href: `/sales/vehicles/${id}/mileage`, + label: "Mileage" + }, + { + href: `/sales/vehicles/${id}/estimates`, + label: "Estimates" + } + ]} + > + {props.children} + + + ) +} diff --git a/apps/dashboard/app/(authenticated)/sales/vehicles/[id]/mileage/page.tsx b/apps/dashboard/app/(authenticated)/sales/vehicles/[id]/mileage/page.tsx new file mode 100644 index 0000000..c8e79e5 --- /dev/null +++ b/apps/dashboard/app/(authenticated)/sales/vehicles/[id]/mileage/page.tsx @@ -0,0 +1,191 @@ +"use client" + +import { useParams } from "next/navigation" +import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query" +import { type ColumnDef } from "@tanstack/react-table" +import { useState } from "react" +import { Plus, Pencil, Trash2, MoreHorizontal } from "lucide-react" +import { toast } from "sonner" + +import { useAuthApi } from "@/shared/useApi" +import { DataTable, ColumnHeader } from "@/shared/data-view/table-view" +import { confirm } from "@/shared/components/confirm-dialog" +import { Button } from "@/shared/components/ui/button" +import { Card, CardContent } from "@/shared/components/ui/card" +import { + Dialog, + DialogContent, + DialogHeader, + DialogTitle, +} from "@/shared/components/ui/dialog" +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from "@/shared/components/ui/dropdown-menu" +import { MileageForm } from "@/modules/vehicles/mileage-form" +import DashboardPage from "@/base/components/layout/dashboard/dashboard-page" + +type MileageRecord = { + id: number + name: string + created_at: string + updated_at: string +} + +export default function VehicleMileagePage() { + const { id: vehicleId } = useParams<{ id: string }>() + const api = useAuthApi() + const queryClient = useQueryClient() + const [dialogOpen, setDialogOpen] = useState(false) + const [editItem, setEditItem] = useState(null) + + const queryKey = ["vehicle-mileage", vehicleId] + + const { data, isLoading } = useQuery({ + queryKey, + queryFn: () => api.vehicleDocuments.listMileage({ vehicle_id: vehicleId }), + }) + + const deleteMutation = useMutation({ + mutationFn: (id: number) => { + const promise = api.vehicleDocuments.destroyMileage(String(id)) + toast.promise(promise, { + loading: "Deleting...", + success: "Mileage record deleted successfully.", + error: "Failed to delete mileage record.", + }) + return promise + }, + onSuccess: () => { + queryClient.invalidateQueries({ queryKey }) + }, + }) + + const handleDelete = async (record: MileageRecord) => { + const confirmed = await confirm({ + title: "Delete Mileage Record", + description: `Are you sure you want to delete this mileage record?`, + confirmLabel: "Delete", + variant: "destructive", + }) + if (confirmed) { + deleteMutation.mutate(record.id) + } + } + + const handleEdit = (record: MileageRecord) => { + setEditItem(record) + setDialogOpen(true) + } + + const handleCreate = () => { + setEditItem(null) + setDialogOpen(true) + } + + const columns: ColumnDef[] = [ + { + accessorKey: "name", + header: ({ column }) => , + }, + { + accessorKey: "created_at", + header: ({ column }) => , + cell: ({ getValue }) => { + const val = getValue() + return val ? new Date(val).toLocaleDateString() : "—" + }, + }, + { + id: "actions", + header: () => Actions, + cell: ({ row }) => ( + + + + + + handleEdit(row.original)}> + + Edit + + handleDelete(row.original)} + > + + Delete + + + + ), + enableSorting: false, + }, + ] + + const records = (data as any)?.data ?? [] + const meta = (data as any)?.meta + + const pagination = { + page: meta?.current_page ?? 1, + pageSize: meta?.per_page ?? 15, + pageCount: meta?.last_page ?? 1, + total: meta?.total ?? 0, + } + + return ( +
+ + + + + Add Mileage + + } + title='Milage' + > + + + + {}} + isLoading={isLoading} + /> + + + + + + + + + {editItem ? "Edit Mileage" : "Add Mileage"} + + + { + queryClient.invalidateQueries({ queryKey }) + setDialogOpen(false) + setEditItem(null) + }} + /> + + +
+ ) +} diff --git a/apps/dashboard/app/(authenticated)/sales/vehicles/[id]/owners/page.tsx b/apps/dashboard/app/(authenticated)/sales/vehicles/[id]/owners/page.tsx new file mode 100644 index 0000000..725ce0d --- /dev/null +++ b/apps/dashboard/app/(authenticated)/sales/vehicles/[id]/owners/page.tsx @@ -0,0 +1,240 @@ +"use client" + +import { useParams } from "next/navigation" +import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query" +import { type ColumnDef } from "@tanstack/react-table" +import { useState } from "react" +import { Unlink, Plus, Loader2 } from "lucide-react" +import { toast } from "sonner" + +import { useAuthApi } from "@/shared/useApi" +import { DataTable } from "@/shared/data-view/table-view" +import { ColumnHeader } from "@/shared/data-view/table-view" +import { confirm } from "@/shared/components/confirm-dialog" +import { Button } from "@/shared/components/ui/button" +import { Card, CardContent } from "@/shared/components/ui/card" +import { + Dialog, + DialogContent, + DialogHeader, + DialogTitle, +} from "@/shared/components/ui/dialog" +import { RhfAsyncSelectField } from "@/shared/components/form" +import { Rhform } from "@/shared/components/form" +import { useForm } from "react-hook-form" +import { TableCell, TableRow } from "@/shared/components/ui/table" +import { ApiResponse, CustomersClient } from "@garage/api" +import { paths } from "@garage/api/types" +import DashboardPage from "@/base/components/layout/dashboard/dashboard-page" + +type Owner = { + id: number + name: string + created_at: string + updated_at: string +} + +const mapCustomerOption = (item: any) => ({ + value: String(item.id), + label: `${item.first_name ?? ""} ${item.last_name ?? ""}`.trim() || item.name || `Customer #${item.id}`, +}) + +const STORE_OBJECT = { + getOptionValue: (o: any) => o, + getOptionLabel: (o: any) => o.label, +} + +export default function VehicleOwnersPage() { + const { id: vehicleId } = useParams<{ id: string }>() + const api = useAuthApi() + const queryClient = useQueryClient() + const [linkDialogOpen, setLinkDialogOpen] = useState(false) + + const queryKey = ["vehicle-owners", vehicleId] + + const { data, isLoading } = useQuery({ + queryKey, + queryFn: () => api.vehicles.getOwners(vehicleId), + }) + + const unlinkMutation = useMutation({ + mutationFn: (customerId: number) => + api.vehicles.unlinkCustomer({ customer_id: customerId, vehicle_id: Number(vehicleId) }), + onSuccess: () => { + toast.success("Owner unlinked successfully.") + queryClient.invalidateQueries({ queryKey }) + }, + onError: () => { + toast.error("Failed to unlink owner.") + }, + }) + + const handleUnlink = async (owner: Owner) => { + const confirmed = await confirm({ + title: "Unlink Owner", + description: `Are you sure you want to unlink "${owner.name}" from this vehicle?`, + confirmLabel: "Unlink", + variant: "destructive", + }) + if (confirmed) { + unlinkMutation.mutate(owner.id) + } + } + + const columns: ColumnDef[] = [ + { + accessorKey: "first_name", + header: ({ column }) => , + }, + { + accessorKey: "phone", + header: ({ column }) => , + }, + { + accessorKey: "created_at", + header: ({ column }) => , + cell: ({ getValue }) => { + const val = getValue() + return val ? new Date(val).toLocaleDateString() : "—" + }, + }, + { + id: "actions", + header: () => Actions, + cell: ({ row }) => ( + + ), + enableSorting: false, + }, + ] + + const owners = (data as any)?.data ?? [] + + + // [BackendIssue] [FrontendWorkaround] : pagination should be replaced with "meta" property + const meta = (data as any)?.pagination + + const pagination = { + page: meta?.current_page ?? 1, + pageSize: meta?.per_page ?? 15, + pageCount: meta?.last_page ?? 1, + total: meta?.total ?? 0, + } + + return ( + setLinkDialogOpen(true)}> + + Add Owner + + }> + + + + + { }} + isLoading={isLoading} + /> + + { + queryClient.invalidateQueries({ queryKey }) + setLinkDialogOpen(false) + }} + /> + + + + ) +} + +function LinkOwnerDialog({ + vehicleId, + open, + onOpenChange, + onSuccess, +}: { + vehicleId: string + open: boolean + onOpenChange: (open: boolean) => void + onSuccess: () => void +}) { + const api = useAuthApi() + + const form = useForm<{ customer: { value: string; label: string } | null }>({ + defaultValues: { customer: null }, + }) + + const linkMutation = useMutation({ + mutationFn: (customerId: number) => + api.vehicles.linkCustomer({ customer_id: customerId, vehicle_id: Number(vehicleId) }), + onSuccess: () => { + toast.success("Owner linked successfully.") + form.reset() + onSuccess() + }, + onError: () => { + toast.error("Failed to link owner.") + }, + }) + + const handleSubmit = (values: { customer: { value: string; label: string } | null }) => { + if (!values.customer) return + linkMutation.mutate(Number(values.customer.value)) + } + + return ( + + + + Add Owner + + +
+ api.customers.list()} + mapOption={mapCustomerOption} + {...STORE_OBJECT} + /> +
+ + +
+
+
+
+
+ ) +} diff --git a/apps/dashboard/app/(authenticated)/sales/vehicles/[id]/page.tsx b/apps/dashboard/app/(authenticated)/sales/vehicles/[id]/page.tsx new file mode 100644 index 0000000..1460d29 --- /dev/null +++ b/apps/dashboard/app/(authenticated)/sales/vehicles/[id]/page.tsx @@ -0,0 +1,18 @@ + +import { getServerApi } from '@garage/api/server' +import { VehicleGeneralInfo } from '@/modules/vehicles/vehicle-general-info' +import DashboardPage from '@/base/components/layout/dashboard/dashboard-page' + +export default async function page(props: { params: Promise<{ id: string }> }) { + const { id } = await props.params + const api = await getServerApi() + const vehicle = await api.vehicles.getById(id) + + if (!vehicle.data) { + return
Vehicle not found.
+ } + + return + + +} diff --git a/apps/dashboard/app/(authenticated)/sales/vehicles/page.tsx b/apps/dashboard/app/(authenticated)/sales/vehicles/page.tsx index f310d47..5c7a8d1 100644 --- a/apps/dashboard/app/(authenticated)/sales/vehicles/page.tsx +++ b/apps/dashboard/app/(authenticated)/sales/vehicles/page.tsx @@ -1,21 +1,35 @@ "use client" +import { useRouter } from 'next/navigation' import { ResourcePage } from '@/shared/data-view/resource-page' import { ColumnHeader } from '@/shared/data-view/table-view' +import FormDialog from '@/shared/components/form-dialog' import { VehicleForm } from '@/modules/vehicles/vehicle-form' import { VEHICLE_ROUTES } from '@garage/api' import type { VehiclesClient } from '@garage/api' import { CarIcon } from 'lucide-react' export default function VehiclesPage() { + const router = useRouter() return ( pageTitle="Vehicles" - title="Vehicle" routeKey={VEHICLE_ROUTES.INDEX} getClient={(api) => api.vehicles} - - + onRowClick={(row) => router.push(`/sales/vehicles/${(row as any).id}`)} + headerProps={({ selectedItem, invalidateQuery }) => ({ + actions: ( + + {(resourceId) => ( + + )} + + ), + })} columns={({ actionsColumn }) => [ { accessorKey: "name", @@ -86,13 +100,6 @@ export default function VehiclesPage() { }, actionsColumn(), ]} - renderForm={({ resourceId, initialData, onSuccess }) => ( - - )} /> ) } \ No newline at end of file diff --git a/apps/dashboard/app/(authenticated)/settings/shop-type/page.tsx b/apps/dashboard/app/(authenticated)/settings/shop-type/page.tsx index dca0f82..a7566f1 100644 --- a/apps/dashboard/app/(authenticated)/settings/shop-type/page.tsx +++ b/apps/dashboard/app/(authenticated)/settings/shop-type/page.tsx @@ -2,6 +2,7 @@ import { ResourcePage } from "@/shared/data-view/resource-page" import { ColumnHeader } from "@/shared/data-view/table-view" +import FormDialog from "@/shared/components/form-dialog" import { ShopTypeForm } from "@/modules/settings/shop-type/shop-type-form" import { SHOP_TYPE_ROUTES } from "@garage/api" import type { ShopTypesClient } from "@garage/api" @@ -11,9 +12,21 @@ export default function ShopTypesPage() { return ( pageTitle="Shop Types" - title="Shop Type" routeKey={SHOP_TYPE_ROUTES.INDEX} getClient={(api) => api.shopTypes} + headerProps={({ selectedItem, invalidateQuery }) => ({ + actions: ( + + {(resourceId) => ( + + )} + + ), + })} columns={({ actionsColumn }) => [ { accessorKey: "title", @@ -42,13 +55,6 @@ export default function ShopTypesPage() { }, actionsColumn(), ]} - renderForm={({ resourceId, initialData, onSuccess }) => ( - - )} /> ) } diff --git a/apps/dashboard/app/(authenticated)/settings/tax-rates/page.tsx b/apps/dashboard/app/(authenticated)/settings/tax-rates/page.tsx new file mode 100644 index 0000000..4c120cf --- /dev/null +++ b/apps/dashboard/app/(authenticated)/settings/tax-rates/page.tsx @@ -0,0 +1,61 @@ +"use client" + +import { TaxForm } from "@/modules/settings/tax-rates/tax-form" +import { ResourcePage } from "@/shared/data-view/resource-page" +import { ColumnHeader } from "@/shared/data-view/table-view" +import FormDialog from "@/shared/components/form-dialog" + import { TAX_ROUTES } from "@garage/api" +import type { TaxesClient } from "@garage/api" +import { CheckIcon, XIcon } from "lucide-react" + +export default function TaxesPage() { + return ( + + pageTitle="Tax & Rates" + routeKey={TAX_ROUTES.INDEX} + getClient={(api) => api.taxes} + headerProps={({ selectedItem, invalidateQuery }) => ({ + actions: ( + + {(resourceId) => ( + + )} + + ), + })} + columns={({ actionsColumn }) => [ + { + accessorKey: "title", + header: ({ column }) => , + }, + { + accessorKey: "rate", + header: ({ column }) => , + cell: ({ row }) => `${(row.original as any).rate ?? 0}%`, + }, + { + accessorKey: "note", + header: ({ column }) => , + cell: ({ row }) => ( + + {(row.original as any).note ?? "—"} + + ), + }, + { + accessorKey: "is_default", + header: ({ column }) => , + cell: ({ row }) => + (row.original as any).is_default + ? + : , + }, + actionsColumn(), + ]} + /> + ) +} diff --git a/apps/dashboard/base/components/layout/dashboard/dashboard-details-page-layout.tsx b/apps/dashboard/base/components/layout/dashboard/dashboard-details-page-layout.tsx new file mode 100644 index 0000000..d0f78a7 --- /dev/null +++ b/apps/dashboard/base/components/layout/dashboard/dashboard-details-page-layout.tsx @@ -0,0 +1,129 @@ +"use client" + +import React from "react" +import Link from "next/link" +import { usePathname } from "next/navigation" +import { cn } from "@/shared/lib/utils" +import { Avatar, AvatarFallback, AvatarImage } from "@/shared/components/ui/avatar" +import { Button } from "@/shared/components/ui/button" +import { ArrowLeft } from "lucide-react" +import { DashboardHeader } from "./dashboard-header" + +type Tab = { + /** URL path this tab navigates to */ + href: string + label: string +} + +type DashboardDetailsPageLayoutProps = { + /** Primary title displayed in the header */ + title: string + /** Secondary text below the title */ + description?: string + /** Avatar image URL */ + avatarSrc?: string + /** Fallback text for the avatar (e.g. initials) */ + avatarFallback?: string + /** Icon element rendered instead of avatar when no avatar is provided */ + icon?: React.ReactNode + /** Action buttons rendered on the right side of the header */ + actions?: React.ReactNode + /** Optional back navigation URL */ + backHref?: string + /** Content rendered between the header and tabs */ + subHeader?: React.ReactNode + /** Route-based tab definitions */ + tabs?: Tab[] + /** Content from the active route (Next.js children) */ + children?: React.ReactNode + className?: string +} + +export default function DashboardDetailsPageLayout({ + title, + description, + avatarSrc, + avatarFallback, + icon, + actions, + backHref, + subHeader, + tabs, + children, + className, +}: DashboardDetailsPageLayoutProps) { + const pathname = usePathname() + + return ( +
+ + {/* Header */} +
+
+ {backHref && ( + + )} + {(avatarSrc || avatarFallback) && ( + + {avatarSrc && } + + {avatarFallback ?? title.charAt(0).toUpperCase()} + + + )} + {!avatarSrc && !avatarFallback && icon && ( +
+ {icon} +
+ )} +
+

{title}

+ {description && ( +

{description}

+ )} +
+
+ {actions && ( +
{actions}
+ )} +
+ + {/* Sub-header */} + {subHeader && ( +
{subHeader}
+ )} + + {/* Navigation tabs */} + {tabs && tabs.length > 0 && ( + + )} + + {/* Route content */} +
{children}
+
+ ) +} + +export type { DashboardDetailsPageLayoutProps, Tab as DashboardDetailsTab } diff --git a/apps/dashboard/base/components/layout/dashboard/dashboard-header.tsx b/apps/dashboard/base/components/layout/dashboard/dashboard-header.tsx index 17ab906..b93a333 100644 --- a/apps/dashboard/base/components/layout/dashboard/dashboard-header.tsx +++ b/apps/dashboard/base/components/layout/dashboard/dashboard-header.tsx @@ -39,7 +39,7 @@ import { } from "@/shared/components/ui/dropdown-menu" import { Separator } from "@/shared/components/ui/separator" -type DashboardHeaderProps = { +export type DashboardHeaderProps = { user?: UserInfo actions?: React.ReactNode className?: string diff --git a/apps/dashboard/base/components/layout/dashboard/dashboard-layout.tsx b/apps/dashboard/base/components/layout/dashboard/dashboard-layout.tsx index 4152104..515bb26 100644 --- a/apps/dashboard/base/components/layout/dashboard/dashboard-layout.tsx +++ b/apps/dashboard/base/components/layout/dashboard/dashboard-layout.tsx @@ -32,8 +32,10 @@ export function DashboardLayout({ - - {children} + +
+ {children} +
diff --git a/apps/dashboard/base/components/layout/dashboard/dashboard-page.tsx b/apps/dashboard/base/components/layout/dashboard/dashboard-page.tsx index 08325ae..a36d4fc 100644 --- a/apps/dashboard/base/components/layout/dashboard/dashboard-page.tsx +++ b/apps/dashboard/base/components/layout/dashboard/dashboard-page.tsx @@ -1,18 +1,43 @@ import { cn } from '@/shared/lib/utils' -import { title } from 'process' import React from 'react' +import { DashboardHeader, type DashboardHeaderProps } from './dashboard-header' + +type DashboardPageProps = { + children: React.ReactNode + header?: React.ReactNode | null + headerProps?: DashboardHeaderProps + toolbar?: React.ReactNode + title?: string + fullscreen?: boolean +} + +export default function DashboardPage({ children, header, headerProps, title, fullscreen, toolbar }: DashboardPageProps) { + const resolvedHeader = header !== undefined + ? header + : -export default function DashboardPage({ children, header, title, fullscreen }: { children: React.ReactNode, header: React.ReactNode, title?: string, fullscreen?: boolean }) { return (
-
- {header} -
-
- { - title && -

{title}

- } + {resolvedHeader !== null && ( +
+ {resolvedHeader} +
+ )} +
+ {(title || toolbar) &&
+ + { + title && +

{title}

+ } + { + toolbar && +
+ {toolbar} +
+ } + +
} {children}
diff --git a/apps/dashboard/base/components/layout/dashboard/index.ts b/apps/dashboard/base/components/layout/dashboard/index.ts index 21d6b95..f52e096 100644 --- a/apps/dashboard/base/components/layout/dashboard/index.ts +++ b/apps/dashboard/base/components/layout/dashboard/index.ts @@ -1,3 +1,6 @@ export { DashboardLayout } from "./dashboard-layout" export { AppSidebar } from "./app-sidebar" export { DashboardHeader } from "./dashboard-header" +export type { DashboardHeaderProps } from "./dashboard-header" +export { default as DashboardDetailsPage } from "./dashboard-details-page-layout" +export type { DashboardDetailsPageLayoutProps, DashboardDetailsTab } from "./dashboard-details-page-layout" diff --git a/apps/dashboard/config/constants.ts b/apps/dashboard/config/constants.ts new file mode 100644 index 0000000..113e235 --- /dev/null +++ b/apps/dashboard/config/constants.ts @@ -0,0 +1,4 @@ +export const CONSTANTS = { + apiUrl: process.env.NEXT_PUBLIC_API_URL || "http://localhost:4000", + getAssetUrl: (path: string) => `${CONSTANTS.apiUrl}/${path}`, +} \ No newline at end of file diff --git a/apps/dashboard/config/navGroups.tsx b/apps/dashboard/config/navGroups.tsx new file mode 100644 index 0000000..0387e19 --- /dev/null +++ b/apps/dashboard/config/navGroups.tsx @@ -0,0 +1,182 @@ +import type { NavGroup } from "@/base/types/navigation" + +import { + AlarmClockIcon, + AwardIcon, + BanknoteArrowDownIcon, + BarChart3Icon, + BellRingIcon, + BookIcon, + BriefcaseBusinessIcon, + Building2Icon, + CalendarCheck2Icon, + CalendarDaysIcon, + LayoutDashboardIcon, + ClipboardListIcon, + UsersIcon, + CalendarIcon, + CarIcon, + ClipboardCheckIcon, + Clock3Icon, + ClockIcon, + GemIcon, + GitBranchIcon, + HandCoinsIcon, + ListIcon, + ListTodoIcon, + MegaphoneIcon, + PackageIcon, + PhoneCallIcon, + PlugZapIcon, + ReceiptIcon, + ReceiptTextIcon, + SettingsIcon, + ShoppingBasketIcon, + CircleDollarSign, + StarIcon, + StoreIcon, + TimerIcon, + UserCogIcon, + WalletIcon, + WrenchIcon, + ShoppingCartIcon, +} from "lucide-react" +export const navGroups: NavGroup[] = [ + { + items: [ + { + title: "Dashboard", + href: "/", + icon: , + }, + { + title: "Job Cards", + href: "/sales/job-cards", + icon: , + }, + { + title: "Customer & Vehicles", + href: "/customer-vehicles", + icon: , + }, + { + title: "Reports", + href: "/reports", + icon: , + }, + ], + }, + { + label: "Management", + items: [ + { + title: "Calendars", + href: "/calendars", + icon: , + items: [ + { title: "Work Schedule", href: "/calendar/work-schedule/list", icon: }, + { title: "Appointments", href: "/calendar/appointment/list", icon: }, + ], + }, + { + title: "Sales", + href: "/sales", + icon: , + items: [ + { title: "Customers", href: "/sales/customers", icon: }, + { title: "Vehicles", href: "/sales/vehicles", icon: }, + { title: "Inspections", href: "/sales/inspections", icon: }, + { title: "Estimates", href: "/sales/estimates", icon: }, + { title: "Job Cards", href: "/sales/job-cards", icon: }, + { title: "Invoices", href: "/sales/invoice", icon: }, + { title: "Payments Received", href: "/sales/payment-received", icon: }, + { title: "Credit Notes", href: "/sales/credit-notes", icon: }, + ], + }, + { + title: "Purchases", + href: "/purchases", + icon: , + items: [ + { title: "Vendors", href: "/purchase/vendor", icon: }, + { title: "Expenses", href: "/purchase/expense", icon: }, + { title: "Purchase Orders", href: "/purchase/purchase-order", icon: }, + { title: "Bills", href: "/purchase/bill", icon: }, + { title: "Payments Made", href: "/purchase/payments-made", icon: }, + { title: "Vendor Credits", href: "/purchase/vendor-credit", icon: }, + ], + }, + { + title: "CRM", + href: "/crm", + icon: , + items: [ + { title: "Leads", href: "/crm/leads/list", icon: }, + { title: "Calls", href: "/crm/calls-follow-up/list", icon: }, + { title: "Tasks", href: "/crm/tasks/list", icon: }, + ], + }, + { + title: "Marketing", + href: "/marketing", + icon: , + items: [ + { title: "Service Reminders", href: "/marketing/service-reminder/list", icon: }, + { title: "Rating & Reviews", href: "/marketing/rating-review", icon: }, + { title: "Google Business Reviews", href: "/marketing/google-rating-review", icon: }, + ], + }, + { + title: "Accountants", + href: "/accountants", + icon: , + items: [ + { title: "Manual Journals", href: "/accountants/manual-journal", icon: }, + { title: "Chart of Accounts", href: "/accountants/chart-of-account", icon: }, + ], + }, + { + title: "Employees", + href: "/productivity", + icon: , + items: [ + { title: "Employees", href: "/productivity/employees", icon: }, + { title: "Time Clocks", href: "/productivity/time-clocks", icon: }, + { title: "Time Sheets", href: "/productivity/timesheet", icon: }, + { title: "Payroll", href: "/productivity/payroll", icon: }, + { title: "Payments Made", href: "/productivity/employee-payments-made", icon: }, + { title: "Shop Calendars", href: "/productivity/shop-calendars", icon: }, + { title: "Shop Timing", href: "/productivity/shop-timings", icon: }, + { title: "Holidays", href: "/productivity/holidays", icon: }, + ], + }, + { + title: "Items", + href: "/items", + icon: , + items: [ + { title: "Services", href: "/items/services", icon: }, + { title: "Parts", href: "/items/parts", icon: }, + { title: "Expense Item", href: "/items/expense-item", icon: }, + { title: "Service Group", href: "/items/service-group", icon: }, + { title: "Inspections", href: "/items/inspection", icon: }, + { title: "Inventory Adjustments", href: "/items/adjustment", icon: }, + ], + }, + { + title: "Settings", + href: "/setting", + icon: , + items: [ + { title: "Company", href: "/settings/company", icon: }, + { title: "Shop Types", href: "/settings/shop-type", icon: }, + { title: "Tax & Rates", href: "/settings/tax-rates", icon: }, + { title: "Configurations", href: "/settings/configurations/preferences/sales", icon: }, + { title: "Templates", href: "/settings/templates", icon: }, + { title: "Integrations", href: "/settings/integrations/providers", icon: }, + { title: "Master", href: "/settings/master/body-type", icon: }, + ], + }, + ], + }, +] diff --git a/apps/dashboard/modules/estimates/estimate-form.tsx b/apps/dashboard/modules/estimates/estimate-form.tsx new file mode 100644 index 0000000..83eec74 --- /dev/null +++ b/apps/dashboard/modules/estimates/estimate-form.tsx @@ -0,0 +1,215 @@ +"use client" + +import { AlertTriangle, Plus, Save } from "lucide-react" + +import { Button } from "@/shared/components/ui/button" +import { Alert, AlertTitle } from "@/shared/components/ui/alert" +import { FieldGroup } from "@/shared/components/ui/field" +import { + Rhform, + RhfTextField, + RhfTextareaField, + RhfCheckboxField, + RhfAsyncSelectField, + RhfAsyncMultiSelectField, +} from "@/shared/components/form" +import { toast } from "sonner" +import { useAuthApi } from "@/shared/useApi" +import { useResourceForm } from "@/shared/hooks/use-resource-form" +import { useFormMutation } from "@/shared/hooks/use-form-mutation" +import { toRelation, toId } from "@/shared/lib/utils" + +import { + estimateFormSchema, + type EstimateFormValues, +} from "./estimate.schema" +import { ESTIMATE_ROUTES, CUSTOMER_ROUTES, VEHICLE_ROUTES, DEPARTMENT_ROUTES, LABEL_ROUTES } from "@garage/api" + +// ── Props ── + +export type EstimateFormProps = { + resourceId?: string | null + initialData?: Partial + onSuccess?: () => void + defaultVehicleId?: string | null +} + +// ── Default values ── + +const DEFAULT_VALUES: EstimateFormValues = { + title: "", + customer: null, + vehicle: null, + department: null, + estimate_number: "", + date: "", + has_insurance: false, + remarks: "", + labels: [], +} + +// ── Mapping helpers ── + +function mapToFormValues(data: unknown): EstimateFormValues { + const d = (data as any)?.data ?? data ?? {} + + return { + title: d.title || "", + customer: toRelation(d.customer_id, d.customer_name), + vehicle: toRelation(d.vehicle_id, d.vehicle_name), + department: toRelation(d.department_id, d.department_name), + estimate_number: d.estimate_number || "", + date: d.date || "", + has_insurance: d.has_insurance ?? false, + remarks: Array.isArray(d.remarks) ? d.remarks.join("\n") : d.remarks || "", + labels: Array.isArray(d.labels) + ? d.labels.map((l: any) => ({ value: String(l.id), label: l.name })) + : [], + } +} + +function mapFormToPayload(values: EstimateFormValues) { + return { + title: values.title, + customer_id: toId(values.customer), + vehicle_id: toId(values.vehicle), + department_id: toId(values.department), + estimate_number: values.estimate_number || undefined, + date: values.date || undefined, + has_insurance: values.has_insurance, + remarks: values.remarks + ? values.remarks.split("\n").filter(Boolean) + : [], + label_ids: values.labels.map((l) => Number(l.value)), + } +} + +// ── Shared mapOption for async selects ── + +const mapLookupOption = (item: any) => ({ + value: String(item.id), + label: item.name, +}) + +const mapCustomerOption = (item: any) => ({ + value: String(item.id), + label: [item.first_name, item.last_name].filter(Boolean).join(" "), +}) + +const mapVehicleOption = (item: any) => ({ + value: String(item.id), + label: [item.year, item.make_name, item.model_name].filter(Boolean).join(" "), +}) + +const STORE_OBJECT = { getOptionValue: (o: any) => o, getOptionLabel: (o: any) => o.label } + +// ── Component ── + +export function EstimateForm({ resourceId, initialData, onSuccess }: EstimateFormProps) { + const api = useAuthApi() + + const { form, isEditing } = useResourceForm({ + schema: estimateFormSchema, + defaultValues: DEFAULT_VALUES, + resourceId, + initialData, + queryKey: [ESTIMATE_ROUTES.BY_ID, resourceId], + mapToFormValues, + }) + + const { mutate, error, isPending } = useFormMutation(form, { + mutationFn: (values: EstimateFormValues) => { + const payload = mapFormToPayload(values) + const promise = (isEditing && resourceId + ? api.estimates.update(resourceId, payload) + : api.estimates.create(payload)) as Promise + toast.promise(promise, { + loading: isEditing ? "Updating estimate..." : "Creating estimate...", + success: isEditing ? "Estimate updated successfully" : "Estimate created successfully", + error: isEditing ? "Failed to update estimate" : "Failed to create estimate", + }) + return promise + }, + onSuccess: () => { + form.reset() + onSuccess?.() + }, + }) + + return ( + mutate(values)}> + {error && ( + + + + {isEditing ? "Failed to update estimate" : "Failed to create estimate"} + + {error.message} + + )} + + + + +
+ + +
+ +
+ api.customers.list()} + mapOption={mapCustomerOption} + {...STORE_OBJECT} + /> + api.vehicles.list()} + mapOption={mapVehicleOption} + {...STORE_OBJECT} + /> +
+ +
+ api.departments.list()} + mapOption={mapLookupOption} + {...STORE_OBJECT} + /> + api.labels.list()} + mapOption={mapLookupOption} + {...STORE_OBJECT} + /> +
+ + + + + + +
+
+ ) +} diff --git a/apps/dashboard/modules/estimates/estimate.schema.ts b/apps/dashboard/modules/estimates/estimate.schema.ts new file mode 100644 index 0000000..b59b956 --- /dev/null +++ b/apps/dashboard/modules/estimates/estimate.schema.ts @@ -0,0 +1,31 @@ +import { z } from "zod" + +const relationFieldSchema = z + .object({ value: z.string(), label: z.string() }) + .nullable() + +const estimateFormSchema = z.object({ + // ── Required fields ── + title: z.string().min(1, "Title is required"), + + // ── Relations ── + customer: relationFieldSchema, + vehicle: relationFieldSchema, + department: relationFieldSchema, + + // ── Optional fields ── + estimate_number: z.string().optional(), + date: z.string().optional(), + has_insurance: z.boolean().default(false), + remarks: z.string().optional(), + + // ── Multi-select relations ── + labels: z + .array(z.object({ value: z.string(), label: z.string() })) + .default([]), +}) + +type EstimateFormValues = z.infer + +export { estimateFormSchema, relationFieldSchema } +export type { EstimateFormValues } diff --git a/apps/dashboard/modules/expenses/expense-form.tsx b/apps/dashboard/modules/expenses/expense-form.tsx new file mode 100644 index 0000000..c8f62b5 --- /dev/null +++ b/apps/dashboard/modules/expenses/expense-form.tsx @@ -0,0 +1,209 @@ +"use client" + +import { AlertTriangle, Plus, Save } from "lucide-react" + +import { Button } from "@/shared/components/ui/button" +import { Alert, AlertTitle } from "@/shared/components/ui/alert" +import { FieldGroup } from "@/shared/components/ui/field" +import { + Rhform, + RhfTextField, + RhfSelectField, + RhfAsyncSelectField, + RhfTextareaField, +} from "@/shared/components/form" +import { toast } from "sonner" +import { useAuthApi } from "@/shared/useApi" +import { useResourceForm } from "@/shared/hooks/use-resource-form" +import { useFormMutation } from "@/shared/hooks/use-form-mutation" +import { toRelation, toId } from "@/shared/lib/utils" + +import { + expenseFormSchema, + type ExpenseFormValues, +} from "./expense.schema" +import { EXPENSE_ROUTES, JOB_CARD_ROUTES, VENDOR_ROUTES, DEPARTMENT_ROUTES } from "@garage/api" + +// ── Constants ── + +const STATUS_OPTIONS = [ + { value: "open", label: "Open" }, + { value: "paid", label: "Paid" }, +] + +// ── Props ── + +export type ExpenseFormProps = { + resourceId?: string | null + initialData?: unknown + onSuccess?: () => void +} + +// ── Default values ── + +const DEFAULT_VALUES: ExpenseFormValues = { + job_card: null, + category: null, + vendor: null, + department: null, + title: "", + invoice_number: "", + expense_date: "", + notes: "", + status: "open", +} + +// ── Mapping helpers ── + +function mapToFormValues(data: unknown): ExpenseFormValues { + const d = (data as any)?.data ?? data ?? {} + + return { + job_card: toRelation(d.job_card_id, d.job_card_name), + category: toRelation(d.category_id, d.category_name), + vendor: toRelation(d.vendor_id, d.vendor_name), + department: toRelation(d.department_id, d.department_name), + title: d.title || "", + invoice_number: d.invoice_number || "", + expense_date: d.expense_date || "", + notes: d.notes || "", + status: d.status || "open", + } +} + +function mapFormToPayload(values: ExpenseFormValues) { + return { + job_card_id: toId(values.job_card), + category_id: toId(values.category), + vendor_id: toId(values.vendor), + department_id: toId(values.department), + title: values.title, + invoice_number: values.invoice_number || undefined, + expense_date: values.expense_date || undefined, + notes: values.notes || undefined, + status: values.status || undefined, + } +} + +// ── Shared mapOption for async selects ── + +const mapLookupOption = (item: any) => ({ + value: String(item.id), + label: item.name, +}) + +const STORE_OBJECT = { getOptionValue: (o: any) => o, getOptionLabel: (o: any) => o.label } + +// ── Component ── + +export function ExpenseForm({ resourceId, initialData, onSuccess }: ExpenseFormProps) { + const api = useAuthApi() + + const { form, isEditing } = useResourceForm({ + schema: expenseFormSchema, + defaultValues: DEFAULT_VALUES, + resourceId, + initialData, + mapToFormValues, + }) + + const { mutate, error, isPending } = useFormMutation(form, { + mutationFn: (values: ExpenseFormValues) => { + const payload = mapFormToPayload(values) + const promise = isEditing && resourceId + ? api.expenses.update(resourceId, payload) + : api.expenses.create(payload) + toast.promise(promise, { + loading: isEditing ? "Updating expense..." : "Creating expense...", + success: isEditing ? "Expense updated successfully" : "Expense created successfully", + error: isEditing ? "Failed to update expense" : "Failed to create expense", + }) + return promise + }, + onSuccess: () => { + form.reset() + onSuccess?.() + }, + }) + + return ( + mutate(values)}> + {error && ( + + + + {isEditing ? "Failed to update expense" : "Failed to create expense"} + + {error.message} + + )} + + + + +
+ + +
+ +
+ api.vendors.list()} + mapOption={mapLookupOption} + {...STORE_OBJECT} + /> + api.departments.list()} + mapOption={mapLookupOption} + {...STORE_OBJECT} + /> +
+ +
+ api.jobCards.list()} + mapOption={(item: any) => ({ value: String(item.id), label: item.job_card_number || item.name || `#${item.id}` })} + {...STORE_OBJECT} + /> + api.expenses.listItems()} + mapOption={mapLookupOption} + {...STORE_OBJECT} + /> +
+ + + + + + +
+
+ ) +} diff --git a/apps/dashboard/modules/expenses/expense.schema.ts b/apps/dashboard/modules/expenses/expense.schema.ts new file mode 100644 index 0000000..e87e3a8 --- /dev/null +++ b/apps/dashboard/modules/expenses/expense.schema.ts @@ -0,0 +1,25 @@ +import { z } from "zod" + +const relationFieldSchema = z + .object({ value: z.string(), label: z.string() }) + .nullable() + +const expenseFormSchema = z.object({ + // ── Relations ── + job_card: relationFieldSchema, + category: relationFieldSchema, + vendor: relationFieldSchema, + department: relationFieldSchema, + + // ── Basic info ── + title: z.string().min(1, "Title is required"), + invoice_number: z.string().optional(), + expense_date: z.string().optional(), + notes: z.string().optional(), + status: z.string().optional(), +}) + +type ExpenseFormValues = z.infer + +export { expenseFormSchema, relationFieldSchema } +export type { ExpenseFormValues } diff --git a/apps/dashboard/modules/home/appointments-summary-card.tsx b/apps/dashboard/modules/home/appointments-summary-card.tsx new file mode 100644 index 0000000..888878e --- /dev/null +++ b/apps/dashboard/modules/home/appointments-summary-card.tsx @@ -0,0 +1,68 @@ +"use client" + +import { CalendarCheck, CalendarX, Eye, Ban } from "lucide-react" +import { Card, CardContent, CardHeader, CardTitle } from "@/shared/components/ui/card" +import type { DashboardData } from "./use-dashboard-data" + +type Props = { data: DashboardData } + +export function AppointmentsSummaryCard({ data }: Props) { + const totals = data.appointments_summary?.totals + + const stats = [ + { + label: "Completed", + value: totals?.completed?.text ?? "0 Appt.", + icon: CalendarCheck, + color: "text-emerald-600", + bg: "bg-emerald-500/10", + }, + { + label: "No Shows", + value: totals?.no_shows?.text ?? "0 Appt.", + icon: Eye, + color: "text-amber-600", + bg: "bg-amber-500/10", + }, + { + label: "No-Show Rate", + value: totals?.no_shows_rate?.text ?? "0%", + icon: Ban, + color: "text-red-600", + bg: "bg-red-500/10", + }, + { + label: "Cancelled", + value: totals?.cancelled?.text ?? "0 Appt.", + icon: CalendarX, + color: "text-slate-600", + bg: "bg-slate-500/10", + }, + ] + + return ( + + + Appointments Summary + + +
+ {stats.map((stat) => ( +
+
+ +
+
+

{stat.value}

+

{stat.label}

+
+
+ ))} +
+
+
+ ) +} diff --git a/apps/dashboard/modules/home/customers-totals-card.tsx b/apps/dashboard/modules/home/customers-totals-card.tsx new file mode 100644 index 0000000..c9f5fb1 --- /dev/null +++ b/apps/dashboard/modules/home/customers-totals-card.tsx @@ -0,0 +1,40 @@ +"use client" + +import { Users, Building2, Truck, Shield } from "lucide-react" +import { Card, CardContent, CardHeader, CardTitle } from "@/shared/components/ui/card" +import type { DashboardData } from "./use-dashboard-data" + +type Props = { data: DashboardData } + +export function CustomersTotalsCard({ data }: Props) { + const customers = data.customers_totals + + const stats = [ + { label: "Individuals", value: customers?.individuals ?? 0, icon: Users, color: "text-sky-600", bg: "bg-sky-500/10" }, + { label: "Companies", value: customers?.companies ?? 0, icon: Building2, color: "text-indigo-600", bg: "bg-indigo-500/10" }, + { label: "Fleets", value: customers?.fleets ?? 0, icon: Truck, color: "text-teal-600", bg: "bg-teal-500/10" }, + { label: "Insurers", value: customers?.insurers ?? 0, icon: Shield, color: "text-rose-600", bg: "bg-rose-500/10" }, + ] + + return ( + + + Customers + {customers?.total_customers ?? 0} + + + {stats.map((stat) => ( +
+
+
+ +
+ {stat.label} +
+ {stat.value} +
+ ))} +
+
+ ) +} diff --git a/apps/dashboard/modules/home/dashboard-content.tsx b/apps/dashboard/modules/home/dashboard-content.tsx new file mode 100644 index 0000000..fb5d889 --- /dev/null +++ b/apps/dashboard/modules/home/dashboard-content.tsx @@ -0,0 +1,69 @@ +"use client" + +import { Loader2 } from "lucide-react" +import { useDashboardData } from "./use-dashboard-data" +import { FinancialTotalsCards } from "./financial-totals-cards" +import { IncomeExpenseChart } from "./income-expense-chart" +import { FinancialSummaryChart } from "./financial-summary-chart" +import { WorkOrdersStatusCard } from "./work-orders-status-card" +import { AppointmentsSummaryCard } from "./appointments-summary-card" +import { UpcomingAppointmentsCard } from "./upcoming-appointments-card" +import { ItemsTotalsCard } from "./items-totals-card" +import { CustomersTotalsCard } from "./customers-totals-card" +import { SalesPurchaseCards } from "./sales-purchase-cards" +import { VehicleStatsCards } from "./vehicle-stats-cards" + +export function DashboardContent() { + const { data, isLoading, isError, error } = useDashboardData() + + if (isLoading) { + return ( +
+ +
+ ) + } + + if (isError || !data) { + return ( +
+

Failed to load dashboard

+

{error?.message ?? "An unexpected error occurred"}

+
+ ) + } + + return ( +
+ {/* Financial Overview */} + + + {/* Charts Row */} +
+ + +
+ + {/* Work Orders + Appointments */} +
+ + +
+ + {/* Upcoming Appointments */} + + + {/* Sales & Purchase Documents */} + + + {/* Quick Stats Row */} +
+ + +
+ + {/* Vehicle Statistics */} + +
+ ) +} diff --git a/apps/dashboard/modules/home/financial-summary-chart.tsx b/apps/dashboard/modules/home/financial-summary-chart.tsx new file mode 100644 index 0000000..bde7b75 --- /dev/null +++ b/apps/dashboard/modules/home/financial-summary-chart.tsx @@ -0,0 +1,75 @@ +"use client" + +import { Bar, BarChart, XAxis, YAxis, CartesianGrid } from "recharts" +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/shared/components/ui/card" +import { + ChartContainer, + ChartTooltip, + ChartTooltipContent, + type ChartConfig, +} from "@/shared/components/ui/chart" +import type { DashboardData } from "./use-dashboard-data" + +const chartConfig = { + amount: { + label: "Amount", + color: "var(--color-blue-500, #3b82f6)", + }, +} satisfies ChartConfig + +type Props = { data: DashboardData } + +export function FinancialSummaryChart({ data }: Props) { + const summary = data.financial_summary + const currency = summary?.currency ?? "" + + const chartData = (summary?.chart ?? []).map((item) => ({ + label: item.label ?? "", + amount: item.amount ?? 0, + count: item.count ?? 0, + })) + + const colors = ["#3b82f6", "#f59e0b", "#ef4444"] + + return ( + + + Financial Summary + + Invoices, expenses & bills breakdown ({currency}) + + + + + + + + v.toLocaleString()} /> + ( +
+ {currency} {Number(value).toLocaleString()} + {item.payload.count} document(s) +
+ )} + /> + } + /> + + {chartData.map((_entry, index) => ( + + ))} + +
+
+
+
+ ) +} diff --git a/apps/dashboard/modules/home/financial-totals-cards.tsx b/apps/dashboard/modules/home/financial-totals-cards.tsx new file mode 100644 index 0000000..7cb9478 --- /dev/null +++ b/apps/dashboard/modules/home/financial-totals-cards.tsx @@ -0,0 +1,63 @@ +"use client" + +import { + DollarSign, + TrendingUp, + TrendingDown, + ArrowUpRight, + ArrowDownRight, +} from "lucide-react" +import { Card, CardContent, CardHeader, CardTitle } from "@/shared/components/ui/card" +import type { DashboardData } from "./use-dashboard-data" + +type Props = { data: DashboardData } + +export function FinancialTotalsCards({ data }: Props) { + const totals = data.totals + + return ( +
+ + + + Total Income + +
+ +
+
+ +
+ {totals?.total_income_text ?? `${totals?.currency ?? ""} 0.00`} +
+
+ + Income this period +
+
+
+ + + + + + Total Expenses + +
+ +
+
+ +
+ {totals?.total_expense_text ?? `${totals?.currency ?? ""} 0.00`} +
+
+ + Expenses this period +
+
+
+ +
+ ) +} diff --git a/apps/dashboard/modules/home/income-expense-chart.tsx b/apps/dashboard/modules/home/income-expense-chart.tsx new file mode 100644 index 0000000..9b51143 --- /dev/null +++ b/apps/dashboard/modules/home/income-expense-chart.tsx @@ -0,0 +1,106 @@ +"use client" + +import { + Area, + AreaChart, + CartesianGrid, + XAxis, + YAxis, +} from "recharts" +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/shared/components/ui/card" +import { + ChartContainer, + ChartTooltip, + ChartTooltipContent, + type ChartConfig, +} from "@/shared/components/ui/chart" +import type { DashboardData } from "./use-dashboard-data" + +const chartConfig = { + income: { + label: "Income", + color: "var(--color-emerald-500, #10b981)", + }, + expense: { + label: "Expense", + color: "var(--color-red-500, #ef4444)", + }, +} satisfies ChartConfig + +type Props = { data: DashboardData } + +export function IncomeExpenseChart({ data }: Props) { + const series = data.chart?.series ?? [] + const currency = data.chart?.currency ?? "" + + const chartData = series.map((item) => ({ + date: item.date ?? "", + income: item.income ?? 0, + expense: item.expense ?? 0, + })) + + return ( + + + Income vs Expenses + + Financial trend over the selected period ({currency}) + + + + + + + + + + + + + + + + + { + const date = new Date(value) + return date.toLocaleDateString("en-US", { month: "short", day: "numeric" }) + }} + /> + `${v.toLocaleString()}`} /> + { + return new Date(value).toLocaleDateString("en-US", { + month: "long", + day: "numeric", + year: "numeric", + }) + }} + /> + } + /> + + + + + + + ) +} diff --git a/apps/dashboard/modules/home/items-totals-card.tsx b/apps/dashboard/modules/home/items-totals-card.tsx new file mode 100644 index 0000000..2792c12 --- /dev/null +++ b/apps/dashboard/modules/home/items-totals-card.tsx @@ -0,0 +1,39 @@ +"use client" + +import { Package, Wrench, Layers } from "lucide-react" +import { Card, CardContent, CardHeader, CardTitle } from "@/shared/components/ui/card" +import type { DashboardData } from "./use-dashboard-data" + +type Props = { data: DashboardData } + +export function ItemsTotalsCard({ data }: Props) { + const items = data.items_totals + + const stats = [ + { label: "Parts", value: items?.parts ?? 0, icon: Package, color: "text-blue-600", bg: "bg-blue-500/10" }, + { label: "Services", value: items?.services ?? 0, icon: Wrench, color: "text-violet-600", bg: "bg-violet-500/10" }, + { label: "Service Groups", value: items?.service_groups ?? 0, icon: Layers, color: "text-amber-600", bg: "bg-amber-500/10" }, + ] + + return ( + + + Items + {items?.total_items ?? 0} + + + {stats.map((stat) => ( +
+
+
+ +
+ {stat.label} +
+ {stat.value} +
+ ))} +
+
+ ) +} diff --git a/apps/dashboard/modules/home/sales-purchase-cards.tsx b/apps/dashboard/modules/home/sales-purchase-cards.tsx new file mode 100644 index 0000000..1700476 --- /dev/null +++ b/apps/dashboard/modules/home/sales-purchase-cards.tsx @@ -0,0 +1,78 @@ +"use client" + +import { FileText, FileSearch, Receipt, ShoppingCart } from "lucide-react" +import { Card, CardContent, CardHeader, CardTitle } from "@/shared/components/ui/card" +import type { DashboardData } from "./use-dashboard-data" + +type Props = { data: DashboardData } + +export function SalesPurchaseCards({ data }: Props) { + const sales = data.sales_totals + const purchase = data.purchase_totals + + const salesStats = [ + { label: "Inspections", value: sales?.inspections ?? 0, icon: FileSearch }, + { label: "Estimates", value: sales?.estimates ?? 0, icon: FileText }, + { label: "Invoices", value: sales?.invoices ?? 0, icon: Receipt }, + ] + + const purchaseStats = [ + { label: "Purchase Orders", value: purchase?.purchase_orders ?? 0, icon: ShoppingCart }, + { label: "Bills", value: purchase?.bills ?? 0, icon: Receipt }, + { label: "Expenses", value: purchase?.expenses ?? 0, icon: FileText }, + ] + + return ( +
+ + + Sales Documents + + {sales?.total_sales_documents ?? 0} + + + +
+ {salesStats.map((stat) => ( +
+ + {stat.value} + + {stat.label} + +
+ ))} +
+
+
+ + + + Purchase Documents + + {purchase?.total_purchase_documents ?? 0} + + + +
+ {purchaseStats.map((stat) => ( +
+ + {stat.value} + + {stat.label} + +
+ ))} +
+
+
+
+ ) +} diff --git a/apps/dashboard/modules/home/upcoming-appointments-card.tsx b/apps/dashboard/modules/home/upcoming-appointments-card.tsx new file mode 100644 index 0000000..8e4151f --- /dev/null +++ b/apps/dashboard/modules/home/upcoming-appointments-card.tsx @@ -0,0 +1,98 @@ +"use client" + +import { Calendar, Clock } from "lucide-react" +import { Card, CardContent, CardHeader, CardTitle } from "@/shared/components/ui/card" +import { Badge } from "@/shared/components/ui/badge" +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/shared/components/ui/tabs" +import type { DashboardData } from "./use-dashboard-data" + +type Props = { data: DashboardData } + +const statusBadge: Record = { + confirmed: "bg-emerald-100 text-emerald-700 dark:bg-emerald-900 dark:text-emerald-300", + pending: "bg-amber-100 text-amber-700 dark:bg-amber-900 dark:text-amber-300", + cancelled: "bg-red-100 text-red-700 dark:bg-red-900 dark:text-red-300", +} + +type AppointmentDetail = NonNullable["today"]>["details"]>[number] + +function AppointmentRow({ appt }: { appt: AppointmentDetail }) { + return ( +
+
+
+ +
+
+

{appt.title}

+ {appt.notes && ( +

{appt.notes}

+ )} +
+
+
+
+ + {appt.from_time?.slice(0, 5)} - {appt.to_time?.slice(0, 5)} +
+ + {appt.status} + +
+
+ ) +} + +function EmptyState() { + return ( +
+ +

No appointments

+
+ ) +} + +export function UpcomingAppointmentsCard({ data }: Props) { + const upcoming = data.upcoming_appointments + + const tabs = [ + { key: "today", label: "Today", data: upcoming?.today }, + { key: "tomorrow", label: "Tomorrow", data: upcoming?.tomorrow }, + { key: "this_week", label: "This Week", data: upcoming?.this_week }, + { key: "next_week", label: "Next Week", data: upcoming?.next_week }, + ] + + return ( + + + Upcoming Appointments + + + + + {tabs.map((tab) => ( + + {tab.label} + + {tab.data?.count ?? 0} + + + ))} + + + {tabs.map((tab) => ( + + {(tab.data?.details as AppointmentDetail[] | undefined)?.length ? ( + (tab.data?.details as AppointmentDetail[]).map((appt) => ( + + )) + ) : ( + + )} + + ))} + + + + ) +} diff --git a/apps/dashboard/modules/home/use-dashboard-data.ts b/apps/dashboard/modules/home/use-dashboard-data.ts new file mode 100644 index 0000000..bc0b317 --- /dev/null +++ b/apps/dashboard/modules/home/use-dashboard-data.ts @@ -0,0 +1,16 @@ +"use client" + +import { useQuery } from "@tanstack/react-query" +import { useAuthApi } from "@/shared/useApi" +import type { HomeDashboardResponse } from "@garage/api" + +export type DashboardData = HomeDashboardResponse + +export function useDashboardData() { + const api = useAuthApi() + + return useQuery({ + queryKey: ["home", "dashboard"], + queryFn: () => api.home.dashboard(), + }) +} diff --git a/apps/dashboard/modules/home/vehicle-stats-cards.tsx b/apps/dashboard/modules/home/vehicle-stats-cards.tsx new file mode 100644 index 0000000..9cd31f1 --- /dev/null +++ b/apps/dashboard/modules/home/vehicle-stats-cards.tsx @@ -0,0 +1,104 @@ +"use client" + +import { Car } from "lucide-react" +import { Bar, BarChart, XAxis, YAxis, CartesianGrid, Cell } from "recharts" +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/shared/components/ui/card" +import { + ChartContainer, + ChartTooltip, + ChartTooltipContent, + type ChartConfig, +} from "@/shared/components/ui/chart" +import type { DashboardData } from "./use-dashboard-data" + +const chartConfig = { + vehicles_count: { + label: "Vehicles", + color: "var(--color-blue-500, #3b82f6)", + }, +} satisfies ChartConfig + +const COLORS = ["#3b82f6", "#8b5cf6", "#06b6d4", "#f59e0b", "#ef4444", "#10b981", "#ec4899", "#6366f1"] + +type Props = { data: DashboardData } + +export function VehicleStatsCards({ data }: Props) { + const bodyTypes = data.body_types_vehicle_totals ?? [] + const makes = data.make_model_vehicle_totals?.makes ?? [] + + const bodyData = bodyTypes.map((bt) => ({ + name: bt.body_type ?? "Unknown", + vehicles_count: bt.vehicles_count ?? 0, + })) + + const makeData = makes.map((m) => ({ + name: m.make ?? "Unknown", + vehicles_count: m.vehicles_count ?? 0, + })) + + return ( +
+ + +
+ +
+ Vehicles by Body Type + Distribution across body types +
+
+
+ + {bodyData.length > 0 ? ( + + + + + + } /> + + {bodyData.map((_entry, index) => ( + + ))} + + + + ) : ( +

No vehicle data

+ )} +
+
+ + + +
+ +
+ Vehicles by Make + Top vehicle manufacturers +
+
+
+ + {makeData.length > 0 ? ( + + + + + + } /> + + {makeData.map((_entry, index) => ( + + ))} + + + + ) : ( +

No vehicle data

+ )} +
+
+
+ ) +} diff --git a/apps/dashboard/modules/home/work-orders-status-card.tsx b/apps/dashboard/modules/home/work-orders-status-card.tsx new file mode 100644 index 0000000..df2e2cd --- /dev/null +++ b/apps/dashboard/modules/home/work-orders-status-card.tsx @@ -0,0 +1,69 @@ +"use client" + +import { ClipboardList } from "lucide-react" +import { Card, CardContent, CardHeader, CardTitle } from "@/shared/components/ui/card" +import { Badge } from "@/shared/components/ui/badge" +import { Progress } from "@/shared/components/ui/progress" +import type { DashboardData } from "./use-dashboard-data" + +type Props = { data: DashboardData } + +const statusColors: Record = { + draft: "bg-slate-100 text-slate-700 dark:bg-slate-800 dark:text-slate-300", + check_in: "bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300", + in_progress: "bg-amber-100 text-amber-700 dark:bg-amber-900 dark:text-amber-300", + completed: "bg-emerald-100 text-emerald-700 dark:bg-emerald-900 dark:text-emerald-300", + cancelled: "bg-red-100 text-red-700 dark:bg-red-900 dark:text-red-300", + invoiced: "bg-purple-100 text-purple-700 dark:bg-purple-900 dark:text-purple-300", +} + +export function WorkOrdersStatusCard({ data }: Props) { + const workOrders = data.work_orders_status + const cards = workOrders?.cards ?? [] + const totals = workOrders?.totals + const totalOrders = totals?.orders ?? 0 + + return ( + + +
+ + Work Orders +
+
+

{totals?.orders_text ?? "0 Orders"}

+

{totals?.amount_text ?? ""}

+
+
+ + {cards.map((card) => { + const percentage = totalOrders > 0 ? ((card.count ?? 0) / totalOrders) * 100 : 0 + return ( +
+
+
+ + {card.label} + + + {card.orders_text} + +
+ {card.amount_text} +
+ +
+ ) + })} + {cards.length === 0 && ( +

+ No work orders this period +

+ )} +
+
+ ) +} diff --git a/apps/dashboard/modules/invoices/invoice-actions.tsx b/apps/dashboard/modules/invoices/invoice-actions.tsx new file mode 100644 index 0000000..a0e0d39 --- /dev/null +++ b/apps/dashboard/modules/invoices/invoice-actions.tsx @@ -0,0 +1,50 @@ +"use client" + +import { useAuthApi } from "@/shared/useApi" +import { useRouter } from "next/navigation" +import { Button } from "@/shared/components/ui/button" +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from "@/shared/components/ui/dropdown-menu" +import { Ellipsis, Pencil, Trash2 } from "lucide-react" + +type InvoiceActionsProps = { + invoiceId: string +} + +export function InvoiceActions({ invoiceId }: InvoiceActionsProps) { + const api = useAuthApi() + const router = useRouter() + + const handleEdit = () => { + router.push(`/sales/invoice/${invoiceId}/edit`) + } + + const handleDelete = async () => { + await api.invoices.destroy(invoiceId) + router.push("/sales/invoice") + } + + return ( + + + + + + + + Edit + + + + Delete + + + + ) +} diff --git a/apps/dashboard/modules/invoices/invoice-context.tsx b/apps/dashboard/modules/invoices/invoice-context.tsx new file mode 100644 index 0000000..2b37622 --- /dev/null +++ b/apps/dashboard/modules/invoices/invoice-context.tsx @@ -0,0 +1,28 @@ +"use client" + +import { createContext, useContext } from "react" + +type InvoiceContextValue = { + id: string + label: string +} + +const InvoiceContext = createContext(null) + +export function InvoiceProvider({ + invoice, + children, +}: { + invoice: InvoiceContextValue + children: React.ReactNode +}) { + return ( + + {children} + + ) +} + +export function useInvoice() { + return useContext(InvoiceContext) +} diff --git a/apps/dashboard/modules/invoices/invoice-document-form.tsx b/apps/dashboard/modules/invoices/invoice-document-form.tsx new file mode 100644 index 0000000..1649a86 --- /dev/null +++ b/apps/dashboard/modules/invoices/invoice-document-form.tsx @@ -0,0 +1,76 @@ +"use client" + +import { z } from "zod" +import { useForm } from "react-hook-form" +import { zodResolver } from "@hookform/resolvers/zod" +import { Plus } from "lucide-react" +import { Button } from "@/shared/components/ui/button" +import { FieldGroup } from "@/shared/components/ui/field" +import { Rhform, RhfTextField, RhfCheckboxField } from "@/shared/components/form" +import { toast } from "sonner" +import { useAuthApi } from "@/shared/useApi" + +const schema = z.object({ + document_number: z.string().min(1, "Document number is required"), + show_in_invoice: z.boolean(), + show_in_estimate: z.boolean(), + show_in_statement: z.boolean(), +}) + +type FormValues = z.infer + +type InvoiceDocumentFormProps = { + invoiceId: string + onSuccess?: () => void +} + +export function InvoiceDocumentForm({ invoiceId, onSuccess }: InvoiceDocumentFormProps) { + const api = useAuthApi() + + const form = useForm({ + resolver: zodResolver(schema), + defaultValues: { + document_number: "", + show_in_invoice: true, + show_in_estimate: false, + show_in_statement: false, + }, + }) + + const handleSubmit = async (values: FormValues) => { + try { + await api.invoices.createDocument({ + invoice_id: Number(invoiceId), + document_number: values.document_number, + show_in_invoice: values.show_in_invoice, + show_in_estimate: values.show_in_estimate, + show_in_statement: values.show_in_statement, + }) + toast.success("Document created") + form.reset() + onSuccess?.() + } catch { + toast.error("Failed to create document") + } + } + + return ( + + + + + + + + + + ) +} diff --git a/apps/dashboard/modules/invoices/invoice-form.tsx b/apps/dashboard/modules/invoices/invoice-form.tsx new file mode 100644 index 0000000..a65d60e --- /dev/null +++ b/apps/dashboard/modules/invoices/invoice-form.tsx @@ -0,0 +1,216 @@ +"use client" + +import { AlertTriangle, Plus, Save } from "lucide-react" + +import { Button } from "@/shared/components/ui/button" +import { Alert, AlertTitle } from "@/shared/components/ui/alert" +import { FieldGroup } from "@/shared/components/ui/field" +import { + Rhform, + RhfTextField, + RhfSelectField, + RhfTextareaField, + RhfAsyncSelectField, +} from "@/shared/components/form" +import { toast } from "sonner" +import { useAuthApi } from "@/shared/useApi" +import { useResourceForm } from "@/shared/hooks/use-resource-form" +import { useFormMutation } from "@/shared/hooks/use-form-mutation" +import { toRelation, toId } from "@/shared/lib/utils" + +import { + invoiceFormSchema, + type InvoiceFormValues, +} from "./invoice.schema" +import { INVOICE_ROUTES, CUSTOMER_ROUTES, VEHICLE_ROUTES, DEPARTMENT_ROUTES } from "@garage/api" + +// ── Constants ── + +const STATUS_OPTIONS = [ + { value: "draft", label: "Draft" }, + { value: "open", label: "Open" }, + { value: "paid", label: "Paid" }, + { value: "overdue", label: "Overdue" }, + { value: "void", label: "Void" }, +] + +// ── Props ── + +export type InvoiceFormProps = { + resourceId?: string | null + initialData?: unknown + onSuccess?: () => void +} + +// ── Default values ── + +const DEFAULT_VALUES: InvoiceFormValues = { + subject: "", + customer: null, + vehicle: null, + department: null, + invoice_number: "", + invoice_date: "", + due_date: "", + status: "draft", + notes: "", +} + +// ── Mapping helpers ── + +function mapToFormValues(data: unknown): InvoiceFormValues { + const d = (data as any)?.data ?? data ?? {} + + return { + subject: d.subject || "", + customer: toRelation(d.customer_id, d.customer_name), + vehicle: toRelation(d.vehicle_id, d.vehicle_name), + department: toRelation(d.department_id, d.department_name), + invoice_number: d.invoice_number || "", + invoice_date: d.invoice_date || "", + due_date: d.due_date || "", + status: d.status || "draft", + notes: d.notes || "", + } +} + +function mapFormToPayload(values: InvoiceFormValues) { + return { + subject: values.subject, + customer_id: toId(values.customer), + vehicle_id: toId(values.vehicle), + department_id: toId(values.department), + invoice_number: values.invoice_number || undefined, + invoice_date: values.invoice_date || undefined, + due_date: values.due_date || undefined, + status: values.status || undefined, + notes: values.notes || undefined, + } +} + +// ── Shared mapOption for async selects ── + +const mapLookupOption = (item: any) => ({ + value: String(item.id), + label: item.name, +}) + +const mapCustomerOption = (item: any) => ({ + value: String(item.id), + label: [item.first_name, item.last_name].filter(Boolean).join(" "), +}) + +const mapVehicleOption = (item: any) => ({ + value: String(item.id), + label: [item.year, item.make_name, item.model_name].filter(Boolean).join(" "), +}) + +const STORE_OBJECT = { getOptionValue: (o: any) => o, getOptionLabel: (o: any) => o.label } + +// ── Component ── + +export function InvoiceForm({ resourceId, initialData, onSuccess }: InvoiceFormProps) { + const api = useAuthApi() + + const { form, isEditing } = useResourceForm({ + schema: invoiceFormSchema, + defaultValues: DEFAULT_VALUES, + resourceId, + initialData, + queryKey: [INVOICE_ROUTES.BY_ID, resourceId], + mapToFormValues, + }) + + const { mutate, error, isPending } = useFormMutation(form, { + mutationFn: (values: InvoiceFormValues) => { + const payload = mapFormToPayload(values) + const promise = (isEditing && resourceId + ? api.invoices.update(resourceId, payload) + : api.invoices.create(payload)) as Promise + toast.promise(promise, { + loading: isEditing ? "Updating invoice..." : "Creating invoice...", + success: isEditing ? "Invoice updated successfully" : "Invoice created successfully", + error: isEditing ? "Failed to update invoice" : "Failed to create invoice", + }) + return promise + }, + onSuccess: () => { + form.reset() + onSuccess?.() + }, + }) + + return ( + mutate(values)}> + {error && ( + + + + {isEditing ? "Failed to update invoice" : "Failed to create invoice"} + + {error.message} + + )} + + + + +
+ + +
+ +
+ + +
+ +
+ api.customers.list()} + mapOption={mapCustomerOption} + {...STORE_OBJECT} + /> + api.vehicles.list()} + mapOption={mapVehicleOption} + {...STORE_OBJECT} + + /> +
+ + api.departments.list()} + mapOption={mapLookupOption} + {...STORE_OBJECT} + /> + + + + +
+
+ ) +} diff --git a/apps/dashboard/modules/invoices/invoice-general-info.tsx b/apps/dashboard/modules/invoices/invoice-general-info.tsx new file mode 100644 index 0000000..6e91990 --- /dev/null +++ b/apps/dashboard/modules/invoices/invoice-general-info.tsx @@ -0,0 +1,161 @@ +import { + FileText, + Calendar, + Hash, + Users, + Car, + Building2, + CircleDollarSign, + Clock, +} from "lucide-react" +import { + Card, + CardContent, + CardHeader, + CardTitle, +} from "@/shared/components/ui/card" +import { Badge } from "@/shared/components/ui/badge" +import { Separator } from "@/shared/components/ui/separator" + +type InvoiceData = { + id?: number + subject?: string + invoice_number?: string + invoice_date?: string + due_date?: string + status?: string + notes?: string + customer_name?: string + customer_id?: number + vehicle_name?: string + vehicle_id?: number + department_name?: string + department_id?: number + created_at?: string + updated_at?: string +} + +type InvoiceGeneralInfoProps = { + invoice: InvoiceData +} + +function InfoItem({ + icon: Icon, + label, + value, +}: { + icon: React.ComponentType<{ className?: string }> + label: string + value?: string | null +}) { + return ( +
+
+ +
+
+ {label} + + {value || } + +
+
+ ) +} + +const statusColorMap: Record = { + draft: "secondary", + open: "default", + paid: "default", + overdue: "destructive", + void: "outline", +} + +export function InvoiceGeneralInfo({ invoice }: InvoiceGeneralInfoProps) { + return ( +
+ {/* Invoice Details */} + + + + + Invoice Details + + + +
+ {invoice.subject && ( + {invoice.subject} + )} + {invoice.status && ( + + {invoice.status.charAt(0).toUpperCase() + invoice.status.slice(1)} + + )} +
+ +
+ + + + +
+
+
+ + {/* Relations */} + + + + + Related Information + + + +
+ + + +
+ {invoice.notes && ( + <> + +
+ Notes +

{invoice.notes}

+
+ + )} +
+
+
+ ) +} diff --git a/apps/dashboard/modules/invoices/invoice-note-form.tsx b/apps/dashboard/modules/invoices/invoice-note-form.tsx new file mode 100644 index 0000000..2a5ca90 --- /dev/null +++ b/apps/dashboard/modules/invoices/invoice-note-form.tsx @@ -0,0 +1,63 @@ +"use client" + +import { z } from "zod" +import { useForm } from "react-hook-form" +import { zodResolver } from "@hookform/resolvers/zod" +import { Plus } from "lucide-react" +import { Button } from "@/shared/components/ui/button" +import { FieldGroup } from "@/shared/components/ui/field" +import { Rhform, RhfTextareaField } from "@/shared/components/form" +import { toast } from "sonner" +import { useAuthApi } from "@/shared/useApi" + +const schema = z.object({ + note: z.string().min(1, "Note is required"), +}) + +type FormValues = z.infer + +type InvoiceNoteFormProps = { + invoiceId: string + onSuccess?: () => void +} + +export function InvoiceNoteForm({ invoiceId, onSuccess }: InvoiceNoteFormProps) { + const api = useAuthApi() + + const form = useForm({ + resolver: zodResolver(schema), + defaultValues: { note: "" }, + }) + + const handleSubmit = async (values: FormValues) => { + try { + await api.invoices.createNote({ + invoice_id: Number(invoiceId), + note: values.note, + }) + toast.success("Note created") + form.reset() + onSuccess?.() + } catch { + toast.error("Failed to create note") + } + } + + return ( + + + + + + + ) +} diff --git a/apps/dashboard/modules/invoices/invoice.schema.ts b/apps/dashboard/modules/invoices/invoice.schema.ts new file mode 100644 index 0000000..5d3da94 --- /dev/null +++ b/apps/dashboard/modules/invoices/invoice.schema.ts @@ -0,0 +1,27 @@ +import { z } from "zod" + +const relationFieldSchema = z + .object({ value: z.string(), label: z.string() }) + .nullable() + +const invoiceFormSchema = z.object({ + // ── Required fields ── + subject: z.string().min(1, "Subject is required"), + + // ── Relations ── + customer: relationFieldSchema, + vehicle: relationFieldSchema, + department: relationFieldSchema, + + // ── Optional fields ── + invoice_number: z.string().optional(), + invoice_date: z.string().optional(), + due_date: z.string().optional(), + status: z.string().optional(), + notes: z.string().optional(), +}) + +type InvoiceFormValues = z.infer + +export { invoiceFormSchema, relationFieldSchema } +export type { InvoiceFormValues } diff --git a/apps/dashboard/modules/job-cards/job-card-actions.tsx b/apps/dashboard/modules/job-cards/job-card-actions.tsx new file mode 100644 index 0000000..0970be0 --- /dev/null +++ b/apps/dashboard/modules/job-cards/job-card-actions.tsx @@ -0,0 +1,289 @@ +"use client" + +import { useState, useRef } from "react" +import { useMutation, useQuery } from "@tanstack/react-query" +import { useAuthApi } from "@/shared/useApi" +import { useRouter } from "next/navigation" +import { Button } from "@/shared/components/ui/button" +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from "@/shared/components/ui/dropdown-menu" +import { + Dialog, + DialogContent, + DialogHeader, + DialogTitle, + DialogDescription, +} from "@/shared/components/ui/dialog" +import { + Combobox, + ComboboxInput, + ComboboxContent, + ComboboxList, + ComboboxItem, + ComboboxEmpty, +} from "@/shared/components/ui/combobox" +import { + Popover, + PopoverContent, + PopoverTrigger, +} from "@/shared/components/ui/popover" +import { Calendar } from "@/shared/components/ui/calendar" +import { confirm } from "@/shared/components/confirm-dialog" +import { toast } from "sonner" +import { Ellipsis, Pencil, Trash2, CalendarIcon, UserCog, UserCheck, Loader2 } from "lucide-react" +import { format } from "date-fns" +import { EMPLOYEE_ROUTES } from "@garage/api" + +type JobCardActionsProps = { + jobCardId: string +} + +type Employee = { + id: number + first_name?: string + last_name?: string + name?: string +} + +function getEmployeeName(emp: Employee) { + return emp.name || [emp.first_name, emp.last_name].filter(Boolean).join(" ") || `Employee #${emp.id}` +} + +// ── Employee Picker Dialog ── + +type EmployeePickerDialogProps = { + open: boolean + onOpenChange: (open: boolean) => void + title: string + description: string + employees: Employee[] + loading: boolean + isPending: boolean + onSelect: (employeeId: number) => void +} + +function EmployeePickerDialog({ + open, + onOpenChange, + title, + description, + employees, + loading, + isPending, + onSelect, +}: EmployeePickerDialogProps) { + const anchorRef = useRef(null) + + const handleSelect = (emp: Employee | null) => { + if (!emp) return + onSelect(emp.id) + } + + return ( + + + + {title} + {description} + +
+ + + + + {loading && ( +
+ +
+ )} + {!loading && + employees.map((emp) => ( + + {getEmployeeName(emp)} + + ))} + {!loading && employees.length === 0 && ( + No employees found + )} +
+
+
+
+
+
+ ) +} + +// ── Main Component ── + +export function JobCardActions({ jobCardId }: JobCardActionsProps) { + const api = useAuthApi() + const router = useRouter() + const [datePickerOpen, setDatePickerOpen] = useState(false) + const [serviceWriterDialogOpen, setServiceWriterDialogOpen] = useState(false) + const [salesPersonDialogOpen, setSalesPersonDialogOpen] = useState(false) + + const { data: employeesData, isLoading: employeesLoading } = useQuery({ + queryKey: [EMPLOYEE_ROUTES.INDEX], + queryFn: () => api.employees.list(), + }) + + const employees: Employee[] = (employeesData as any)?.data ?? [] + + const handleEdit = () => { + router.push(`/sales/job-cards/${jobCardId}/edit`) + } + + const handleDelete = async () => { + const confirmed = await confirm({ + title: "Delete Job Card", + description: "Are you sure you want to delete this job card? This action cannot be undone.", + confirmLabel: "Delete", + variant: "destructive", + }) + if (confirmed) { + const promise = api.jobCards.destroy(jobCardId) + toast.promise(promise, { + loading: "Deleting job card...", + success: "Job card deleted successfully", + error: "Failed to delete job card", + }) + await promise + router.push("/sales/job-cards") + } + } + + const changeDateMutation = useMutation({ + mutationFn: (date: Date) => { + const order_date = format(date, "yyyy-MM-dd") + const promise = api.jobCards.changeDate(jobCardId, { order_date }) + toast.promise(promise, { + loading: "Updating date...", + success: "Date updated successfully", + error: "Failed to update date", + }) + return promise + }, + onSuccess: () => { + setDatePickerOpen(false) + router.refresh() + }, + }) + + const changeServiceWriterMutation = useMutation({ + mutationFn: (employeeId: number) => { + const promise = api.jobCards.changeServiceWriter(jobCardId, { service_writer_id: employeeId }) + toast.promise(promise, { + loading: "Updating service writer...", + success: "Service writer updated successfully", + error: "Failed to update service writer", + }) + return promise + }, + onSuccess: () => { + setServiceWriterDialogOpen(false) + router.refresh() + }, + }) + + const changeSalesPersonMutation = useMutation({ + mutationFn: (employeeId: number) => { + const promise = api.jobCards.changeSalesPerson(jobCardId, { sales_person_id: employeeId }) + toast.promise(promise, { + loading: "Updating sales person...", + success: "Sales person updated successfully", + error: "Failed to update sales person", + }) + return promise + }, + onSuccess: () => { + setSalesPersonDialogOpen(false) + router.refresh() + }, + }) + + return ( +
+ + + + + + { + if (date) changeDateMutation.mutate(date) + }} + disabled={changeDateMutation.isPending} + /> + + + + + + + + + + + + + + + Edit + + + + + Delete + + + + + changeServiceWriterMutation.mutate(id)} + /> + + changeSalesPersonMutation.mutate(id)} + /> +
+ ) +} diff --git a/apps/dashboard/modules/job-cards/job-card-context.tsx b/apps/dashboard/modules/job-cards/job-card-context.tsx new file mode 100644 index 0000000..9119e4c --- /dev/null +++ b/apps/dashboard/modules/job-cards/job-card-context.tsx @@ -0,0 +1,37 @@ +"use client" + +import { createContext, useContext, useState, useCallback } from "react" +import type { JobCardStatus } from "./job-card.schema" + +type JobCardContextValue = { + id: string + label: string + status: JobCardStatus + setStatus: (status: JobCardStatus) => void +} + +const JobCardContext = createContext(null) + +export function JobCardProvider({ + jobCard, + children, +}: { + jobCard: { id: string; label: string; status: JobCardStatus } + children: React.ReactNode +}) { + const [status, setStatusState] = useState(jobCard.status) + + const setStatus = useCallback((newStatus: JobCardStatus) => { + setStatusState(newStatus) + }, []) + + return ( + + {children} + + ) +} + +export function useJobCard() { + return useContext(JobCardContext) +} diff --git a/apps/dashboard/modules/job-cards/job-card-form.tsx b/apps/dashboard/modules/job-cards/job-card-form.tsx new file mode 100644 index 0000000..06e2633 --- /dev/null +++ b/apps/dashboard/modules/job-cards/job-card-form.tsx @@ -0,0 +1,195 @@ +"use client" + +import { AlertTriangle, Plus, Save } from "lucide-react" + +import { Button } from "@/shared/components/ui/button" +import { Alert, AlertTitle } from "@/shared/components/ui/alert" +import { FieldGroup } from "@/shared/components/ui/field" +import { + Rhform, + RhfTextField, + RhfSelectField, + RhfAsyncSelectField, +} from "@/shared/components/form" +import { toast } from "sonner" +import { useAuthApi } from "@/shared/useApi" +import { useResourceForm } from "@/shared/hooks/use-resource-form" +import { useFormMutation } from "@/shared/hooks/use-form-mutation" +import { toRelation, toId } from "@/shared/lib/utils" + +import { + jobCardFormSchema, + type JobCardFormValues, + TAX_INCLUSIVE_OPTIONS, + DISCOUNT_TYPE_OPTIONS, + DISCOUNT_AT_OPTIONS, +} from "./job-card.schema" +import { JOB_CARD_ROUTES, CUSTOMER_ROUTES, VEHICLE_ROUTES } from "@garage/api" + +// ── Props ── + +export type JobCardFormProps = { + resourceId?: string | null + initialData?: unknown + onSuccess?: () => void +} + +// ── Default values ── + +const DEFAULT_VALUES: JobCardFormValues = { + title: "", + customer: null, + vehicle: null, + status: "draft", + tax_inclusive: "Tax Inclusive", + discount_type: "no", + discount_at: "inclusive_of_tax", +} + +// ── Mapping helpers ── + +function mapToFormValues(data: unknown): JobCardFormValues { + const d = (data as any)?.data ?? data ?? {} + + return { + title: d.title || "", + customer: toRelation(d.customer_id, d.customer_name), + vehicle: toRelation(d.vehicle_id, d.vehicle_name), + status: d.status || "draft", + tax_inclusive: d.tax_inclusive || "Tax Inclusive", + discount_type: d.discount_type || "no", + discount_at: d.discount_at || "inclusive_of_tax", + } +} + +function mapFormToPayload(values: JobCardFormValues) { + return { + title: values.title, + customer_id: toId(values.customer), + vehicle_id: toId(values.vehicle), + status: values.status || undefined, + tax_inclusive: values.tax_inclusive || undefined, + discount_type: values.discount_type || undefined, + discount_at: values.discount_at || undefined, + } +} + +// ── Shared mapOption for async selects ── + +const mapLookupOption = (item: any) => ({ + value: String(item.id), + label: item.name, +}) + +const mapCustomerOption = (item: any) => ({ + value: String(item.id), + label: [item.first_name, item.last_name].filter(Boolean).join(" "), +}) + +const mapVehicleOption = (item: any) => ({ + value: String(item.id), + label: [item.year, item.make_name, item.model_name].filter(Boolean).join(" "), +}) + +const STORE_OBJECT = { getOptionValue: (o: any) => o, getOptionLabel: (o: any) => o.label } + +// ── Component ── + +export function JobCardForm({ resourceId, initialData, onSuccess }: JobCardFormProps) { + const api = useAuthApi() + + const { form, isEditing } = useResourceForm({ + schema: jobCardFormSchema, + defaultValues: DEFAULT_VALUES, + resourceId, + initialData, + queryKey: [JOB_CARD_ROUTES.BY_ID, resourceId], + mapToFormValues, + }) + + const { mutate, error, isPending } = useFormMutation(form, { + mutationFn: (values: JobCardFormValues) => { + const payload = mapFormToPayload(values) + const promise = (isEditing && resourceId + ? api.jobCards.update(resourceId, payload) + : api.jobCards.create(payload)) as Promise + toast.promise(promise, { + loading: isEditing ? "Updating job card..." : "Creating job card...", + success: isEditing ? "Job card updated successfully" : "Job card created successfully", + error: isEditing ? "Failed to update job card" : "Failed to create job card", + }) + return promise + }, + onSuccess: () => { + form.reset() + onSuccess?.() + }, + }) + + return ( + mutate(values)}> + {error && ( + + + + {isEditing ? "Failed to update job card" : "Failed to create job card"} + + {error.message} + + )} + + + + +
+ api.customers.list()} + mapOption={mapCustomerOption} + {...STORE_OBJECT} + /> + api.vehicles.list()} + mapOption={mapVehicleOption} + {...STORE_OBJECT} + /> +
+ +
+ + + +
+ + +
+
+ ) +} diff --git a/apps/dashboard/modules/job-cards/job-card-general-info.tsx b/apps/dashboard/modules/job-cards/job-card-general-info.tsx new file mode 100644 index 0000000..60a5c0b --- /dev/null +++ b/apps/dashboard/modules/job-cards/job-card-general-info.tsx @@ -0,0 +1,249 @@ +import { + ClipboardList, + Calendar, + Hash, + Users, + Car, + Building2, + Gauge, + Clock, + UserCheck, + Briefcase, + Receipt, + DollarSign, +} from "lucide-react" +import { + Card, + CardContent, + CardHeader, + CardTitle, +} from "@/shared/components/ui/card" +import { Badge } from "@/shared/components/ui/badge" +import { Separator } from "@/shared/components/ui/separator" + +type JobCardData = { + id?: number + title?: string + status?: string + check_in_date?: string + km_in?: number + tax_inclusive?: string + discount_type?: string + discount_at?: string + customer_id?: number + customer_name?: string + vehicle_id?: number + vehicle_name?: string + department_id?: number + department_name?: string + sales_person_id?: number + sales_person_name?: string + service_writer_id?: number + service_writer_name?: string + purchase_orders_count?: number + bills_count?: number + expenses_count?: number + tasks_count?: number + appointments_count?: number + created_at?: string + updated_at?: string +} + +type JobCardGeneralInfoProps = { + jobCard: JobCardData +} + +function InfoItem({ + icon: Icon, + label, + value, +}: { + icon: React.ComponentType<{ className?: string }> + label: string + value?: string | null +}) { + return ( +
+
+ +
+
+ {label} + + {value || } + +
+
+ ) +} + +const statusColorMap: Record = { + draft: "secondary", + check_in: "default", + in_progress: "default", + completed: "default", + invoiced: "outline", + cancelled: "destructive", +} + +export function JobCardGeneralInfo({ jobCard }: JobCardGeneralInfoProps) { + const formatStatus = (status?: string) => { + if (!status) return null + return status + .split("_") + .map((w) => w.charAt(0).toUpperCase() + w.slice(1)) + .join(" ") + } + + return ( +
+ {/* Job Card Details */} + + + + + Job Card Details + + + +
+ {jobCard.title && ( + {jobCard.title} + )} + {jobCard.status && ( + + {formatStatus(jobCard.status)} + + )} +
+ +
+ + + + +
+
+
+ + {/* Related Information */} + + + + + Related Information + + + +
+ + + + + +
+
+
+ + {/* Tax & Discount Settings */} + + + + + Tax & Discount Settings + + + + + + + + + + {/* Counts */} + + + + + Related Counts + + + + + + + + + + +
+ ) +} diff --git a/apps/dashboard/modules/job-cards/job-card-recommendation-form.tsx b/apps/dashboard/modules/job-cards/job-card-recommendation-form.tsx new file mode 100644 index 0000000..3083c2a --- /dev/null +++ b/apps/dashboard/modules/job-cards/job-card-recommendation-form.tsx @@ -0,0 +1,62 @@ +"use client" + +import { z } from "zod" +import { useForm } from "react-hook-form" +import { zodResolver } from "@hookform/resolvers/zod" +import { Plus } from "lucide-react" +import { Button } from "@/shared/components/ui/button" +import { FieldGroup } from "@/shared/components/ui/field" +import { Rhform, RhfTextareaField } from "@/shared/components/form" +import { toast } from "sonner" +import { useAuthApi } from "@/shared/useApi" + +const schema = z.object({ + recommendation: z.string().min(1, "Recommendation is required"), +}) + +type FormValues = z.infer + +type JobCardRecommendationFormProps = { + jobCardId: string + onSuccess?: () => void +} + +export function JobCardRecommendationForm({ jobCardId, onSuccess }: JobCardRecommendationFormProps) { + const api = useAuthApi() + + const form = useForm({ + resolver: zodResolver(schema), + defaultValues: { recommendation: "" }, + }) + + const handleSubmit = async (values: FormValues) => { + try { + await api.jobCards.addShopRecommendation(jobCardId, { + recommendation: values.recommendation, + }) + toast.success("Shop recommendation added") + form.reset() + onSuccess?.() + } catch { + toast.error("Failed to add shop recommendation") + } + } + + return ( + + + + + + + ) +} diff --git a/apps/dashboard/modules/job-cards/job-card-remark-form.tsx b/apps/dashboard/modules/job-cards/job-card-remark-form.tsx new file mode 100644 index 0000000..90ce9dc --- /dev/null +++ b/apps/dashboard/modules/job-cards/job-card-remark-form.tsx @@ -0,0 +1,62 @@ +"use client" + +import { z } from "zod" +import { useForm } from "react-hook-form" +import { zodResolver } from "@hookform/resolvers/zod" +import { Plus } from "lucide-react" +import { Button } from "@/shared/components/ui/button" +import { FieldGroup } from "@/shared/components/ui/field" +import { Rhform, RhfTextareaField } from "@/shared/components/form" +import { toast } from "sonner" +import { useAuthApi } from "@/shared/useApi" + +const schema = z.object({ + remark: z.string().min(1, "Remark is required"), +}) + +type FormValues = z.infer + +type JobCardRemarkFormProps = { + jobCardId: string + onSuccess?: () => void +} + +export function JobCardRemarkForm({ jobCardId, onSuccess }: JobCardRemarkFormProps) { + const api = useAuthApi() + + const form = useForm({ + resolver: zodResolver(schema), + defaultValues: { remark: "" }, + }) + + const handleSubmit = async (values: FormValues) => { + try { + await api.jobCards.addCustomerRemark(jobCardId, { + remark: values.remark, + }) + toast.success("Customer remark added") + form.reset() + onSuccess?.() + } catch { + toast.error("Failed to add customer remark") + } + } + + return ( + + + + + + + ) +} diff --git a/apps/dashboard/modules/job-cards/job-card-status-stepper.tsx b/apps/dashboard/modules/job-cards/job-card-status-stepper.tsx new file mode 100644 index 0000000..e35e542 --- /dev/null +++ b/apps/dashboard/modules/job-cards/job-card-status-stepper.tsx @@ -0,0 +1,125 @@ +"use client" + +import { useMutation } from "@tanstack/react-query" +import { toast } from "sonner" +import { cn } from "@/shared/lib/utils" +import { useAuthApi } from "@/shared/useApi" +import { useJobCard } from "./job-card-context" +import { JOB_CARD_STATUSES, type JobCardStatus } from "./job-card.schema" +import { + Tooltip, + TooltipContent, + TooltipProvider, + TooltipTrigger, +} from "@/shared/components/ui/tooltip" +import { + CircleDot, + LogIn, + Loader, + Pause, + PackageCheck, + CheckCircle2, +} from "lucide-react" + +// ── Status icon mapping ── + +const STATUS_ICONS: Record> = { + draft: CircleDot, + check_in: LogIn, + in_progress: Loader, + on_hold: Pause, + ready_to_deliver: PackageCheck, + delivered: CheckCircle2, +} + +// ── Component ── + +type JobCardStatusStepperProps = { + jobCardId: string +} + +export function JobCardStatusStepper({ jobCardId }: JobCardStatusStepperProps) { + const api = useAuthApi() + const jobCard = useJobCard() + const currentStatus = jobCard?.status ?? "draft" + + const currentIndex = JOB_CARD_STATUSES.findIndex((s) => s.value === currentStatus) + + const { mutate, isPending, variables } = useMutation({ + mutationFn: async (status: JobCardStatus) => { + const promise = api.jobCards.changeStatus(jobCardId, { status }) + toast.promise(promise, { + loading: "Updating status...", + success: "Status updated successfully", + error: "Failed to update status", + }) + return promise + }, + onSuccess: (_data, status) => { + jobCard?.setStatus(status) + }, + }) + + const handleClick = (status: JobCardStatus, index: number) => { + if (isPending) return + if (status === currentStatus) return + mutate(status) + } + + return ( + +
+ {JOB_CARD_STATUSES.map((step, index) => { + const Icon = STATUS_ICONS[step.value] + const isActive = step.value === currentStatus + const isCompleted = index < currentIndex + const isTransitioning = isPending && variables === step.value + const isClickable = !isPending && step.value !== currentStatus + + return ( +
+ + + + + + {isActive ? `Current: ${step.label}` : `Change to ${step.label}`} + + + + {/* Connector line */} + {index < JOB_CARD_STATUSES.length - 1 && ( +
+ )} +
+ ) + })} +
+ + ) +} diff --git a/apps/dashboard/modules/job-cards/job-card.schema.ts b/apps/dashboard/modules/job-cards/job-card.schema.ts new file mode 100644 index 0000000..366a9d9 --- /dev/null +++ b/apps/dashboard/modules/job-cards/job-card.schema.ts @@ -0,0 +1,53 @@ +import { z } from "zod" + +const relationFieldSchema = z + .object({ value: z.string(), label: z.string() }) + .nullable() + +// ── Job Card Statuses ── + +export const JOB_CARD_STATUSES = [ + { value: "draft", label: "Draft" }, + { value: "check_in", label: "Check In" }, + { value: "in_progress", label: "In Progress" }, + { value: "on_hold", label: "On Hold" }, + { value: "ready_to_deliver", label: "Ready to Deliver" }, + { value: "delivered", label: "Delivered" }, +] as const + +export type JobCardStatus = (typeof JOB_CARD_STATUSES)[number]["value"] + +const TAX_INCLUSIVE_OPTIONS = [ + { value: "Tax Inclusive", label: "Tax Inclusive" }, + { value: "Tax Exclusive", label: "Tax Exclusive" }, +] + +const DISCOUNT_TYPE_OPTIONS = [ + { value: "no", label: "No Discount" }, + { value: "transaction_level", label: "Transaction Level" }, +] + +const DISCOUNT_AT_OPTIONS = [ + { value: "inclusive_of_tax", label: "Inclusive of Tax" }, + { value: "exclusive_of_tax", label: "Exclusive of Tax" }, +] + +const jobCardFormSchema = z.object({ + // ── Required fields ── + title: z.string().min(1, "Title is required"), + + // ── Relations ── + customer: relationFieldSchema, + vehicle: relationFieldSchema, + + // ── Settings ── + status: z.string().optional(), + tax_inclusive: z.string().optional(), + discount_type: z.string().optional(), + discount_at: z.string().optional(), +}) + +type JobCardFormValues = z.infer + +export { jobCardFormSchema, relationFieldSchema, TAX_INCLUSIVE_OPTIONS, DISCOUNT_TYPE_OPTIONS, DISCOUNT_AT_OPTIONS } +export type { JobCardFormValues } diff --git a/apps/dashboard/modules/payment-received/payment-received-form.tsx b/apps/dashboard/modules/payment-received/payment-received-form.tsx new file mode 100644 index 0000000..8786fe9 --- /dev/null +++ b/apps/dashboard/modules/payment-received/payment-received-form.tsx @@ -0,0 +1,201 @@ +"use client" + +import { AlertTriangle, Plus, Save } from "lucide-react" + +import { Button } from "@/shared/components/ui/button" +import { Alert, AlertTitle } from "@/shared/components/ui/alert" +import { FieldGroup } from "@/shared/components/ui/field" +import { + Rhform, + RhfTextField, + RhfTextareaField, + RhfAsyncSelectField, +} from "@/shared/components/form" +import { toast } from "sonner" +import { useAuthApi } from "@/shared/useApi" +import { useResourceForm } from "@/shared/hooks/use-resource-form" +import { useFormMutation } from "@/shared/hooks/use-form-mutation" +import { toRelation, toId } from "@/shared/lib/utils" + +import { + paymentReceivedFormSchema, + type PaymentReceivedFormValues, +} from "./payment-received.schema" +import { PAYMENT_ROUTES, CUSTOMER_ROUTES, JOB_CARD_ROUTES } from "@garage/api" + +// ── Props ── + +export type PaymentReceivedFormProps = { + resourceId?: string | null + initialData?: unknown + onSuccess?: () => void +} + +// ── Default values ── + +const DEFAULT_VALUES: PaymentReceivedFormValues = { + job_card: null, + payment_mode: null, + customer: null, + amount_received: "", + payment_number: "", + payment_date: "", + note: "", +} + +// ── Mapping helpers ── + +function mapToFormValues(data: unknown): PaymentReceivedFormValues { + const d = (data as any)?.data ?? data ?? {} + + return { + job_card: toRelation(d.job_card_id, d.job_card_name), + payment_mode: toRelation(d.payment_mode_id, d.payment_mode_name), + customer: toRelation(d.customer_id, d.customer_name), + amount_received: d.amount_received ? String(d.amount_received) : "", + payment_number: d.payment_number || "", + payment_date: d.payment_date || "", + note: d.note || "", + } +} + +function mapFormToPayload(values: PaymentReceivedFormValues) { + return { + job_card_id: toId(values.job_card), + payment_mode_id: toId(values.payment_mode), + customer_id: toId(values.customer), + amount_received: values.amount_received, + payment_number: values.payment_number || undefined, + payment_date: values.payment_date, + note: values.note || undefined, + } +} + +// ── Shared mapOption for async selects ── + +const mapLookupOption = (item: any) => ({ + value: String(item.id), + label: item.name || item.title, +}) + +const STORE_OBJECT = { getOptionValue: (o: any) => o, getOptionLabel: (o: any) => o.label } + +// ── Component ── + +export function PaymentReceivedForm({ resourceId, initialData, onSuccess }: PaymentReceivedFormProps) { + const api = useAuthApi() + + const { form, isEditing } = useResourceForm({ + schema: paymentReceivedFormSchema, + defaultValues: DEFAULT_VALUES, + resourceId, + initialData, + mapToFormValues, + }) + + const { mutate, error, isPending } = useFormMutation(form, { + mutationFn: (values: PaymentReceivedFormValues) => { + const payload = mapFormToPayload(values) + const promise = isEditing && resourceId + ? api.payments.updateReceived(resourceId, payload as any) + : api.payments.createReceived(payload as any) + toast.promise(promise, { + loading: isEditing ? "Updating payment..." : "Recording payment...", + success: isEditing ? "Payment updated successfully" : "Payment recorded successfully", + error: isEditing ? "Failed to update payment" : "Failed to record payment", + }) + return promise + }, + onSuccess: () => { + form.reset() + onSuccess?.() + }, + }) + + return ( + mutate(values)}> + {error && ( + + + + {isEditing ? "Failed to update payment" : "Failed to record payment"} + + {error.message} + + )} + + +
+ api.customers.list()} + mapOption={(item: any) => ({ + value: String(item.id), + label: item.first_name + ? `${item.first_name} ${item.last_name || ""}`.trim() + : item.name || `#${item.id}`, + })} + {...STORE_OBJECT} + /> + api.jobCards.list()} + mapOption={(item: any) => ({ + value: String(item.id), + label: item.job_card_number || item.name || `#${item.id}`, + })} + {...STORE_OBJECT} + /> +
+ +
+ + api.payments.listModes()} + mapOption={mapLookupOption} + {...STORE_OBJECT} + /> +
+ +
+ + +
+ + + + +
+
+ ) +} diff --git a/apps/dashboard/modules/payment-received/payment-received.schema.ts b/apps/dashboard/modules/payment-received/payment-received.schema.ts new file mode 100644 index 0000000..c3ab6fa --- /dev/null +++ b/apps/dashboard/modules/payment-received/payment-received.schema.ts @@ -0,0 +1,23 @@ +import { z } from "zod" + +const relationFieldSchema = z + .object({ value: z.string(), label: z.string() }) + .nullable() + +const paymentReceivedFormSchema = z.object({ + // ── Relations ── + job_card: relationFieldSchema, + payment_mode: relationFieldSchema, + customer: relationFieldSchema, + + // ── Payment info ── + amount_received: z.string().min(1, "Amount is required"), + payment_number: z.string().optional(), + payment_date: z.string().min(1, "Payment date is required"), + note: z.string().optional(), +}) + +type PaymentReceivedFormValues = z.infer + +export { paymentReceivedFormSchema, relationFieldSchema } +export type { PaymentReceivedFormValues } diff --git a/apps/dashboard/modules/settings/holiday-year/holiday-year-form.tsx b/apps/dashboard/modules/settings/holiday-year/holiday-year-form.tsx new file mode 100644 index 0000000..9ce59e1 --- /dev/null +++ b/apps/dashboard/modules/settings/holiday-year/holiday-year-form.tsx @@ -0,0 +1,97 @@ +"use client" + +import { AlertTriangle, Plus } from "lucide-react" + +import { Button } from "@/shared/components/ui/button" +import { Alert, AlertTitle } from "@/shared/components/ui/alert" +import { FieldGroup } from "@/shared/components/ui/field" +import { + Rhform, + RhfTextField, +} from "@/shared/components/form" +import { toast } from "sonner" +import { useAuthApi } from "@/shared/useApi" +import { useResourceForm } from "@/shared/hooks/use-resource-form" +import { useFormMutation } from "@/shared/hooks/use-form-mutation" + +import { holidayYearFormSchema, type HolidayYearFormValues } from "./holiday-year.schema" + +// ── Props ── + +export type HolidayYearFormProps = { + resourceId?: string | null + initialData?: unknown + onSuccess?: () => void +} + +// ── Default values ── + +const DEFAULT_VALUES: HolidayYearFormValues = { + year: new Date().getFullYear(), +} + +// ── Mapping helpers ── + +function mapToFormValues(data: unknown): HolidayYearFormValues { + const d = (data as any)?.data ?? data ?? {} + return { + year: d.year ?? new Date().getFullYear(), + } +} + +// ── Component ── + +export function HolidayYearForm({ resourceId, initialData, onSuccess }: HolidayYearFormProps) { + const api = useAuthApi() + + const { form } = useResourceForm({ + schema: holidayYearFormSchema, + defaultValues: DEFAULT_VALUES, + resourceId: null, + initialData, + mapToFormValues, + }) + + const { mutate, error, isPending } = useFormMutation(form, { + mutationFn: (values: HolidayYearFormValues) => { + const promise = api.holidayYears.create({ year: values.year }) + toast.promise(promise, { + loading: "Creating holiday year...", + success: "Holiday year created successfully", + error: "Failed to create holiday year", + }) + return promise + }, + onSuccess: () => { + form.reset() + onSuccess?.() + }, + }) + + return ( + mutate(values)}> + {error && ( + + + Failed to create holiday year + {error.message} + + )} + + + + + + + + ) +} diff --git a/apps/dashboard/modules/settings/holiday-year/holiday-year.schema.ts b/apps/dashboard/modules/settings/holiday-year/holiday-year.schema.ts new file mode 100644 index 0000000..9d6162c --- /dev/null +++ b/apps/dashboard/modules/settings/holiday-year/holiday-year.schema.ts @@ -0,0 +1,7 @@ +import { z } from "zod" + +export const holidayYearFormSchema = z.object({ + year: z.coerce.number().min(1900, "Year is required").max(2100, "Invalid year"), +}) + +export type HolidayYearFormValues = z.infer diff --git a/apps/dashboard/modules/settings/tax-rates/tax-form.tsx b/apps/dashboard/modules/settings/tax-rates/tax-form.tsx new file mode 100644 index 0000000..45460e8 --- /dev/null +++ b/apps/dashboard/modules/settings/tax-rates/tax-form.tsx @@ -0,0 +1,139 @@ +"use client" + +import { AlertTriangle, Plus, Save } from "lucide-react" + +import { Button } from "@/shared/components/ui/button" +import { Alert, AlertTitle } from "@/shared/components/ui/alert" +import { FieldGroup } from "@/shared/components/ui/field" +import { + Rhform, + RhfTextField, + RhfTextareaField, + RhfCheckboxField, +} from "@/shared/components/form" +import { toast } from "sonner" +import { useAuthApi } from "@/shared/useApi" +import { useResourceForm } from "@/shared/hooks/use-resource-form" +import { useFormMutation } from "@/shared/hooks/use-form-mutation" + +import { taxFormSchema, type TaxFormValues } from "./tax.schema" +import { TAX_ROUTES } from "@garage/api" + +// ── Props ── + +export type TaxFormProps = { + resourceId?: string | null + initialData?: unknown + onSuccess?: () => void +} + +// ── Default values ── + +const DEFAULT_VALUES: TaxFormValues = { + title: "", + note: "", + rate: 0, + is_default: false, +} + +// ── Mapping helpers ── + +function mapToFormValues(data: unknown): TaxFormValues { + const d = (data as any)?.data ?? data ?? {} + return { + title: d.title ?? "", + note: d.note ?? "", + rate: d.rate ? Number(d.rate) : 0, + is_default: d.is_default ?? false, + } +} + +function mapFormToPayload(values: TaxFormValues) { + return { + title: values.title, + note: values.note || undefined, + rate: values.rate, + is_default: values.is_default, + } +} + +// ── Component ── + +export function TaxForm({ resourceId, initialData, onSuccess }: TaxFormProps) { + const api = useAuthApi() + + const { form, isEditing } = useResourceForm({ + schema: taxFormSchema, + defaultValues: DEFAULT_VALUES, + resourceId, + initialData, + queryKey: [TAX_ROUTES.BY_ID, resourceId], + mapToFormValues, + }) + + const { mutate, error, isPending } = useFormMutation(form, { + mutationFn: (values: TaxFormValues) => { + const payload = mapFormToPayload(values) + const promise = isEditing && resourceId + ? api.taxes.update(resourceId, payload) + : api.taxes.create(payload) + toast.promise(promise, { + loading: isEditing ? "Updating tax..." : "Creating tax...", + success: isEditing ? "Tax updated successfully" : "Tax created successfully", + error: isEditing ? "Failed to update tax" : "Failed to create tax", + }) + return promise + }, + onSuccess: () => { + form.reset() + onSuccess?.() + }, + }) + + return ( + mutate(values)}> + {error && ( + + + + {isEditing ? "Failed to update tax" : "Failed to create tax"} + + {error.message} + + )} + + + + + + + + + + + ) +} diff --git a/apps/dashboard/modules/settings/tax-rates/tax.schema.ts b/apps/dashboard/modules/settings/tax-rates/tax.schema.ts new file mode 100644 index 0000000..fc6ff45 --- /dev/null +++ b/apps/dashboard/modules/settings/tax-rates/tax.schema.ts @@ -0,0 +1,10 @@ +import { z } from "zod" + +export const taxFormSchema = z.object({ + title: z.string().min(1, "Title is required"), + note: z.string().optional(), + rate: z.coerce.number().min(0, "Rate must be 0 or more"), + is_default: z.boolean().optional(), +}) + +export type TaxFormValues = z.infer diff --git a/apps/dashboard/modules/vehicles/inline-forms/document-type-inline-form.tsx b/apps/dashboard/modules/vehicles/inline-forms/document-type-inline-form.tsx new file mode 100644 index 0000000..cd665c0 --- /dev/null +++ b/apps/dashboard/modules/vehicles/inline-forms/document-type-inline-form.tsx @@ -0,0 +1,55 @@ +"use client" + +import { z } from "zod" +import { useForm } from "react-hook-form" +import { zodResolver } from "@hookform/resolvers/zod" +import { Plus } from "lucide-react" +import { Button } from "@/shared/components/ui/button" +import { FieldGroup } from "@/shared/components/ui/field" +import { Rhform, RhfTextField, type InlineCreateFormProps } from "@/shared/components/form" +import { toast } from "sonner" +import { useAuthApi } from "@/shared/useApi" + +const schema = z.object({ + title: z.string().min(1, "Title is required"), +}) + +type FormValues = z.infer + +export function DocumentTypeInlineForm({ onSuccess }: InlineCreateFormProps) { + const api = useAuthApi() + + const form = useForm({ + resolver: zodResolver(schema), + defaultValues: { title: "" }, + }) + + const handleSubmit = async (values: FormValues) => { + try { + const result = await api.vehicleDocuments.createDocumentType({ title: values.title }) + toast.success("Document type created") + form.reset() + const item = (result as any)?.data ?? result + onSuccess({ value: String(item.id), label: item.title ?? item.name ?? String(item.id) }) + } catch { + toast.error("Failed to create document type") + } + } + + return ( + + + + + + + ) +} diff --git a/apps/dashboard/modules/vehicles/mileage-form.tsx b/apps/dashboard/modules/vehicles/mileage-form.tsx new file mode 100644 index 0000000..06056a5 --- /dev/null +++ b/apps/dashboard/modules/vehicles/mileage-form.tsx @@ -0,0 +1,119 @@ +"use client" + +import { AlertTriangle, Plus, Save } from "lucide-react" + +import { Button } from "@/shared/components/ui/button" +import { Alert, AlertTitle } from "@/shared/components/ui/alert" +import { FieldGroup } from "@/shared/components/ui/field" +import { Rhform, RhfTextField } from "@/shared/components/form" +import { toast } from "sonner" +import { useAuthApi } from "@/shared/useApi" +import { useResourceForm } from "@/shared/hooks/use-resource-form" +import { useFormMutation } from "@/shared/hooks/use-form-mutation" + +import { mileageFormSchema, type MileageFormValues } from "./mileage.schema" + +// ── Props ── + +export type MileageFormProps = { + vehicleId: string + resourceId?: string | null + initialData?: unknown + onSuccess?: () => void +} + +// ── Default values ── + +const DEFAULT_VALUES: MileageFormValues = { + mileage: 0, + date: "", + time: "", +} + +// ── Mapping helpers ── + +function mapToFormValues(data: unknown): MileageFormValues { + const d = (data as any)?.data ?? data ?? {} + return { + mileage: d.mileage ?? 0, + date: d.date || "", + time: d.time || "", + } +} + +// ── Component ── + +export function MileageForm({ vehicleId, resourceId, initialData, onSuccess }: MileageFormProps) { + const api = useAuthApi() + + const { form, isEditing } = useResourceForm({ + schema: mileageFormSchema, + defaultValues: DEFAULT_VALUES, + resourceId, + initialData, + mapToFormValues, + }) + + const { mutate, error, isPending } = useFormMutation(form, { + mutationFn: (values: MileageFormValues) => { + const payload = { mileage: values.mileage, date: values.date, time: values.time } + const promise = isEditing && resourceId + ? api.vehicleDocuments.updateMileage(resourceId, payload as any) + : api.vehicleDocuments.createMileage({ vehicle_id: Number(vehicleId), ...payload } as any) + toast.promise(promise, { + loading: isEditing ? "Updating mileage..." : "Adding mileage...", + success: isEditing ? "Mileage updated successfully" : "Mileage added successfully", + error: isEditing ? "Failed to update mileage" : "Failed to add mileage", + }) + return promise + }, + onSuccess: () => { + form.reset() + onSuccess?.() + }, + }) + + return ( + mutate(values)}> + {error && ( + + + + {isEditing ? "Failed to update mileage" : "Failed to add mileage"} + + {error.message} + + )} + + + + +
+ + +
+ + +
+
+ ) +} diff --git a/apps/dashboard/modules/vehicles/mileage.schema.ts b/apps/dashboard/modules/vehicles/mileage.schema.ts new file mode 100644 index 0000000..cbdeaf1 --- /dev/null +++ b/apps/dashboard/modules/vehicles/mileage.schema.ts @@ -0,0 +1,9 @@ +import { z } from "zod" + +export const mileageFormSchema = z.object({ + mileage: z.coerce.number({ message: "Mileage is required" }).min(0, "Mileage must be 0 or greater"), + date: z.string().min(1, "Date is required"), + time: z.string().min(1, "Time is required"), +}) + +export type MileageFormValues = z.infer diff --git a/apps/dashboard/modules/vehicles/vehicle-actions.tsx b/apps/dashboard/modules/vehicles/vehicle-actions.tsx new file mode 100644 index 0000000..b086be5 --- /dev/null +++ b/apps/dashboard/modules/vehicles/vehicle-actions.tsx @@ -0,0 +1,50 @@ +"use client" + +import { useAuthApi } from "@/shared/useApi" +import { useRouter } from "next/navigation" +import { Button } from "@/shared/components/ui/button" +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from "@/shared/components/ui/dropdown-menu" +import { Ellipsis, Pencil, Trash2 } from "lucide-react" + +type VehicleActionsProps = { + vehicleId: string +} + +export function VehicleActions({ vehicleId }: VehicleActionsProps) { + const api = useAuthApi() + const router = useRouter() + + const handleEdit = () => { + router.push(`/sales/vehicles/${vehicleId}/edit`) + } + + const handleDelete = async () => { + await api.vehicles.destroy(vehicleId) + router.push("/sales/vehicles") + } + + return ( + + + + + + + + Edit + + + + Delete + + + + ) +} diff --git a/apps/dashboard/modules/vehicles/vehicle-context.tsx b/apps/dashboard/modules/vehicles/vehicle-context.tsx new file mode 100644 index 0000000..c5fb940 --- /dev/null +++ b/apps/dashboard/modules/vehicles/vehicle-context.tsx @@ -0,0 +1,18 @@ +"use client" + +import { createContext, useContext } from "react" + +type VehicleContextValue = { + id: string + label: string +} + +const VehicleContext = createContext(null) + +export function VehicleProvider({ vehicle, children }: { vehicle: VehicleContextValue; children: React.ReactNode }) { + return {children} +} + +export function useVehicle() { + return useContext(VehicleContext) +} diff --git a/apps/dashboard/modules/vehicles/vehicle-document-form.tsx b/apps/dashboard/modules/vehicles/vehicle-document-form.tsx new file mode 100644 index 0000000..0b06279 --- /dev/null +++ b/apps/dashboard/modules/vehicles/vehicle-document-form.tsx @@ -0,0 +1,144 @@ +"use client" + +import { AlertTriangle, Plus, Save } from "lucide-react" + +import { Button } from "@/shared/components/ui/button" +import { Alert, AlertTitle } from "@/shared/components/ui/alert" +import { FieldGroup } from "@/shared/components/ui/field" +import { + Rhform, + RhfTextareaField, + RhfAsyncSelectField, + RhfDocumentField, +} from "@/shared/components/form" +import { DocumentTypeInlineForm } from "./inline-forms/document-type-inline-form" +import { toast } from "sonner" +import { useAuthApi } from "@/shared/useApi" +import { useResourceForm } from "@/shared/hooks/use-resource-form" +import { useFormMutation } from "@/shared/hooks/use-form-mutation" +import { toRelation, toId } from "@/shared/lib/utils" + +import { vehicleDocumentFormSchema, type VehicleDocumentFormValues } from "./vehicle-document.schema" + +// ── Props ── + +export type VehicleDocumentFormProps = { + vehicleId: string + resourceId?: string | null + initialData?: unknown + onSuccess?: () => void +} + +// ── Default values ── + +const DEFAULT_VALUES: VehicleDocumentFormValues = { + document_type: null, + file: null, + note: "", +} + +// ── Mapping helpers ── + +const mapLookupOption = (item: any) => ({ + value: String(item.id), + label: item.name ?? item.title ?? String(item.id), +}) + +const STORE_OBJECT = { getOptionValue: (o: any) => o, getOptionLabel: (o: any) => o.label } + +function mapToFormValues(data: unknown): VehicleDocumentFormValues { + const d = (data as any)?.data ?? data ?? {} + + return { + document_type: toRelation(d.document_type_id, d.document_type?.name ?? d.document_type?.title), + file: null, + note: d.note || "", + } +} + +function mapToPayload(values: VehicleDocumentFormValues, vehicleId: string) { + return { + vehicle_id: Number(vehicleId), + document_type_id: toId(values.document_type), + file: values.file instanceof File ? values.file : undefined, + note: values.note || undefined, + } +} + +// ── Component ── + +export function VehicleDocumentForm({ vehicleId, resourceId, initialData, onSuccess }: VehicleDocumentFormProps) { + const api = useAuthApi() + + const { form, isEditing } = useResourceForm({ + schema: vehicleDocumentFormSchema, + defaultValues: DEFAULT_VALUES, + resourceId, + initialData, + mapToFormValues, + }) + + const { mutate, error, isPending } = useFormMutation(form, { + mutationFn: (values: VehicleDocumentFormValues) => { + const payload = mapToPayload(values, vehicleId) + const promise = isEditing && resourceId + ? api.vehicleDocuments.updateDocument(resourceId, payload) + : api.vehicleDocuments.createDocument(payload) + toast.promise(promise, { + loading: isEditing ? "Updating document..." : "Uploading document...", + success: isEditing ? "Document updated successfully" : "Document uploaded successfully", + error: isEditing ? "Failed to update document" : "Failed to upload document", + }) + return promise + }, + onSuccess: () => { + form.reset() + onSuccess?.() + }, + }) + + return ( + mutate(values)}> + {error && ( + + + + {isEditing ? "Failed to update document" : "Failed to upload document"} + + {error.message} + + )} + + + api.vehicleDocuments.listDocumentTypes()} + mapOption={mapLookupOption} + createForm={(props) => } + createLabel="Document Type" + {...STORE_OBJECT} + /> + + + + + + + + + ) +} diff --git a/apps/dashboard/modules/vehicles/vehicle-document.schema.ts b/apps/dashboard/modules/vehicles/vehicle-document.schema.ts new file mode 100644 index 0000000..7c081f8 --- /dev/null +++ b/apps/dashboard/modules/vehicles/vehicle-document.schema.ts @@ -0,0 +1,11 @@ +import { z } from "zod" + +const relationFieldSchema = z.object({ value: z.string(), label: z.string() }).nullable() + +export const vehicleDocumentFormSchema = z.object({ + document_type: relationFieldSchema, + file: z.instanceof(File, { message: "File is required" }).nullable(), + note: z.string().optional(), +}) + +export type VehicleDocumentFormValues = z.infer diff --git a/apps/dashboard/modules/vehicles/vehicle-form.tsx b/apps/dashboard/modules/vehicles/vehicle-form.tsx index 29c9a71..36e4806 100644 --- a/apps/dashboard/modules/vehicles/vehicle-form.tsx +++ b/apps/dashboard/modules/vehicles/vehicle-form.tsx @@ -10,6 +10,7 @@ import { RhfTextField, RhfTextareaField, RhfAsyncSelectField, + RhfImageField, } from "@/shared/components/form" import { ShopTypeInlineForm } from "./inline-forms/shop-type-inline-form" import { BodyTypeInlineForm } from "./inline-forms/body-type-inline-form" @@ -52,6 +53,7 @@ const DEFAULT_VALUES: VehicleFormValues = { mileage: "", owners_number: "", note: "", + image: null, } // ── Mapping helpers ── @@ -83,10 +85,11 @@ function mapToFormValues(data: unknown): VehicleFormValues { mileage: d.mileage || "", owners_number: d.owners_number || "", note: d.note || "", + image: null, } } -function mapCreatePayload(values: VehicleFormValues) { +function mapToPayload(values: VehicleFormValues) { return { shop_type_id: toId(values.shop_type), vehicle_body_type_id: toId(values.vehicle_body_type), @@ -104,13 +107,7 @@ function mapCreatePayload(values: VehicleFormValues) { mileage: values.mileage || undefined, owners_number: values.owners_number || undefined, note: values.note || undefined, - } -} - -function mapUpdatePayload(values: VehicleFormValues) { - return { - mileage: values.mileage || undefined, - license_plate: values.license_plate || undefined, + image: values.image instanceof File ? values.image : undefined, } } @@ -129,9 +126,10 @@ export function VehicleForm({ resourceId, initialData, onSuccess }: VehicleFormP const { mutate, error, isPending } = useFormMutation(form, { mutationFn: (values: VehicleFormValues) => { + const payload = mapToPayload(values) const promise = isEditing && resourceId - ? api.vehicles.update(resourceId, mapUpdatePayload(values)) - : api.vehicles.create(mapCreatePayload(values)) + ? api.vehicles.update(resourceId, payload) + : api.vehicles.create(payload) toast.promise(promise, { loading: isEditing ? "Updating vehicle..." : "Creating vehicle...", success: isEditing ? "Vehicle updated successfully" : "Vehicle created successfully", @@ -158,102 +156,97 @@ export function VehicleForm({ resourceId, initialData, onSuccess }: VehicleFormP )} - {!isEditing && ( - <> - {/* Vehicle identity */} -
- - - -
+ {/* Vehicle identity */} +
+ + + +
- + - {/* Associations */} -
- api.shopTypes.list()} - mapOption={mapLookupOption} - createForm={(props) => } - createLabel="Shop Type" - {...STORE_OBJECT} - /> - api.vehicleAttributes.listBodyTypes()} - mapOption={mapLookupOption} - createForm={(props) => } - createLabel="Body Type" - {...STORE_OBJECT} - /> -
+ {/* Associations */} +
+ api.shopTypes.list()} + mapOption={mapLookupOption} + createForm={(props) => } + createLabel="Shop Type" + {...STORE_OBJECT} + /> + api.vehicleAttributes.listBodyTypes()} + mapOption={mapLookupOption} + createForm={(props) => } + createLabel="Body Type" + {...STORE_OBJECT} + /> +
-
- api.vehicleAttributes.listFuelTypes()} - mapOption={mapLookupOption} - createForm={(props) => } - createLabel="Fuel Type" - {...STORE_OBJECT} - /> - api.vehicleAttributes.listTransmissions()} - mapOption={mapLookupOption} - createForm={(props) => } - createLabel="Transmission" - {...STORE_OBJECT} - /> -
+
+ api.vehicleAttributes.listFuelTypes()} + mapOption={mapLookupOption} + createForm={(props) => } + createLabel="Fuel Type" + {...STORE_OBJECT} + /> + api.vehicleAttributes.listTransmissions()} + mapOption={mapLookupOption} + createForm={(props) => } + createLabel="Transmission" + {...STORE_OBJECT} + /> +
-
- api.vehicleAttributes.listColors()} - mapOption={mapLookupOption} - createForm={(props) => } - createLabel="Color" - {...STORE_OBJECT} - /> - -
+
+ api.vehicleAttributes.listColors()} + mapOption={mapLookupOption} + createForm={(props) => } + createLabel="Color" + {...STORE_OBJECT} + /> + +
- {/* Technical specs */} -
- - -
+ {/* Technical specs */} +
+ + +
- - - )} + - {/* Editable in both create and update */}
- {!isEditing && ( - - )} + + + +
+ + ) +} diff --git a/apps/dashboard/modules/vendors/vendor.schema.ts b/apps/dashboard/modules/vendors/vendor.schema.ts new file mode 100644 index 0000000..13f5a8a --- /dev/null +++ b/apps/dashboard/modules/vendors/vendor.schema.ts @@ -0,0 +1,15 @@ +import { z } from "zod" + +const vendorFormSchema = z.object({ + first_name: z.string().min(1, "First name is required"), + last_name: z.string().optional(), + company_name: z.string().optional(), + email: z + .union([z.string().email("Enter a valid email address"), z.literal("")]) + .optional(), +}) + +type VendorFormValues = z.infer + +export { vendorFormSchema } +export type { VendorFormValues } diff --git a/apps/dashboard/package.json b/apps/dashboard/package.json index 23276c1..cca0b05 100644 --- a/apps/dashboard/package.json +++ b/apps/dashboard/package.json @@ -18,8 +18,8 @@ }, "dependencies": { "@base-ui/react": "^1.3.0", - "@hookform/resolvers": "^5.2.2", "@garage/api": "workspace:*", + "@hookform/resolvers": "^5.2.2", "@tanstack/react-query": "^5.95.2", "@tanstack/react-table": "^8.21.3", "class-variance-authority": "^0.7.1", @@ -32,6 +32,7 @@ "next": "16.1.7", "next-themes": "^0.4.6", "nuqs": "^2.8.9", + "object-to-formdata": "^4.5.1", "radix-ui": "^1.4.3", "react": "^19.2.4", "react-day-picker": "^9.14.0", diff --git a/apps/dashboard/shared/components/form/controls/document-input-field.tsx b/apps/dashboard/shared/components/form/controls/document-input-field.tsx new file mode 100644 index 0000000..e87c2c9 --- /dev/null +++ b/apps/dashboard/shared/components/form/controls/document-input-field.tsx @@ -0,0 +1,170 @@ +"use client" + +import { useCallback, useRef, useState, useEffect } from "react" +import { FileUp, X, FileText, FileImage, FileSpreadsheet, File } from "lucide-react" +import type { BaseFieldControlProps } from "../types" +import { cn } from "@/shared/lib/utils" + +export type DocumentInputFieldProps = BaseFieldControlProps & { + accept?: string +} + +const IMAGE_TYPES = ["image/png", "image/jpeg", "image/gif", "image/webp", "image/svg+xml"] + +function getFileIcon(file: File) { + if (IMAGE_TYPES.includes(file.type)) return FileImage + if (file.type === "application/pdf") return FileText + if ( + file.type === "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" || + file.type === "application/vnd.ms-excel" || + file.type === "text/csv" + ) return FileSpreadsheet + return File +} + +function formatFileSize(bytes: number): string { + if (bytes < 1024) return `${bytes} B` + if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB` + return `${(bytes / (1024 * 1024)).toFixed(1)} MB` +} + +export function DocumentInputField({ + value, + onChange, + onBlur, + name, + disabled, + invalid, + accept = "image/*,.pdf,.doc,.docx,.xls,.xlsx,.csv,.txt", +}: DocumentInputFieldProps) { + const inputRef = useRef(null) + const [preview, setPreview] = useState(null) + const [isDragging, setIsDragging] = useState(false) + + const isImage = value && IMAGE_TYPES.includes(value.type) + + useEffect(() => { + if (!value || !isImage) { + setPreview(null) + return + } + const url = URL.createObjectURL(value) + setPreview(url) + return () => URL.revokeObjectURL(url) + }, [value, isImage]) + + const handleFile = useCallback( + (file: File | null) => { + onChange(file) + }, + [onChange], + ) + + const handleDrop = useCallback( + (e: React.DragEvent) => { + e.preventDefault() + setIsDragging(false) + if (disabled) return + const file = e.dataTransfer.files?.[0] ?? null + handleFile(file) + }, + [disabled, handleFile], + ) + + const handleDragOver = useCallback( + (e: React.DragEvent) => { + e.preventDefault() + if (!disabled) setIsDragging(true) + }, + [disabled], + ) + + const handleDragLeave = useCallback(() => setIsDragging(false), []) + + const handleClear = useCallback( + (e: React.MouseEvent) => { + e.stopPropagation() + onChange(null) + if (inputRef.current) inputRef.current.value = "" + }, + [onChange], + ) + + const FileIcon = value ? getFileIcon(value) : FileUp + + return ( +
!disabled && inputRef.current?.click()} + onKeyDown={(e) => { + if (e.key === "Enter" || e.key === " ") { + e.preventDefault() + inputRef.current?.click() + } + }} + onDrop={handleDrop} + onDragOver={handleDragOver} + onDragLeave={handleDragLeave} + onBlur={onBlur} + aria-invalid={invalid || undefined} + className={cn( + "relative flex min-h-35 cursor-pointer flex-col items-center justify-center gap-2 rounded-md border border-dashed border-input bg-background p-4 text-sm transition-colors", + isDragging && "border-primary bg-primary/5", + invalid && "border-destructive", + disabled && "pointer-events-none opacity-50", + )} + > + handleFile(e.target.files?.[0] ?? null)} + /> + + {value ? ( + <> + {isImage && preview ? ( + Preview + ) : ( +
+ + + {value.name} + + + {formatFileSize(value.size)} + +
+ )} + {!disabled && ( + + )} + + ) : ( + <> + + + Click or drag & drop a file + + + Images, PDF, Word, Excel, CSV, or text files + + + )} +
+ ) +} diff --git a/apps/dashboard/shared/components/form/controls/image-input-field.tsx b/apps/dashboard/shared/components/form/controls/image-input-field.tsx new file mode 100644 index 0000000..edb94e0 --- /dev/null +++ b/apps/dashboard/shared/components/form/controls/image-input-field.tsx @@ -0,0 +1,133 @@ +"use client" + +import { useCallback, useRef, useState, useEffect } from "react" +import { ImagePlus, X } from "lucide-react" +import type { BaseFieldControlProps } from "../types" +import { cn } from "@/shared/lib/utils" + +export type ImageInputFieldProps = BaseFieldControlProps & { + accept?: string +} + +export function ImageInputField({ + value, + onChange, + onBlur, + name, + disabled, + invalid, + accept = "image/*", +}: ImageInputFieldProps) { + const inputRef = useRef(null) + const [preview, setPreview] = useState(null) + const [isDragging, setIsDragging] = useState(false) + + useEffect(() => { + if (!value) { + setPreview(null) + return + } + const url = URL.createObjectURL(value) + setPreview(url) + return () => URL.revokeObjectURL(url) + }, [value]) + + const handleFile = useCallback( + (file: File | null) => { + if (file && !file.type.startsWith("image/")) return + onChange(file) + }, + [onChange], + ) + + const handleDrop = useCallback( + (e: React.DragEvent) => { + e.preventDefault() + setIsDragging(false) + if (disabled) return + const file = e.dataTransfer.files?.[0] ?? null + handleFile(file) + }, + [disabled, handleFile], + ) + + const handleDragOver = useCallback( + (e: React.DragEvent) => { + e.preventDefault() + if (!disabled) setIsDragging(true) + }, + [disabled], + ) + + const handleDragLeave = useCallback(() => setIsDragging(false), []) + + const handleClear = useCallback( + (e: React.MouseEvent) => { + e.stopPropagation() + onChange(null) + if (inputRef.current) inputRef.current.value = "" + }, + [onChange], + ) + + return ( +
!disabled && inputRef.current?.click()} + onKeyDown={(e) => { + if (e.key === "Enter" || e.key === " ") { + e.preventDefault() + inputRef.current?.click() + } + }} + onDrop={handleDrop} + onDragOver={handleDragOver} + onDragLeave={handleDragLeave} + onBlur={onBlur} + aria-invalid={invalid || undefined} + className={cn( + "relative flex min-h-35 cursor-pointer flex-col items-center justify-center gap-2 rounded-md border border-dashed border-input bg-background p-4 text-sm transition-colors", + isDragging && "border-primary bg-primary/5", + invalid && "border-destructive", + disabled && "pointer-events-none opacity-50", + )} + > + handleFile(e.target.files?.[0] ?? null)} + /> + + {preview ? ( + <> + Preview + {!disabled && ( + + )} + + ) : ( + <> + + + Click or drag & drop an image + + + )} +
+ ) +} diff --git a/apps/dashboard/shared/components/form/fields/rhf-document-field.tsx b/apps/dashboard/shared/components/form/fields/rhf-document-field.tsx new file mode 100644 index 0000000..5fb9341 --- /dev/null +++ b/apps/dashboard/shared/components/form/fields/rhf-document-field.tsx @@ -0,0 +1,24 @@ +"use client" + +import type { FieldValues, FieldPath } from "react-hook-form" +import { RhfField } from "../rhf-field" +import { DocumentInputField, type DocumentInputFieldProps } from "../controls/document-input-field" +import type { BaseFieldControlProps } from "../types" + +type RhfDocumentFieldProps< + TValues extends FieldValues, + TName extends FieldPath, +> = { + name: TName + label?: string + description?: string + required?: boolean + disabled?: boolean +} & Omit> + +export function RhfDocumentField< + TValues extends FieldValues, + TName extends FieldPath, +>(props: RhfDocumentFieldProps) { + return +} diff --git a/apps/dashboard/shared/components/form/fields/rhf-image-field.tsx b/apps/dashboard/shared/components/form/fields/rhf-image-field.tsx new file mode 100644 index 0000000..e0274ec --- /dev/null +++ b/apps/dashboard/shared/components/form/fields/rhf-image-field.tsx @@ -0,0 +1,24 @@ +"use client" + +import type { FieldValues, FieldPath } from "react-hook-form" +import { RhfField } from "../rhf-field" +import { ImageInputField, type ImageInputFieldProps } from "../controls/image-input-field" +import type { BaseFieldControlProps } from "../types" + +type RhfImageFieldProps< + TValues extends FieldValues, + TName extends FieldPath, +> = { + name: TName + label?: string + description?: string + required?: boolean + disabled?: boolean +} & Omit> + +export function RhfImageField< + TValues extends FieldValues, + TName extends FieldPath, +>(props: RhfImageFieldProps) { + return +} diff --git a/apps/dashboard/shared/components/form/index.ts b/apps/dashboard/shared/components/form/index.ts index e9138b6..3cacb3d 100644 --- a/apps/dashboard/shared/components/form/index.ts +++ b/apps/dashboard/shared/components/form/index.ts @@ -22,6 +22,8 @@ export { AsyncMultiSelectField, type AsyncMultiSelectFieldProps, } from "./controls/async-select-field" export { FileInputField, type FileInputFieldProps } from "./controls/file-input-field" +export { ImageInputField, type ImageInputFieldProps } from "./controls/image-input-field" +export { DocumentInputField, type DocumentInputFieldProps } from "./controls/document-input-field" // ── RHF Field Wrappers ── export { RhfTextField } from "./fields/rhf-text-field" @@ -29,5 +31,7 @@ export { RhfTextareaField } from "./fields/rhf-textarea-field" export { RhfCheckboxField } from "./fields/rhf-checkbox-field" export { RhfSelectField } from "./fields/rhf-select-field" export { RhfFileField } from "./fields/rhf-file-field" +export { RhfImageField } from "./fields/rhf-image-field" +export { RhfDocumentField } from "./fields/rhf-document-field" export { RhfAsyncSelectField, RhfAsyncMultiSelectField, type InlineCreateFormProps, type InlineCreateConfig } from "./fields/rhf-async-select-field" export { SimpleTitleForm, type SimpleTitleFormProps } from "./fields/simple-title-form" diff --git a/apps/dashboard/shared/data-view/resource-page/index.ts b/apps/dashboard/shared/data-view/resource-page/index.ts index f7031c8..044b69c 100644 --- a/apps/dashboard/shared/data-view/resource-page/index.ts +++ b/apps/dashboard/shared/data-view/resource-page/index.ts @@ -10,5 +10,7 @@ export type { export type { ResourceFormProps, ResourcePageColumnHelpers, + ResourcePageHeaderHelpers, + ResourcePageContext, ResourcePageProps, } from "./resource-page" diff --git a/apps/dashboard/shared/data-view/resource-page/resource-page.tsx b/apps/dashboard/shared/data-view/resource-page/resource-page.tsx index 19d1b6a..ba638ec 100644 --- a/apps/dashboard/shared/data-view/resource-page/resource-page.tsx +++ b/apps/dashboard/shared/data-view/resource-page/resource-page.tsx @@ -1,9 +1,8 @@ "use client" import React from "react" -import { DashboardHeader } from "@/base/components/layout/dashboard" import DashboardPage from "@/base/components/layout/dashboard/dashboard-page" -import FormDialog from "@/shared/components/form-dialog" +import type { DashboardHeaderProps } from "@/base/components/layout/dashboard" import { Card, CardContent } from "@/shared/components/ui/card" import { DataTable, type ActionsColumnOptions } from "@/shared/data-view/table-view" import { useResourcePage, type UseResourcePageOptions, type ResourceItem, type ResourcePageClient } from "./use-resource-page" @@ -15,32 +14,60 @@ export type ResourceFormProps = { onSuccess: () => void } +export type ResourcePageHeaderHelpers = { + selectedItem: ResourceItem | null + invalidateQuery: () => void +} + export type ResourcePageColumnHelpers = { actionsColumn: (options?: Partial>>) => ColumnDef, unknown> openEdit: (row: ResourceItem) => void deleteItem: (id: string) => Promise } +export type ResourcePageContext = { + selectedItem: ResourceItem | null + isDialogOpen: boolean + dialogResourceId: string | null + isLoading: boolean + data: ResourceItem[] + openCreate: () => void + openEdit: (row: ResourceItem) => void + closeDialog: () => void + deleteItem: (id: string) => Promise + invalidateQuery: () => void +} + +type ReactNodeOrRender = + | React.ReactNode + | ((context: ResourcePageContext) => React.ReactNode) + export type ResourcePageProps = UseResourcePageOptions & { - title: string columns: ColumnDef>[] | ((helpers: ResourcePageColumnHelpers) => ColumnDef>[]) - renderForm: (props: ResourceFormProps) => React.ReactNode + headerProps?: DashboardHeaderProps | ((helpers: ResourcePageHeaderHelpers) => DashboardHeaderProps) + header?: ReactNodeOrRender | null pageTitle?: string paramKey?: string + onRowClick?: (row: ResourceItem) => void + toolbar?: ReactNodeOrRender + } export function ResourcePage({ - title, columns: columnsProp, - renderForm, + headerProps: headerPropsProp, + header, pageTitle, routeKey, getClient, queryOptions, paramKey, + onRowClick, + toolbar, + extraParams, }: ResourcePageProps) { type TItem = ResourceItem - const page = useResourcePage({ routeKey, getClient, queryOptions, paramKey }) + const page = useResourcePage({ routeKey, getClient, queryOptions, paramKey, extraParams }) const columns = typeof columnsProp === "function" ? columnsProp({ @@ -52,35 +79,48 @@ export function ResourcePage({ type ListResponse = { data?: TItem[] } const responseData = page.data as ListResponse | undefined + const items = (responseData?.data ?? []) as TItem[] + + const context: ResourcePageContext = { + selectedItem: page.selectedItem, + isDialogOpen: page.isDialogOpen, + dialogResourceId: page.dialogResourceId, + isLoading: page.isLoading, + data: items, + openCreate: page.openCreate, + openEdit: page.openEdit, + closeDialog: page.closeDialog, + deleteItem: page.deleteItem, + invalidateQuery: () => page.invalidateQuery(), + } + + const resolvedHeaderProps = typeof headerPropsProp === "function" + ? headerPropsProp({ + selectedItem: page.selectedItem, + invalidateQuery: () => page.invalidateQuery(), + }) + : headerPropsProp + + const resolvedHeader = typeof header === "function" ? header(context) : header + const resolvedToolbar = typeof toolbar === "function" ? toolbar(context) : toolbar return ( - {(resourceId) => - renderForm({ - resourceId, - initialData: page.selectedItem, - onSuccess: () => page.invalidateQuery(), - }) - } - - } - /> - } + header={resolvedHeader} + headerProps={resolvedHeaderProps} title={pageTitle} + toolbar={resolvedToolbar} > diff --git a/apps/dashboard/shared/data-view/resource-page/use-resource-page.ts b/apps/dashboard/shared/data-view/resource-page/use-resource-page.ts index a4f36b1..ebe535e 100644 --- a/apps/dashboard/shared/data-view/resource-page/use-resource-page.ts +++ b/apps/dashboard/shared/data-view/resource-page/use-resource-page.ts @@ -25,6 +25,7 @@ export type UseResourcePageOptions = { getClient: (api: ApiInstance) => TClient queryOptions?: Omit>, "queryKey" | "queryFn"> paramKey?: string + extraParams?: Record } export function useResourcePage({ @@ -32,6 +33,7 @@ export function useResourcePage({ getClient, queryOptions, paramKey, + extraParams, }: UseResourcePageOptions) { type TItem = ResourceItem @@ -44,6 +46,7 @@ export function useResourcePage({ queryKey: [routeKey], client, queryOptions, + extraParams, }) const { mutateAsync: deleteItem } = useMutation({ diff --git a/apps/dashboard/shared/data-view/table-view/data-table.tsx b/apps/dashboard/shared/data-view/table-view/data-table.tsx index 84e76ca..b1c57fe 100644 --- a/apps/dashboard/shared/data-view/table-view/data-table.tsx +++ b/apps/dashboard/shared/data-view/table-view/data-table.tsx @@ -10,6 +10,7 @@ import { Table, TableHeader, TableBody, + TableFooter, TableHead, TableRow, TableCell, @@ -26,6 +27,8 @@ export function DataTable({ sorting = [], onChange, isLoading = false, + onRowClick, + slots, }: DataViewProps) { const table = useReactTable({ data, @@ -67,9 +70,12 @@ export function DataTable({ onChange={onChange} isLoading={isLoading} > -
-
- +
+ {slots?.actions && ( +
{slots.actions}
+ )} +
+
{table.getHeaderGroups().map((headerGroup) => ( @@ -85,6 +91,7 @@ export function DataTable({ ))} ))} + {slots?.extraHeader} {isLoading ? ( @@ -99,7 +106,12 @@ export function DataTable({ )) ) : table.getRowModel().rows.length ? ( table.getRowModel().rows.map((row) => ( - + onRowClick?.(row.original)} + > {row.getVisibleCells().map((cell) => ( {flexRender(cell.column.columnDef.cell, cell.getContext())} @@ -117,7 +129,11 @@ export function DataTable({ )} + {slots?.extraBody} + {slots?.footer && ( + {slots.footer} + )}
diff --git a/apps/dashboard/shared/data-view/table-view/index.ts b/apps/dashboard/shared/data-view/table-view/index.ts index 2140066..76b6992 100644 --- a/apps/dashboard/shared/data-view/table-view/index.ts +++ b/apps/dashboard/shared/data-view/table-view/index.ts @@ -11,6 +11,7 @@ export type { DataViewSorting, DataViewState, DataViewChangeEvent, + DataViewSlots, } from "./types" export type { DataTableSearchParams } from "./search-params" export type { ActionsColumnOptions } from "./actions-column" diff --git a/apps/dashboard/shared/data-view/table-view/types.ts b/apps/dashboard/shared/data-view/table-view/types.ts index 474e9df..d554702 100644 --- a/apps/dashboard/shared/data-view/table-view/types.ts +++ b/apps/dashboard/shared/data-view/table-view/types.ts @@ -1,4 +1,5 @@ import type { ColumnDef, SortingState } from "@tanstack/react-table" +import type { ReactNode } from "react" export type DataViewPaginationState = { page: number @@ -18,6 +19,13 @@ export type DataViewChangeEvent = | { type: "pagination"; pagination: DataViewPaginationState } | { type: "sorting"; sorting: DataViewSorting } +export type DataViewSlots = { + actions?: ReactNode + extraHeader?: ReactNode + extraBody?: ReactNode + footer?: ReactNode +} + export type DataViewProps = { columns: ColumnDef[] data: TData[] @@ -25,4 +33,6 @@ export type DataViewProps = { sorting?: DataViewSorting onChange: (event: DataViewChangeEvent) => void isLoading?: boolean + onRowClick?: (row: TData) => void + slots?: DataViewSlots } diff --git a/apps/dashboard/shared/data-view/table-view/use-data-table-query.ts b/apps/dashboard/shared/data-view/table-view/use-data-table-query.ts index a5ce82a..dda1ecf 100644 --- a/apps/dashboard/shared/data-view/table-view/use-data-table-query.ts +++ b/apps/dashboard/shared/data-view/table-view/use-data-table-query.ts @@ -14,21 +14,24 @@ type UseDataTableQueryOptions = { queryKey: string[] client: C queryOptions?: Omit>, "queryKey" | "queryFn"> + extraParams?: Record } export function useDataTableQuery({ queryKey, client, queryOptions, + extraParams, }: UseDataTableQueryOptions) { const [params, setParams] = useQueryStates(dataTableSearchParams) - const _queryKey = [...queryKey, params] + const _queryKey = [...queryKey, params, ...(extraParams ? [extraParams] : [])] const query = useQuery>({ queryKey: _queryKey, queryFn: () => { const apiParams: Record = { page: params.page, per_page: params.per_page, + ...extraParams, } if (params.sort_by) apiParams.sort_by = params.sort_by if (params.sort_order) apiParams.sort_order = params.sort_order diff --git a/apps/dashboard/shared/hooks/use-resource-form.ts b/apps/dashboard/shared/hooks/use-resource-form.ts index a7f7457..2b3a35b 100644 --- a/apps/dashboard/shared/hooks/use-resource-form.ts +++ b/apps/dashboard/shared/hooks/use-resource-form.ts @@ -48,14 +48,18 @@ export function useResourceForm { if (!isEditing) { - form.reset(defaultValues) + if (initialData) { + form.reset({ ...defaultValues, ...initialData } as any) + } else { + form.reset(defaultValues) + } return } if (resolvedData) { form.reset(mapToFormValues(resolvedData) as any) } - }, [isEditing, resolvedData]) // eslint-disable-line react-hooks/exhaustive-deps + }, [isEditing, resolvedData, initialData]) // eslint-disable-line react-hooks/exhaustive-deps return { form, isEditing, isInitializing: isEditing && !!initialize && isQueryLoading } } diff --git a/packages/api/open-api/schema.json b/packages/api/open-api/schema.json index f422857..38ce9f1 100644 --- a/packages/api/open-api/schema.json +++ b/packages/api/open-api/schema.json @@ -210,6 +210,9 @@ { "name": "Taxes" }, + { + "name": "Configurations" + }, { "name": "Make and Models" } @@ -365,6 +368,902 @@ } } }, + "/api/home": { + "get": { + "tags": [ + "Auth" + ], + "summary": "Home Dashboard", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "filters": { + "type": "object", + "properties": { + "period": { + "type": "string" + }, + "start_date": { + "type": "string" + }, + "end_date": { + "type": "string" + }, + "available_periods": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "financial_filters": { + "type": "object", + "properties": { + "period": { + "type": "string" + }, + "start_date": { + "type": "string" + }, + "end_date": { + "type": "string" + }, + "available_periods": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "work_orders_filters": { + "type": "object", + "properties": { + "period": { + "type": "string" + }, + "start_date": { + "type": "string" + }, + "end_date": { + "type": "string" + }, + "available_periods": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "appointments_filters": { + "type": "object", + "properties": { + "period": { + "type": "string" + }, + "start_date": { + "type": "string" + }, + "end_date": { + "type": "string" + }, + "available_periods": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "sales_filters": { + "type": "object", + "properties": { + "period": { + "type": "string" + }, + "start_date": { + "type": "string" + }, + "end_date": { + "type": "string" + }, + "available_periods": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "purchase_filters": { + "type": "object", + "properties": { + "period": { + "type": "string" + }, + "start_date": { + "type": "string" + }, + "end_date": { + "type": "string" + }, + "available_periods": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "chart": { + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "series": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string" + }, + "income": { + "type": "integer" + }, + "expense": { + "type": "integer" + } + } + } + } + } + }, + "totals": { + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "income": { + "type": "integer" + }, + "expense": { + "type": "integer" + }, + "total_income_text": { + "type": "string" + }, + "total_expense_text": { + "type": "string" + } + } + }, + "financial_summary": { + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "chart": { + "type": "array", + "items": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "count": { + "type": "integer" + }, + "amount": { + "type": "integer" + } + } + } + } + } + }, + "work_orders_status": { + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "cards": { + "type": "array", + "items": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "label": { + "type": "string" + }, + "count": { + "type": "integer" + }, + "orders_text": { + "type": "string" + }, + "amount": { + "type": "integer" + }, + "amount_text": { + "type": "string" + } + } + } + }, + "totals": { + "type": "object", + "properties": { + "orders": { + "type": "integer" + }, + "orders_text": { + "type": "string" + }, + "amount": { + "type": "integer" + }, + "amount_text": { + "type": "string" + } + } + } + } + }, + "appointments_summary": { + "type": "object", + "properties": { + "totals": { + "type": "object", + "properties": { + "completed": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "text": { + "type": "string" + } + } + }, + "no_shows": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "text": { + "type": "string" + } + } + }, + "no_shows_rate": { + "type": "object", + "properties": { + "value": { + "type": "integer" + }, + "text": { + "type": "string" + } + } + }, + "cancelled": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "text": { + "type": "string" + } + } + } + } + } + } + }, + "upcoming_appointments": { + "type": "object", + "properties": { + "selected_filter": { + "type": "string" + }, + "pagination": { + "type": "object", + "properties": { + "current_page": { + "type": "integer" + }, + "last_page": { + "type": "integer" + }, + "per_page": { + "type": "integer" + }, + "total": { + "type": "integer" + }, + "from": { + "type": "integer" + }, + "to": { + "type": "integer" + }, + "filter": { + "type": "string" + } + } + }, + "today": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "text": { + "type": "string" + }, + "date": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "job_card_id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "date": { + "type": "string" + }, + "from_time": { + "type": "string" + }, + "to_time": { + "type": "string" + }, + "customer_id": { + "type": "integer" + }, + "vehicle_id": { + "type": "integer" + }, + "service_writer_id": { + "type": "integer" + }, + "technician_id": { + "type": "integer" + }, + "department_id": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "notes": { + "type": "string" + } + } + } + } + } + }, + "tomorrow": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "text": { + "type": "string" + }, + "date": { + "type": "string" + }, + "details": { + "type": "array", + "items": {} + } + } + }, + "this_week": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "text": { + "type": "string" + }, + "start_date": { + "type": "string" + }, + "end_date": { + "type": "string" + }, + "details": { + "type": "array", + "items": {} + } + } + }, + "next_week": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "text": { + "type": "string" + }, + "start_date": { + "type": "string" + }, + "end_date": { + "type": "string" + }, + "details": { + "type": "array", + "items": {} + } + } + } + } + }, + "items_totals": { + "type": "object", + "properties": { + "parts": { + "type": "integer" + }, + "services": { + "type": "integer" + }, + "service_groups": { + "type": "integer" + }, + "total_items": { + "type": "integer" + } + } + }, + "customers_totals": { + "type": "object", + "properties": { + "individuals": { + "type": "integer" + }, + "companies": { + "type": "integer" + }, + "fleets": { + "type": "integer" + }, + "insurers": { + "type": "integer" + }, + "total_customers": { + "type": "integer" + } + } + }, + "body_types_vehicle_totals": { + "type": "array", + "items": { + "type": "object", + "properties": { + "body_type_id": { + "type": "integer" + }, + "body_type": { + "type": "string" + }, + "vehicles_count": { + "type": "integer" + } + } + } + }, + "make_model_vehicle_totals": { + "type": "object", + "properties": { + "makes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "make": { + "type": "string" + }, + "vehicles_count": { + "type": "integer" + } + } + } + }, + "models": { + "type": "array", + "items": { + "type": "object", + "properties": { + "make": { + "type": "string" + }, + "model": { + "type": "string" + }, + "vehicles_count": { + "type": "integer" + } + } + } + } + } + }, + "sales_totals": { + "type": "object", + "properties": { + "inspections": { + "type": "integer" + }, + "estimates": { + "type": "integer" + }, + "invoices": { + "type": "integer" + }, + "total_sales_documents": { + "type": "integer" + } + } + }, + "purchase_totals": { + "type": "object", + "properties": { + "purchase_orders": { + "type": "integer" + }, + "bills": { + "type": "integer" + }, + "expenses": { + "type": "integer" + }, + "total_purchase_documents": { + "type": "integer" + } + } + } + } + }, + "example": { + "filters": { + "period": "this_month", + "start_date": "2026-03-01", + "end_date": "2026-03-30", + "available_periods": [ + "today", + "yesterday", + "this_week", + "this_month", + "last_month", + "last_3_months", + "last_6_months", + "last_year", + "year_to_date", + "all_time", + "custom" + ] + }, + "financial_filters": { + "period": "this_month", + "start_date": "2026-03-01", + "end_date": "2026-03-30", + "available_periods": [ + "today", + "yesterday", + "this_week", + "this_month", + "last_month", + "last_3_months", + "last_6_months", + "last_year", + "year_to_date", + "all_time", + "custom" + ] + }, + "work_orders_filters": { + "period": "this_month", + "start_date": "2026-03-01", + "end_date": "2026-03-30", + "available_periods": [ + "today", + "yesterday", + "this_week", + "this_month", + "last_month", + "last_3_months", + "last_6_months", + "last_year", + "year_to_date", + "all_time", + "custom" + ] + }, + "appointments_filters": { + "period": "this_month", + "start_date": "2026-03-01", + "end_date": "2026-03-30", + "available_periods": [ + "today", + "yesterday", + "this_week", + "this_month", + "last_month", + "last_3_months", + "last_6_months", + "last_year", + "year_to_date", + "all_time", + "custom" + ] + }, + "sales_filters": { + "period": "this_month", + "start_date": "2026-03-01", + "end_date": "2026-03-30", + "available_periods": [ + "today", + "yesterday", + "this_week", + "this_month", + "last_month", + "last_3_months", + "last_6_months", + "last_year", + "year_to_date", + "all_time", + "custom" + ] + }, + "purchase_filters": { + "period": "this_month", + "start_date": "2026-03-01", + "end_date": "2026-03-30", + "available_periods": [ + "today", + "yesterday", + "this_week", + "this_month", + "last_month", + "last_3_months", + "last_6_months", + "last_year", + "year_to_date", + "all_time", + "custom" + ] + }, + "chart": { + "currency": "AED", + "series": [ + { + "date": "2026-03-29", + "income": 25000, + "expense": 0 + }, + { + "date": "2026-03-30", + "income": 0, + "expense": 0 + } + ] + }, + "totals": { + "currency": "AED", + "income": 25000, + "expense": 0, + "total_income_text": "AED 25,000.00", + "total_expense_text": "AED 0.00" + }, + "financial_summary": { + "currency": "AED", + "chart": [ + { + "label": "Invoices", + "count": 1, + "amount": 25000 + }, + { + "label": "Expenses", + "count": 0, + "amount": 0 + }, + { + "label": "Bills", + "count": 0, + "amount": 0 + } + ] + }, + "work_orders_status": { + "currency": "AED", + "cards": [ + { + "status": "draft", + "label": "Draft", + "count": 1, + "orders_text": "1 Orders", + "amount": 0, + "amount_text": "AED 0.00" + }, + { + "status": "check_in", + "label": "Check In", + "count": 1, + "orders_text": "1 Orders", + "amount": 0, + "amount_text": "AED 0.00" + } + ], + "totals": { + "orders": 2, + "orders_text": "2 Orders", + "amount": 0, + "amount_text": "AED 0.00" + } + }, + "appointments_summary": { + "totals": { + "completed": { + "count": 0, + "text": "0 Appt." + }, + "no_shows": { + "count": 0, + "text": "0 Appt." + }, + "no_shows_rate": { + "value": 0, + "text": "0%" + }, + "cancelled": { + "count": 0, + "text": "0 Appt." + } + } + }, + "upcoming_appointments": { + "selected_filter": "today", + "pagination": { + "current_page": 1, + "last_page": 1, + "per_page": 10, + "total": 1, + "from": 1, + "to": 1, + "filter": "today" + }, + "today": { + "count": 1, + "text": "1 Appt.", + "date": "2026-03-30", + "details": [ + { + "id": 1, + "job_card_id": 1, + "title": "Oil Change Appointment", + "date": "2026-03-30", + "from_time": "10:00:00", + "to_time": "11:00:00", + "customer_id": 1, + "vehicle_id": 1, + "service_writer_id": 1, + "technician_id": 2, + "department_id": 1, + "status": "confirmed", + "notes": "Customer requested quick service" + } + ] + }, + "tomorrow": { + "count": 0, + "text": "0 Appt.", + "date": "2026-03-31", + "details": [] + }, + "this_week": { + "count": 1, + "text": "1 Appt.", + "start_date": "2026-03-30", + "end_date": "2026-04-05", + "details": [] + }, + "next_week": { + "count": 0, + "text": "0 Appt.", + "start_date": "2026-04-06", + "end_date": "2026-04-12", + "details": [] + } + }, + "items_totals": { + "parts": 10, + "services": 8, + "service_groups": 3, + "total_items": 21 + }, + "customers_totals": { + "individuals": 5, + "companies": 2, + "fleets": 1, + "insurers": 1, + "total_customers": 9 + }, + "body_types_vehicle_totals": [ + { + "body_type_id": 1, + "body_type": "Sedan", + "vehicles_count": 4 + } + ], + "make_model_vehicle_totals": { + "makes": [ + { + "make": "Toyota", + "vehicles_count": 3 + } + ], + "models": [ + { + "make": "Toyota", + "model": "Camry", + "vehicles_count": 2 + } + ] + }, + "sales_totals": { + "inspections": 2, + "estimates": 1, + "invoices": 1, + "total_sales_documents": 4 + }, + "purchase_totals": { + "purchase_orders": 1, + "bills": 0, + "expenses": 0, + "total_purchase_documents": 1 + } + } + } + } + } + } + } + }, "/api/referral-sources": { "get": { "tags": [ @@ -1283,6 +2182,222 @@ } }, "/api/customers/{id}": { + "get": { + "tags": [ + "Customers" + ], + "summary": "Show", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "customer_type_id": { + "type": "integer" + }, + "salutation": { + "type": "string" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "company_name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "alternate_phone": { + "type": "string" + }, + "opening_balance": { + "type": "integer" + }, + "credit_limit": { + "type": "integer" + }, + "website": { + "type": "string" + }, + "referral_source_id": { + "type": "integer" + }, + "payment_terms_id": { + "type": "integer" + }, + "address_line_1": { + "type": "string" + }, + "address_line_2": { + "type": "string" + }, + "country_id": { + "type": "integer" + }, + "state_id": { + "type": "integer" + }, + "city": { + "type": "string" + }, + "zip_code": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "customer_type": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + } + } + }, + "referral_source": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + } + } + }, + "payment_term": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "days": { + "type": "integer" + } + } + }, + "country": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "code": { + "type": "string" + } + } + }, + "state": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "code": { + "type": "string" + } + } + } + } + } + } + }, + "example": { + "data": { + "id": 1, + "customer_type_id": 1, + "salutation": "Mr", + "first_name": "John", + "last_name": "Doe", + "company_name": "Doe Holdings", + "email": "john@example.com", + "phone": "0501234567", + "alternate_phone": "0551234567", + "opening_balance": 0, + "credit_limit": 5000, + "website": "https://example.com", + "referral_source_id": 1, + "payment_terms_id": 1, + "address_line_1": "Street 10", + "address_line_2": "Near Central Plaza", + "country_id": 1, + "state_id": 1, + "city": "Dubai", + "zip_code": "00000", + "created_at": "2026-03-23T12:00:00.000000Z", + "updated_at": "2026-03-23T12:00:00.000000Z", + "customer_type": { + "id": 1, + "name": "Retail" + }, + "referral_source": { + "id": 1, + "name": "Website" + }, + "payment_term": { + "id": 1, + "title": "Net 30", + "days": 30 + }, + "country": { + "id": 1, + "name": "United Arab Emirates", + "code": "AE" + }, + "state": { + "id": 1, + "name": "Dubai", + "code": "DU" + } + } + } + } + } + } + } + }, "put": { "tags": [ "Customers" @@ -1695,6 +2810,309 @@ } } }, + "/api/customers/{id}/add-note": { + "post": { + "tags": [ + "Customers" + ], + "summary": "Add Note", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "note": { + "type": "string" + } + } + }, + "example": { + "note": "Customer prefers afternoon appointments." + } + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "customer_id": { + "type": "integer" + }, + "note": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + } + }, + "example": { + "message": "Customer note added successfully.", + "data": { + "id": 1, + "customer_id": 1, + "note": "Customer prefers afternoon appointments.", + "created_at": "2026-03-27T15:00:00.000000Z", + "updated_at": "2026-03-27T15:00:00.000000Z" + } + } + } + } + } + } + } + }, + "/api/customers/{id}/delete-note": { + "delete": { + "tags": [ + "Customers" + ], + "summary": "Delete Note", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "note_id": { + "type": "integer" + } + } + }, + "example": { + "note_id": 1 + } + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "example": { + "message": "Customer note deleted successfully." + } + } + } + } + } + } + }, + "/api/customers/{id}/update-permissions": { + "post": { + "tags": [ + "Customers" + ], + "summary": "Update Permissions", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "can_view_customers": { + "type": "boolean" + }, + "can_create_customers": { + "type": "boolean" + }, + "can_update_customers": { + "type": "boolean" + }, + "can_delete_customers": { + "type": "boolean" + }, + "can_view_invoices": { + "type": "boolean" + }, + "can_create_invoices": { + "type": "boolean" + } + } + }, + "example": { + "can_view_customers": true, + "can_create_customers": false, + "can_update_customers": true, + "can_delete_customers": false, + "can_view_invoices": true, + "can_create_invoices": false + } + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "can_view_customers": { + "type": "boolean" + }, + "can_create_customers": { + "type": "boolean" + }, + "can_update_customers": { + "type": "boolean" + }, + "can_delete_customers": { + "type": "boolean" + }, + "can_view_invoices": { + "type": "boolean" + }, + "can_create_invoices": { + "type": "boolean" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + } + }, + "example": { + "message": "Customer permissions updated successfully.", + "data": { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john@example.com", + "can_view_customers": true, + "can_create_customers": false, + "can_update_customers": true, + "can_delete_customers": false, + "can_view_invoices": true, + "can_create_invoices": false, + "updated_at": "2026-03-27T16:00:00.000000Z" + } + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "errors": { + "type": "object", + "properties": { + "permissions": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "example": { + "message": "Validation failed.", + "errors": { + "permissions": [ + "At least one permission field (can_*) is required." + ] + } + } + } + } + } + } + } + }, "/api/customer-types": { "get": { "tags": [ @@ -2258,7 +3676,7 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, "created_at": { @@ -2277,7 +3695,7 @@ "message": "Updated successfully.", "data": { "id": 1, - "name": "Sample Item", + "title": "Black", "created_at": "2026-03-23T12:00:00.000000Z", "updated_at": "2026-03-23T12:10:00.000000Z" } @@ -2365,7 +3783,7 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, "created_at": { @@ -2384,7 +3802,7 @@ "message": "Updated successfully.", "data": { "id": 1, - "name": "Sample Item", + "title": "Black", "created_at": "2026-03-23T12:00:00.000000Z", "updated_at": "2026-03-23T12:10:00.000000Z" } @@ -3658,7 +5076,7 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, "created_at": { @@ -3701,7 +5119,7 @@ "data": [ { "id": 1, - "name": "Sample Item", + "title": "Automatic", "created_at": "2026-03-23T12:00:00.000000Z", "updated_at": "2026-03-23T12:00:00.000000Z" } @@ -3760,7 +5178,7 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, "created_at": { @@ -3779,7 +5197,7 @@ "message": "Created successfully.", "data": { "id": 1, - "name": "Sample Item", + "title": "Automatic", "created_at": "2026-03-23T12:00:00.000000Z", "updated_at": "2026-03-23T12:00:00.000000Z" } @@ -3841,7 +5259,7 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, "created_at": { @@ -3860,7 +5278,7 @@ "message": "Updated successfully.", "data": { "id": 1, - "name": "Sample Item", + "title": "Automatic", "created_at": "2026-03-23T12:00:00.000000Z", "updated_at": "2026-03-23T12:10:00.000000Z" } @@ -3929,7 +5347,7 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, "created_at": { @@ -3972,7 +5390,7 @@ "data": [ { "id": 1, - "name": "Sample Item", + "title": "Black", "created_at": "2026-03-23T12:00:00.000000Z", "updated_at": "2026-03-23T12:00:00.000000Z" } @@ -4031,7 +5449,7 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, "created_at": { @@ -4050,7 +5468,7 @@ "message": "Created successfully.", "data": { "id": 1, - "name": "Sample Item", + "title": "Black", "created_at": "2026-03-23T12:00:00.000000Z", "updated_at": "2026-03-23T12:00:00.000000Z" } @@ -4112,7 +5530,7 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, "created_at": { @@ -4131,7 +5549,7 @@ "message": "Updated successfully.", "data": { "id": 1, - "name": "Sample Item", + "title": "Black", "created_at": "2026-03-23T12:00:00.000000Z", "updated_at": "2026-03-23T12:10:00.000000Z" } @@ -4200,7 +5618,37 @@ "id": { "type": "integer" }, - "name": { + "title": { + "type": "string" + }, + "customer_id": { + "type": "integer" + }, + "vehicle_id": { + "type": "integer" + }, + "sales_person_id": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "department_id": { + "type": "integer" + }, + "check_in_date": { + "type": "string" + }, + "km_in": { + "type": "integer" + }, + "tax_inclusive": { + "type": "string" + }, + "discount_type": { + "type": "string" + }, + "discount_at": { "type": "string" }, "created_at": { @@ -4210,6 +5658,29 @@ "updated_at": { "type": "string", "format": "date-time" + }, + "labels": { + "type": "array", + "items": {} + }, + "documents": { + "type": "array", + "items": {} + }, + "purchase_orders_count": { + "type": "integer" + }, + "bills_count": { + "type": "integer" + }, + "expenses_count": { + "type": "integer" + }, + "tasks_count": { + "type": "integer" + }, + "appointments_count": { + "type": "integer" } } } @@ -4243,9 +5714,26 @@ "data": [ { "id": 1, - "name": "Sample Item", + "title": "Job Card 001", + "customer_id": 1, + "vehicle_id": 1, + "sales_person_id": 1, + "status": "draft", + "department_id": 1, + "check_in_date": "2026-03-18", + "km_in": 50000, + "tax_inclusive": "Tax Inclusive", + "discount_type": "no", + "discount_at": "inclusive_of_tax", "created_at": "2026-03-23T12:00:00.000000Z", - "updated_at": "2026-03-23T12:00:00.000000Z" + "updated_at": "2026-03-23T12:00:00.000000Z", + "labels": [], + "documents": [], + "purchase_orders_count": 0, + "bills_count": 0, + "expenses_count": 0, + "tasks_count": 0, + "appointments_count": 0 } ], "meta": { @@ -4572,6 +6060,242 @@ } }, "/api/vehicles/{id}": { + "get": { + "tags": [ + "Vehicles" + ], + "summary": "Show", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "shop_type_id": { + "type": "integer" + }, + "vehicle_body_type_id": { + "type": "integer" + }, + "vehicle_fuel_type_id": { + "type": "integer" + }, + "vehicle_transmission_id": { + "type": "integer" + }, + "vehicle_color_id": { + "type": "integer" + }, + "image": { + "type": "string", + "nullable": true + }, + "image_url": { + "type": "string", + "nullable": true + }, + "make": { + "type": "string" + }, + "model": { + "type": "string" + }, + "year": { + "type": "string" + }, + "sub_model": { + "type": "string" + }, + "license_plate": { + "type": "string" + }, + "vin_number": { + "type": "string" + }, + "engine_number": { + "type": "string", + "nullable": true + }, + "engine_size": { + "type": "string" + }, + "drivetrain": { + "type": "string" + }, + "reg_date": { + "type": "string", + "nullable": true + }, + "mfg_date": { + "type": "string", + "nullable": true + }, + "parked_at": { + "type": "string", + "nullable": true + }, + "mileage": { + "type": "string" + }, + "owners_number": { + "type": "string" + }, + "front_tire_size": { + "type": "string", + "nullable": true + }, + "rear_tire_size": { + "type": "string", + "nullable": true + }, + "note": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "shop_type": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + } + } + }, + "vehicle_body_type": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + } + } + }, + "vehicle_fuel_type": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + } + } + }, + "vehicle_transmission": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + } + } + }, + "vehicle_color": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "code": { + "type": "string" + } + } + } + } + } + } + }, + "example": { + "data": { + "id": 1, + "shop_type_id": 1, + "vehicle_body_type_id": 1, + "vehicle_fuel_type_id": 1, + "vehicle_transmission_id": 1, + "vehicle_color_id": 1, + "image": null, + "image_url": null, + "make": "Toyota", + "model": "Camry", + "year": "2024", + "sub_model": "LE", + "license_plate": "ABC-123", + "vin_number": "1HGBH41JXMN109186", + "engine_number": null, + "engine_size": "2.5L", + "drivetrain": "FWD", + "reg_date": null, + "mfg_date": null, + "parked_at": null, + "mileage": "10000", + "owners_number": "1", + "front_tire_size": null, + "rear_tire_size": null, + "note": "New vehicle", + "created_at": "2026-03-23T12:00:00.000000Z", + "updated_at": "2026-03-23T12:00:00.000000Z", + "shop_type": { + "id": 1, + "title": "Main Workshop" + }, + "vehicle_body_type": { + "id": 1, + "title": "Sedan" + }, + "vehicle_fuel_type": { + "id": 1, + "title": "Petrol" + }, + "vehicle_transmission": { + "id": 1, + "title": "Automatic" + }, + "vehicle_color": { + "id": 1, + "title": "Red", + "code": "RD" + } + } + } + } + } + } + } + }, "put": { "tags": [ "Vehicles" @@ -4589,12 +6313,16 @@ }, "license_plate": { "type": "string" + }, + "drivetrain": { + "type": "string" } } }, "example": { "mileage": "12000", - "license_plate": "ABC-123" + "license_plate": "ABC-123", + "drivetrain": "FWD" } } } @@ -5106,6 +6834,108 @@ } } }, + "/api/get-makes": { + "get": { + "tags": [ + "Vehicles" + ], + "summary": "Get Makes", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "example": { + "data": [ + "Toyota", + "Honda" + ] + } + } + } + } + } + } + }, + "/api/get-models": { + "get": { + "tags": [ + "Vehicles" + ], + "summary": "Get Models", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "example": { + "data": [ + "Camry", + "Corolla" + ] + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "errors": { + "type": "object", + "properties": { + "make": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "example": { + "message": "Validation failed.", + "errors": { + "make": [ + "The make field is required." + ] + } + } + } + } + } + } + } + }, "/api/get-vehicle-owners": { "get": { "tags": [ @@ -5630,28 +7460,52 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" + "customer_remarks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "job_card_id": { + "type": "integer" + }, + "remark": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } } } } } }, "example": { - "message": "Created successfully.", + "message": "Customer remark updated successfully.", "data": { "id": 1, - "name": "Sample Item", - "created_at": "2026-03-23T12:00:00.000000Z", - "updated_at": "2026-03-23T12:00:00.000000Z" + "title": "Job Card 001", + "customer_remarks": [ + { + "id": 1, + "job_card_id": 1, + "remark": "Updated remark", + "created_at": "2026-03-23T12:00:00.000000Z", + "updated_at": "2026-03-23T12:10:00.000000Z" + } + ] } } } @@ -5765,11 +7619,31 @@ "properties": { "message": { "type": "string" + }, + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "customer_remarks": { + "type": "array", + "items": {} + } + } } } }, "example": { - "message": "Deleted successfully." + "message": "Customer remark deleted successfully.", + "data": { + "id": 1, + "title": "Job Card 001", + "customer_remarks": [] + } } } } @@ -5905,28 +7779,52 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" + "shop_recommendations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "job_card_id": { + "type": "integer" + }, + "recommendation": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } } } } } }, "example": { - "message": "Created successfully.", + "message": "Shop recommendation added successfully.", "data": { "id": 1, - "name": "Sample Item", - "created_at": "2026-03-23T12:00:00.000000Z", - "updated_at": "2026-03-23T12:00:00.000000Z" + "title": "Job Card 001", + "shop_recommendations": [ + { + "id": 1, + "job_card_id": 1, + "recommendation": "Replace brake pads", + "created_at": "2026-03-23T12:00:00.000000Z", + "updated_at": "2026-03-23T12:00:00.000000Z" + } + ] } } } @@ -6174,28 +8072,52 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" + "shop_recommendations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "job_card_id": { + "type": "integer" + }, + "recommendation": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } } } } } }, "example": { - "message": "Created successfully.", + "message": "Shop recommendation updated successfully.", "data": { "id": 1, - "name": "Sample Item", - "created_at": "2026-03-23T12:00:00.000000Z", - "updated_at": "2026-03-23T12:00:00.000000Z" + "title": "Job Card 001", + "shop_recommendations": [ + { + "id": 1, + "job_card_id": 1, + "recommendation": "Updated recommendation", + "created_at": "2026-03-23T12:00:00.000000Z", + "updated_at": "2026-03-23T12:10:00.000000Z" + } + ] } } } @@ -6309,11 +8231,31 @@ "properties": { "message": { "type": "string" + }, + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "shop_recommendations": { + "type": "array", + "items": {} + } + } } } }, "example": { - "message": "Deleted successfully." + "message": "Shop recommendation deleted successfully.", + "data": { + "id": 1, + "title": "Job Card 001", + "shop_recommendations": [] + } } } } @@ -6449,28 +8391,52 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" + "customer_remarks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "job_card_id": { + "type": "integer" + }, + "remark": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } } } } } }, "example": { - "message": "Created successfully.", + "message": "Customer remark added successfully.", "data": { "id": 1, - "name": "Sample Item", - "created_at": "2026-03-23T12:00:00.000000Z", - "updated_at": "2026-03-23T12:00:00.000000Z" + "title": "Job Card 001", + "customer_remarks": [ + { + "id": 1, + "job_card_id": 1, + "remark": "Customer requested wash", + "created_at": "2026-03-23T12:00:00.000000Z", + "updated_at": "2026-03-23T12:00:00.000000Z" + } + ] } } } @@ -7090,6 +9056,156 @@ } }, "/api/employees/{id}": { + "get": { + "tags": [ + "Employees" + ], + "summary": "Show", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "department_id": { + "type": "integer" + }, + "position": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + }, + "track_attendance": { + "type": "boolean" + }, + "notify_owner_when_punch_in_out": { + "type": "boolean" + }, + "shop_calender_id": { + "type": "integer" + }, + "shop_timing_id": { + "type": "integer" + }, + "geo_fence_radius": { + "type": "integer" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "department": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + } + } + }, + "shop_calender": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + } + } + }, + "shop_timing": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + } + } + } + } + } + } + }, + "example": { + "data": { + "id": 1, + "first_name": "Jane", + "last_name": "Smith", + "email": "jane@example.com", + "phone": "0501234567", + "department_id": 1, + "position": "Technician", + "status": "active", + "type": "employee", + "track_attendance": true, + "notify_owner_when_punch_in_out": false, + "shop_calender_id": 1, + "shop_timing_id": 1, + "geo_fence_radius": 100, + "created_at": "2026-03-24T12:00:00.000000Z", + "updated_at": "2026-03-24T12:00:00.000000Z", + "department": { + "id": 1, + "name": "Mechanical" + }, + "shop_calender": { + "id": 1, + "title": "Default Calender" + }, + "shop_timing": { + "id": 1, + "title": "Default Shift" + } + } + } + } + } + } + } + }, "put": { "tags": [ "Employees" @@ -7403,28 +9519,52 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" + "customer_remarks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "job_card_id": { + "type": "integer" + }, + "remark": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } } } } } }, "example": { - "message": "Created successfully.", + "message": "Customer remark updated successfully.", "data": { "id": 1, - "name": "Sample Item", - "created_at": "2026-03-23T12:00:00.000000Z", - "updated_at": "2026-03-23T12:00:00.000000Z" + "title": "Job Card 001", + "customer_remarks": [ + { + "id": 1, + "job_card_id": 1, + "remark": "Updated remark", + "created_at": "2026-03-23T12:00:00.000000Z", + "updated_at": "2026-03-23T12:10:00.000000Z" + } + ] } } } @@ -7538,11 +9678,31 @@ "properties": { "message": { "type": "string" + }, + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "customer_remarks": { + "type": "array", + "items": {} + } + } } } }, "example": { - "message": "Deleted successfully." + "message": "Customer remark deleted successfully.", + "data": { + "id": 1, + "title": "Job Card 001", + "customer_remarks": [] + } } } } @@ -7795,28 +9955,52 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" + "shop_recommendations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "job_card_id": { + "type": "integer" + }, + "recommendation": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } } } } } }, "example": { - "message": "Created successfully.", + "message": "Shop recommendation added successfully.", "data": { "id": 1, - "name": "Sample Item", - "created_at": "2026-03-23T12:00:00.000000Z", - "updated_at": "2026-03-23T12:00:00.000000Z" + "title": "Job Card 001", + "shop_recommendations": [ + { + "id": 1, + "job_card_id": 1, + "recommendation": "Replace brake pads", + "created_at": "2026-03-23T12:00:00.000000Z", + "updated_at": "2026-03-23T12:00:00.000000Z" + } + ] } } } @@ -8187,28 +10371,52 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" + "shop_recommendations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "job_card_id": { + "type": "integer" + }, + "recommendation": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } } } } } }, "example": { - "message": "Created successfully.", + "message": "Shop recommendation updated successfully.", "data": { "id": 1, - "name": "Sample Item", - "created_at": "2026-03-23T12:00:00.000000Z", - "updated_at": "2026-03-23T12:00:00.000000Z" + "title": "Job Card 001", + "shop_recommendations": [ + { + "id": 1, + "job_card_id": 1, + "recommendation": "Updated recommendation", + "created_at": "2026-03-23T12:00:00.000000Z", + "updated_at": "2026-03-23T12:10:00.000000Z" + } + ] } } } @@ -8326,11 +10534,31 @@ "properties": { "message": { "type": "string" + }, + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "shop_recommendations": { + "type": "array", + "items": {} + } + } } } }, "example": { - "message": "Deleted successfully." + "message": "Shop recommendation deleted successfully.", + "data": { + "id": 1, + "title": "Job Card 001", + "shop_recommendations": [] + } } } } @@ -12226,7 +14454,37 @@ "id": { "type": "integer" }, - "name": { + "title": { + "type": "string" + }, + "customer_id": { + "type": "integer" + }, + "vehicle_id": { + "type": "integer" + }, + "sales_person_id": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "department_id": { + "type": "integer" + }, + "check_in_date": { + "type": "string" + }, + "km_in": { + "type": "integer" + }, + "tax_inclusive": { + "type": "string" + }, + "discount_type": { + "type": "string" + }, + "discount_at": { "type": "string" }, "created_at": { @@ -12236,6 +14494,29 @@ "updated_at": { "type": "string", "format": "date-time" + }, + "labels": { + "type": "array", + "items": {} + }, + "documents": { + "type": "array", + "items": {} + }, + "purchase_orders_count": { + "type": "integer" + }, + "bills_count": { + "type": "integer" + }, + "expenses_count": { + "type": "integer" + }, + "tasks_count": { + "type": "integer" + }, + "appointments_count": { + "type": "integer" } } } @@ -12269,9 +14550,26 @@ "data": [ { "id": 1, - "name": "Sample Item", + "title": "Job Card 001", + "customer_id": 1, + "vehicle_id": 1, + "sales_person_id": 1, + "status": "draft", + "department_id": 1, + "check_in_date": "2026-03-18", + "km_in": 50000, + "tax_inclusive": "Tax Inclusive", + "discount_type": "no", + "discount_at": "inclusive_of_tax", "created_at": "2026-03-23T12:00:00.000000Z", - "updated_at": "2026-03-23T12:00:00.000000Z" + "updated_at": "2026-03-23T12:00:00.000000Z", + "labels": [], + "documents": [], + "purchase_orders_count": 0, + "bills_count": 0, + "expenses_count": 0, + "tasks_count": 0, + "appointments_count": 0 } ], "meta": { @@ -12311,6 +14609,15 @@ }, "status": { "type": "string" + }, + "tax_inclusive": { + "type": "string" + }, + "discount_type": { + "type": "string" + }, + "discount_at": { + "type": "string" } } }, @@ -12318,7 +14625,10 @@ "title": "Job Card 001", "customer_id": 1, "vehicle_id": 1, - "status": "draft" + "status": "draft", + "tax_inclusive": "Tax Inclusive", + "discount_type": "no", + "discount_at": "inclusive_of_tax" } } } @@ -12340,7 +14650,40 @@ "id": { "type": "integer" }, - "name": { + "title": { + "type": "string" + }, + "customer_id": { + "type": "integer" + }, + "vehicle_id": { + "type": "integer" + }, + "sales_person_id": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "department_id": { + "type": "string", + "nullable": true + }, + "check_in_date": { + "type": "string", + "nullable": true + }, + "km_in": { + "type": "string", + "nullable": true + }, + "tax_inclusive": { + "type": "string" + }, + "discount_type": { + "type": "string" + }, + "discount_at": { "type": "string" }, "created_at": { @@ -12359,7 +14702,17 @@ "message": "Created successfully.", "data": { "id": 1, - "name": "Sample Item", + "title": "Job Card 001", + "customer_id": 1, + "vehicle_id": 1, + "sales_person_id": 1, + "status": "draft", + "department_id": null, + "check_in_date": null, + "km_in": null, + "tax_inclusive": "Tax Inclusive", + "discount_type": "no", + "discount_at": "inclusive_of_tax", "created_at": "2026-03-23T12:00:00.000000Z", "updated_at": "2026-03-23T12:00:00.000000Z" } @@ -12403,6 +14756,15 @@ "items": { "type": "integer" } + }, + "tax_inclusive": { + "type": "string" + }, + "discount_type": { + "type": "string" + }, + "discount_at": { + "type": "string" } } }, @@ -12414,7 +14776,10 @@ "km_in": 50000, "label_ids": [ 1 - ] + ], + "tax_inclusive": "Tax Exclusive", + "discount_type": "transaction_level", + "discount_at": "exclusive_of_tax" } } } @@ -12446,12 +14811,38 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" + "customer_id": { + "type": "integer" + }, + "vehicle_id": { + "type": "integer" + }, + "sales_person_id": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "department_id": { + "type": "integer" + }, + "check_in_date": { + "type": "string" + }, + "km_in": { + "type": "integer" + }, + "tax_inclusive": { + "type": "string" + }, + "discount_type": { + "type": "string" + }, + "discount_at": { + "type": "string" }, "updated_at": { "type": "string", @@ -12465,8 +14856,17 @@ "message": "Updated successfully.", "data": { "id": 1, - "name": "Sample Item", - "created_at": "2026-03-23T12:00:00.000000Z", + "title": "Job Card 001 Updated", + "customer_id": 1, + "vehicle_id": 1, + "sales_person_id": 1, + "status": "check_in", + "department_id": 1, + "check_in_date": "2026-03-18", + "km_in": 50000, + "tax_inclusive": "Tax Exclusive", + "discount_type": "transaction_level", + "discount_at": "exclusive_of_tax", "updated_at": "2026-03-23T12:10:00.000000Z" } } @@ -12563,12 +14963,23 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" + "order_date": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tax_inclusive": { + "type": "string" + }, + "discount_type": { + "type": "string" + }, + "discount_at": { + "type": "string" }, "updated_at": { "type": "string", @@ -12582,8 +14993,12 @@ "message": "Updated successfully.", "data": { "id": 1, - "name": "Sample Item", - "created_at": "2026-03-23T12:00:00.000000Z", + "title": "Job Card 001", + "order_date": "2026-03-18", + "status": "draft", + "tax_inclusive": "Tax Inclusive", + "discount_type": "no", + "discount_at": "inclusive_of_tax", "updated_at": "2026-03-23T12:10:00.000000Z" } } @@ -12644,12 +15059,20 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" + "status": { + "type": "string" + }, + "tax_inclusive": { + "type": "string" + }, + "discount_type": { + "type": "string" + }, + "discount_at": { + "type": "string" }, "updated_at": { "type": "string", @@ -12663,8 +15086,11 @@ "message": "Updated successfully.", "data": { "id": 1, - "name": "Sample Item", - "created_at": "2026-03-23T12:00:00.000000Z", + "title": "Job Card 001", + "status": "in_progress", + "tax_inclusive": "Tax Inclusive", + "discount_type": "no", + "discount_at": "inclusive_of_tax", "updated_at": "2026-03-23T12:10:00.000000Z" } } @@ -12725,28 +15151,52 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" + "customer_remarks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "job_card_id": { + "type": "integer" + }, + "remark": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } } } } } }, "example": { - "message": "Created successfully.", + "message": "Customer remark added successfully.", "data": { "id": 1, - "name": "Sample Item", - "created_at": "2026-03-23T12:00:00.000000Z", - "updated_at": "2026-03-23T12:00:00.000000Z" + "title": "Job Card 001", + "customer_remarks": [ + { + "id": 1, + "job_card_id": 1, + "remark": "Customer requested wash", + "created_at": "2026-03-23T12:00:00.000000Z", + "updated_at": "2026-03-23T12:00:00.000000Z" + } + ] } } } @@ -12810,28 +15260,52 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" + "customer_remarks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "job_card_id": { + "type": "integer" + }, + "remark": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } } } } } }, "example": { - "message": "Created successfully.", + "message": "Customer remark updated successfully.", "data": { "id": 1, - "name": "Sample Item", - "created_at": "2026-03-23T12:00:00.000000Z", - "updated_at": "2026-03-23T12:00:00.000000Z" + "title": "Job Card 001", + "customer_remarks": [ + { + "id": 1, + "job_card_id": 1, + "remark": "Updated remark", + "created_at": "2026-03-23T12:00:00.000000Z", + "updated_at": "2026-03-23T12:10:00.000000Z" + } + ] } } } @@ -12866,11 +15340,31 @@ "properties": { "message": { "type": "string" + }, + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "customer_remarks": { + "type": "array", + "items": {} + } + } } } }, "example": { - "message": "Deleted successfully." + "message": "Customer remark deleted successfully.", + "data": { + "id": 1, + "title": "Job Card 001", + "customer_remarks": [] + } } } } @@ -12929,28 +15423,52 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" + "shop_recommendations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "job_card_id": { + "type": "integer" + }, + "recommendation": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } } } } } }, "example": { - "message": "Created successfully.", + "message": "Shop recommendation added successfully.", "data": { "id": 1, - "name": "Sample Item", - "created_at": "2026-03-23T12:00:00.000000Z", - "updated_at": "2026-03-23T12:00:00.000000Z" + "title": "Job Card 001", + "shop_recommendations": [ + { + "id": 1, + "job_card_id": 1, + "recommendation": "Replace brake pads", + "created_at": "2026-03-23T12:00:00.000000Z", + "updated_at": "2026-03-23T12:00:00.000000Z" + } + ] } } } @@ -13014,28 +15532,52 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" + "shop_recommendations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "job_card_id": { + "type": "integer" + }, + "recommendation": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } } } } } }, "example": { - "message": "Created successfully.", + "message": "Shop recommendation updated successfully.", "data": { "id": 1, - "name": "Sample Item", - "created_at": "2026-03-23T12:00:00.000000Z", - "updated_at": "2026-03-23T12:00:00.000000Z" + "title": "Job Card 001", + "shop_recommendations": [ + { + "id": 1, + "job_card_id": 1, + "recommendation": "Updated recommendation", + "created_at": "2026-03-23T12:00:00.000000Z", + "updated_at": "2026-03-23T12:10:00.000000Z" + } + ] } } } @@ -13070,11 +15612,31 @@ "properties": { "message": { "type": "string" + }, + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "shop_recommendations": { + "type": "array", + "items": {} + } + } } } }, "example": { - "message": "Deleted successfully." + "message": "Shop recommendation deleted successfully.", + "data": { + "id": 1, + "title": "Job Card 001", + "shop_recommendations": [] + } } } } @@ -13130,12 +15692,11 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" + "attachments": { + "type": "string" }, "updated_at": { "type": "string", @@ -13149,8 +15710,8 @@ "message": "Updated successfully.", "data": { "id": 1, - "name": "Sample Item", - "created_at": "2026-03-23T12:00:00.000000Z", + "title": "Job Card 001", + "attachments": "[\"job_card_attachments/file1.jpg\"]", "updated_at": "2026-03-23T12:10:00.000000Z" } } @@ -13267,12 +15828,11 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" + "service_writer_id": { + "type": "integer" }, "updated_at": { "type": "string", @@ -13286,8 +15846,8 @@ "message": "Updated successfully.", "data": { "id": 1, - "name": "Sample Item", - "created_at": "2026-03-23T12:00:00.000000Z", + "title": "Job Card 001", + "service_writer_id": 1, "updated_at": "2026-03-23T12:10:00.000000Z" } } @@ -13348,12 +15908,11 @@ "id": { "type": "integer" }, - "name": { + "title": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" + "sales_person_id": { + "type": "integer" }, "updated_at": { "type": "string", @@ -13367,8 +15926,8 @@ "message": "Updated successfully.", "data": { "id": 1, - "name": "Sample Item", - "created_at": "2026-03-23T12:00:00.000000Z", + "title": "Job Card 001", + "sales_person_id": 1, "updated_at": "2026-03-23T12:10:00.000000Z" } } @@ -14319,6 +16878,167 @@ } }, "/api/parts/{id}": { + "get": { + "tags": [ + "Parts" + ], + "summary": "Show", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "shop_type_id": { + "type": "integer" + }, + "category_id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "part_number": { + "type": "string" + }, + "unit_type_id": { + "type": "integer" + }, + "manufactured_by": { + "type": "string" + }, + "description": { + "type": "string" + }, + "location": { + "type": "string" + }, + "pricing_matrix": { + "type": "string" + }, + "department_id": { + "type": "integer" + }, + "sales_information": { + "type": "boolean" + }, + "selling_price": { + "type": "string" + }, + "sales_chart_of_account": { + "type": "integer" + }, + "purchase_information": { + "type": "boolean" + }, + "purchase_chart_of_account": { + "type": "integer" + }, + "purchase_preferred_vendor_id": { + "type": "integer" + }, + "purchase_price": { + "type": "string" + }, + "track_inventory": { + "type": "boolean" + }, + "opening_stock": { + "type": "integer" + }, + "as_on_date": { + "type": "string" + }, + "min_stock": { + "type": "integer" + }, + "max_stock": { + "type": "integer" + }, + "inventory_chart_of_account": { + "type": "integer" + }, + "tracking_type": { + "type": "integer" + }, + "inventory_purchase_price": { + "type": "string" + }, + "is_active": { + "type": "boolean" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + } + }, + "example": { + "data": { + "id": 1, + "shop_type_id": 1, + "category_id": 1, + "title": "Brake Pad", + "sku": "BP-001", + "part_number": "BP-001-A", + "unit_type_id": 1, + "manufactured_by": "Bosch", + "description": "Front brake pad set", + "location": "Rack A-3", + "pricing_matrix": "Standard", + "department_id": 1, + "sales_information": true, + "selling_price": "45.00", + "sales_chart_of_account": 4000, + "purchase_information": true, + "purchase_chart_of_account": 5000, + "purchase_preferred_vendor_id": 1, + "purchase_price": "25.00", + "track_inventory": true, + "opening_stock": 10, + "as_on_date": "2026-03-20", + "min_stock": 2, + "max_stock": 50, + "inventory_chart_of_account": 3000, + "tracking_type": 1, + "inventory_purchase_price": "24.00", + "is_active": true, + "created_at": "2026-03-23T12:00:00.000000Z", + "updated_at": "2026-03-23T12:00:00.000000Z" + } + } + } + } + } + } + }, "put": { "tags": [ "Parts" @@ -15602,6 +18322,138 @@ } }, "/api/services/{id}": { + "get": { + "tags": [ + "Services" + ], + "summary": "Show", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "shop_type_id": { + "type": "integer" + }, + "category_id": { + "type": "integer" + }, + "labor_name": { + "type": "string" + }, + "service_code": { + "type": "string" + }, + "unit_type_id": { + "type": "integer" + }, + "labor_matrix": { + "type": "string" + }, + "description": { + "type": "string" + }, + "department_id": { + "type": "integer" + }, + "sales_information": { + "type": "boolean" + }, + "rate_type": { + "type": "string" + }, + "labor_rate_id": { + "type": "integer" + }, + "labor_hours": { + "type": "string" + }, + "sales_chart_of_account": { + "type": "integer" + }, + "selling_price": { + "type": "string" + }, + "purchase_information": { + "type": "boolean" + }, + "purchase_chart_of_account": { + "type": "string", + "nullable": true + }, + "purchase_preferred_vendor_id": { + "type": "string", + "nullable": true + }, + "purchase_price": { + "type": "string", + "nullable": true + }, + "is_active": { + "type": "boolean" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + } + }, + "example": { + "data": { + "id": 1, + "shop_type_id": 1, + "category_id": 1, + "labor_name": "Oil Change", + "service_code": "SVC-001", + "unit_type_id": 1, + "labor_matrix": "Standard", + "description": "Full synthetic oil change", + "department_id": 1, + "sales_information": true, + "rate_type": "hourly", + "labor_rate_id": 1, + "labor_hours": "1.00", + "sales_chart_of_account": 4000, + "selling_price": "75.00", + "purchase_information": false, + "purchase_chart_of_account": null, + "purchase_preferred_vendor_id": null, + "purchase_price": null, + "is_active": true, + "created_at": "2026-03-23T12:00:00.000000Z", + "updated_at": "2026-03-23T12:00:00.000000Z" + } + } + } + } + } + } + }, "put": { "tags": [ "Services" @@ -19226,6 +22078,195 @@ } }, "/api/service-groups/{id}": { + "get": { + "tags": [ + "Service Groups" + ], + "summary": "Show", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "service_name": { + "type": "string" + }, + "shop_type_id": { + "type": "integer" + }, + "code": { + "type": "string" + }, + "inventory_category_id": { + "type": "integer" + }, + "unit_type_id": { + "type": "integer" + }, + "department_id": { + "type": "integer" + }, + "service_description": { + "type": "string" + }, + "show_as_lump_sum": { + "type": "boolean" + }, + "mark_as_recommended": { + "type": "boolean" + }, + "set_packaged_pricing": { + "type": "boolean" + }, + "selling_price": { + "type": "string" + }, + "selling_chart_of_account": { + "type": "string" + }, + "is_active": { + "type": "boolean" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "shop_type": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + } + } + }, + "inventory_category": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + } + } + }, + "unit_type": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + } + } + }, + "department": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + } + } + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "color_code": { + "type": "string" + } + } + } + } + } + } + } + }, + "example": { + "data": { + "id": 1, + "service_name": "Engine Service Group", + "shop_type_id": 1, + "code": "SG-001", + "inventory_category_id": 1, + "unit_type_id": 1, + "department_id": 1, + "service_description": "Common engine services", + "show_as_lump_sum": false, + "mark_as_recommended": true, + "set_packaged_pricing": false, + "selling_price": "100.00", + "selling_chart_of_account": "4000", + "is_active": true, + "created_at": "2026-03-23T12:00:00.000000Z", + "updated_at": "2026-03-23T12:00:00.000000Z", + "shop_type": { + "id": 1, + "title": "Main Workshop" + }, + "inventory_category": { + "id": 1, + "title": "Engine" + }, + "unit_type": { + "id": 1, + "title": "Hour" + }, + "department": { + "id": 1, + "name": "Service Department" + }, + "labels": [ + { + "id": 1, + "title": "Recommended", + "color_code": "#00AAFF" + } + ] + } + } + } + } + } + } + }, "put": { "tags": [ "Service Groups" @@ -19350,6 +22391,71 @@ } } }, + "/api/service-groups/{id}/toggle-status": { + "post": { + "tags": [ + "Service Groups" + ], + "summary": "Toggle Status", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + }, + "example": {} + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "is_active": { + "type": "boolean" + } + } + } + } + }, + "example": { + "message": "Service group status updated successfully.", + "data": { + "id": 1, + "is_active": false + } + } + } + } + } + } + } + }, "/api/service-groups/{id}/add-label": { "post": { "tags": [ @@ -27895,6 +31001,451 @@ } } }, + "/api/configurations/sales_tax_discount": { + "put": { + "tags": [ + "Configurations" + ], + "summary": "Update Sales Tax Discount", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sell_rates_tax_inclusive": { + "type": "string" + }, + "give_discounts": { + "type": "string" + } + } + }, + "example": { + "sell_rates_tax_inclusive": "Tax Exclusive", + "give_discounts": "transaction_level" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "sell_rates_tax_inclusive": { + "type": "string" + }, + "give_discounts": { + "type": "string" + }, + "purchase_rates_tax_inclusive": { + "type": "string" + }, + "receive_discounts": { + "type": "string" + }, + "enable_parts_issuing": { + "type": "boolean" + }, + "enable_digital_authorisation": { + "type": "boolean" + }, + "is_taxable_order": { + "type": "boolean" + }, + "customer_search_by_vehicle": { + "type": "boolean" + }, + "vehicle_search_by_customer": { + "type": "boolean" + }, + "odometer_in_check_in": { + "type": "boolean" + }, + "odometer_in_check_out": { + "type": "boolean" + }, + "customer_signature_in_check_in": { + "type": "boolean" + }, + "customer_signature_in_check_out": { + "type": "boolean" + }, + "set_packaged_pricing": { + "type": "boolean" + }, + "show_as_lump_sum": { + "type": "boolean" + }, + "mark_as_recommended": { + "type": "boolean" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + } + }, + "example": { + "message": "Sales tax and discount settings updated successfully.", + "data": { + "id": 1, + "sell_rates_tax_inclusive": "Tax Exclusive", + "give_discounts": "transaction_level", + "purchase_rates_tax_inclusive": "Tax Inclusive", + "receive_discounts": "no", + "enable_parts_issuing": false, + "enable_digital_authorisation": false, + "is_taxable_order": false, + "customer_search_by_vehicle": false, + "vehicle_search_by_customer": false, + "odometer_in_check_in": false, + "odometer_in_check_out": false, + "customer_signature_in_check_in": false, + "customer_signature_in_check_out": false, + "set_packaged_pricing": false, + "show_as_lump_sum": false, + "mark_as_recommended": false, + "created_at": "2026-03-30T16:00:00.000000Z", + "updated_at": "2026-03-30T16:05:00.000000Z" + } + } + } + } + } + } + } + }, + "/api/configurations/purchase_tax_discount": { + "put": { + "tags": [ + "Configurations" + ], + "summary": "Update Purchase Tax Discount", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "purchase_rates_tax_inclusive": { + "type": "string" + }, + "receive_discounts": { + "type": "string" + } + } + }, + "example": { + "purchase_rates_tax_inclusive": "Tax Exclusive", + "receive_discounts": "line_item_level" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "sell_rates_tax_inclusive": { + "type": "string" + }, + "give_discounts": { + "type": "string" + }, + "purchase_rates_tax_inclusive": { + "type": "string" + }, + "receive_discounts": { + "type": "string" + }, + "enable_parts_issuing": { + "type": "boolean" + }, + "enable_digital_authorisation": { + "type": "boolean" + }, + "is_taxable_order": { + "type": "boolean" + }, + "customer_search_by_vehicle": { + "type": "boolean" + }, + "vehicle_search_by_customer": { + "type": "boolean" + }, + "odometer_in_check_in": { + "type": "boolean" + }, + "odometer_in_check_out": { + "type": "boolean" + }, + "customer_signature_in_check_in": { + "type": "boolean" + }, + "customer_signature_in_check_out": { + "type": "boolean" + }, + "set_packaged_pricing": { + "type": "boolean" + }, + "show_as_lump_sum": { + "type": "boolean" + }, + "mark_as_recommended": { + "type": "boolean" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + } + }, + "example": { + "message": "Purchase tax and discount settings updated successfully.", + "data": { + "id": 1, + "sell_rates_tax_inclusive": "Tax Inclusive", + "give_discounts": "no", + "purchase_rates_tax_inclusive": "Tax Exclusive", + "receive_discounts": "line_item_level", + "enable_parts_issuing": false, + "enable_digital_authorisation": false, + "is_taxable_order": false, + "customer_search_by_vehicle": false, + "vehicle_search_by_customer": false, + "odometer_in_check_in": false, + "odometer_in_check_out": false, + "customer_signature_in_check_in": false, + "customer_signature_in_check_out": false, + "set_packaged_pricing": false, + "show_as_lump_sum": false, + "mark_as_recommended": false, + "created_at": "2026-03-30T16:00:00.000000Z", + "updated_at": "2026-03-30T16:10:00.000000Z" + } + } + } + } + } + } + } + }, + "/api/configurations/general_preferences": { + "put": { + "tags": [ + "Configurations" + ], + "summary": "Update General Preferences", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enable_parts_issuing": { + "type": "boolean" + }, + "enable_digital_authorisation": { + "type": "boolean" + }, + "is_taxable_order": { + "type": "boolean" + }, + "customer_search_by_vehicle": { + "type": "boolean" + }, + "vehicle_search_by_customer": { + "type": "boolean" + }, + "odometer_in_check_in": { + "type": "boolean" + }, + "odometer_in_check_out": { + "type": "boolean" + }, + "customer_signature_in_check_in": { + "type": "boolean" + }, + "customer_signature_in_check_out": { + "type": "boolean" + }, + "set_packaged_pricing": { + "type": "boolean" + }, + "show_as_lump_sum": { + "type": "boolean" + }, + "mark_as_recommended": { + "type": "boolean" + } + } + }, + "example": { + "enable_parts_issuing": true, + "enable_digital_authorisation": true, + "is_taxable_order": true, + "customer_search_by_vehicle": true, + "vehicle_search_by_customer": false, + "odometer_in_check_in": true, + "odometer_in_check_out": true, + "customer_signature_in_check_in": true, + "customer_signature_in_check_out": false, + "set_packaged_pricing": true, + "show_as_lump_sum": false, + "mark_as_recommended": true + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "sell_rates_tax_inclusive": { + "type": "string" + }, + "give_discounts": { + "type": "string" + }, + "purchase_rates_tax_inclusive": { + "type": "string" + }, + "receive_discounts": { + "type": "string" + }, + "enable_parts_issuing": { + "type": "boolean" + }, + "enable_digital_authorisation": { + "type": "boolean" + }, + "is_taxable_order": { + "type": "boolean" + }, + "customer_search_by_vehicle": { + "type": "boolean" + }, + "vehicle_search_by_customer": { + "type": "boolean" + }, + "odometer_in_check_in": { + "type": "boolean" + }, + "odometer_in_check_out": { + "type": "boolean" + }, + "customer_signature_in_check_in": { + "type": "boolean" + }, + "customer_signature_in_check_out": { + "type": "boolean" + }, + "set_packaged_pricing": { + "type": "boolean" + }, + "show_as_lump_sum": { + "type": "boolean" + }, + "mark_as_recommended": { + "type": "boolean" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + } + }, + "example": { + "message": "General preferences updated successfully.", + "data": { + "id": 1, + "sell_rates_tax_inclusive": "Tax Inclusive", + "give_discounts": "no", + "purchase_rates_tax_inclusive": "Tax Inclusive", + "receive_discounts": "no", + "enable_parts_issuing": true, + "enable_digital_authorisation": true, + "is_taxable_order": true, + "customer_search_by_vehicle": true, + "vehicle_search_by_customer": false, + "odometer_in_check_in": true, + "odometer_in_check_out": true, + "customer_signature_in_check_in": true, + "customer_signature_in_check_out": false, + "set_packaged_pricing": true, + "show_as_lump_sum": false, + "mark_as_recommended": true, + "created_at": "2026-03-30T16:00:00.000000Z", + "updated_at": "2026-03-30T16:15:00.000000Z" + } + } + } + } + } + } + } + }, "/api/make-and-models": { "get": { "tags": [ diff --git a/packages/api/postman/collection.json b/packages/api/postman/collection.json index 6add2c5..9653a73 100644 --- a/packages/api/postman/collection.json +++ b/packages/api/postman/collection.json @@ -1,20462 +1,21630 @@ { - "info": { - "_postman_id": "cb4c39c8-b714-48f4-8996-5a9774d58d12", - "name": "Reparee API", - "description": "All authenticated API endpoints. Set base_url and auth_token in collection variables.", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "17202336" - }, - "item": [ - { - "name": "Auth", - "item": [ - { - "name": "Login", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"email\": \"admin@admin.com\",\n \"password\": \"12345678\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/login", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "login" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"email\": \"admin@admin.com\",\n \"password\": \"12345678\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/login", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "login" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"token\": \"1|YOUR_SANCTUM_TOKEN\",\n \"user\": {\n \"id\": 1,\n \"name\": \"Admin\",\n \"email\": \"admin@admin.com\"\n }\n}" - } - ] - }, - { - "name": "Profile", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/profile", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "profile" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/profile", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "profile" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": {\n \"id\": 1,\n \"name\": \"Admin\",\n \"email\": \"admin@admin.com\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Logout", - "request": { - "method": "POST", - "header": [], - "url": { - "raw": "{{base_url}}/api/logout", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "logout" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [], - "url": { - "raw": "{{base_url}}/api/logout", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "logout" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Logged out successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Referral Sources", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/referral-sources", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "referral-sources" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/referral-sources", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "referral-sources" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": {\n \"current_page\": 1,\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Website\",\n \"is_default\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"first_page_url\": \"http://localhost:8000/api/referral-sources?page=1\",\n \"from\": 1,\n \"last_page\": 1,\n \"last_page_url\": \"http://localhost:8000/api/referral-sources?page=1\",\n \"links\": [],\n \"next_page_url\": null,\n \"path\": \"http://localhost:8000/api/referral-sources\",\n \"per_page\": 10,\n \"prev_page_url\": null,\n \"to\": 1,\n \"total\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Website\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/referral-sources", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "referral-sources" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Website\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/referral-sources", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "referral-sources" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Referral source created successfully.\",\n \"data\": {\n \"id\": 2,\n \"name\": \"Walk-in\",\n \"is_default\": false,\n \"created_at\": \"2026-03-23T12:05:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:05:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Website\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/referral-sources/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "referral-sources", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Website\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/referral-sources/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "referral-sources", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Referral source updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Website Ads\",\n \"is_default\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/referral-sources/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "referral-sources", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/referral-sources/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "referral-sources", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Referral source deleted successfully.\"\n}" - } - ] - }, - { - "name": "Set Default", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-default-referral-source", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-default-referral-source" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-default-referral-source", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-default-referral-source" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Default referral source updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Website\",\n \"is_default\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:15:00.000000Z\"\n }\n}" - } - ] - } - ] - }, - { - "name": "Customers", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/customers", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "customers" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/customers", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "customers" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"customer_type_id\": 1,\n \"salutation\": \"Mr\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"company_name\": \"Doe Holdings\",\n \"email\": \"john@example.com\",\n \"phone\": \"0501234567\",\n \"alternate_phone\": \"0551234567\",\n \"opening_balance\": 0,\n \"credit_limit\": 5000,\n \"website\": \"https://example.com\",\n \"referral_source_id\": 1,\n \"payment_terms_id\": 1,\n \"address_line_1\": \"Street 10\",\n \"address_line_2\": \"Near Central Plaza\",\n \"country_id\": 1,\n \"state_id\": 1,\n \"city\": \"Dubai\",\n \"zip_code\": \"00000\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"customer_type\": {\n \"id\": 1,\n \"name\": \"Retail\"\n },\n \"referral_source\": {\n \"id\": 1,\n \"name\": \"Website\"\n },\n \"payment_term\": {\n \"id\": 1,\n \"title\": \"Net 30\",\n \"days\": 30\n },\n \"country\": {\n \"id\": 1,\n \"name\": \"United Arab Emirates\",\n \"code\": \"AE\"\n },\n \"state\": {\n \"id\": 1,\n \"name\": \"Dubai\",\n \"code\": \"DU\"\n }\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"customer_type_id\": 1,\n \"salutation\": \"Mr\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"company_name\": \"Doe Holdings\",\n \"email\": \"john@example.com\",\n \"phone\": \"0501234567\",\n \"alternate_phone\": \"0551234567\",\n \"referral_source_id\": 1,\n \"payment_terms_id\": 1,\n \"address_line_1\": \"Street 10\",\n \"address_line_2\": \"Near Central Plaza\",\n \"country_id\": 1,\n \"state_id\": 1,\n \"city\": \"Dubai\",\n \"zip_code\": \"00000\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/customers", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "customers" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"customer_type_id\": 1,\n \"salutation\": \"Mr\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"company_name\": \"Doe Holdings\",\n \"email\": \"john@example.com\",\n \"phone\": \"0501234567\",\n \"alternate_phone\": \"0551234567\",\n \"referral_source_id\": 1,\n \"payment_terms_id\": 1,\n \"address_line_1\": \"Street 10\",\n \"address_line_2\": \"Near Central Plaza\",\n \"country_id\": 1,\n \"state_id\": 1,\n \"city\": \"Dubai\",\n \"zip_code\": \"00000\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/customers", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "customers" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Customer created successfully.\",\n \"data\": {\n \"id\": 2,\n \"customer_type_id\": 1,\n \"salutation\": \"Mr\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"company_name\": \"Doe Holdings\",\n \"email\": \"john@example.com\",\n \"phone\": \"0501234567\",\n \"alternate_phone\": \"0551234567\",\n \"opening_balance\": 0,\n \"credit_limit\": 5000,\n \"website\": \"https://example.com\",\n \"referral_source_id\": 1,\n \"payment_terms_id\": 1,\n \"address_line_1\": \"Street 10\",\n \"address_line_2\": \"Near Central Plaza\",\n \"country_id\": 1,\n \"state_id\": 1,\n \"city\": \"Dubai\",\n \"zip_code\": \"00000\",\n \"created_at\": \"2026-03-23T12:20:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:20:00.000000Z\",\n \"customer_type\": {\n \"id\": 1,\n \"name\": \"Retail\"\n },\n \"referral_source\": {\n \"id\": 1,\n \"name\": \"Website\"\n },\n \"payment_term\": {\n \"id\": 1,\n \"title\": \"Net 30\",\n \"days\": 30\n },\n \"country\": {\n \"id\": 1,\n \"name\": \"United Arab Emirates\",\n \"code\": \"AE\"\n },\n \"state\": {\n \"id\": 1,\n \"name\": \"Dubai\",\n \"code\": \"DU\"\n }\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"first_name\": \"John\",\n \"last_name\": \"Doe\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/customers/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "customers", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"first_name\": \"John\",\n \"last_name\": \"Doe\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/customers/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "customers", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Customer updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"customer_type_id\": 1,\n \"salutation\": \"Mr\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"company_name\": \"Doe Holdings\",\n \"email\": \"john@example.com\",\n \"phone\": \"0501234567\",\n \"alternate_phone\": \"0551234567\",\n \"opening_balance\": 0,\n \"credit_limit\": 5000,\n \"website\": \"https://example.com\",\n \"referral_source_id\": 1,\n \"payment_terms_id\": 1,\n \"address_line_1\": \"Street 10\",\n \"address_line_2\": \"Near Central Plaza\",\n \"country_id\": 1,\n \"state_id\": 1,\n \"city\": \"Dubai\",\n \"zip_code\": \"00000\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:30:00.000000Z\",\n \"customer_type\": {\n \"id\": 1,\n \"name\": \"Retail\"\n },\n \"referral_source\": {\n \"id\": 1,\n \"name\": \"Website\"\n },\n \"payment_term\": {\n \"id\": 1,\n \"title\": \"Net 30\",\n \"days\": 30\n },\n \"country\": {\n \"id\": 1,\n \"name\": \"United Arab Emirates\",\n \"code\": \"AE\"\n },\n \"state\": {\n \"id\": 1,\n \"name\": \"Dubai\",\n \"code\": \"DU\"\n }\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/customers/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "customers", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/customers/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "customers", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Customer deleted successfully.\"\n}" - } - ] - }, - { - "name": "Export", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/customers/export", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "customers", - "export" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/customers/export", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "customers", - "export" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Customers export generated successfully.\",\n \"data\": {\n \"file_name\": \"customers-2026-03-23-123000.xlsx\"\n }\n}" - } - ] - }, - { - "name": "Import", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "file", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/customers/import", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "customers", - "import" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "file", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/customers/import", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "customers", - "import" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Customer import completed successfully.\",\n \"data\": {\n \"imported_count\": 10,\n \"failed_count\": 1,\n \"failed_rows\": [\n {\n \"row\": 4,\n \"errors\": [\n \"The email has already been taken.\"\n ],\n \"values\": {\n \"email\": \"dup@example.com\"\n }\n }\n ]\n }\n}" - } - ] - } - ] - }, - { - "name": "Customer Types", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/customer-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "customer-types" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/customer-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "customer-types" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Retail\"\n }\n ]\n}" - } - ] - } - ] - }, - { - "name": "Countries & States", - "item": [ - { - "name": "Countries", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/countries", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "countries" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/countries", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "countries" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"United Arab Emirates\",\n \"code\": \"AE\"\n },\n {\n \"id\": 2,\n \"name\": \"Saudi Arabia\",\n \"code\": \"SA\"\n }\n ]\n}" - } - ] - }, - { - "name": "States", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/states", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "states" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/states", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "states" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"country_id\": 1,\n \"name\": \"Dubai\",\n \"code\": \"DU\",\n \"country\": {\n \"id\": 1,\n \"name\": \"United Arab Emirates\",\n \"code\": \"AE\"\n }\n },\n {\n \"id\": 2,\n \"country_id\": 1,\n \"name\": \"Abu Dhabi\",\n \"code\": \"AZ\",\n \"country\": {\n \"id\": 1,\n \"name\": \"United Arab Emirates\",\n \"code\": \"AE\"\n }\n }\n ]\n}" - } - ] - } - ] - }, - { - "name": "Payment Terms", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/payment-terms", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-terms" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/payment-terms", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-terms" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"vehicle_body_type_id\": 1,\n \"vehicle_fuel_type_id\": 1,\n \"vehicle_transmission_id\": 1,\n \"vehicle_color_id\": 1,\n \"image\": null,\n \"image_url\": null,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": \"2024\",\n \"sub_model\": \"LE\",\n \"license_plate\": \"ABC-123\",\n \"vin_number\": \"1HGBH41JXMN109186\",\n \"engine_number\": null,\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"reg_date\": null,\n \"mfg_date\": null,\n \"parked_at\": null,\n \"mileage\": \"10000\",\n \"owners_number\": \"1\",\n \"front_tire_size\": null,\n \"rear_tire_size\": null,\n \"note\": \"New vehicle\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"vehicle_body_type\": {\n \"id\": 1,\n \"title\": \"Sedan\"\n },\n \"vehicle_fuel_type\": {\n \"id\": 1,\n \"title\": \"Petrol\"\n },\n \"vehicle_transmission\": {\n \"id\": 1,\n \"title\": \"Automatic\"\n },\n \"vehicle_color\": {\n \"id\": 1,\n \"title\": \"Red\",\n \"code\": \"RD\"\n }\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Net 30\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/payment-terms", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-terms" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Net 30\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/payment-terms", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-terms" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Net 30\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/payment-terms/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-terms", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Net 30\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/payment-terms/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-terms", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/payment-terms/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-terms", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/payment-terms/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-terms", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Set Default", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-default-payment-term", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-default-payment-term" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-default-payment-term", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-default-payment-term" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - } - ] - }, - { - "name": "Shop Types", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/shop-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-types" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/shop-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-types" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"title\": \"Main Workshop\",\n \"shop_type\": \"Car\",\n \"note\": \"General automotive services\",\n \"inspection\": \"shop_types/inspection/inspection-template.pdf\",\n \"image\": \"shop_types/image/shop-type-car.jpg\",\n \"is_default\": true,\n \"created_at\": \"2026-03-24T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T12:00:00.000000Z\"\n }\n ]\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "title", - "value": "Main Workshop", - "type": "text" - }, - { - "key": "shop_type", - "value": "Car", - "type": "text" - }, - { - "key": "note", - "value": "General automotive services", - "type": "text" - }, - { - "key": "is_default", - "value": "1", - "type": "text" - }, - { - "key": "inspection", - "type": "file", - "value": "" - }, - { - "key": "image", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/shop-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-types" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "title", - "value": "Main Workshop", - "type": "text" - }, - { - "key": "shop_type", - "value": "Car", - "type": "text" - }, - { - "key": "note", - "value": "General automotive services", - "type": "text" - }, - { - "key": "is_default", - "value": "1", - "type": "text" - }, - { - "key": "inspection", - "type": "file", - "value": "" - }, - { - "key": "image", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/shop-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-types" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Shop type created successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Main Workshop\",\n \"shop_type\": \"Car\",\n \"note\": \"General automotive services\",\n \"inspection\": \"shop_types/inspection/inspection-template.pdf\",\n \"image\": \"shop_types/image/shop-type-car.jpg\",\n \"is_default\": true,\n \"created_at\": \"2026-03-24T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "_method", - "value": "PUT", - "type": "text" - }, - { - "key": "title", - "value": "Main Workshop Updated", - "type": "text" - }, - { - "key": "shop_type", - "value": "Car", - "type": "text" - }, - { - "key": "note", - "value": "Updated note", - "type": "text" - }, - { - "key": "is_default", - "value": "0", - "type": "text" - }, - { - "key": "inspection", - "type": "file", - "value": "" - }, - { - "key": "image", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/shop-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-types", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "_method", - "value": "PUT", - "type": "text" - }, - { - "key": "title", - "value": "Main Workshop Updated", - "type": "text" - }, - { - "key": "shop_type", - "value": "Car", - "type": "text" - }, - { - "key": "note", - "value": "Updated note", - "type": "text" - }, - { - "key": "is_default", - "value": "0", - "type": "text" - }, - { - "key": "inspection", - "type": "file", - "value": "" - }, - { - "key": "image", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/shop-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-types", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Shop type updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Main Workshop Updated\",\n \"shop_type\": \"Car\",\n \"note\": \"Updated note\",\n \"inspection\": \"shop_types/inspection/inspection-template-v2.pdf\",\n \"image\": \"shop_types/image/shop-type-car-v2.jpg\",\n \"is_default\": false,\n \"created_at\": \"2026-03-24T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/shop-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-types", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/shop-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-types", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Shop type deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Vehicle Body Types", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-body-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-body-types" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-body-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-body-types" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"category_id\": 1,\n \"labor_name\": \"Oil Change\",\n \"service_code\": \"SVC-001\",\n \"unit_type_id\": 1,\n \"labor_matrix\": \"Standard\",\n \"description\": \"Full synthetic oil change\",\n \"department_id\": 1,\n \"sales_information\": false,\n \"rate_type\": null,\n \"labor_rate_id\": null,\n \"labor_hours\": null,\n \"sales_chart_of_account\": null,\n \"selling_price\": \"75.00\",\n \"purchase_information\": false,\n \"purchase_chart_of_account\": null,\n \"purchase_preferred_vendor_id\": null,\n \"purchase_price\": null,\n \"is_active\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"category\": {\n \"id\": 1,\n \"title\": \"Oil & Maintenance\"\n },\n \"unit_type\": {\n \"id\": 1,\n \"title\": \"Hour\"\n },\n \"department\": {\n \"id\": 1,\n \"name\": \"Service Department\"\n },\n \"labor_rate\": null\n }\n ]\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Sedan\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-body-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-body-types" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Sedan\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-body-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-body-types" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"category_id\": 1,\n \"labor_name\": \"Oil Change\",\n \"service_code\": \"SVC-001\",\n \"unit_type_id\": 1,\n \"labor_matrix\": \"Standard\",\n \"description\": \"Full synthetic oil change\",\n \"department_id\": 1,\n \"sales_information\": false,\n \"rate_type\": null,\n \"labor_rate_id\": null,\n \"labor_hours\": null,\n \"sales_chart_of_account\": null,\n \"selling_price\": \"75.00\",\n \"purchase_information\": false,\n \"purchase_chart_of_account\": null,\n \"purchase_preferred_vendor_id\": null,\n \"purchase_price\": null,\n \"is_active\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"category\": {\n \"id\": 1,\n \"title\": \"Oil & Maintenance\"\n },\n \"unit_type\": {\n \"id\": 1,\n \"title\": \"Hour\"\n },\n \"department\": {\n \"id\": 1,\n \"name\": \"Service Department\"\n },\n \"labor_rate\": null\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Sedan\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-body-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-body-types", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Sedan\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-body-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-body-types", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"category_id\": 1,\n \"labor_name\": \"Oil Change Premium\",\n \"service_code\": \"SVC-001\",\n \"unit_type_id\": 1,\n \"labor_matrix\": \"Standard\",\n \"description\": \"Full synthetic oil change\",\n \"department_id\": 1,\n \"sales_information\": false,\n \"rate_type\": null,\n \"labor_rate_id\": null,\n \"labor_hours\": null,\n \"sales_chart_of_account\": null,\n \"selling_price\": \"85.00\",\n \"purchase_information\": false,\n \"purchase_chart_of_account\": null,\n \"purchase_preferred_vendor_id\": null,\n \"purchase_price\": null,\n \"is_active\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"category\": {\n \"id\": 1,\n \"title\": \"Oil & Maintenance\"\n },\n \"unit_type\": {\n \"id\": 1,\n \"title\": \"Hour\"\n },\n \"department\": {\n \"id\": 1,\n \"name\": \"Service Department\"\n },\n \"labor_rate\": null\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-body-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-body-types", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-body-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-body-types", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Vehicle Fuel Types", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-fuel-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-fuel-types" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-fuel-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-fuel-types" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"title\": \"Gasoline\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ]\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Gasoline\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-fuel-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-fuel-types" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Gasoline\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-fuel-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-fuel-types" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Gasoline\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Gasoline\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-fuel-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-fuel-types", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Gasoline\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-fuel-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-fuel-types", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Gasoline\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-fuel-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-fuel-types", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-fuel-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-fuel-types", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Vehicle Transmissions", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-transmissions", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-transmissions" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-transmissions", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-transmissions" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Automatic\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-transmissions", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-transmissions" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Automatic\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-transmissions", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-transmissions" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Automatic\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-transmissions/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-transmissions", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Automatic\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-transmissions/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-transmissions", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-transmissions/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-transmissions", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-transmissions/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-transmissions", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Vehicle Colors", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-colors", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-colors" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-colors", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-colors" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Black\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-colors", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-colors" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Black\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-colors", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-colors" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Black\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-colors/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-colors", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Black\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-colors/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-colors", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-colors/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-colors", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-colors/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-colors", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Vehicles", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicles", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicles" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicles", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicles" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"shop_type_id\": 1,\n \"vehicle_body_type_id\": 1,\n \"vehicle_fuel_type_id\": 1,\n \"vehicle_transmission_id\": 1,\n \"vehicle_color_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": \"2024\",\n \"sub_model\": \"LE\",\n \"license_plate\": \"ABC-123\",\n \"vin_number\": \"1HGBH41JXMN109186\",\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"mileage\": \"10000\",\n \"owners_number\": \"1\",\n \"note\": \"New vehicle\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicles", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicles" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"shop_type_id\": 1,\n \"vehicle_body_type_id\": 1,\n \"vehicle_fuel_type_id\": 1,\n \"vehicle_transmission_id\": 1,\n \"vehicle_color_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": \"2024\",\n \"sub_model\": \"LE\",\n \"license_plate\": \"ABC-123\",\n \"vin_number\": \"1HGBH41JXMN109186\",\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"mileage\": \"10000\",\n \"owners_number\": \"1\",\n \"note\": \"New vehicle\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicles", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicles" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"vehicle_body_type_id\": 1,\n \"vehicle_fuel_type_id\": 1,\n \"vehicle_transmission_id\": 1,\n \"vehicle_color_id\": 1,\n \"image\": null,\n \"image_url\": null,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": \"2024\",\n \"sub_model\": \"LE\",\n \"license_plate\": \"ABC-123\",\n \"vin_number\": \"1HGBH41JXMN109186\",\n \"engine_number\": null,\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"reg_date\": null,\n \"mfg_date\": null,\n \"parked_at\": null,\n \"mileage\": \"10000\",\n \"owners_number\": \"1\",\n \"front_tire_size\": null,\n \"rear_tire_size\": null,\n \"note\": \"New vehicle\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"vehicle_body_type\": {\n \"id\": 1,\n \"title\": \"Sedan\"\n },\n \"vehicle_fuel_type\": {\n \"id\": 1,\n \"title\": \"Petrol\"\n },\n \"vehicle_transmission\": {\n \"id\": 1,\n \"title\": \"Automatic\"\n },\n \"vehicle_color\": {\n \"id\": 1,\n \"title\": \"Red\",\n \"code\": \"RD\"\n }\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"mileage\": \"12000\",\n \"license_plate\": \"ABC-123\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicles/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicles", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"mileage\": \"12000\",\n \"license_plate\": \"ABC-123\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicles/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicles", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"vehicle_body_type_id\": 1,\n \"vehicle_fuel_type_id\": 1,\n \"vehicle_transmission_id\": 1,\n \"vehicle_color_id\": 1,\n \"image\": null,\n \"image_url\": null,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": \"2024\",\n \"sub_model\": \"LE\",\n \"license_plate\": \"ABC-123\",\n \"vin_number\": \"1HGBH41JXMN109186\",\n \"engine_number\": null,\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"reg_date\": null,\n \"mfg_date\": null,\n \"parked_at\": null,\n \"mileage\": \"12000\",\n \"owners_number\": \"1\",\n \"front_tire_size\": null,\n \"rear_tire_size\": null,\n \"note\": \"New vehicle\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"vehicle_body_type\": {\n \"id\": 1,\n \"title\": \"Sedan\"\n },\n \"vehicle_fuel_type\": {\n \"id\": 1,\n \"title\": \"Petrol\"\n },\n \"vehicle_transmission\": {\n \"id\": 1,\n \"title\": \"Automatic\"\n },\n \"vehicle_color\": {\n \"id\": 1,\n \"title\": \"Red\",\n \"code\": \"RD\"\n }\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicles/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicles", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicles/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicles", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Export", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicles/export", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicles", - "export" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicles/export", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicles", - "export" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"customer_type_id\": 1,\n \"salutation\": \"Mr\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john@example.com\",\n \"phone\": \"0501234567\",\n \"alternate_phone\": \"0551234567\",\n \"address_line_1\": \"Street 10\",\n \"address_line_2\": \"Near Central Plaza\",\n \"country_id\": 1,\n \"state_id\": 1,\n \"city\": \"Dubai\",\n \"zip_code\": \"00000\"\n }\n ],\n \"pagination\": {\n \"current_page\": 1,\n \"first_page_url\": \"{{base_url}}/api/get-vehicle-owners?page=1\",\n \"from\": 1,\n \"last_page_url\": \"{{base_url}}/api/get-vehicle-owners?page=1\",\n \"next_page_url\": null,\n \"path\": \"{{base_url}}/api/get-vehicle-owners\",\n \"per_page\": 10,\n \"prev_page_url\": null,\n \"to\": 1,\n \"total\": 1\n }\n}" - } - ] - }, - { - "name": "Import", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "file", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/vehicles/import", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicles", - "import" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "file", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/vehicles/import", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicles", - "import" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Import completed successfully.\",\n \"data\": {\n \"imported_count\": 10,\n \"failed_count\": 1,\n \"failed_rows\": [\n {\n \"row\": 4,\n \"errors\": [\n \"The service code has already been taken.\"\n ],\n \"values\": {\n \"service_code\": \"SVC-001\"\n }\n }\n ]\n }\n}" - } - ] - }, - { - "name": "Get Vehicle Owners", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/get-vehicle-owners", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "get-vehicle-owners" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/get-vehicle-owners", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "get-vehicle-owners" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Link Customer to Vehicle", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"customer_id\": 1,\n \"vehicle_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/link-customer-to-vehicle", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "link-customer-to-vehicle" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"customer_id\": 1,\n \"vehicle_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/link-customer-to-vehicle", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "link-customer-to-vehicle" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"vehicle_body_type_id\": 1,\n \"vehicle_fuel_type_id\": 1,\n \"vehicle_transmission_id\": 1,\n \"vehicle_color_id\": 1,\n \"image\": null,\n \"image_url\": null,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": \"2024\",\n \"sub_model\": \"LE\",\n \"license_plate\": \"ABC-123\",\n \"vin_number\": \"1HGBH41JXMN109186\",\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"mileage\": \"10000\",\n \"note\": \"New vehicle\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"customers\": [\n {\n \"id\": 1,\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john@example.com\"\n }\n ]\n }\n}" - } - ] - }, - { - "name": "Unlink Customer from Vehicle", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"customer_id\": 1,\n \"vehicle_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/unlink-customer-from-vehicle", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "unlink-customer-from-vehicle" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"customer_id\": 1,\n \"vehicle_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/unlink-customer-from-vehicle", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "unlink-customer-from-vehicle" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Removed successfully.\",\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"vehicle_body_type_id\": 1,\n \"vehicle_fuel_type_id\": 1,\n \"vehicle_transmission_id\": 1,\n \"vehicle_color_id\": 1,\n \"image\": null,\n \"image_url\": null,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": \"2024\",\n \"sub_model\": \"LE\",\n \"license_plate\": \"ABC-123\",\n \"vin_number\": \"1HGBH41JXMN109186\",\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"mileage\": \"10000\",\n \"note\": \"New vehicle\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"customers\": []\n }\n}" - } - ] - } - ] - }, - { - "name": "Document Types", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/document-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "document-types" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/document-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "document-types" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Registration\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/document-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "document-types" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Registration\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/document-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "document-types" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Registration\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/document-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "document-types", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Registration\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/document-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "document-types", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/document-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "document-types", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/document-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "document-types", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Vehicle Documents", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-documents", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-documents" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-documents", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-documents" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"vehicle_id\": 1,\n \"document_type_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-documents", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-documents" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"vehicle_id\": 1,\n \"document_type_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-documents", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-documents" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-documents/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-documents", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-documents/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-documents", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-documents/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-documents", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-documents/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-documents", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Vehicle Mile and Kms", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-mile-and-kms", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-mile-and-kms" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-mile-and-kms", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-mile-and-kms" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"vehicle_id\": 1,\n \"mileage\": 50000\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-mile-and-kms", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-mile-and-kms" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"vehicle_id\": 1,\n \"mileage\": 50000\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-mile-and-kms", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-mile-and-kms" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"mileage\": 51000\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-mile-and-kms/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-mile-and-kms", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"mileage\": 51000\n}" - }, - "url": { - "raw": "{{base_url}}/api/vehicle-mile-and-kms/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-mile-and-kms", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-mile-and-kms/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-mile-and-kms", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/vehicle-mile-and-kms/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vehicle-mile-and-kms", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Departments", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/departments", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "departments" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/departments", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "departments" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"name\": \"Mechanical\",\n \"assignment_type\": \"bays\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/departments", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "departments" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"name\": \"Mechanical\",\n \"assignment_type\": \"bays\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/departments", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "departments" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"name\": \"Mechanical\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/departments/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "departments", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"name\": \"Mechanical\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/departments/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "departments", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/departments/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "departments", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/departments/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "departments", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Set Favorite", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-favorite-department", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-favorite-department" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-favorite-department", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-favorite-department" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Remove Favorite", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/remove-favorite-department", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "remove-favorite-department" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/remove-favorite-department", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "remove-favorite-department" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Removed successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Employees", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/employees", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "employees" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/employees", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "employees" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"email\": \"jane@example.com\",\n \"phone\": \"0501234567\",\n \"department_id\": 1,\n \"position\": \"Technician\",\n \"status\": \"active\",\n \"type\": \"employee\",\n \"track_attendance\": true,\n \"notify_owner_when_punch_in_out\": false,\n \"shop_calender_id\": 1,\n \"shop_timing_id\": 1,\n \"geo_fence_radius\": 100,\n \"created_at\": \"2026-03-24T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T12:00:00.000000Z\",\n \"department\": {\n \"id\": 1,\n \"name\": \"Mechanical\"\n },\n \"shop_calender\": {\n \"id\": 1,\n \"title\": \"Default Calendar\"\n },\n \"shop_timing\": {\n \"id\": 1,\n \"title\": \"Regular Shift\"\n },\n \"has_active_time_sheet\": false,\n \"active_time_sheet\": null\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"email\": \"jane@example.com\",\n \"phone\": \"0501234567\",\n \"department_id\": 1,\n \"position\": \"Technician\",\n \"status\": \"active\",\n \"type\": \"employee\",\n \"track_attendance\": true,\n \"notify_owner_when_punch_in_out\": false,\n \"shop_calender_id\": 1,\n \"shop_timing_id\": 1,\n \"geo_fence_radius\": 100\n}" - }, - "url": { - "raw": "{{base_url}}/api/employees", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "employees" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"email\": \"jane@example.com\",\n \"phone\": \"0501234567\",\n \"department_id\": 1,\n \"position\": \"Technician\",\n \"status\": \"active\",\n \"type\": \"employee\",\n \"track_attendance\": true,\n \"notify_owner_when_punch_in_out\": false,\n \"shop_calender_id\": 1,\n \"shop_timing_id\": 1,\n \"geo_fence_radius\": 100\n}" - }, - "url": { - "raw": "{{base_url}}/api/employees", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "employees" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Employee created successfully.\",\n \"data\": {\n \"id\": 1,\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"email\": \"jane@example.com\",\n \"phone\": \"0501234567\",\n \"department_id\": 1,\n \"position\": \"Technician\",\n \"status\": \"active\",\n \"type\": \"employee\",\n \"track_attendance\": true,\n \"notify_owner_when_punch_in_out\": false,\n \"shop_calender_id\": 1,\n \"shop_timing_id\": 1,\n \"geo_fence_radius\": 100,\n \"created_at\": \"2026-03-24T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T12:00:00.000000Z\",\n \"department\": {\n \"id\": 1,\n \"name\": \"Mechanical\"\n },\n \"has_active_time_sheet\": false,\n \"active_time_sheet\": null\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"status\": \"inactive\",\n \"position\": \"Senior Technician\",\n \"shop_timing_id\": 2\n}" - }, - "url": { - "raw": "{{base_url}}/api/employees/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "employees", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"status\": \"inactive\",\n \"position\": \"Senior Technician\",\n \"shop_timing_id\": 2\n}" - }, - "url": { - "raw": "{{base_url}}/api/employees/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "employees", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Employee updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"email\": \"jane@example.com\",\n \"phone\": \"0501234567\",\n \"department_id\": 1,\n \"position\": \"Senior Technician\",\n \"status\": \"inactive\",\n \"type\": \"employee\",\n \"track_attendance\": true,\n \"notify_owner_when_punch_in_out\": false,\n \"shop_calender_id\": 1,\n \"shop_timing_id\": 2,\n \"geo_fence_radius\": 100,\n \"created_at\": \"2026-03-24T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T12:10:00.000000Z\",\n \"has_active_time_sheet\": false,\n \"active_time_sheet\": null\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/employees/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "employees", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/employees/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "employees", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Employee deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Unit Types", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/unit-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "unit-types" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/unit-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "unit-types" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Hour\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/unit-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "unit-types" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Hour\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/unit-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "unit-types" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Hour\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/unit-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "unit-types", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Hour\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/unit-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "unit-types", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/unit-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "unit-types", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/unit-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "unit-types", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Set Favorite", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-favorite-unit-type", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-favorite-unit-type" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-favorite-unit-type", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-favorite-unit-type" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Remove Favorite", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/remove-favorite-unit-type", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "remove-favorite-unit-type" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/remove-favorite-unit-type", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "remove-favorite-unit-type" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Removed successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Inventory Categories", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/inventory-categories", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inventory-categories" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/inventory-categories", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inventory-categories" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Parts\",\n \"shop_type_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/inventory-categories", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inventory-categories" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Parts\",\n \"shop_type_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/inventory-categories", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inventory-categories" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Parts\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/inventory-categories/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inventory-categories", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Parts\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/inventory-categories/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inventory-categories", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/inventory-categories/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inventory-categories", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/inventory-categories/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inventory-categories", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Set Favorite", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-favorite-inventory-category", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-favorite-inventory-category" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-favorite-inventory-category", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-favorite-inventory-category" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Remove Favorite", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/remove-favorite-inventory-category", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "remove-favorite-inventory-category" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/remove-favorite-inventory-category", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "remove-favorite-inventory-category" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Removed successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Labor Rates", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/labor-rates", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "labor-rates" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/labor-rates", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "labor-rates" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Standard\",\n \"rate\": 75\n}" - }, - "url": { - "raw": "{{base_url}}/api/labor-rates", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "labor-rates" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Standard\",\n \"rate\": 75\n}" - }, - "url": { - "raw": "{{base_url}}/api/labor-rates", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "labor-rates" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Standard\",\n \"rate\": 80\n}" - }, - "url": { - "raw": "{{base_url}}/api/labor-rates/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "labor-rates", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Standard\",\n \"rate\": 80\n}" - }, - "url": { - "raw": "{{base_url}}/api/labor-rates/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "labor-rates", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/labor-rates/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "labor-rates", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/labor-rates/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "labor-rates", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Set Favorite", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-favorite-labor-rate", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-favorite-labor-rate" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-favorite-labor-rate", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-favorite-labor-rate" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Remove Favorite", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/remove-favorite-labor-rate", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "remove-favorite-labor-rate" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/remove-favorite-labor-rate", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "remove-favorite-labor-rate" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Removed successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Vendors", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/vendors", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendors" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/vendors", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendors" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"first_name\": \"Vendor\",\n \"last_name\": \"Name\",\n \"company_name\": \"ACME\",\n \"email\": \"vendor@example.com\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vendors", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendors" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"first_name\": \"Vendor\",\n \"last_name\": \"Name\",\n \"company_name\": \"ACME\",\n \"email\": \"vendor@example.com\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vendors", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendors" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"company_name\": \"ACME Inc\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vendors/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendors", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"company_name\": \"ACME Inc\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vendors/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendors", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/vendors/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendors", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/vendors/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendors", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Toggle Status", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/toggle-vendor-status", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "toggle-vendor-status" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/toggle-vendor-status", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "toggle-vendor-status" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Create Vendor Address", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"vendor_id\": 1,\n \"address_line_1\": \"123 Main St\",\n \"address_line_2\": \"Suite 100\",\n \"country_id\": 1,\n \"state_id\": 1,\n \"city\": \"New York\",\n \"zip_code\": \"10001\",\n \"phone_number\": \"555-1234\",\n \"title\": \"Main Office\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/create-vendor-address", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "create-vendor-address" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"vendor_id\": 1,\n \"address_line_1\": \"123 Main St\",\n \"address_line_2\": \"Suite 100\",\n \"country_id\": 1,\n \"state_id\": 1,\n \"city\": \"New York\",\n \"zip_code\": \"10001\",\n \"phone_number\": \"555-1234\",\n \"title\": \"Main Office\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/create-vendor-address", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "create-vendor-address" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Get Vendor Address", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/vendor-address/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendor-address", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/vendor-address/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendor-address", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - } - ] - }, - { - "name": "Inspection Categories", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/inspection-categories", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-categories" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/inspection-categories", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-categories" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"inspection_name\": \"Brake Check\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/inspection-categories", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-categories" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"inspection_name\": \"Brake Check\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/inspection-categories", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-categories" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"inspection_name\": \"Brake Check\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/inspection-categories/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-categories", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"inspection_name\": \"Brake Check\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/inspection-categories/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-categories", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/inspection-categories/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-categories", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/inspection-categories/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-categories", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Inspections", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/inspections", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspections" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/inspections", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspections" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Pre-purchase\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"department_id\": 1,\n \"inspection_category_id\": 1,\n \"employee_id\": 1,\n \"order_number\": \"ORD-001\",\n \"date\": \"2026-03-16\",\n \"time\": \"10:00:00\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/inspections", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspections" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Pre-purchase\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"department_id\": 1,\n \"inspection_category_id\": 1,\n \"employee_id\": 1,\n \"order_number\": \"ORD-001\",\n \"date\": \"2026-03-16\",\n \"time\": \"10:00:00\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/inspections", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspections" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Pre-purchase\",\n \"note\": \"Updated note\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/inspections/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspections", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Pre-purchase\",\n \"note\": \"Updated note\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/inspections/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspections", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/inspections/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspections", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/inspections/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspections", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Change Inspection Status", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1,\n \"status\": \"completed\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/change-inspection-status", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "change-inspection-status" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1,\n \"status\": \"completed\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/change-inspection-status", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "change-inspection-status" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - } - ] - }, - { - "name": "Labels", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/labels", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "labels" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/labels", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "labels" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Urgent\",\n \"color_code\": \"#FF0000\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/labels", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "labels" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Urgent\",\n \"color_code\": \"#FF0000\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/labels", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "labels" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Urgent\",\n \"color_code\": \"#FF0000\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/labels/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "labels", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Urgent\",\n \"color_code\": \"#FF0000\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/labels/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "labels", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/labels/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "labels", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/labels/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "labels", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Insurance Types", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/insurance-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "insurance-types" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/insurance-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "insurance-types" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Comprehensive\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/insurance-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "insurance-types" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Comprehensive\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/insurance-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "insurance-types" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Comprehensive\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/insurance-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "insurance-types", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Comprehensive\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/insurance-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "insurance-types", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/insurance-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "insurance-types", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/insurance-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "insurance-types", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Estimates", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/estimates", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "estimates" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/estimates", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "estimates" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Estimate 001\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"department_id\": 1,\n \"estimate_number\": \"EST-001\",\n \"date\": \"2026-03-16\",\n \"has_insurance\": false,\n \"label_ids\": [1],\n \"remarks\": [\"Customer note\"]\n}" - }, - "url": { - "raw": "{{base_url}}/api/estimates", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "estimates" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Estimate 001\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"department_id\": 1,\n \"estimate_number\": \"EST-001\",\n \"date\": \"2026-03-16\",\n \"has_insurance\": false,\n \"label_ids\": [1],\n \"remarks\": [\"Customer note\"]\n}" - }, - "url": { - "raw": "{{base_url}}/api/estimates", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "estimates" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Estimate 001\",\n \"label_ids\": [1, 2],\n \"remarks\": [\"Updated note\"]\n}" - }, - "url": { - "raw": "{{base_url}}/api/estimates/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "estimates", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Estimate 001\",\n \"label_ids\": [1, 2],\n \"remarks\": [\"Updated note\"]\n}" - }, - "url": { - "raw": "{{base_url}}/api/estimates/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "estimates", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/estimates/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "estimates", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/estimates/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "estimates", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Quick Remark", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/quick-remark", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "quick-remark" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/quick-remark", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "quick-remark" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"description\": \"Needs follow-up\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/quick-remark", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "quick-remark" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"description\": \"Needs follow-up\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/quick-remark", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "quick-remark" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"description\": \"Needs follow-up\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/quick-remark/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "quick-remark", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"description\": \"Needs follow-up\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/quick-remark/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "quick-remark", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/quick-remark/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "quick-remark", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/quick-remark/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "quick-remark", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Quick Notes", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/quick-notes", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "quick-notes" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/quick-notes", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "quick-notes" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"description\": \"Quick note text\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/quick-notes", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "quick-notes" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"description\": \"Quick note text\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/quick-notes", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "quick-notes" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"description\": \"Updated note\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/quick-notes/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "quick-notes", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"description\": \"Updated note\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/quick-notes/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "quick-notes", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/quick-notes/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "quick-notes", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/quick-notes/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "quick-notes", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Reasons", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/reasons", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "reasons" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/reasons", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "reasons" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"title\": \"Customer request\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ]\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Customer request\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/reasons", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "reasons" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Customer request\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/reasons", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "reasons" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Reason created successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Customer request\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Updated reason title\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/reasons/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "reasons", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Updated reason title\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/reasons/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "reasons", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Reason updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Updated reason title\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/reasons/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "reasons", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/reasons/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "reasons", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Reason deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Check Point Label", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/check-point-label", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "check-point-label" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/check-point-label", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "check-point-label" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Pass\",\n \"color_code\": \"#00FF00\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/check-point-label", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "check-point-label" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Pass\",\n \"color_code\": \"#00FF00\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/check-point-label", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "check-point-label" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Pass\",\n \"color_code\": \"#00FF00\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/check-point-label/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "check-point-label", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Pass\",\n \"color_code\": \"#00FF00\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/check-point-label/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "check-point-label", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/check-point-label/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "check-point-label", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/check-point-label/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "check-point-label", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Inspection Check Points", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/inspection-check-points?inspection_id=1", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-check-points" - ], - "query": [ - { - "key": "inspection_id", - "value": "1" - } - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/inspection-check-points?inspection_id=1", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-check-points" - ], - "query": [ - { - "key": "inspection_id", - "value": "1" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"inspection_id\": 1,\n \"name\": \"Brake pads\",\n \"description\": \"Check thickness\",\n \"record_type\": \"record_conditions\",\n \"condition_rate\": 85\n}" - }, - "url": { - "raw": "{{base_url}}/api/inspection-check-points", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-check-points" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"inspection_id\": 1,\n \"name\": \"Brake pads\",\n \"description\": \"Check thickness\",\n \"record_type\": \"record_conditions\",\n \"condition_rate\": 85\n}" - }, - "url": { - "raw": "{{base_url}}/api/inspection-check-points", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-check-points" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"name\": \"Brake pads\",\n \"record_type\": \"record_conditions\",\n \"condition_rate\": 90,\n \"file\": null\n}" - }, - "url": { - "raw": "{{base_url}}/api/inspection-check-points/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-check-points", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"name\": \"Brake pads\",\n \"record_type\": \"record_conditions\",\n \"condition_rate\": 90,\n \"file\": null\n}" - }, - "url": { - "raw": "{{base_url}}/api/inspection-check-points/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-check-points", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/inspection-check-points/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-check-points", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/inspection-check-points/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-check-points", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Toggle Label to Checkpoint", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"inspection_check_point_id\": 1,\n \"check_point_label_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/toggle-label-to-checkpoint", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "toggle-label-to-checkpoint" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"inspection_check_point_id\": 1,\n \"check_point_label_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/toggle-label-to-checkpoint", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "toggle-label-to-checkpoint" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Change Status", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"inspection_check_point_id\": 1,\n \"status\": \"passed\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/inspection-check-points/change-status", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-check-points", - "change-status" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"inspection_check_point_id\": 1,\n \"status\": \"passed\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/inspection-check-points/change-status", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-check-points", - "change-status" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Add Attachment", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "inspection_check_point_id", - "value": "1", - "type": "text" - }, - { - "key": "attachment", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/inspection-check-points/add-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-check-points", - "add-attachment" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "inspection_check_point_id", - "value": "1", - "type": "text" - }, - { - "key": "attachment", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/inspection-check-points/add-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-check-points", - "add-attachment" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Upload Media", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "file", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/inspection-check-points/{{id}}/upload-media", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-check-points", - "{{id}}", - "upload-media" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "file", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/inspection-check-points/{{id}}/upload-media", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-check-points", - "{{id}}", - "upload-media" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Remove Media", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/inspection-check-points/{{id}}/media", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-check-points", - "{{id}}", - "media" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/inspection-check-points/{{id}}/media", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inspection-check-points", - "{{id}}", - "media" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Job Cards", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/job-cards", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/job-cards", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Job Card 001\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"status\": \"draft\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/job-cards", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Job Card 001\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"status\": \"draft\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/job-cards", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Job Card 001 Updated\",\n \"status\": \"check_in\",\n \"department_id\": 1,\n \"check_in_date\": \"2026-03-18\",\n \"km_in\": 50000,\n \"label_ids\": [1]\n}" - }, - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Job Card 001 Updated\",\n \"status\": \"check_in\",\n \"department_id\": 1,\n \"check_in_date\": \"2026-03-18\",\n \"km_in\": 50000,\n \"label_ids\": [1]\n}" - }, - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Change Date", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"order_date\": \"2026-03-18\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/change-date", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "change-date" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"order_date\": \"2026-03-18\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/change-date", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "change-date" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Change Status", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"status\": \"in_progress\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/change-status", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "change-status" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"status\": \"in_progress\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/change-status", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "change-status" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Add Customer Remark", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"remark\": \"Customer requested wash\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/add-customer-remark", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "add-customer-remark" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"remark\": \"Customer requested wash\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/add-customer-remark", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "add-customer-remark" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Edit Customer Remark", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"customer_remark_id\": 1,\n \"remark\": \"Updated remark\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/edit-customer-remark", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "edit-customer-remark" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"customer_remark_id\": 1,\n \"remark\": \"Updated remark\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/edit-customer-remark", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "edit-customer-remark" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete Customer Remark", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/delete-customer-remark?customer_remark_id=1", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "delete-customer-remark" - ], - "query": [ - { - "key": "customer_remark_id", - "value": "1" - } - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/delete-customer-remark?customer_remark_id=1", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "delete-customer-remark" - ], - "query": [ - { - "key": "customer_remark_id", - "value": "1" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Add Shop Recommendation", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"recommendation\": \"Replace brake pads\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/add-shop-recommendation", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "add-shop-recommendation" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"recommendation\": \"Replace brake pads\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/add-shop-recommendation", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "add-shop-recommendation" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Edit Shop Recommendation", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"shop_recommendation_id\": 1,\n \"recommendation\": \"Updated recommendation\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/edit-shop-recommendation", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "edit-shop-recommendation" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"shop_recommendation_id\": 1,\n \"recommendation\": \"Updated recommendation\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/edit-shop-recommendation", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "edit-shop-recommendation" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete Shop Recommendation", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/delete-shop-recommendation?shop_recommendation_id=1", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "delete-shop-recommendation" - ], - "query": [ - { - "key": "shop_recommendation_id", - "value": "1" - } - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/delete-shop-recommendation?shop_recommendation_id=1", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "delete-shop-recommendation" - ], - "query": [ - { - "key": "shop_recommendation_id", - "value": "1" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Add Attachment", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "attachments[]", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/add-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "add-attachment" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "attachments[]", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/add-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "add-attachment" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete Attachment", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"attachment_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/delete-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "delete-attachment" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"attachment_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/delete-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "delete-attachment" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Removed successfully.\"\n}" - } - ] - }, - { - "name": "Change Service Writer", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"service_writer_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/change-service-writer-id", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "change-service-writer-id" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"service_writer_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/change-service-writer-id", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "change-service-writer-id" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Change Sales Person", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"sales_person_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/change-sales-person-id", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "change-sales-person-id" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"sales_person_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/job-cards/{{id}}/change-sales-person-id", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "job-cards", - "{{id}}", - "change-sales-person-id" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - } - ] - }, - { - "name": "Payment Modes", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/payment-mode", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-mode" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/payment-mode", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-mode" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Cash\",\n \"is_default\": true\n}" - }, - "url": { - "raw": "{{base_url}}/api/payment-mode", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-mode" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Cash\",\n \"is_default\": true\n}" - }, - "url": { - "raw": "{{base_url}}/api/payment-mode", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-mode" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Bank Transfer\",\n \"is_default\": false\n}" - }, - "url": { - "raw": "{{base_url}}/api/payment-mode/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-mode", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Bank Transfer\",\n \"is_default\": false\n}" - }, - "url": { - "raw": "{{base_url}}/api/payment-mode/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-mode", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/payment-mode/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-mode", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/payment-mode/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-mode", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Payment Received", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/payment-recieved", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-recieved" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/payment-recieved", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-recieved" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "job_card_id", - "value": "1", - "type": "text" - }, - { - "key": "payment_mode_id", - "value": "1", - "type": "text" - }, - { - "key": "customer_id", - "value": "1", - "type": "text" - }, - { - "key": "amount_received", - "value": "5000", - "type": "text" - }, - { - "key": "payment_number", - "value": "PAY-001", - "type": "text" - }, - { - "key": "payment_date", - "value": "2026-03-18", - "type": "text" - }, - { - "key": "note", - "value": "First payment", - "type": "text" - }, - { - "key": "attachment_files[]", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/payment-recieved", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-recieved" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "job_card_id", - "value": "1", - "type": "text" - }, - { - "key": "payment_mode_id", - "value": "1", - "type": "text" - }, - { - "key": "customer_id", - "value": "1", - "type": "text" - }, - { - "key": "amount_received", - "value": "5000", - "type": "text" - }, - { - "key": "payment_number", - "value": "PAY-001", - "type": "text" - }, - { - "key": "payment_date", - "value": "2026-03-18", - "type": "text" - }, - { - "key": "note", - "value": "First payment", - "type": "text" - }, - { - "key": "attachment_files[]", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/payment-recieved", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-recieved" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "_method", - "value": "PUT", - "type": "text" - }, - { - "key": "amount_received", - "value": "6000", - "type": "text" - }, - { - "key": "note", - "value": "Updated payment", - "type": "text" - }, - { - "key": "delete_attachment_ids[]", - "value": "1", - "type": "text" - }, - { - "key": "attachment_files[]", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/payment-recieved/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-recieved", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "_method", - "value": "PUT", - "type": "text" - }, - { - "key": "amount_received", - "value": "6000", - "type": "text" - }, - { - "key": "note", - "value": "Updated payment", - "type": "text" - }, - { - "key": "delete_attachment_ids[]", - "value": "1", - "type": "text" - }, - { - "key": "attachment_files[]", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/payment-recieved/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-recieved", - "{{id}}" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/payment-recieved/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-recieved", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/payment-recieved/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-recieved", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Parts", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/parts", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "parts" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/parts", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "parts" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"category_id\": 1,\n \"title\": \"Brake Pad\",\n \"sku\": \"BP-001\",\n \"part_number\": \"BP-001-A\",\n \"unit_type_id\": 1,\n \"manufactured_by\": \"Bosch\",\n \"description\": \"Front brake pad set\",\n \"location\": \"Rack A-3\",\n \"pricing_matrix\": \"Standard\",\n \"department_id\": 1,\n \"sales_information\": true,\n \"selling_price\": \"45.00\",\n \"sales_chart_of_account\": 4000,\n \"purchase_information\": true,\n \"purchase_chart_of_account\": 5000,\n \"purchase_preferred_vendor_id\": 1,\n \"purchase_price\": \"25.00\",\n \"track_inventory\": true,\n \"opening_stock\": 10,\n \"as_on_date\": \"2026-03-20\",\n \"min_stock\": 2,\n \"max_stock\": 50,\n \"inventory_chart_of_account\": 3000,\n \"tracking_type\": 1,\n \"inventory_purchase_price\": \"24.00\",\n \"is_active\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ]\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"shop_type_id\": 1,\n \"category_id\": 1,\n \"title\": \"Brake Pad\",\n \"sku\": \"BP-001\",\n \"unit_type_id\": 1,\n \"department_id\": 1,\n \"description\": \"Front brake pad set\",\n \"selling_price\": 45.00,\n \"purchase_price\": 25.00\n}" - }, - "url": { - "raw": "{{base_url}}/api/parts", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "parts" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"shop_type_id\": 1,\n \"category_id\": 1,\n \"title\": \"Brake Pad\",\n \"sku\": \"BP-001\",\n \"unit_type_id\": 1,\n \"department_id\": 1,\n \"description\": \"Front brake pad set\",\n \"selling_price\": 45.00,\n \"purchase_price\": 25.00\n}" - }, - "url": { - "raw": "{{base_url}}/api/parts", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "parts" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"category_id\": 1,\n \"title\": \"Brake Pad\",\n \"sku\": \"BP-001\",\n \"part_number\": \"BP-001-A\",\n \"unit_type_id\": 1,\n \"manufactured_by\": \"Bosch\",\n \"description\": \"Front brake pad set\",\n \"location\": \"Rack A-3\",\n \"pricing_matrix\": \"Standard\",\n \"department_id\": 1,\n \"sales_information\": true,\n \"selling_price\": \"45.00\",\n \"sales_chart_of_account\": 4000,\n \"purchase_information\": true,\n \"purchase_chart_of_account\": 5000,\n \"purchase_preferred_vendor_id\": 1,\n \"purchase_price\": \"25.00\",\n \"track_inventory\": true,\n \"opening_stock\": 10,\n \"as_on_date\": \"2026-03-20\",\n \"min_stock\": 2,\n \"max_stock\": 50,\n \"inventory_chart_of_account\": 3000,\n \"tracking_type\": 1,\n \"inventory_purchase_price\": \"24.00\",\n \"is_active\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Brake Pad Updated\",\n \"selling_price\": 50.00\n}" - }, - "url": { - "raw": "{{base_url}}/api/parts/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "parts", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Brake Pad Updated\",\n \"selling_price\": 50.00\n}" - }, - "url": { - "raw": "{{base_url}}/api/parts/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "parts", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"category_id\": 1,\n \"title\": \"Brake Pad Updated\",\n \"sku\": \"BP-001\",\n \"part_number\": \"BP-001-A\",\n \"unit_type_id\": 1,\n \"manufactured_by\": \"Bosch\",\n \"description\": \"Front brake pad set\",\n \"location\": \"Rack A-3\",\n \"pricing_matrix\": \"Standard\",\n \"department_id\": 1,\n \"sales_information\": true,\n \"selling_price\": \"50.00\",\n \"sales_chart_of_account\": 4000,\n \"purchase_information\": true,\n \"purchase_chart_of_account\": 5000,\n \"purchase_preferred_vendor_id\": 1,\n \"purchase_price\": \"25.00\",\n \"track_inventory\": true,\n \"opening_stock\": 10,\n \"as_on_date\": \"2026-03-20\",\n \"min_stock\": 2,\n \"max_stock\": 50,\n \"inventory_chart_of_account\": 3000,\n \"tracking_type\": 1,\n \"inventory_purchase_price\": \"24.00\",\n \"is_active\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/parts/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "parts", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/parts/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "parts", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Import", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "file", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/import-parts", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "import-parts" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "file", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/import-parts", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "import-parts" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Import completed successfully.\",\n \"data\": {\n \"imported_count\": 8,\n \"failed_count\": 1,\n \"failed_rows\": [\n {\n \"row\": 4,\n \"errors\": [\n \"The sku has already been taken.\"\n ],\n \"values\": {\n \"sku\": \"BP-001\"\n }\n }\n ]\n }\n}" - } - ] - }, - { - "name": "Export", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"search\": \"\",\n \"shop_type_id\": null,\n \"category_id\": null,\n \"department_id\": null\n}" - }, - "url": { - "raw": "{{base_url}}/api/export-parts", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "export-parts" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"search\": \"\",\n \"shop_type_id\": null,\n \"category_id\": null,\n \"department_id\": null\n}" - }, - "url": { - "raw": "{{base_url}}/api/export-parts", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "export-parts" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Export generated successfully.\"\n}" - } - ] - }, - { - "name": "Toggle Status", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/toggle-part-status", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "toggle-part-status" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/toggle-part-status", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "toggle-part-status" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Status updated successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Purchase Orders", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/purchase-orders", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "purchase-orders" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/purchase-orders", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "purchase-orders" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"service_name\": \"Engine Service Group\",\n \"shop_type_id\": 1,\n \"code\": \"SG-001\",\n \"inventory_category_id\": 1,\n \"unit_type_id\": 1,\n \"department_id\": 1,\n \"service_description\": \"Common engine services\",\n \"show_as_lump_sum\": false,\n \"mark_as_recommended\": true,\n \"set_packaged_pricing\": false,\n \"selling_price\": \"100.00\",\n \"selling_chart_of_account\": \"4000\",\n \"is_active\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"inventory_category\": {\n \"id\": 1,\n \"title\": \"Engine\"\n },\n \"unit_type\": {\n \"id\": 1,\n \"name\": \"Hour\"\n },\n \"department\": {\n \"id\": 1,\n \"name\": \"Service Department\"\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"job_card_id\": 1,\n \"vendor_id\": 1,\n \"title\": \"PO-001\",\n \"order_number\": \"PO-2026-001\",\n \"order_date\": \"2026-03-19\",\n \"delivery_date\": \"2026-03-25\",\n \"department_id\": 1,\n \"notes\": \"Urgent order\",\n \"label_ids\": [1],\n \"items\": [\n {\n \"part_id\": 1,\n \"quantity\": 5,\n \"rate\": 25.00,\n \"description\": \"Brake pads\"\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/purchase-orders", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "purchase-orders" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"job_card_id\": 1,\n \"vendor_id\": 1,\n \"title\": \"PO-001\",\n \"order_number\": \"PO-2026-001\",\n \"order_date\": \"2026-03-19\",\n \"delivery_date\": \"2026-03-25\",\n \"department_id\": 1,\n \"notes\": \"Urgent order\",\n \"label_ids\": [1],\n \"items\": [\n {\n \"part_id\": 1,\n \"quantity\": 5,\n \"rate\": 25.00,\n \"description\": \"Brake pads\"\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/purchase-orders", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "purchase-orders" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Service group created successfully.\",\n \"data\": {\n \"id\": 1,\n \"service_name\": \"Engine Service Group\",\n \"shop_type_id\": 1,\n \"code\": \"SG-001\",\n \"inventory_category_id\": 1,\n \"unit_type_id\": 1,\n \"department_id\": 1,\n \"service_description\": \"Common engine services\",\n \"show_as_lump_sum\": false,\n \"mark_as_recommended\": true,\n \"set_packaged_pricing\": false,\n \"selling_price\": \"100.00\",\n \"selling_chart_of_account\": \"4000\",\n \"is_active\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"inventory_category\": {\n \"id\": 1,\n \"title\": \"Engine\"\n },\n \"unit_type\": {\n \"id\": 1,\n \"name\": \"Hour\"\n },\n \"department\": {\n \"id\": 1,\n \"name\": \"Service Department\"\n }\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"PO-001 Updated\",\n \"notes\": \"Updated notes\",\n \"label_ids\": [1, 2],\n \"items\": [\n {\n \"part_id\": 1,\n \"quantity\": 10,\n \"rate\": 22.00,\n \"description\": \"Brake pads bulk\"\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/purchase-orders/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "purchase-orders", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"PO-001 Updated\",\n \"notes\": \"Updated notes\",\n \"label_ids\": [1, 2],\n \"items\": [\n {\n \"part_id\": 1,\n \"quantity\": 10,\n \"rate\": 22.00,\n \"description\": \"Brake pads bulk\"\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/purchase-orders/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "purchase-orders", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Service group updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"service_name\": \"Engine Service Group Updated\",\n \"shop_type_id\": 1,\n \"code\": \"SG-001\",\n \"inventory_category_id\": 1,\n \"unit_type_id\": 1,\n \"department_id\": 1,\n \"service_description\": \"Common engine services\",\n \"show_as_lump_sum\": false,\n \"mark_as_recommended\": true,\n \"set_packaged_pricing\": false,\n \"selling_price\": \"125.00\",\n \"selling_chart_of_account\": \"4000\",\n \"is_active\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"inventory_category\": {\n \"id\": 1,\n \"title\": \"Engine\"\n },\n \"unit_type\": {\n \"id\": 1,\n \"name\": \"Hour\"\n },\n \"department\": {\n \"id\": 1,\n \"name\": \"Service Department\"\n }\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/purchase-orders/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "purchase-orders", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/purchase-orders/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "purchase-orders", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Service group deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Services", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/services", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "services" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/services", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "services" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"shop_type_id\": 1,\n \"category_id\": 1,\n \"labor_name\": \"Oil Change\",\n \"service_code\": \"SVC-001\",\n \"unit_type_id\": 1,\n \"labor_matrix\": \"Standard\",\n \"department_id\": 1,\n \"description\": \"Full synthetic oil change\",\n \"selling_price\": 75.00\n}" - }, - "url": { - "raw": "{{base_url}}/api/services", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "services" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"shop_type_id\": 1,\n \"category_id\": 1,\n \"labor_name\": \"Oil Change\",\n \"service_code\": \"SVC-001\",\n \"unit_type_id\": 1,\n \"labor_matrix\": \"Standard\",\n \"department_id\": 1,\n \"description\": \"Full synthetic oil change\",\n \"selling_price\": 75.00\n}" - }, - "url": { - "raw": "{{base_url}}/api/services", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "services" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"labor_name\": \"Oil Change Premium\",\n \"selling_price\": 85.00\n}" - }, - "url": { - "raw": "{{base_url}}/api/services/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "services", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"labor_name\": \"Oil Change Premium\",\n \"selling_price\": 85.00\n}" - }, - "url": { - "raw": "{{base_url}}/api/services/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "services", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/services/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "services", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/services/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "services", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Import", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "file", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/import-services", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "import-services" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "file", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/import-services", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "import-services" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Import completed successfully.\"\n}" - } - ] - }, - { - "name": "Export", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"search\": \"\",\n \"shop_type_id\": null,\n \"category_id\": null,\n \"department_id\": null\n}" - }, - "url": { - "raw": "{{base_url}}/api/export-services", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "export-services" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"search\": \"\",\n \"shop_type_id\": null,\n \"category_id\": null,\n \"department_id\": null\n}" - }, - "url": { - "raw": "{{base_url}}/api/export-services", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "export-services" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Export generated successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Expense Items", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/expense-items", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "expense-items" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/expense-items", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "expense-items" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"item_type\": \"Office Supply\",\n \"category_id\": 1,\n \"item_name\": \"Printer Paper\",\n \"sku\": \"EXP-001\",\n \"unit_type_id\": 1,\n \"department_id\": 1,\n \"description\": \"A4 printer paper\",\n \"selling_price\": 15.00,\n \"purchase_price\": 10.00\n}" - }, - "url": { - "raw": "{{base_url}}/api/expense-items", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "expense-items" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"item_type\": \"Office Supply\",\n \"category_id\": 1,\n \"item_name\": \"Printer Paper\",\n \"sku\": \"EXP-001\",\n \"unit_type_id\": 1,\n \"department_id\": 1,\n \"description\": \"A4 printer paper\",\n \"selling_price\": 15.00,\n \"purchase_price\": 10.00\n}" - }, - "url": { - "raw": "{{base_url}}/api/expense-items", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "expense-items" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"item_name\": \"Printer Paper A4\",\n \"selling_price\": 18.00\n}" - }, - "url": { - "raw": "{{base_url}}/api/expense-items/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "expense-items", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"item_name\": \"Printer Paper A4\",\n \"selling_price\": 18.00\n}" - }, - "url": { - "raw": "{{base_url}}/api/expense-items/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "expense-items", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/expense-items/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "expense-items", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/expense-items/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "expense-items", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Toggle Status", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/toggle-expense-item-status", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "toggle-expense-item-status" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/toggle-expense-item-status", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "toggle-expense-item-status" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - } - ] - }, - { - "name": "Bills", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/bills", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "bills" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/bills", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "bills" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Bill 001\",\n \"job_card_id\": 1,\n \"vendor_id\": 1,\n \"vendor_address_id\": 1,\n \"bill_date\": \"2026-03-19\",\n \"bill_due_date\": \"2026-04-19\",\n \"payment_terms_id\": 1,\n \"department_id\": 1,\n \"notes\": \"Monthly bill\",\n \"label_ids\": [1],\n \"items\": [\n {\n \"part_id\": 1,\n \"quantity\": 3,\n \"rate\": 25.00,\n \"chart_of_account\": null,\n \"description\": \"Brake pads\"\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/bills", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "bills" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Bill 001\",\n \"job_card_id\": 1,\n \"vendor_id\": 1,\n \"vendor_address_id\": 1,\n \"bill_date\": \"2026-03-19\",\n \"bill_due_date\": \"2026-04-19\",\n \"payment_terms_id\": 1,\n \"department_id\": 1,\n \"notes\": \"Monthly bill\",\n \"label_ids\": [1],\n \"items\": [\n {\n \"part_id\": 1,\n \"quantity\": 3,\n \"rate\": 25.00,\n \"chart_of_account\": null,\n \"description\": \"Brake pads\"\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/bills", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "bills" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Bill 001 Updated\",\n \"notes\": \"Updated notes\",\n \"label_ids\": [1, 2],\n \"items\": [\n {\n \"part_id\": 1,\n \"quantity\": 5,\n \"rate\": 22.00,\n \"description\": \"Brake pads bulk\"\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/bills/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "bills", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Bill 001 Updated\",\n \"notes\": \"Updated notes\",\n \"label_ids\": [1, 2],\n \"items\": [\n {\n \"part_id\": 1,\n \"quantity\": 5,\n \"rate\": 22.00,\n \"description\": \"Brake pads bulk\"\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/bills/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "bills", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/bills/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "bills", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/bills/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "bills", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Expenses", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/expenses", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "expenses" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/expenses", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "expenses" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"job_card_id\": 1,\n \"title\": \"Office Supplies\",\n \"category_id\": 1,\n \"vendor_id\": 1,\n \"invoice_number\": \"INV-001\",\n \"expense_date\": \"2026-03-19\",\n \"department_id\": 1,\n \"notes\": \"Monthly office expense\",\n \"status\": \"open\",\n \"label_ids\": [1],\n \"items\": [\n {\n \"expense_item_id\": 1,\n \"quantity\": 2,\n \"rate\": 15.00,\n \"chart_of_account\": null,\n \"description\": \"Printer paper\"\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/expenses", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "expenses" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"job_card_id\": 1,\n \"title\": \"Office Supplies\",\n \"category_id\": 1,\n \"vendor_id\": 1,\n \"invoice_number\": \"INV-001\",\n \"expense_date\": \"2026-03-19\",\n \"department_id\": 1,\n \"notes\": \"Monthly office expense\",\n \"status\": \"open\",\n \"label_ids\": [1],\n \"items\": [\n {\n \"expense_item_id\": 1,\n \"quantity\": 2,\n \"rate\": 15.00,\n \"chart_of_account\": null,\n \"description\": \"Printer paper\"\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/expenses", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "expenses" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Office Supplies Updated\",\n \"status\": \"paid\",\n \"label_ids\": [1, 2],\n \"items\": [\n {\n \"expense_item_id\": 1,\n \"quantity\": 5,\n \"rate\": 12.00,\n \"description\": \"Printer paper bulk\"\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/expenses/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "expenses", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Office Supplies Updated\",\n \"status\": \"paid\",\n \"label_ids\": [1, 2],\n \"items\": [\n {\n \"expense_item_id\": 1,\n \"quantity\": 5,\n \"rate\": 12.00,\n \"description\": \"Printer paper bulk\"\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/expenses/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "expenses", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/expenses/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "expenses", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/expenses/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "expenses", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Task Types", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/task-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "task-types" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/task-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "task-types" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Maintenance\",\n \"is_default\": false\n}" - }, - "url": { - "raw": "{{base_url}}/api/task-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "task-types" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Maintenance\",\n \"is_default\": false\n}" - }, - "url": { - "raw": "{{base_url}}/api/task-types", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "task-types" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Maintenance Updated\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/task-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "task-types", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Maintenance Updated\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/task-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "task-types", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/task-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "task-types", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/task-types/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "task-types", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Set Default", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-default-task-type", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-default-task-type" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-default-task-type", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-default-task-type" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Remove Default", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/remove-default-task-type", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "remove-default-task-type" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/remove-default-task-type", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "remove-default-task-type" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Removed successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Task Sections", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/task-sections", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "task-sections" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/task-sections", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "task-sections" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"To Do\",\n \"arrangement\": 1,\n \"is_default\": false\n}" - }, - "url": { - "raw": "{{base_url}}/api/task-sections", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "task-sections" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"To Do\",\n \"arrangement\": 1,\n \"is_default\": false\n}" - }, - "url": { - "raw": "{{base_url}}/api/task-sections", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "task-sections" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"To Do Updated\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/task-sections/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "task-sections", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"To Do Updated\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/task-sections/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "task-sections", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/task-sections/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "task-sections", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/task-sections/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "task-sections", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Set Default", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-default-task-section", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-default-task-section" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-default-task-section", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-default-task-section" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Remove Default", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/remove-default-task-section", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "remove-default-task-section" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/remove-default-task-section", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "remove-default-task-section" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Removed successfully.\"\n}" - } - ] - }, - { - "name": "Change Arrangement", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1,\n \"arrangement\": 3\n}" - }, - "url": { - "raw": "{{base_url}}/api/change-task-section-arrangement", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "change-task-section-arrangement" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1,\n \"arrangement\": 3\n}" - }, - "url": { - "raw": "{{base_url}}/api/change-task-section-arrangement", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "change-task-section-arrangement" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - } - ] - }, - { - "name": "Tasks", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/tasks", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "tasks" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/tasks", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "tasks" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"task_type_id\": 1,\n \"task_section_id\": 1,\n \"job_card_id\": 1,\n \"subject\": \"Replace brake pads\",\n \"description\": \"Front and rear brake pads need replacement\",\n \"owner_id\": 1,\n \"department_id\": 1,\n \"priority\": 2,\n \"due_date\": \"2026-03-25\",\n \"task_number\": \"TSK-001\",\n \"status\": \"pending\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/tasks", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "tasks" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"task_type_id\": 1,\n \"task_section_id\": 1,\n \"job_card_id\": 1,\n \"subject\": \"Replace brake pads\",\n \"description\": \"Front and rear brake pads need replacement\",\n \"owner_id\": 1,\n \"department_id\": 1,\n \"priority\": 2,\n \"due_date\": \"2026-03-25\",\n \"task_number\": \"TSK-001\",\n \"status\": \"pending\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/tasks", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "tasks" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"subject\": \"Replace brake pads - Updated\",\n \"priority\": 3,\n \"due_date\": \"2026-03-28\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/tasks/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "tasks", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"subject\": \"Replace brake pads - Updated\",\n \"priority\": 3,\n \"due_date\": \"2026-03-28\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/tasks/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "tasks", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/tasks/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "tasks", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/tasks/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "tasks", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Complete", - "request": { - "method": "POST", - "header": [], - "url": { - "raw": "{{base_url}}/api/tasks/{{id}}/complete", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "tasks", - "{{id}}", - "complete" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [], - "url": { - "raw": "{{base_url}}/api/tasks/{{id}}/complete", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "tasks", - "{{id}}", - "complete" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - } - ] - }, - { - "name": "Appointments", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/appointments", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "appointments" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/appointments", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "appointments" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Brake Inspection\",\n \"date\": \"2026-03-25\",\n \"from_time\": \"09:00\",\n \"to_time\": \"10:00\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"service_writer_id\": 1,\n \"technician_id\": 1,\n \"department_id\": 1,\n \"job_card_id\": 1,\n \"notes\": \"Customer requested morning slot\",\n \"label_ids\": [1]\n}" - }, - "url": { - "raw": "{{base_url}}/api/appointments", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "appointments" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Brake Inspection\",\n \"date\": \"2026-03-25\",\n \"from_time\": \"09:00\",\n \"to_time\": \"10:00\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"service_writer_id\": 1,\n \"technician_id\": 1,\n \"department_id\": 1,\n \"job_card_id\": 1,\n \"notes\": \"Customer requested morning slot\",\n \"label_ids\": [1]\n}" - }, - "url": { - "raw": "{{base_url}}/api/appointments", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "appointments" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Brake Inspection Updated\",\n \"date\": \"2026-03-26\",\n \"from_time\": \"14:00\",\n \"to_time\": \"15:00\",\n \"label_ids\": [1, 2]\n}" - }, - "url": { - "raw": "{{base_url}}/api/appointments/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "appointments", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Brake Inspection Updated\",\n \"date\": \"2026-03-26\",\n \"from_time\": \"14:00\",\n \"to_time\": \"15:00\",\n \"label_ids\": [1, 2]\n}" - }, - "url": { - "raw": "{{base_url}}/api/appointments/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "appointments", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/appointments/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "appointments", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/appointments/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "appointments", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Unlink Job Card", - "request": { - "method": "POST", - "header": [], - "url": { - "raw": "{{base_url}}/api/appointments/{{id}}/un-link-job-card", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "appointments", - "{{id}}", - "un-link-job-card" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [], - "url": { - "raw": "{{base_url}}/api/appointments/{{id}}/un-link-job-card", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "appointments", - "{{id}}", - "un-link-job-card" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Removed successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Invoice Sequences", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/invoice-sequences", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-sequences" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/invoice-sequences", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-sequences" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Default Invoice Sequence\",\n \"sequence_title\": \"INV 2026\",\n \"is_default\": true,\n \"auto_generate\": true,\n \"prefix\": \"INV-\",\n \"start_number\": 1,\n \"department_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/invoice-sequences", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-sequences" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Default Invoice Sequence\",\n \"sequence_title\": \"INV 2026\",\n \"is_default\": true,\n \"auto_generate\": true,\n \"prefix\": \"INV-\",\n \"start_number\": 1,\n \"department_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/invoice-sequences", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-sequences" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Updated Sequence\",\n \"prefix\": \"INV-2026-\",\n \"start_number\": 100\n}" - }, - "url": { - "raw": "{{base_url}}/api/invoice-sequences/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-sequences", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Updated Sequence\",\n \"prefix\": \"INV-2026-\",\n \"start_number\": 100\n}" - }, - "url": { - "raw": "{{base_url}}/api/invoice-sequences/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-sequences", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/invoice-sequences/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-sequences", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/invoice-sequences/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-sequences", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Set Default", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-default-invoice-sequence", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-default-invoice-sequence" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-default-invoice-sequence", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-default-invoice-sequence" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Remove Default", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/remove-default-invoice-sequence", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "remove-default-invoice-sequence" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/remove-default-invoice-sequence", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "remove-default-invoice-sequence" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Removed successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Service Groups", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/service-groups", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-groups" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/service-groups", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-groups" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"service_name\": \"Engine Service Group\",\n \"shop_type_id\": 1,\n \"code\": \"SG-001\",\n \"inventory_category_id\": 1,\n \"unit_type_id\": 1,\n \"department_id\": 1,\n \"service_description\": \"Common engine services\",\n \"show_as_lump_sum\": false,\n \"mark_as_recommended\": true,\n \"set_packaged_pricing\": false,\n \"selling_price\": 100,\n \"selling_chart_of_account\": \"4000\",\n \"is_active\": true\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-groups", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-groups" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"service_name\": \"Engine Service Group\",\n \"shop_type_id\": 1,\n \"code\": \"SG-001\",\n \"inventory_category_id\": 1,\n \"unit_type_id\": 1,\n \"department_id\": 1,\n \"service_description\": \"Common engine services\",\n \"show_as_lump_sum\": false,\n \"mark_as_recommended\": true,\n \"set_packaged_pricing\": false,\n \"selling_price\": 100,\n \"selling_chart_of_account\": \"4000\",\n \"is_active\": true\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-groups", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-groups" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"service_name\": \"Engine Service Group Updated\",\n \"selling_price\": 125,\n \"is_active\": true\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-groups/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-groups", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"service_name\": \"Engine Service Group Updated\",\n \"selling_price\": 125,\n \"is_active\": true\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-groups/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-groups", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/service-groups/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-groups", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/service-groups/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-groups", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Service Group Details", - "item": [ - { - "name": "Add Label", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"label_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-groups/{{id}}/add-label", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-groups", - "{{id}}", - "add-label" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"label_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-groups/{{id}}/add-label", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-groups", - "{{id}}", - "add-label" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Label added to service group successfully.\",\n \"data\": {\n \"id\": 1,\n \"service_name\": \"Engine Service Group\",\n \"labels\": [\n {\n \"id\": 1,\n \"title\": \"Recommended\",\n \"color_code\": \"#00AAFF\"\n }\n ]\n }\n}" - } - ] - }, - { - "name": "Delete Label", - "request": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"label_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-groups/{{id}}/delete-label", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-groups", - "{{id}}", - "delete-label" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"label_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-groups/{{id}}/delete-label", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-groups", - "{{id}}", - "delete-label" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Label removed from service group successfully.\",\n \"data\": {\n \"id\": 1,\n \"service_name\": \"Engine Service Group\",\n \"labels\": []\n }\n}" - } - ] - }, - { - "name": "Includes List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/service-group-includes", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-includes" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/service-group-includes", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-includes" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"service_group_id\": 1,\n \"title\": \"Basic inspection\",\n \"arrangement\": 1,\n \"created_at\": \"2026-03-26T18:40:00.000000Z\",\n \"updated_at\": \"2026-03-26T18:40:00.000000Z\",\n \"service_group\": {\n \"id\": 1,\n \"service_name\": \"Engine Service Group\"\n }\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Includes Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"service_group_id\": 1,\n \"title\": \"Basic inspection\",\n \"arrangement\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-group-includes", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-includes" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"service_group_id\": 1,\n \"title\": \"Basic inspection\",\n \"arrangement\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-group-includes", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-includes" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Service group include created successfully.\",\n \"data\": {\n \"id\": 1,\n \"service_group_id\": 1,\n \"title\": \"Basic inspection\",\n \"arrangement\": 1\n }\n}" - } - ] - }, - { - "name": "Includes Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Basic inspection updated\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-group-includes/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-includes", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Basic inspection updated\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-group-includes/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-includes", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Service group include updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"service_group_id\": 1,\n \"title\": \"Basic inspection updated\",\n \"arrangement\": 1\n }\n}" - } - ] - }, - { - "name": "Includes Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/service-group-includes/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-includes", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/service-group-includes/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-includes", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Service group include deleted successfully.\"\n}" - } - ] - }, - { - "name": "Includes Change Arrangement", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"arrangement\": 2\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-group-includes/{{id}}/change-arrangement", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-includes", - "{{id}}", - "change-arrangement" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"arrangement\": 2\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-group-includes/{{id}}/change-arrangement", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-includes", - "{{id}}", - "change-arrangement" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Service group include arrangement updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"service_group_id\": 1,\n \"title\": \"Basic inspection\",\n \"arrangement\": 2\n }\n}" - } - ] - }, - { - "name": "Pricings List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/service-group-pricings", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-pricings" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/service-group-pricings", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-pricings" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"service_group_id\": 1,\n \"shop_type_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"fuel_type_id\": 1,\n \"body_type_id\": 1,\n \"rate_type\": \"hourly\",\n \"labor_rate_id\": 1,\n \"labor_hours\": \"2.00\",\n \"selling_price\": \"120.00\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Pricings Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"service_group_id\": 1,\n \"shop_type_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"fuel_type_id\": 1,\n \"body_type_id\": 1,\n \"rate_type\": \"hourly\",\n \"labor_rate_id\": 1,\n \"labor_hours\": 2,\n \"selling_price\": 120\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-group-pricings", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-pricings" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"service_group_id\": 1,\n \"shop_type_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"fuel_type_id\": 1,\n \"body_type_id\": 1,\n \"rate_type\": \"hourly\",\n \"labor_rate_id\": 1,\n \"labor_hours\": 2,\n \"selling_price\": 120\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-group-pricings", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-pricings" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Service group pricing created successfully.\",\n \"data\": {\n \"id\": 1,\n \"service_group_id\": 1,\n \"shop_type_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"fuel_type_id\": 1,\n \"body_type_id\": 1,\n \"rate_type\": \"hourly\",\n \"labor_rate_id\": 1,\n \"labor_hours\": \"2.00\",\n \"selling_price\": \"120.00\"\n }\n}" - } - ] - }, - { - "name": "Pricings Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"selling_price\": 150\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-group-pricings/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-pricings", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"selling_price\": 150\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-group-pricings/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-pricings", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Service group pricing updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"service_group_id\": 1,\n \"selling_price\": \"150.00\"\n }\n}" - } - ] - }, - { - "name": "Pricings Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/service-group-pricings/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-pricings", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/service-group-pricings/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-pricings", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Service group pricing deleted successfully.\"\n}" - } - ] - }, - { - "name": "Services List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/service-group-services", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-services" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/service-group-services", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-services" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"service_group_id\": 1,\n \"service_id\": 1,\n \"rate_type\": \"hourly\",\n \"labor_rate_id\": 1,\n \"rate\": \"100.00\",\n \"hours\": \"1.50\",\n \"tax_id\": 1,\n \"chart_of_account\": \"4000\",\n \"description\": \"Labor line\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Services Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"service_group_id\": 1,\n \"service_id\": 1,\n \"rate_type\": \"hourly\",\n \"labor_rate_id\": 1,\n \"rate\": 100,\n \"hours\": 1.5,\n \"tax_id\": 1,\n \"chart_of_account\": \"4000\",\n \"description\": \"Labor line\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-group-services", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-services" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"service_group_id\": 1,\n \"service_id\": 1,\n \"rate_type\": \"hourly\",\n \"labor_rate_id\": 1,\n \"rate\": 100,\n \"hours\": 1.5,\n \"tax_id\": 1,\n \"chart_of_account\": \"4000\",\n \"description\": \"Labor line\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-group-services", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-services" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Service group service created successfully.\",\n \"data\": {\n \"id\": 1,\n \"service_group_id\": 1,\n \"service_id\": 1,\n \"rate_type\": \"hourly\",\n \"labor_rate_id\": 1,\n \"rate\": \"100.00\",\n \"hours\": \"1.50\",\n \"tax_id\": 1,\n \"chart_of_account\": \"4000\",\n \"description\": \"Labor line\"\n }\n}" - } - ] - }, - { - "name": "Services Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"rate\": 120,\n \"hours\": 2\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-group-services/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-services", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"rate\": 120,\n \"hours\": 2\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-group-services/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-services", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Service group service updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"rate\": \"120.00\",\n \"hours\": \"2.00\"\n }\n}" - } - ] - }, - { - "name": "Services Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/service-group-services/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-services", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/service-group-services/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-services", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Service group service deleted successfully.\"\n}" - } - ] - }, - { - "name": "Parts List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/service-group-parts", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-parts" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/service-group-parts", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-parts" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"service_group_id\": 1,\n \"part_id\": 1,\n \"quantity\": \"2.00\",\n \"rate\": \"50.00\",\n \"tax_id\": 1,\n \"chart_of_account\": \"5000\",\n \"description\": \"Parts line\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Parts Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"service_group_id\": 1,\n \"part_id\": 1,\n \"quantity\": 2,\n \"rate\": 50,\n \"tax_id\": 1,\n \"chart_of_account\": \"5000\",\n \"description\": \"Parts line\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-group-parts", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-parts" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"service_group_id\": 1,\n \"part_id\": 1,\n \"quantity\": 2,\n \"rate\": 50,\n \"tax_id\": 1,\n \"chart_of_account\": \"5000\",\n \"description\": \"Parts line\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-group-parts", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-parts" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Service group part created successfully.\",\n \"data\": {\n \"id\": 1,\n \"service_group_id\": 1,\n \"part_id\": 1,\n \"quantity\": \"2.00\",\n \"rate\": \"50.00\",\n \"tax_id\": 1,\n \"chart_of_account\": \"5000\",\n \"description\": \"Parts line\"\n }\n}" - } - ] - }, - { - "name": "Parts Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"quantity\": 3,\n \"rate\": 55\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-group-parts/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-parts", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"quantity\": 3,\n \"rate\": 55\n}" - }, - "url": { - "raw": "{{base_url}}/api/service-group-parts/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-parts", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Service group part updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"quantity\": \"3.00\",\n \"rate\": \"55.00\"\n }\n}" - } - ] - }, - { - "name": "Parts Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/service-group-parts/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-parts", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/service-group-parts/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "service-group-parts", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Service group part deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Invoice Labels", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/invoice-labels", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-labels" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/invoice-labels", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-labels" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Urgent Invoice\",\n \"color_code\": \"#FF0000\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/invoice-labels", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-labels" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Urgent Invoice\",\n \"color_code\": \"#FF0000\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/invoice-labels", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-labels" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Urgent\",\n \"color_code\": \"#D60000\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/invoice-labels/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-labels", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Urgent\",\n \"color_code\": \"#D60000\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/invoice-labels/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-labels", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/invoice-labels/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-labels", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/invoice-labels/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-labels", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Invoices", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/invoices", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoices" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/invoices", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoices" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"subject\": \"Invoice 001\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"invoice_date\": \"2026-03-23\",\n \"due_date\": \"2026-03-30\",\n \"invoice_sequence_id\": 1,\n \"invoice_number\": \"INV-0001\",\n \"department_id\": 1,\n \"status\": \"draft\",\n \"inspection_categories\": [\n {\n \"inspection_category_id\": 1,\n \"rate\": 100\n }\n ],\n \"parts\": [\n {\n \"part_id\": 1,\n \"quantity\": 1,\n \"rate\": 25\n }\n ],\n \"services\": [\n {\n \"service_id\": 1,\n \"rate\": 50\n }\n ],\n \"expenses\": [\n {\n \"expense_id\": 1,\n \"quantity\": 1,\n \"rate\": 10\n }\n ],\n \"service_groups\": [\n {\n \"service_group_id\": 1,\n \"rate\": 120\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/invoices", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoices" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"subject\": \"Invoice 001\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"invoice_date\": \"2026-03-23\",\n \"due_date\": \"2026-03-30\",\n \"invoice_sequence_id\": 1,\n \"invoice_number\": \"INV-0001\",\n \"department_id\": 1,\n \"status\": \"draft\",\n \"inspection_categories\": [\n {\n \"inspection_category_id\": 1,\n \"rate\": 100\n }\n ],\n \"parts\": [\n {\n \"part_id\": 1,\n \"quantity\": 1,\n \"rate\": 25\n }\n ],\n \"services\": [\n {\n \"service_id\": 1,\n \"rate\": 50\n }\n ],\n \"expenses\": [\n {\n \"expense_id\": 1,\n \"quantity\": 1,\n \"rate\": 10\n }\n ],\n \"service_groups\": [\n {\n \"service_group_id\": 1,\n \"rate\": 120\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/invoices", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoices" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"subject\": \"Invoice 001 Updated\",\n \"status\": \"open\",\n \"notes\": \"Updated note\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/invoices/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoices", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"subject\": \"Invoice 001 Updated\",\n \"status\": \"open\",\n \"notes\": \"Updated note\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/invoices/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoices", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/invoices/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoices", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/invoices/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoices", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Add Attachment", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "attachments[]", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/invoices/{{id}}/add-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoices", - "{{id}}", - "add-attachment" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "attachments[]", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/invoices/{{id}}/add-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoices", - "{{id}}", - "add-attachment" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete Attachment", - "request": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"attachment_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/invoices/{{id}}/delete-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoices", - "{{id}}", - "delete-attachment" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"attachment_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/invoices/{{id}}/delete-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoices", - "{{id}}", - "delete-attachment" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Invoice Documents", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/invoice-documents", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-documents" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/invoice-documents", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-documents" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"invoice_id\": 1,\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"document_type_id\": 1,\n \"document_number\": \"DOC-001\",\n \"show_in_invoice\": true,\n \"show_in_estimate\": false,\n \"show_in_statement\": false\n}" - }, - "url": { - "raw": "{{base_url}}/api/invoice-documents", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-documents" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"invoice_id\": 1,\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"document_type_id\": 1,\n \"document_number\": \"DOC-001\",\n \"show_in_invoice\": true,\n \"show_in_estimate\": false,\n \"show_in_statement\": false\n}" - }, - "url": { - "raw": "{{base_url}}/api/invoice-documents", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-documents" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"document_number\": \"DOC-001-UPDATED\",\n \"show_in_statement\": true\n}" - }, - "url": { - "raw": "{{base_url}}/api/invoice-documents/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-documents", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"document_number\": \"DOC-001-UPDATED\",\n \"show_in_statement\": true\n}" - }, - "url": { - "raw": "{{base_url}}/api/invoice-documents/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-documents", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/invoice-documents/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-documents", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/invoice-documents/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-documents", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Invoice Notes", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/invoice-notes", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-notes" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/invoice-notes", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-notes" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"invoice_id\": 1,\n \"note\": \"Call customer before delivery\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/invoice-notes", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-notes" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"invoice_id\": 1,\n \"note\": \"Call customer before delivery\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/invoice-notes", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-notes" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"note\": \"Updated internal note\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/invoice-notes/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-notes", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"note\": \"Updated internal note\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/invoice-notes/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-notes", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/invoice-notes/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-notes", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/invoice-notes/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "invoice-notes", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Credit Notes", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/credit-notes", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "credit-notes" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/credit-notes", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "credit-notes" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"subject\": \"Credit Note 001\",\n \"customer_id\": 1,\n \"date\": \"2026-03-23\",\n \"status\": \"open\",\n \"labels\": [\n { \"label_id\": 1 }\n ],\n \"inspections\": [\n {\n \"inspection_category_id\": 1,\n \"rate\": 20\n }\n ],\n \"parts\": [\n {\n \"part_id\": 1,\n \"quantity\": 1,\n \"rate\": 10\n }\n ],\n \"services\": [\n {\n \"service_id\": 1,\n \"rate\": 15\n }\n ],\n \"expenses\": [\n {\n \"expense_id\": 1,\n \"quantity\": 1,\n \"rate\": 5\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/credit-notes", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "credit-notes" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"subject\": \"Credit Note 001\",\n \"customer_id\": 1,\n \"date\": \"2026-03-23\",\n \"status\": \"open\",\n \"labels\": [\n { \"label_id\": 1 }\n ],\n \"inspections\": [\n {\n \"inspection_category_id\": 1,\n \"rate\": 20\n }\n ],\n \"parts\": [\n {\n \"part_id\": 1,\n \"quantity\": 1,\n \"rate\": 10\n }\n ],\n \"services\": [\n {\n \"service_id\": 1,\n \"rate\": 15\n }\n ],\n \"expenses\": [\n {\n \"expense_id\": 1,\n \"quantity\": 1,\n \"rate\": 5\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/credit-notes", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "credit-notes" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"subject\": \"Credit Note 001 Updated\",\n \"notes\": \"Adjusted amount\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/credit-notes/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "credit-notes", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"subject\": \"Credit Note 001 Updated\",\n \"notes\": \"Adjusted amount\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/credit-notes/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "credit-notes", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/credit-notes/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "credit-notes", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/credit-notes/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "credit-notes", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Add Attachment", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "attachments[]", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/credit-notes/{{id}}/add-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "credit-notes", - "{{id}}", - "add-attachment" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "attachments[]", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/credit-notes/{{id}}/add-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "credit-notes", - "{{id}}", - "add-attachment" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete Attachment", - "request": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"attachment_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/credit-notes/{{id}}/delete-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "credit-notes", - "{{id}}", - "delete-attachment" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"attachment_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/credit-notes/{{id}}/delete-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "credit-notes", - "{{id}}", - "delete-attachment" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Add Internal Note", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"note\": \"Internal review needed\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/credit-notes/{{id}}/add-internal-note", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "credit-notes", - "{{id}}", - "add-internal-note" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"note\": \"Internal review needed\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/credit-notes/{{id}}/add-internal-note", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "credit-notes", - "{{id}}", - "add-internal-note" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Edit Internal Note", - "request": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"internal_note_id\": 1,\n \"note\": \"Updated internal note\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/credit-notes/{{id}}/edit-internal-note", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "credit-notes", - "{{id}}", - "edit-internal-note" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"internal_note_id\": 1,\n \"note\": \"Updated internal note\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/credit-notes/{{id}}/edit-internal-note", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "credit-notes", - "{{id}}", - "edit-internal-note" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Delete Internal Note", - "request": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"internal_note_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/credit-notes/{{id}}/delete-internal-note", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "credit-notes", - "{{id}}", - "delete-internal-note" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"internal_note_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/credit-notes/{{id}}/delete-internal-note", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "credit-notes", - "{{id}}", - "delete-internal-note" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Payment Mades", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/payment-mades", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-mades" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/payment-mades", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-mades" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"vendor_id\": 1,\n \"employee_id\": null,\n \"payment_for\": \"bill\",\n \"payment_made\": \"100.00\",\n \"payment_number\": \"PM-001\",\n \"payment_reference\": \"REF-001\",\n \"payment_date\": \"2026-03-23\",\n \"payment_mode_id\": 1,\n \"paid_through\": 1,\n \"notes\": \"Payment against vendor bills\",\n \"excess_amount_will_be_deposited\": null,\n \"amount_paid\": \"100.00\",\n \"amount_used_for_payments\": \"100.00\",\n \"amount_in_excess\": \"0.00\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"vendor\": {\n \"id\": 1,\n \"first_name\": \"Vendor\",\n \"last_name\": \"One\",\n \"company_name\": \"ACME Parts\",\n \"email\": \"vendor1@example.com\"\n },\n \"payment_mode\": {\n \"id\": 1,\n \"title\": \"Cash\"\n },\n \"details\": [\n {\n \"id\": 1,\n \"payment_made_id\": 1,\n \"bill_id\": 10,\n \"expense_id\": null,\n \"amount_paid\": \"60.00\",\n \"bill\": {\n \"id\": 10,\n \"title\": \"Bill #10\",\n \"status\": \"partially_paid\"\n },\n \"expense\": null\n },\n {\n \"id\": 2,\n \"payment_made_id\": 1,\n \"bill_id\": 11,\n \"expense_id\": null,\n \"amount_paid\": \"40.00\",\n \"bill\": {\n \"id\": 11,\n \"title\": \"Bill #11\",\n \"status\": \"paid\"\n },\n \"expense\": null\n }\n ],\n \"attachments\": [\n {\n \"id\": 1,\n \"payment_made_id\": 1,\n \"attachment_path\": \"payment_made_attachments/sample-receipt.pdf\",\n \"original_name\": \"receipt.pdf\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ]\n }\n ]\n}" - } - ] - }, - { - "name": "Create (Bill)", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"vendor_id\": 1,\n \"payment_for\": \"bill\",\n \"payment_made\": 100,\n \"payment_number\": \"PM-001\",\n \"payment_reference\": \"REF-001\",\n \"payment_date\": \"2026-03-23\",\n \"payment_mode_id\": 1,\n \"paid_through\": 1,\n \"notes\": \"Payment against bills\",\n \"details\": [\n {\n \"bill_id\": 1,\n \"amount_paid\": 60\n },\n {\n \"bill_id\": 2,\n \"amount_paid\": 40\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/payment-mades", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-mades" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"vendor_id\": 1,\n \"payment_for\": \"bill\",\n \"payment_made\": 100,\n \"payment_number\": \"PM-001\",\n \"payment_reference\": \"REF-001\",\n \"payment_date\": \"2026-03-23\",\n \"payment_mode_id\": 1,\n \"paid_through\": 1,\n \"notes\": \"Payment against bills\",\n \"details\": [\n {\n \"bill_id\": 1,\n \"amount_paid\": 60\n },\n {\n \"bill_id\": 2,\n \"amount_paid\": 40\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/payment-mades", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-mades" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Payment made created successfully.\",\n \"data\": {\n \"id\": 1,\n \"vendor_id\": 1,\n \"employee_id\": null,\n \"payment_for\": \"bill\",\n \"payment_made\": \"100.00\",\n \"payment_number\": \"PM-001\",\n \"payment_reference\": \"REF-001\",\n \"payment_date\": \"2026-03-23\",\n \"payment_mode_id\": 1,\n \"paid_through\": 1,\n \"notes\": \"Payment against bills\",\n \"excess_amount_will_be_deposited\": null,\n \"amount_paid\": \"100.00\",\n \"amount_used_for_payments\": \"100.00\",\n \"amount_in_excess\": \"0.00\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"vendor\": {\n \"id\": 1,\n \"first_name\": \"Vendor\",\n \"last_name\": \"One\",\n \"company_name\": \"ACME Parts\",\n \"email\": \"vendor1@example.com\"\n },\n \"payment_mode\": {\n \"id\": 1,\n \"title\": \"Cash\"\n },\n \"details\": [\n {\n \"id\": 1,\n \"payment_made_id\": 1,\n \"bill_id\": 1,\n \"expense_id\": null,\n \"amount_paid\": \"60.00\"\n },\n {\n \"id\": 2,\n \"payment_made_id\": 1,\n \"bill_id\": 2,\n \"expense_id\": null,\n \"amount_paid\": \"40.00\"\n }\n ],\n \"attachments\": []\n }\n}" - } - ] - }, - { - "name": "Create (Expense)", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"employee_id\": 1,\n \"payment_for\": \"expense\",\n \"payment_made\": 50,\n \"payment_number\": \"PM-002\",\n \"payment_reference\": \"REF-002\",\n \"payment_date\": \"2026-03-23\",\n \"payment_mode_id\": 1,\n \"paid_through\": 1,\n \"notes\": \"Office expense reimbursement\",\n \"details\": [\n {\n \"expense_id\": 1,\n \"amount_paid\": 50\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/payment-mades", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-mades" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"employee_id\": 1,\n \"payment_for\": \"expense\",\n \"payment_made\": 50,\n \"payment_number\": \"PM-002\",\n \"payment_reference\": \"REF-002\",\n \"payment_date\": \"2026-03-23\",\n \"payment_mode_id\": 1,\n \"paid_through\": 1,\n \"notes\": \"Office expense reimbursement\",\n \"details\": [\n {\n \"expense_id\": 1,\n \"amount_paid\": 50\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/payment-mades", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-mades" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Payment made created successfully.\",\n \"data\": {\n \"id\": 2,\n \"vendor_id\": null,\n \"employee_id\": 1,\n \"payment_for\": \"expense\",\n \"payment_made\": \"50.00\",\n \"payment_number\": \"PM-002\",\n \"payment_reference\": \"REF-002\",\n \"payment_date\": \"2026-03-23\",\n \"payment_mode_id\": 1,\n \"paid_through\": 1,\n \"notes\": \"Office expense reimbursement\",\n \"excess_amount_will_be_deposited\": null,\n \"amount_paid\": \"50.00\",\n \"amount_used_for_payments\": \"50.00\",\n \"amount_in_excess\": \"0.00\",\n \"created_at\": \"2026-03-23T12:05:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:05:00.000000Z\",\n \"vendor\": null,\n \"payment_mode\": {\n \"id\": 1,\n \"title\": \"Cash\"\n },\n \"details\": [\n {\n \"id\": 3,\n \"payment_made_id\": 2,\n \"bill_id\": null,\n \"expense_id\": 1,\n \"amount_paid\": \"50.00\"\n }\n ],\n \"attachments\": []\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"notes\": \"Updated payment made\",\n \"details\": [\n {\n \"bill_id\": 1,\n \"amount_paid\": 75\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/payment-mades/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-mades", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"notes\": \"Updated payment made\",\n \"details\": [\n {\n \"bill_id\": 1,\n \"amount_paid\": 75\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/payment-mades/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-mades", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Payment made updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"vendor_id\": 1,\n \"employee_id\": null,\n \"payment_for\": \"bill\",\n \"payment_made\": \"100.00\",\n \"payment_number\": \"PM-001\",\n \"payment_reference\": \"REF-001\",\n \"payment_date\": \"2026-03-23\",\n \"payment_mode_id\": 1,\n \"paid_through\": 1,\n \"notes\": \"Updated payment made\",\n \"excess_amount_will_be_deposited\": null,\n \"amount_paid\": \"100.00\",\n \"amount_used_for_payments\": \"75.00\",\n \"amount_in_excess\": \"25.00\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:20:00.000000Z\",\n \"vendor\": {\n \"id\": 1,\n \"first_name\": \"Vendor\",\n \"last_name\": \"One\",\n \"company_name\": \"ACME Parts\",\n \"email\": \"vendor1@example.com\"\n },\n \"payment_mode\": {\n \"id\": 1,\n \"title\": \"Cash\"\n },\n \"details\": [\n {\n \"id\": 4,\n \"payment_made_id\": 1,\n \"bill_id\": 1,\n \"expense_id\": null,\n \"amount_paid\": \"75.00\"\n }\n ],\n \"attachments\": [\n {\n \"id\": 1,\n \"payment_made_id\": 1,\n \"attachment_path\": \"payment_made_attachments/sample-receipt.pdf\",\n \"original_name\": \"receipt.pdf\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ]\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/payment-mades/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-mades", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/payment-mades/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-mades", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Add Attachment", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "attachments[]", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/payment-mades/{{id}}/add-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-mades", - "{{id}}", - "add-attachment" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "attachments[]", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/payment-mades/{{id}}/add-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-mades", - "{{id}}", - "add-attachment" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Payment made attachments added successfully.\",\n \"data\": {\n \"id\": 1,\n \"attachments\": [\n {\n \"id\": 1,\n \"payment_made_id\": 1,\n \"attachment_path\": \"payment_made_attachments/sample-receipt.pdf\",\n \"original_name\": \"receipt.pdf\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n },\n {\n \"id\": 2,\n \"payment_made_id\": 1,\n \"attachment_path\": \"payment_made_attachments/new-proof.jpg\",\n \"original_name\": \"proof.jpg\",\n \"created_at\": \"2026-03-23T12:25:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:25:00.000000Z\"\n }\n ]\n }\n}" - } - ] - }, - { - "name": "Delete Attachment", - "request": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"attachment_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/payment-mades/{{id}}/delete-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-mades", - "{{id}}", - "delete-attachment" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"attachment_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/payment-mades/{{id}}/delete-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "payment-mades", - "{{id}}", - "delete-attachment" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Payment made attachment deleted successfully.\",\n \"data\": {\n \"id\": 1,\n \"attachments\": [\n {\n \"id\": 2,\n \"payment_made_id\": 1,\n \"attachment_path\": \"payment_made_attachments/new-proof.jpg\",\n \"original_name\": \"proof.jpg\",\n \"created_at\": \"2026-03-23T12:25:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:25:00.000000Z\"\n }\n ]\n }\n}" - } - ] - } - ] - }, - { - "name": "Vendor Credits", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/vendor-credits", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendor-credits" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/vendor-credits", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendor-credits" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"subject\": \"Vendor Credit 001\",\n \"credit_number\": \"VC-001\",\n \"vendor_id\": 1,\n \"vendor_credit_date\": \"2026-03-23\",\n \"department_id\": 1,\n \"labels\": [\n { \"label_id\": 1 }\n ],\n \"parts\": [\n {\n \"part_id\": 1,\n \"quantity\": 1,\n \"rate\": 25\n }\n ],\n \"services\": [\n {\n \"service_id\": 1,\n \"quantity\": 1,\n \"rate\": 50\n }\n ],\n \"expenses\": [\n {\n \"expense_id\": 1,\n \"quantity\": 1,\n \"rate\": 10\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/vendor-credits", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendor-credits" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"subject\": \"Vendor Credit 001\",\n \"credit_number\": \"VC-001\",\n \"vendor_id\": 1,\n \"vendor_credit_date\": \"2026-03-23\",\n \"department_id\": 1,\n \"labels\": [\n { \"label_id\": 1 }\n ],\n \"parts\": [\n {\n \"part_id\": 1,\n \"quantity\": 1,\n \"rate\": 25\n }\n ],\n \"services\": [\n {\n \"service_id\": 1,\n \"quantity\": 1,\n \"rate\": 50\n }\n ],\n \"expenses\": [\n {\n \"expense_id\": 1,\n \"quantity\": 1,\n \"rate\": 10\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/vendor-credits", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendor-credits" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"subject\": \"Vendor Credit 001 Updated\",\n \"notes\": \"Updated notes\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vendor-credits/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendor-credits", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"subject\": \"Vendor Credit 001 Updated\",\n \"notes\": \"Updated notes\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vendor-credits/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendor-credits", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/vendor-credits/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendor-credits", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/vendor-credits/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendor-credits", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Add Attachment", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "attachments[]", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/vendor-credits/{{id}}/add-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendor-credits", - "{{id}}", - "add-attachment" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "attachments[]", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/vendor-credits/{{id}}/add-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendor-credits", - "{{id}}", - "add-attachment" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete Attachment", - "request": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"attachment_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/vendor-credits/{{id}}/delete-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendor-credits", - "{{id}}", - "delete-attachment" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"attachment_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/vendor-credits/{{id}}/delete-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendor-credits", - "{{id}}", - "delete-attachment" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Add Internal Note", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"note\": \"Internal note\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vendor-credits/{{id}}/add-internal-note", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendor-credits", - "{{id}}", - "add-internal-note" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"note\": \"Internal note\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vendor-credits/{{id}}/add-internal-note", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendor-credits", - "{{id}}", - "add-internal-note" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Edit Internal Note", - "request": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"internal_note_id\": 1,\n \"note\": \"Updated internal note\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vendor-credits/{{id}}/edit-internal-note", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendor-credits", - "{{id}}", - "edit-internal-note" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"internal_note_id\": 1,\n \"note\": \"Updated internal note\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/vendor-credits/{{id}}/edit-internal-note", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendor-credits", - "{{id}}", - "edit-internal-note" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Delete Internal Note", - "request": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"internal_note_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/vendor-credits/{{id}}/delete-internal-note", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendor-credits", - "{{id}}", - "delete-internal-note" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"internal_note_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/vendor-credits/{{id}}/delete-internal-note", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "vendor-credits", - "{{id}}", - "delete-internal-note" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Inventory Adjustments", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/inventory-adjustments", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inventory-adjustments" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/inventory-adjustments", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inventory-adjustments" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"reference_number\": \"IA-001\",\n \"date\": \"2026-03-23\",\n \"chart_of_account\": 1,\n \"reason_id\": 1,\n \"job_card_id\": 1,\n \"invoice_id\": 1,\n \"notes\": \"Stock correction\",\n \"parts\": [\n {\n \"part_id\": 1,\n \"quantity\": 2,\n \"rate\": 25,\n \"description\": \"Adjustment line\"\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/inventory-adjustments", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inventory-adjustments" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"reference_number\": \"IA-001\",\n \"date\": \"2026-03-23\",\n \"chart_of_account\": 1,\n \"reason_id\": 1,\n \"job_card_id\": 1,\n \"invoice_id\": 1,\n \"notes\": \"Stock correction\",\n \"parts\": [\n {\n \"part_id\": 1,\n \"quantity\": 2,\n \"rate\": 25,\n \"description\": \"Adjustment line\"\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/inventory-adjustments", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inventory-adjustments" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"notes\": \"Updated adjustment\",\n \"parts\": [\n {\n \"part_id\": 1,\n \"quantity\": 3,\n \"rate\": 25\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/inventory-adjustments/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inventory-adjustments", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"notes\": \"Updated adjustment\",\n \"parts\": [\n {\n \"part_id\": 1,\n \"quantity\": 3,\n \"rate\": 25\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/api/inventory-adjustments/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inventory-adjustments", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/inventory-adjustments/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inventory-adjustments", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/inventory-adjustments/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inventory-adjustments", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Add Attachment", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "attachments[]", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/inventory-adjustments/{{id}}/add-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inventory-adjustments", - "{{id}}", - "add-attachment" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "attachments[]", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/inventory-adjustments/{{id}}/add-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inventory-adjustments", - "{{id}}", - "add-attachment" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete Attachment", - "request": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"attachment_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/inventory-adjustments/{{id}}/delete-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inventory-adjustments", - "{{id}}", - "delete-attachment" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"attachment_id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/inventory-adjustments/{{id}}/delete-attachment", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "inventory-adjustments", - "{{id}}", - "delete-attachment" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Time Sheets", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/time-sheets", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "time-sheets" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/time-sheets", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "time-sheets" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"employee_id\": 1,\n \"date\": \"2026-03-23\",\n \"clock_in\": \"09:00:00\",\n \"clock_out\": \"17:00:00\",\n \"note\": \"Regular shift\",\n \"activity_type\": \"general\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/time-sheets", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "time-sheets" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"employee_id\": 1,\n \"date\": \"2026-03-23\",\n \"clock_in\": \"09:00:00\",\n \"clock_out\": \"17:00:00\",\n \"note\": \"Regular shift\",\n \"activity_type\": \"general\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/time-sheets", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "time-sheets" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"clock_out\": \"18:00:00\",\n \"note\": \"Overtime\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/time-sheets/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "time-sheets", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"clock_out\": \"18:00:00\",\n \"note\": \"Overtime\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/time-sheets/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "time-sheets", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/time-sheets/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "time-sheets", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/time-sheets/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "time-sheets", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Deleted successfully.\"\n}" - } - ] - }, - { - "name": "Clock In", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"employee_id\": 1,\n \"date\": \"2026-03-23\",\n \"activity_type\": \"general\",\n \"note\": \"Clock in\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/time-sheet/clock-in", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "time-sheet", - "clock-in" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"employee_id\": 1,\n \"date\": \"2026-03-23\",\n \"activity_type\": \"general\",\n \"note\": \"Clock in\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/time-sheet/clock-in", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "time-sheet", - "clock-in" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Clock Out", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"employee_id\": 1,\n \"date\": \"2026-03-23\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/time-sheet/clock-out", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "time-sheet", - "clock-out" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"employee_id\": 1,\n \"date\": \"2026-03-23\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/time-sheet/clock-out", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "time-sheet", - "clock-out" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" - } - ] - } - ] - }, - { - "name": "Shop Timings", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/shop-timings", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-timings" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/shop-timings", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-timings" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"title\": \"Regular Shift\",\n \"in_time\": \"10:00:00\",\n \"out_time\": \"19:00:00\",\n \"full_day_hours\": \"09:00:00\",\n \"half_day_hours\": \"04:30:00\",\n \"punch_in\": \"10:00:00\",\n \"punch_out\": \"19:00:00\",\n \"before_time\": \"01:00:00\",\n \"after_time\": \"01:00:00\",\n \"is_default\": true,\n \"created_at\": \"2026-03-24T10:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T10:00:00.000000Z\"\n }\n ]\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Regular Shift\",\n \"in_time\": \"10:00:00\",\n \"out_time\": \"19:00:00\",\n \"full_day_hours\": \"09:00:00\",\n \"half_day_hours\": \"04:30:00\",\n \"punch_in\": \"10:00:00\",\n \"punch_out\": \"19:00:00\",\n \"before_time\": \"01:00:00\",\n \"after_time\": \"01:00:00\",\n \"is_default\": true\n}" - }, - "url": { - "raw": "{{base_url}}/api/shop-timings", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-timings" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Regular Shift\",\n \"in_time\": \"10:00:00\",\n \"out_time\": \"19:00:00\",\n \"full_day_hours\": \"09:00:00\",\n \"half_day_hours\": \"04:30:00\",\n \"punch_in\": \"10:00:00\",\n \"punch_out\": \"19:00:00\",\n \"before_time\": \"01:00:00\",\n \"after_time\": \"01:00:00\",\n \"is_default\": true\n}" - }, - "url": { - "raw": "{{base_url}}/api/shop-timings", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-timings" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Shop timing created successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Regular Shift\",\n \"in_time\": \"10:00:00\",\n \"out_time\": \"19:00:00\",\n \"full_day_hours\": \"09:00:00\",\n \"half_day_hours\": \"04:30:00\",\n \"punch_in\": \"10:00:00\",\n \"punch_out\": \"19:00:00\",\n \"before_time\": \"01:00:00\",\n \"after_time\": \"01:00:00\",\n \"is_default\": true,\n \"created_at\": \"2026-03-24T10:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T10:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Weekend Shift\",\n \"in_time\": \"09:00:00\",\n \"out_time\": \"15:00:00\",\n \"is_default\": false\n}" - }, - "url": { - "raw": "{{base_url}}/api/shop-timings/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-timings", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Weekend Shift\",\n \"in_time\": \"09:00:00\",\n \"out_time\": \"15:00:00\",\n \"is_default\": false\n}" - }, - "url": { - "raw": "{{base_url}}/api/shop-timings/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-timings", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Shop timing updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Weekend Shift\",\n \"in_time\": \"09:00:00\",\n \"out_time\": \"15:00:00\",\n \"full_day_hours\": \"06:00:00\",\n \"half_day_hours\": \"03:00:00\",\n \"punch_in\": \"09:00:00\",\n \"punch_out\": \"15:00:00\",\n \"before_time\": \"00:30:00\",\n \"after_time\": \"00:30:00\",\n \"is_default\": false,\n \"created_at\": \"2026-03-24T10:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T10:20:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/shop-timings/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-timings", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/shop-timings/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-timings", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Shop timing deleted successfully.\"\n}" - } - ] - }, - { - "name": "Set Default", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-default-shop-timing", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-default-shop-timing" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-default-shop-timing", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-default-shop-timing" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Default shop timing updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Regular Shift\",\n \"is_default\": true\n }\n}" - } - ] - }, - { - "name": "Remove Default", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/remove-default-shop-timing", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "remove-default-shop-timing" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/remove-default-shop-timing", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "remove-default-shop-timing" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Default shop timing removed successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Regular Shift\",\n \"is_default\": false\n }\n}" - } - ] - } - ] - }, - { - "name": "Holiday Years", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/holiday-years", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "holiday-years" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/holiday-years", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "holiday-years" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"year\": 2026,\n \"created_at\": \"2026-03-24T11:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T11:00:00.000000Z\"\n }\n ]\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"year\": 2026\n}" - }, - "url": { - "raw": "{{base_url}}/api/holiday-years", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "holiday-years" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"year\": 2026\n}" - }, - "url": { - "raw": "{{base_url}}/api/holiday-years", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "holiday-years" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Holiday year created successfully.\",\n \"data\": {\n \"id\": 1,\n \"year\": 2026,\n \"created_at\": \"2026-03-24T11:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T11:00:00.000000Z\"\n }\n}" - } - ] - } - ] - }, - { - "name": "Shop Calenders", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/shop-calenders", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-calenders" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/shop-calenders", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-calenders" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"title\": \"Default Calendar\",\n \"is_default\": true,\n \"created_at\": \"2026-03-24T10:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T10:00:00.000000Z\",\n \"shop_calender_days\": [\n {\n \"id\": 1,\n \"shop_calender_id\": 1,\n \"day_number\": 1,\n \"type\": \"full_day\",\n \"created_at\": \"2026-03-24T10:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T10:00:00.000000Z\"\n }\n ]\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Default Calendar\",\n \"is_default\": true\n}" - }, - "url": { - "raw": "{{base_url}}/api/shop-calenders", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-calenders" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"Default Calendar\",\n \"is_default\": true\n}" - }, - "url": { - "raw": "{{base_url}}/api/shop-calenders", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-calenders" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Shop calender created successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Default Calendar\",\n \"is_default\": true,\n \"created_at\": \"2026-03-24T10:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T10:00:00.000000Z\",\n \"shop_calender_days\": [\n {\n \"id\": 1,\n \"shop_calender_id\": 1,\n \"day_number\": 1,\n \"type\": \"full_day\"\n }\n ]\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/shop-calenders/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-calenders", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/shop-calenders/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-calenders", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Shop calender deleted successfully.\"\n}" - } - ] - }, - { - "name": "Set Default", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-default-shop-calender", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-default-shop-calender" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-default-shop-calender", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-default-shop-calender" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Default shop calender updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Default Calendar\",\n \"is_default\": true\n }\n}" - } - ] - }, - { - "name": "Remove Default", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/remove-default-shop-calender", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "remove-default-shop-calender" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/remove-default-shop-calender", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "remove-default-shop-calender" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Default shop calender removed successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Default Calendar\",\n \"is_default\": false\n }\n}" - } - ] - }, - { - "name": "Update Day Type", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"day_number\": 1,\n \"type\": \"week_off\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/shop-calenders/{{id}}/update-day-type", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-calenders", - "{{id}}", - "update-day-type" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"day_number\": 1,\n \"type\": \"week_off\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/shop-calenders/{{id}}/update-day-type", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "shop-calenders", - "{{id}}", - "update-day-type" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Shop calender day type updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Default Calendar\",\n \"is_default\": true,\n \"shop_calender_days\": [\n {\n \"id\": 1,\n \"shop_calender_id\": 1,\n \"day_number\": 1,\n \"type\": \"week_off\"\n }\n ]\n }\n}" - } - ] - } - ] - }, - { - "name": "Holidays", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/holidays?holiday_year_id=1", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "holidays" - ], - "query": [ - { - "key": "holiday_year_id", - "value": "1" - } - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/holidays?holiday_year_id=1", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "holidays" - ], - "query": [ - { - "key": "holiday_year_id", - "value": "1" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"holiday_year_id\": 1,\n \"date\": \"2026-12-02\",\n \"name\": \"National Day\",\n \"created_at\": \"2026-03-24T11:10:00.000000Z\",\n \"updated_at\": \"2026-03-24T11:10:00.000000Z\",\n \"holiday_year\": {\n \"id\": 1,\n \"year\": 2026,\n \"created_at\": \"2026-03-24T11:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T11:00:00.000000Z\"\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"holiday_year_id\": 1,\n \"date\": \"2026-12-02\",\n \"name\": \"National Day\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/holidays", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "holidays" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"holiday_year_id\": 1,\n \"date\": \"2026-12-02\",\n \"name\": \"National Day\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/holidays", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "holidays" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Holiday created successfully.\",\n \"data\": {\n \"id\": 1,\n \"holiday_year_id\": 1,\n \"date\": \"2026-12-02\",\n \"name\": \"National Day\",\n \"created_at\": \"2026-03-24T11:10:00.000000Z\",\n \"updated_at\": \"2026-03-24T11:10:00.000000Z\",\n \"holiday_year\": {\n \"id\": 1,\n \"year\": 2026\n }\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"name\": \"National Day Holiday\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/holidays/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "holidays", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"name\": \"National Day Holiday\"\n}" - }, - "url": { - "raw": "{{base_url}}/api/holidays/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "holidays", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Holiday updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"holiday_year_id\": 1,\n \"date\": \"2026-12-02\",\n \"name\": \"National Day Holiday\",\n \"created_at\": \"2026-03-24T11:10:00.000000Z\",\n \"updated_at\": \"2026-03-24T11:20:00.000000Z\",\n \"holiday_year\": {\n \"id\": 1,\n \"year\": 2026\n }\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/holidays/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "holidays", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/holidays/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "holidays", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Holiday deleted successfully.\"\n}" - } - ] - } - ] - }, - { - "name": "Settings", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/settings", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "settings" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/settings", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "settings" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": {\n \"id\": 1,\n \"name\": \"Reparee\",\n \"email\": \"support@reparee.com\",\n \"phone\": \"1234567890\",\n \"alternative_phone\": \"0987654321\",\n \"website\": \"https://reparee.com\",\n \"time_zone\": \"Asia/Kolkata\",\n \"upi_id\": \"reparee@upi\",\n \"first_day_of_work\": \"monday\",\n \"latitude\": \"23.0225\",\n \"longitude\": \"72.5714\",\n \"bank_details\": \"Bank: Example Bank, A/C: 1234567890, IFSC: EXMP0001234\",\n \"first_address_line\": \"123 Business Park\",\n \"second_address_line\": \"Near Central Plaza\",\n \"country_id\": \"101\",\n \"state_id\": \"12\",\n \"city\": \"Ahmedabad\",\n \"zip_code\": \"380001\",\n \"logo\": \"settings/logo.png\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "name", - "value": "Reparee", - "type": "text" - }, - { - "key": "email", - "value": "support@reparee.com", - "type": "text" - }, - { - "key": "phone", - "value": "1234567890", - "type": "text" - }, - { - "key": "first_day_of_work", - "value": "monday", - "type": "text" - }, - { - "key": "logo", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/settings", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "settings" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "name", - "value": "Reparee", - "type": "text" - }, - { - "key": "email", - "value": "support@reparee.com", - "type": "text" - }, - { - "key": "phone", - "value": "1234567890", - "type": "text" - }, - { - "key": "first_day_of_work", - "value": "monday", - "type": "text" - }, - { - "key": "logo", - "type": "file", - "value": "" - } - ] - }, - "url": { - "raw": "{{base_url}}/api/settings", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "settings" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Settings updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Reparee\",\n \"email\": \"support@reparee.com\",\n \"phone\": \"1234567890\",\n \"alternative_phone\": \"0987654321\",\n \"website\": \"https://reparee.com\",\n \"time_zone\": \"Asia/Kolkata\",\n \"upi_id\": \"reparee@upi\",\n \"first_day_of_work\": \"monday\",\n \"latitude\": \"23.0225\",\n \"longitude\": \"72.5714\",\n \"bank_details\": \"Bank: Example Bank, A/C: 1234567890, IFSC: EXMP0001234\",\n \"first_address_line\": \"123 Business Park\",\n \"second_address_line\": \"Near Central Plaza\",\n \"country_id\": \"101\",\n \"state_id\": \"12\",\n \"city\": \"Ahmedabad\",\n \"zip_code\": \"380001\",\n \"logo\": \"settings/logo.png\"\n }\n}" - } - ] - } - ] - }, - { - "name": "Taxes", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/taxes", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "taxes" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/taxes", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "taxes" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"title\": \"VAT\",\n \"note\": \"Standard rate\",\n \"rate\": \"18.00\",\n \"is_default\": true,\n \"created_at\": \"2026-03-25T10:00:00.000000Z\",\n \"updated_at\": \"2026-03-25T10:00:00.000000Z\"\n }\n ]\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"VAT\",\n \"note\": \"Standard rate\",\n \"rate\": 18,\n \"is_default\": true\n}" - }, - "url": { - "raw": "{{base_url}}/api/taxes", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "taxes" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"VAT\",\n \"note\": \"Standard rate\",\n \"rate\": 18,\n \"is_default\": true\n}" - }, - "url": { - "raw": "{{base_url}}/api/taxes", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "taxes" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Tax created successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"VAT\",\n \"note\": \"Standard rate\",\n \"rate\": \"18.00\",\n \"is_default\": true,\n \"created_at\": \"2026-03-25T10:00:00.000000Z\",\n \"updated_at\": \"2026-03-25T10:00:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"VAT (updated)\",\n \"note\": \"Revised rate\",\n \"rate\": 20,\n \"is_default\": false\n}" - }, - "url": { - "raw": "{{base_url}}/api/taxes/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "taxes", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"VAT (updated)\",\n \"note\": \"Revised rate\",\n \"rate\": 20,\n \"is_default\": false\n}" - }, - "url": { - "raw": "{{base_url}}/api/taxes/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "taxes", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Tax updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"VAT (updated)\",\n \"note\": \"Revised rate\",\n \"rate\": \"20.00\",\n \"is_default\": false,\n \"created_at\": \"2026-03-25T10:00:00.000000Z\",\n \"updated_at\": \"2026-03-25T10:15:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/taxes/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "taxes", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/taxes/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "taxes", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Tax deleted successfully.\"\n}" - } - ] - }, - { - "name": "Set Default", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-default-tax", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-default-tax" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/set-default-tax", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "set-default-tax" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Default tax updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"VAT\",\n \"note\": \"Standard rate\",\n \"rate\": \"18.00\",\n \"is_default\": true,\n \"created_at\": \"2026-03-25T10:00:00.000000Z\",\n \"updated_at\": \"2026-03-25T10:20:00.000000Z\"\n }\n}" - } - ] - }, - { - "name": "Remove Default", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/remove-default-tax", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "remove-default-tax" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/remove-default-tax", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "remove-default-tax" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Default tax removed successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"VAT\",\n \"note\": \"Standard rate\",\n \"rate\": \"18.00\",\n \"is_default\": false,\n \"created_at\": \"2026-03-25T10:00:00.000000Z\",\n \"updated_at\": \"2026-03-25T10:25:00.000000Z\"\n }\n}" - } - ] - } - ] - }, - { - "name": "Make and Models", - "item": [ - { - "name": "List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/make-and-models", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "make-and-models" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/api/make-and-models", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "make-and-models" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": 2024,\n \"sub_model\": \"LE\",\n \"body_type_id\": 1,\n \"fuel_id\": 1,\n \"transmission_id\": 1,\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"is_active\": true,\n \"is_default\": false,\n \"created_at\": \"2026-03-25T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-25T12:00:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"body_type\": {\n \"id\": 1,\n \"title\": \"Sedan\"\n },\n \"fuel\": {\n \"id\": 1,\n \"title\": \"Petrol\"\n },\n \"transmission\": {\n \"id\": 1,\n \"title\": \"Automatic\"\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Create", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"shop_type_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": 2024,\n \"sub_model\": \"LE\",\n \"body_type_id\": 1,\n \"fuel_id\": 1,\n \"transmission_id\": 1,\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"is_active\": true\n}" - }, - "url": { - "raw": "{{base_url}}/api/make-and-models", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "make-and-models" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"shop_type_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": 2024,\n \"sub_model\": \"LE\",\n \"body_type_id\": 1,\n \"fuel_id\": 1,\n \"transmission_id\": 1,\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"is_active\": true\n}" - }, - "url": { - "raw": "{{base_url}}/api/make-and-models", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "make-and-models" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Make and model created successfully.\",\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": 2024,\n \"sub_model\": \"LE\",\n \"body_type_id\": 1,\n \"fuel_id\": 1,\n \"transmission_id\": 1,\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"is_active\": true,\n \"is_default\": false,\n \"created_at\": \"2026-03-25T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-25T12:00:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"body_type\": {\n \"id\": 1,\n \"title\": \"Sedan\"\n },\n \"fuel\": {\n \"id\": 1,\n \"title\": \"Petrol\"\n },\n \"transmission\": {\n \"id\": 1,\n \"title\": \"Automatic\"\n }\n }\n}" - } - ] - }, - { - "name": "Update", - "request": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"make\": \"Toyota\",\n \"model\": \"Camry Hybrid\",\n \"year\": 2025,\n \"is_active\": true\n}" - }, - "url": { - "raw": "{{base_url}}/api/make-and-models/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "make-and-models", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"make\": \"Toyota\",\n \"model\": \"Camry Hybrid\",\n \"year\": 2025,\n \"is_active\": true\n}" - }, - "url": { - "raw": "{{base_url}}/api/make-and-models/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "make-and-models", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Make and model updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry Hybrid\",\n \"year\": 2025,\n \"sub_model\": \"LE\",\n \"body_type_id\": 1,\n \"fuel_id\": 1,\n \"transmission_id\": 1,\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"is_active\": true,\n \"is_default\": false,\n \"created_at\": \"2026-03-25T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-25T12:30:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"body_type\": {\n \"id\": 1,\n \"title\": \"Sedan\"\n },\n \"fuel\": {\n \"id\": 1,\n \"title\": \"Petrol\"\n },\n \"transmission\": {\n \"id\": 1,\n \"title\": \"Automatic\"\n }\n }\n}" - } - ] - }, - { - "name": "Delete", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/make-and-models/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "make-and-models", - "{{id}}" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/api/make-and-models/{{id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "make-and-models", - "{{id}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Make and model deleted successfully.\"\n}" - } - ] - }, - { - "name": "Toggle Status", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/toggle-make-and-model-status", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "toggle-make-and-model-status" - ] - } - }, - "response": [ - { - "name": "Success Example", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1\n}" - }, - "url": { - "raw": "{{base_url}}/api/toggle-make-and-model-status", - "host": [ - "{{base_url}}" - ], - "path": [ - "api", - "toggle-make-and-model-status" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"message\": \"Make and model status updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": 2024,\n \"sub_model\": \"LE\",\n \"body_type_id\": 1,\n \"fuel_id\": 1,\n \"transmission_id\": 1,\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"is_active\": false,\n \"is_default\": false,\n \"created_at\": \"2026-03-25T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-25T12:45:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"body_type\": {\n \"id\": 1,\n \"title\": \"Sedan\"\n },\n \"fuel\": {\n \"id\": 1,\n \"title\": \"Petrol\"\n },\n \"transmission\": {\n \"id\": 1,\n \"title\": \"Automatic\"\n }\n }\n}" - } - ] - } - ] - } - ], - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{auth_token}}", - "type": "string" - } - ] - }, - "variable": [ - { - "key": "base_url", - "value": "http://localhost:8000" - }, - { - "key": "auth_token", - "value": "YOUR_SANCTUM_TOKEN" - }, - { - "key": "id", - "value": "1" - } - ] + "info": { + "_postman_id": "f1c7fd3f-8d16-4e57-8dca-aa769839e5c2", + "name": "Reparee API", + "description": "All authenticated API endpoints. Set base_url and auth_token in collection variables.", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "49012308" + }, + "item": [ + { + "name": "Auth", + "item": [ + { + "name": "Login", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"email\": \"admin@admin.com\",\n \"password\": \"12345678\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/login", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "login" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"email\": \"admin@admin.com\",\n \"password\": \"12345678\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/login", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "login" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"token\": \"1|YOUR_SANCTUM_TOKEN\",\n \"user\": {\n \"id\": 1,\n \"name\": \"Admin\",\n \"email\": \"admin@admin.com\"\n }\n}" + } + ] + }, + { + "name": "Profile", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/profile", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "profile" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/profile", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "profile" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": {\n \"id\": 1,\n \"name\": \"Admin\",\n \"email\": \"admin@admin.com\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Logout", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{base_url}}/api/logout", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "logout" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [], + "url": { + "raw": "{{base_url}}/api/logout", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "logout" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Logged out successfully.\"\n}" + } + ] + }, + { + "name": "Home Dashboard", + "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{base_url}}/api/home?period=this_month&financial_period=this_month&work_order_period=this_month&appointment_period=this_month&sales_period=this_month&purchase_period=this_month&upcoming_filter=today&upcoming_per_page=10&upcoming_page=1", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "home" + ], + "query": [ + { + "key": "period", + "value": "this_month" + }, + { + "key": "financial_period", + "value": "this_month" + }, + { + "key": "work_order_period", + "value": "this_month" + }, + { + "key": "appointment_period", + "value": "this_month" + }, + { + "key": "sales_period", + "value": "this_month" + }, + { + "key": "purchase_period", + "value": "this_month" + }, + { + "key": "upcoming_filter", + "value": "today" + }, + { + "key": "upcoming_per_page", + "value": "10" + }, + { + "key": "upcoming_page", + "value": "1" + } + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{base_url}}/api/home?period=this_month&financial_period=this_month&work_order_period=this_month&appointment_period=this_month&sales_period=this_month&purchase_period=this_month&upcoming_filter=today&upcoming_per_page=10&upcoming_page=1", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "home" + ], + "query": [ + { + "key": "period", + "value": "this_month" + }, + { + "key": "financial_period", + "value": "this_month" + }, + { + "key": "work_order_period", + "value": "this_month" + }, + { + "key": "appointment_period", + "value": "this_month" + }, + { + "key": "sales_period", + "value": "this_month" + }, + { + "key": "purchase_period", + "value": "this_month" + }, + { + "key": "upcoming_filter", + "value": "today" + }, + { + "key": "upcoming_per_page", + "value": "10" + }, + { + "key": "upcoming_page", + "value": "1" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"filters\": {\n \"period\": \"this_month\",\n \"start_date\": \"2026-03-01\",\n \"end_date\": \"2026-03-30\",\n \"available_periods\": [\"today\", \"yesterday\", \"this_week\", \"this_month\", \"last_month\", \"last_3_months\", \"last_6_months\", \"last_year\", \"year_to_date\", \"all_time\", \"custom\"]\n },\n \"financial_filters\": {\n \"period\": \"this_month\",\n \"start_date\": \"2026-03-01\",\n \"end_date\": \"2026-03-30\",\n \"available_periods\": [\"today\", \"yesterday\", \"this_week\", \"this_month\", \"last_month\", \"last_3_months\", \"last_6_months\", \"last_year\", \"year_to_date\", \"all_time\", \"custom\"]\n },\n \"work_orders_filters\": {\n \"period\": \"this_month\",\n \"start_date\": \"2026-03-01\",\n \"end_date\": \"2026-03-30\",\n \"available_periods\": [\"today\", \"yesterday\", \"this_week\", \"this_month\", \"last_month\", \"last_3_months\", \"last_6_months\", \"last_year\", \"year_to_date\", \"all_time\", \"custom\"]\n },\n \"appointments_filters\": {\n \"period\": \"this_month\",\n \"start_date\": \"2026-03-01\",\n \"end_date\": \"2026-03-30\",\n \"available_periods\": [\"today\", \"yesterday\", \"this_week\", \"this_month\", \"last_month\", \"last_3_months\", \"last_6_months\", \"last_year\", \"year_to_date\", \"all_time\", \"custom\"]\n },\n \"sales_filters\": {\n \"period\": \"this_month\",\n \"start_date\": \"2026-03-01\",\n \"end_date\": \"2026-03-30\",\n \"available_periods\": [\"today\", \"yesterday\", \"this_week\", \"this_month\", \"last_month\", \"last_3_months\", \"last_6_months\", \"last_year\", \"year_to_date\", \"all_time\", \"custom\"]\n },\n \"purchase_filters\": {\n \"period\": \"this_month\",\n \"start_date\": \"2026-03-01\",\n \"end_date\": \"2026-03-30\",\n \"available_periods\": [\"today\", \"yesterday\", \"this_week\", \"this_month\", \"last_month\", \"last_3_months\", \"last_6_months\", \"last_year\", \"year_to_date\", \"all_time\", \"custom\"]\n },\n \"chart\": {\n \"currency\": \"AED\",\n \"series\": [\n { \"date\": \"2026-03-29\", \"income\": 25000, \"expense\": 0 },\n { \"date\": \"2026-03-30\", \"income\": 0, \"expense\": 0 }\n ]\n },\n \"totals\": {\n \"currency\": \"AED\",\n \"income\": 25000,\n \"expense\": 0,\n \"total_income_text\": \"AED 25,000.00\",\n \"total_expense_text\": \"AED 0.00\"\n },\n \"financial_summary\": {\n \"currency\": \"AED\",\n \"chart\": [\n { \"label\": \"Invoices\", \"count\": 1, \"amount\": 25000 },\n { \"label\": \"Expenses\", \"count\": 0, \"amount\": 0 },\n { \"label\": \"Bills\", \"count\": 0, \"amount\": 0 }\n ]\n },\n \"work_orders_status\": {\n \"currency\": \"AED\",\n \"cards\": [\n { \"status\": \"draft\", \"label\": \"Draft\", \"count\": 1, \"orders_text\": \"1 Orders\", \"amount\": 0, \"amount_text\": \"AED 0.00\" },\n { \"status\": \"check_in\", \"label\": \"Check In\", \"count\": 1, \"orders_text\": \"1 Orders\", \"amount\": 0, \"amount_text\": \"AED 0.00\" }\n ],\n \"totals\": { \"orders\": 2, \"orders_text\": \"2 Orders\", \"amount\": 0, \"amount_text\": \"AED 0.00\" }\n },\n \"appointments_summary\": {\n \"totals\": {\n \"completed\": { \"count\": 0, \"text\": \"0 Appt.\" },\n \"no_shows\": { \"count\": 0, \"text\": \"0 Appt.\" },\n \"no_shows_rate\": { \"value\": 0, \"text\": \"0%\" },\n \"cancelled\": { \"count\": 0, \"text\": \"0 Appt.\" }\n }\n },\n \"upcoming_appointments\": {\n \"selected_filter\": \"today\",\n \"pagination\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 10,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1,\n \"filter\": \"today\"\n },\n \"today\": {\n \"count\": 1,\n \"text\": \"1 Appt.\",\n \"date\": \"2026-03-30\",\n \"details\": [\n {\n \"id\": 1,\n \"job_card_id\": 1,\n \"title\": \"Oil Change Appointment\",\n \"date\": \"2026-03-30\",\n \"from_time\": \"10:00:00\",\n \"to_time\": \"11:00:00\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"service_writer_id\": 1,\n \"technician_id\": 2,\n \"department_id\": 1,\n \"status\": \"confirmed\",\n \"notes\": \"Customer requested quick service\"\n }\n ]\n },\n \"tomorrow\": { \"count\": 0, \"text\": \"0 Appt.\", \"date\": \"2026-03-31\", \"details\": [] },\n \"this_week\": { \"count\": 1, \"text\": \"1 Appt.\", \"start_date\": \"2026-03-30\", \"end_date\": \"2026-04-05\", \"details\": [] },\n \"next_week\": { \"count\": 0, \"text\": \"0 Appt.\", \"start_date\": \"2026-04-06\", \"end_date\": \"2026-04-12\", \"details\": [] }\n },\n \"items_totals\": { \"parts\": 10, \"services\": 8, \"service_groups\": 3, \"total_items\": 21 },\n \"customers_totals\": { \"individuals\": 5, \"companies\": 2, \"fleets\": 1, \"insurers\": 1, \"total_customers\": 9 },\n \"body_types_vehicle_totals\": [\n { \"body_type_id\": 1, \"body_type\": \"Sedan\", \"vehicles_count\": 4 }\n ],\n \"make_model_vehicle_totals\": {\n \"makes\": [{ \"make\": \"Toyota\", \"vehicles_count\": 3 }],\n \"models\": [{ \"make\": \"Toyota\", \"model\": \"Camry\", \"vehicles_count\": 2 }]\n },\n \"sales_totals\": { \"inspections\": 2, \"estimates\": 1, \"invoices\": 1, \"total_sales_documents\": 4 },\n \"purchase_totals\": { \"purchase_orders\": 1, \"bills\": 0, \"expenses\": 0, \"total_purchase_documents\": 1 }\n}" + } + ] + } + ] + }, + { + "name": "Referral Sources", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/referral-sources", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "referral-sources" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/referral-sources", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "referral-sources" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": {\n \"current_page\": 1,\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Website\",\n \"is_default\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"first_page_url\": \"http://localhost:8000/api/referral-sources?page=1\",\n \"from\": 1,\n \"last_page\": 1,\n \"last_page_url\": \"http://localhost:8000/api/referral-sources?page=1\",\n \"links\": [],\n \"next_page_url\": null,\n \"path\": \"http://localhost:8000/api/referral-sources\",\n \"per_page\": 10,\n \"prev_page_url\": null,\n \"to\": 1,\n \"total\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Website\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/referral-sources", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "referral-sources" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Website\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/referral-sources", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "referral-sources" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Referral source created successfully.\",\n \"data\": {\n \"id\": 2,\n \"name\": \"Walk-in\",\n \"is_default\": false,\n \"created_at\": \"2026-03-23T12:05:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:05:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Website\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/referral-sources/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "referral-sources", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Website\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/referral-sources/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "referral-sources", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Referral source updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Website Ads\",\n \"is_default\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/referral-sources/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "referral-sources", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/referral-sources/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "referral-sources", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Referral source deleted successfully.\"\n}" + } + ] + }, + { + "name": "Set Default", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-default-referral-source", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-default-referral-source" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-default-referral-source", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-default-referral-source" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Default referral source updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Website\",\n \"is_default\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:15:00.000000Z\"\n }\n}" + } + ] + } + ] + }, + { + "name": "Customers", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/customers", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "customers" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/customers", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "customers" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"customer_type_id\": 1,\n \"salutation\": \"Mr\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"company_name\": \"Doe Holdings\",\n \"email\": \"john@example.com\",\n \"phone\": \"0501234567\",\n \"alternate_phone\": \"0551234567\",\n \"opening_balance\": 0,\n \"credit_limit\": 5000,\n \"website\": \"https://example.com\",\n \"referral_source_id\": 1,\n \"payment_terms_id\": 1,\n \"address_line_1\": \"Street 10\",\n \"address_line_2\": \"Near Central Plaza\",\n \"country_id\": 1,\n \"state_id\": 1,\n \"city\": \"Dubai\",\n \"zip_code\": \"00000\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"customer_type\": {\n \"id\": 1,\n \"name\": \"Retail\"\n },\n \"referral_source\": {\n \"id\": 1,\n \"name\": \"Website\"\n },\n \"payment_term\": {\n \"id\": 1,\n \"title\": \"Net 30\",\n \"days\": 30\n },\n \"country\": {\n \"id\": 1,\n \"name\": \"United Arab Emirates\",\n \"code\": \"AE\"\n },\n \"state\": {\n \"id\": 1,\n \"name\": \"Dubai\",\n \"code\": \"DU\"\n }\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Show", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/customers/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "customers", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/customers/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "customers", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": {\n \"id\": 1,\n \"customer_type_id\": 1,\n \"salutation\": \"Mr\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"company_name\": \"Doe Holdings\",\n \"email\": \"john@example.com\",\n \"phone\": \"0501234567\",\n \"alternate_phone\": \"0551234567\",\n \"opening_balance\": 0,\n \"credit_limit\": 5000,\n \"website\": \"https://example.com\",\n \"referral_source_id\": 1,\n \"payment_terms_id\": 1,\n \"address_line_1\": \"Street 10\",\n \"address_line_2\": \"Near Central Plaza\",\n \"country_id\": 1,\n \"state_id\": 1,\n \"city\": \"Dubai\",\n \"zip_code\": \"00000\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"customer_type\": {\n \"id\": 1,\n \"name\": \"Retail\"\n },\n \"referral_source\": {\n \"id\": 1,\n \"name\": \"Website\"\n },\n \"payment_term\": {\n \"id\": 1,\n \"title\": \"Net 30\",\n \"days\": 30\n },\n \"country\": {\n \"id\": 1,\n \"name\": \"United Arab Emirates\",\n \"code\": \"AE\"\n },\n \"state\": {\n \"id\": 1,\n \"name\": \"Dubai\",\n \"code\": \"DU\"\n }\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"customer_type_id\": 1,\n \"salutation\": \"Mr\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"company_name\": \"Doe Holdings\",\n \"email\": \"john@example.com\",\n \"phone\": \"0501234567\",\n \"alternate_phone\": \"0551234567\",\n \"referral_source_id\": 1,\n \"payment_terms_id\": 1,\n \"address_line_1\": \"Street 10\",\n \"address_line_2\": \"Near Central Plaza\",\n \"country_id\": 1,\n \"state_id\": 1,\n \"city\": \"Dubai\",\n \"zip_code\": \"00000\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/customers", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "customers" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"customer_type_id\": 1,\n \"salutation\": \"Mr\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"company_name\": \"Doe Holdings\",\n \"email\": \"john@example.com\",\n \"phone\": \"0501234567\",\n \"alternate_phone\": \"0551234567\",\n \"referral_source_id\": 1,\n \"payment_terms_id\": 1,\n \"address_line_1\": \"Street 10\",\n \"address_line_2\": \"Near Central Plaza\",\n \"country_id\": 1,\n \"state_id\": 1,\n \"city\": \"Dubai\",\n \"zip_code\": \"00000\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/customers", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "customers" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Customer created successfully.\",\n \"data\": {\n \"id\": 2,\n \"customer_type_id\": 1,\n \"salutation\": \"Mr\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"company_name\": \"Doe Holdings\",\n \"email\": \"john@example.com\",\n \"phone\": \"0501234567\",\n \"alternate_phone\": \"0551234567\",\n \"opening_balance\": 0,\n \"credit_limit\": 5000,\n \"website\": \"https://example.com\",\n \"referral_source_id\": 1,\n \"payment_terms_id\": 1,\n \"address_line_1\": \"Street 10\",\n \"address_line_2\": \"Near Central Plaza\",\n \"country_id\": 1,\n \"state_id\": 1,\n \"city\": \"Dubai\",\n \"zip_code\": \"00000\",\n \"created_at\": \"2026-03-23T12:20:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:20:00.000000Z\",\n \"customer_type\": {\n \"id\": 1,\n \"name\": \"Retail\"\n },\n \"referral_source\": {\n \"id\": 1,\n \"name\": \"Website\"\n },\n \"payment_term\": {\n \"id\": 1,\n \"title\": \"Net 30\",\n \"days\": 30\n },\n \"country\": {\n \"id\": 1,\n \"name\": \"United Arab Emirates\",\n \"code\": \"AE\"\n },\n \"state\": {\n \"id\": 1,\n \"name\": \"Dubai\",\n \"code\": \"DU\"\n }\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"first_name\": \"John\",\n \"last_name\": \"Doe\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/customers/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "customers", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"first_name\": \"John\",\n \"last_name\": \"Doe\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/customers/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "customers", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Customer updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"customer_type_id\": 1,\n \"salutation\": \"Mr\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"company_name\": \"Doe Holdings\",\n \"email\": \"john@example.com\",\n \"phone\": \"0501234567\",\n \"alternate_phone\": \"0551234567\",\n \"opening_balance\": 0,\n \"credit_limit\": 5000,\n \"website\": \"https://example.com\",\n \"referral_source_id\": 1,\n \"payment_terms_id\": 1,\n \"address_line_1\": \"Street 10\",\n \"address_line_2\": \"Near Central Plaza\",\n \"country_id\": 1,\n \"state_id\": 1,\n \"city\": \"Dubai\",\n \"zip_code\": \"00000\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:30:00.000000Z\",\n \"customer_type\": {\n \"id\": 1,\n \"name\": \"Retail\"\n },\n \"referral_source\": {\n \"id\": 1,\n \"name\": \"Website\"\n },\n \"payment_term\": {\n \"id\": 1,\n \"title\": \"Net 30\",\n \"days\": 30\n },\n \"country\": {\n \"id\": 1,\n \"name\": \"United Arab Emirates\",\n \"code\": \"AE\"\n },\n \"state\": {\n \"id\": 1,\n \"name\": \"Dubai\",\n \"code\": \"DU\"\n }\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/customers/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "customers", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/customers/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "customers", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Customer deleted successfully.\"\n}" + } + ] + }, + { + "name": "Export", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/customers/export", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "customers", + "export" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/customers/export", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "customers", + "export" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Customers export generated successfully.\",\n \"data\": {\n \"file_name\": \"customers-2026-03-23-123000.xlsx\"\n }\n}" + } + ] + }, + { + "name": "Import", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/customers/import", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "customers", + "import" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/customers/import", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "customers", + "import" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Customer import completed successfully.\",\n \"data\": {\n \"imported_count\": 10,\n \"failed_count\": 1,\n \"failed_rows\": [\n {\n \"row\": 4,\n \"errors\": [\n \"The email has already been taken.\"\n ],\n \"values\": {\n \"email\": \"dup@example.com\"\n }\n }\n ]\n }\n}" + } + ] + }, + { + "name": "Add Note", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"note\": \"Customer prefers afternoon appointments.\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/customers/{{id}}/add-note", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "customers", + "{{id}}", + "add-note" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"note\": \"Customer prefers afternoon appointments.\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/customers/{{id}}/add-note", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "customers", + "{{id}}", + "add-note" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Customer note added successfully.\",\n \"data\": {\n \"id\": 1,\n \"customer_id\": 1,\n \"note\": \"Customer prefers afternoon appointments.\",\n \"created_at\": \"2026-03-27T15:00:00.000000Z\",\n \"updated_at\": \"2026-03-27T15:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete Note", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"note_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/customers/{{id}}/delete-note", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "customers", + "{{id}}", + "delete-note" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"note_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/customers/{{id}}/delete-note", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "customers", + "{{id}}", + "delete-note" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Customer note deleted successfully.\"\n}" + } + ] + }, + { + "name": "Update Permissions", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"can_view_customers\": true,\n \"can_create_customers\": false,\n \"can_update_customers\": true,\n \"can_delete_customers\": false,\n \"can_view_invoices\": true,\n \"can_create_invoices\": false\n}" + }, + "url": { + "raw": "{{base_url}}/api/customers/{{id}}/update-permissions", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "customers", + "{{id}}", + "update-permissions" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"can_view_customers\": true,\n \"can_create_customers\": false,\n \"can_update_customers\": true,\n \"can_delete_customers\": false,\n \"can_view_invoices\": true,\n \"can_create_invoices\": false\n}" + }, + "url": { + "raw": "{{base_url}}/api/customers/{{id}}/update-permissions", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "customers", + "{{id}}", + "update-permissions" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Customer permissions updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john@example.com\",\n \"can_view_customers\": true,\n \"can_create_customers\": false,\n \"can_update_customers\": true,\n \"can_delete_customers\": false,\n \"can_view_invoices\": true,\n \"can_create_invoices\": false,\n \"updated_at\": \"2026-03-27T16:00:00.000000Z\"\n }\n}" + }, + { + "name": "Validation Failed Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"can_view_customers\": true,\n \"can_create_customers\": false,\n \"can_update_customers\": true,\n \"can_delete_customers\": false,\n \"can_view_invoices\": true,\n \"can_create_invoices\": false\n}" + }, + "url": { + "raw": "{{base_url}}/api/customers/{{id}}/update-permissions", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "customers", + "{{id}}", + "update-permissions" + ] + } + }, + "status": "Unprocessable Entity", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Validation failed.\",\n \"errors\": {\n \"permissions\": [\n \"At least one permission field (can_*) is required.\"\n ]\n }\n}" + } + ] + } + ] + }, + { + "name": "Customer Types", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/customer-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "customer-types" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/customer-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "customer-types" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Retail\"\n }\n ]\n}" + } + ] + } + ] + }, + { + "name": "Countries & States", + "item": [ + { + "name": "Countries", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/countries", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "countries" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/countries", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "countries" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"United Arab Emirates\",\n \"code\": \"AE\"\n },\n {\n \"id\": 2,\n \"name\": \"Saudi Arabia\",\n \"code\": \"SA\"\n }\n ]\n}" + } + ] + }, + { + "name": "States", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/states", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "states" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/states", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "states" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"country_id\": 1,\n \"name\": \"Dubai\",\n \"code\": \"DU\",\n \"country\": {\n \"id\": 1,\n \"name\": \"United Arab Emirates\",\n \"code\": \"AE\"\n }\n },\n {\n \"id\": 2,\n \"country_id\": 1,\n \"name\": \"Abu Dhabi\",\n \"code\": \"AZ\",\n \"country\": {\n \"id\": 1,\n \"name\": \"United Arab Emirates\",\n \"code\": \"AE\"\n }\n }\n ]\n}" + } + ] + } + ] + }, + { + "name": "Payment Terms", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/payment-terms", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-terms" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/payment-terms", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-terms" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"vehicle_body_type_id\": 1,\n \"vehicle_fuel_type_id\": 1,\n \"vehicle_transmission_id\": 1,\n \"vehicle_color_id\": 1,\n \"image\": null,\n \"image_url\": null,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": \"2024\",\n \"sub_model\": \"LE\",\n \"license_plate\": \"ABC-123\",\n \"vin_number\": \"1HGBH41JXMN109186\",\n \"engine_number\": null,\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"reg_date\": null,\n \"mfg_date\": null,\n \"parked_at\": null,\n \"mileage\": \"10000\",\n \"owners_number\": \"1\",\n \"front_tire_size\": null,\n \"rear_tire_size\": null,\n \"note\": \"New vehicle\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"vehicle_body_type\": {\n \"id\": 1,\n \"title\": \"Sedan\"\n },\n \"vehicle_fuel_type\": {\n \"id\": 1,\n \"title\": \"Petrol\"\n },\n \"vehicle_transmission\": {\n \"id\": 1,\n \"title\": \"Automatic\"\n },\n \"vehicle_color\": {\n \"id\": 1,\n \"title\": \"Red\",\n \"code\": \"RD\"\n }\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Net 30\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/payment-terms", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-terms" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Net 30\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/payment-terms", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-terms" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Net 30\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/payment-terms/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-terms", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Net 30\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/payment-terms/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-terms", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Black\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/payment-terms/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-terms", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/payment-terms/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-terms", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Set Default", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-default-payment-term", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-default-payment-term" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-default-payment-term", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-default-payment-term" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Black\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + } + ] + }, + { + "name": "Shop Types", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/shop-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-types" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/shop-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-types" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"title\": \"Main Workshop\",\n \"shop_type\": \"Car\",\n \"note\": \"General automotive services\",\n \"inspection\": \"shop_types/inspection/inspection-template.pdf\",\n \"image\": \"shop_types/image/shop-type-car.jpg\",\n \"is_default\": true,\n \"created_at\": \"2026-03-24T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T12:00:00.000000Z\"\n }\n ]\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "title", + "value": "Main Workshop", + "type": "text" + }, + { + "key": "shop_type", + "value": "Car", + "type": "text" + }, + { + "key": "note", + "value": "General automotive services", + "type": "text" + }, + { + "key": "is_default", + "value": "1", + "type": "text" + }, + { + "key": "inspection", + "value": "", + "type": "file" + }, + { + "key": "image", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/shop-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-types" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "title", + "value": "Main Workshop", + "type": "text" + }, + { + "key": "shop_type", + "value": "Car", + "type": "text" + }, + { + "key": "note", + "value": "General automotive services", + "type": "text" + }, + { + "key": "is_default", + "value": "1", + "type": "text" + }, + { + "key": "inspection", + "value": "", + "type": "file" + }, + { + "key": "image", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/shop-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-types" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Shop type created successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Main Workshop\",\n \"shop_type\": \"Car\",\n \"note\": \"General automotive services\",\n \"inspection\": \"shop_types/inspection/inspection-template.pdf\",\n \"image\": \"shop_types/image/shop-type-car.jpg\",\n \"is_default\": true,\n \"created_at\": \"2026-03-24T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "_method", + "value": "PUT", + "type": "text" + }, + { + "key": "title", + "value": "Main Workshop Updated", + "type": "text" + }, + { + "key": "shop_type", + "value": "Car", + "type": "text" + }, + { + "key": "note", + "value": "Updated note", + "type": "text" + }, + { + "key": "is_default", + "value": "0", + "type": "text" + }, + { + "key": "inspection", + "value": "", + "type": "file" + }, + { + "key": "image", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/shop-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-types", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "_method", + "value": "PUT", + "type": "text" + }, + { + "key": "title", + "value": "Main Workshop Updated", + "type": "text" + }, + { + "key": "shop_type", + "value": "Car", + "type": "text" + }, + { + "key": "note", + "value": "Updated note", + "type": "text" + }, + { + "key": "is_default", + "value": "0", + "type": "text" + }, + { + "key": "inspection", + "value": "", + "type": "file" + }, + { + "key": "image", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/shop-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-types", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Shop type updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Main Workshop Updated\",\n \"shop_type\": \"Car\",\n \"note\": \"Updated note\",\n \"inspection\": \"shop_types/inspection/inspection-template-v2.pdf\",\n \"image\": \"shop_types/image/shop-type-car-v2.jpg\",\n \"is_default\": false,\n \"created_at\": \"2026-03-24T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/shop-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-types", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/shop-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-types", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Shop type deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Vehicle Body Types", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-body-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-body-types" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-body-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-body-types" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"category_id\": 1,\n \"labor_name\": \"Oil Change\",\n \"service_code\": \"SVC-001\",\n \"unit_type_id\": 1,\n \"labor_matrix\": \"Standard\",\n \"description\": \"Full synthetic oil change\",\n \"department_id\": 1,\n \"sales_information\": false,\n \"rate_type\": null,\n \"labor_rate_id\": null,\n \"labor_hours\": null,\n \"sales_chart_of_account\": null,\n \"selling_price\": \"75.00\",\n \"purchase_information\": false,\n \"purchase_chart_of_account\": null,\n \"purchase_preferred_vendor_id\": null,\n \"purchase_price\": null,\n \"is_active\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"category\": {\n \"id\": 1,\n \"title\": \"Oil & Maintenance\"\n },\n \"unit_type\": {\n \"id\": 1,\n \"title\": \"Hour\"\n },\n \"department\": {\n \"id\": 1,\n \"name\": \"Service Department\"\n },\n \"labor_rate\": null\n }\n ]\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Sedan\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-body-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-body-types" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Sedan\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-body-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-body-types" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"category_id\": 1,\n \"labor_name\": \"Oil Change\",\n \"service_code\": \"SVC-001\",\n \"unit_type_id\": 1,\n \"labor_matrix\": \"Standard\",\n \"description\": \"Full synthetic oil change\",\n \"department_id\": 1,\n \"sales_information\": false,\n \"rate_type\": null,\n \"labor_rate_id\": null,\n \"labor_hours\": null,\n \"sales_chart_of_account\": null,\n \"selling_price\": \"75.00\",\n \"purchase_information\": false,\n \"purchase_chart_of_account\": null,\n \"purchase_preferred_vendor_id\": null,\n \"purchase_price\": null,\n \"is_active\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"category\": {\n \"id\": 1,\n \"title\": \"Oil & Maintenance\"\n },\n \"unit_type\": {\n \"id\": 1,\n \"title\": \"Hour\"\n },\n \"department\": {\n \"id\": 1,\n \"name\": \"Service Department\"\n },\n \"labor_rate\": null\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Sedan\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-body-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-body-types", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Sedan\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-body-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-body-types", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"category_id\": 1,\n \"labor_name\": \"Oil Change Premium\",\n \"service_code\": \"SVC-001\",\n \"unit_type_id\": 1,\n \"labor_matrix\": \"Standard\",\n \"description\": \"Full synthetic oil change\",\n \"department_id\": 1,\n \"sales_information\": false,\n \"rate_type\": null,\n \"labor_rate_id\": null,\n \"labor_hours\": null,\n \"sales_chart_of_account\": null,\n \"selling_price\": \"85.00\",\n \"purchase_information\": false,\n \"purchase_chart_of_account\": null,\n \"purchase_preferred_vendor_id\": null,\n \"purchase_price\": null,\n \"is_active\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"category\": {\n \"id\": 1,\n \"title\": \"Oil & Maintenance\"\n },\n \"unit_type\": {\n \"id\": 1,\n \"title\": \"Hour\"\n },\n \"department\": {\n \"id\": 1,\n \"name\": \"Service Department\"\n },\n \"labor_rate\": null\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-body-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-body-types", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-body-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-body-types", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Vehicle Fuel Types", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-fuel-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-fuel-types" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-fuel-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-fuel-types" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"title\": \"Gasoline\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ]\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Gasoline\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-fuel-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-fuel-types" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Gasoline\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-fuel-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-fuel-types" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Gasoline\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Gasoline\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-fuel-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-fuel-types", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Gasoline\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-fuel-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-fuel-types", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Gasoline\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-fuel-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-fuel-types", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-fuel-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-fuel-types", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Vehicle Transmissions", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-transmissions", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-transmissions" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-transmissions", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-transmissions" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"title\": \"Automatic\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Automatic\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-transmissions", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-transmissions" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Automatic\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-transmissions", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-transmissions" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Automatic\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Automatic\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-transmissions/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-transmissions", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Automatic\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-transmissions/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-transmissions", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Automatic\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-transmissions/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-transmissions", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-transmissions/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-transmissions", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Vehicle Colors", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-colors", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-colors" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-colors", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-colors" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"title\": \"Black\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Black\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-colors", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-colors" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Black\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-colors", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-colors" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Black\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Black\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-colors/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-colors", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Black\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-colors/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-colors", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Black\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-colors/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-colors", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-colors/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-colors", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Vehicles", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicles", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicles" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicles", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicles" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"sales_person_id\": 1,\n \"status\": \"draft\",\n \"department_id\": 1,\n \"check_in_date\": \"2026-03-18\",\n \"km_in\": 50000,\n \"tax_inclusive\": \"Tax Inclusive\",\n \"discount_type\": \"no\",\n \"discount_at\": \"inclusive_of_tax\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"labels\": [],\n \"documents\": [],\n \"purchase_orders_count\": 0,\n \"bills_count\": 0,\n \"expenses_count\": 0,\n \"tasks_count\": 0,\n \"appointments_count\": 0\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Show", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicles/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicles", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicles/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicles", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"vehicle_body_type_id\": 1,\n \"vehicle_fuel_type_id\": 1,\n \"vehicle_transmission_id\": 1,\n \"vehicle_color_id\": 1,\n \"image\": null,\n \"image_url\": null,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": \"2024\",\n \"sub_model\": \"LE\",\n \"license_plate\": \"ABC-123\",\n \"vin_number\": \"1HGBH41JXMN109186\",\n \"engine_number\": null,\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"reg_date\": null,\n \"mfg_date\": null,\n \"parked_at\": null,\n \"mileage\": \"10000\",\n \"owners_number\": \"1\",\n \"front_tire_size\": null,\n \"rear_tire_size\": null,\n \"note\": \"New vehicle\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"vehicle_body_type\": {\n \"id\": 1,\n \"title\": \"Sedan\"\n },\n \"vehicle_fuel_type\": {\n \"id\": 1,\n \"title\": \"Petrol\"\n },\n \"vehicle_transmission\": {\n \"id\": 1,\n \"title\": \"Automatic\"\n },\n \"vehicle_color\": {\n \"id\": 1,\n \"title\": \"Red\",\n \"code\": \"RD\"\n }\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"shop_type_id\": 1,\n \"vehicle_body_type_id\": 1,\n \"vehicle_fuel_type_id\": 1,\n \"vehicle_transmission_id\": 1,\n \"vehicle_color_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": \"2024\",\n \"sub_model\": \"LE\",\n \"license_plate\": \"ABC-123\",\n \"vin_number\": \"1HGBH41JXMN109186\",\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"mileage\": \"10000\",\n \"owners_number\": \"1\",\n \"note\": \"New vehicle\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicles", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicles" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"shop_type_id\": 1,\n \"vehicle_body_type_id\": 1,\n \"vehicle_fuel_type_id\": 1,\n \"vehicle_transmission_id\": 1,\n \"vehicle_color_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"image\": null,\n \"year\": \"2024\",\n \"sub_model\": \"LE\",\n \"license_plate\": \"ABC-123\",\n \"vin_number\": \"1HGBH41JXMN109186\",\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"mileage\": \"10000\",\n \"owners_number\": \"1\",\n \"note\": \"New vehicle\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicles", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicles" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"vehicle_body_type_id\": 1,\n \"vehicle_fuel_type_id\": 1,\n \"vehicle_transmission_id\": 1,\n \"vehicle_color_id\": 1,\n \"image\": null,\n \"image_url\": null,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": \"2024\",\n \"sub_model\": \"LE\",\n \"license_plate\": \"ABC-123\",\n \"vin_number\": \"1HGBH41JXMN109186\",\n \"engine_number\": null,\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"reg_date\": null,\n \"mfg_date\": null,\n \"parked_at\": null,\n \"mileage\": \"10000\",\n \"owners_number\": \"1\",\n \"front_tire_size\": null,\n \"rear_tire_size\": null,\n \"note\": \"New vehicle\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"vehicle_body_type\": {\n \"id\": 1,\n \"title\": \"Sedan\"\n },\n \"vehicle_fuel_type\": {\n \"id\": 1,\n \"title\": \"Petrol\"\n },\n \"vehicle_transmission\": {\n \"id\": 1,\n \"title\": \"Automatic\"\n },\n \"vehicle_color\": {\n \"id\": 1,\n \"title\": \"Red\",\n \"code\": \"RD\"\n }\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"mileage\": \"12000\",\n \"license_plate\": \"ABC-123\",\n \"drivetrain\": \"FWD\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicles/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicles", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"mileage\": \"12000\",\n \"license_plate\": \"ABC-123\",\n \"drivetrain\": \"FWD\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicles/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicles", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"vehicle_body_type_id\": 1,\n \"vehicle_fuel_type_id\": 1,\n \"vehicle_transmission_id\": 1,\n \"vehicle_color_id\": 1,\n \"image\": null,\n \"image_url\": null,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": \"2024\",\n \"sub_model\": \"LE\",\n \"license_plate\": \"ABC-123\",\n \"vin_number\": \"1HGBH41JXMN109186\",\n \"engine_number\": null,\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"reg_date\": null,\n \"mfg_date\": null,\n \"parked_at\": null,\n \"mileage\": \"12000\",\n \"owners_number\": \"1\",\n \"front_tire_size\": null,\n \"rear_tire_size\": null,\n \"note\": \"New vehicle\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"vehicle_body_type\": {\n \"id\": 1,\n \"title\": \"Sedan\"\n },\n \"vehicle_fuel_type\": {\n \"id\": 1,\n \"title\": \"Petrol\"\n },\n \"vehicle_transmission\": {\n \"id\": 1,\n \"title\": \"Automatic\"\n },\n \"vehicle_color\": {\n \"id\": 1,\n \"title\": \"Red\",\n \"code\": \"RD\"\n }\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicles/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicles", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicles/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicles", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Export", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicles/export", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicles", + "export" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicles/export", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicles", + "export" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"customer_type_id\": 1,\n \"salutation\": \"Mr\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john@example.com\",\n \"phone\": \"0501234567\",\n \"alternate_phone\": \"0551234567\",\n \"address_line_1\": \"Street 10\",\n \"address_line_2\": \"Near Central Plaza\",\n \"country_id\": 1,\n \"state_id\": 1,\n \"city\": \"Dubai\",\n \"zip_code\": \"00000\"\n }\n ],\n \"pagination\": {\n \"current_page\": 1,\n \"first_page_url\": \"{{base_url}}/api/get-vehicle-owners?page=1\",\n \"from\": 1,\n \"last_page_url\": \"{{base_url}}/api/get-vehicle-owners?page=1\",\n \"next_page_url\": null,\n \"path\": \"{{base_url}}/api/get-vehicle-owners\",\n \"per_page\": 10,\n \"prev_page_url\": null,\n \"to\": 1,\n \"total\": 1\n }\n}" + } + ] + }, + { + "name": "Import", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/vehicles/import", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicles", + "import" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/vehicles/import", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicles", + "import" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Import completed successfully.\",\n \"data\": {\n \"imported_count\": 10,\n \"failed_count\": 1,\n \"failed_rows\": [\n {\n \"row\": 4,\n \"errors\": [\n \"The service code has already been taken.\"\n ],\n \"values\": {\n \"service_code\": \"SVC-001\"\n }\n }\n ]\n }\n}" + } + ] + }, + { + "name": "Get Makes", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/get-makes?shop_type_id=1", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "get-makes" + ], + "query": [ + { + "key": "shop_type_id", + "value": "1" + } + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/get-makes?shop_type_id=1", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "get-makes" + ], + "query": [ + { + "key": "shop_type_id", + "value": "1" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n \"Toyota\",\n \"Honda\"\n ]\n}" + } + ] + }, + { + "name": "Get Models", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/get-models?make=Toyota", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "get-models" + ], + "query": [ + { + "key": "make", + "value": "Toyota" + } + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/get-models?make=Toyota", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "get-models" + ], + "query": [ + { + "key": "make", + "value": "Toyota" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n \"Camry\",\n \"Corolla\"\n ]\n}" + }, + { + "name": "Validation Failed Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/get-models?make=Toyota", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "get-models" + ], + "query": [ + { + "key": "make", + "value": "Toyota" + } + ] + } + }, + "status": "Unprocessable Entity", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Validation failed.\",\n \"errors\": {\n \"make\": [\n \"The make field is required.\"\n ]\n }\n}" + } + ] + }, + { + "name": "Get Vehicle Owners", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/get-vehicle-owners", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "get-vehicle-owners" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/get-vehicle-owners", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "get-vehicle-owners" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Link Customer to Vehicle", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"customer_id\": 1,\n \"vehicle_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/link-customer-to-vehicle", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "link-customer-to-vehicle" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"customer_id\": 1,\n \"vehicle_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/link-customer-to-vehicle", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "link-customer-to-vehicle" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"vehicle_body_type_id\": 1,\n \"vehicle_fuel_type_id\": 1,\n \"vehicle_transmission_id\": 1,\n \"vehicle_color_id\": 1,\n \"image\": null,\n \"image_url\": null,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": \"2024\",\n \"sub_model\": \"LE\",\n \"license_plate\": \"ABC-123\",\n \"vin_number\": \"1HGBH41JXMN109186\",\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"mileage\": \"10000\",\n \"note\": \"New vehicle\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"customers\": [\n {\n \"id\": 1,\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john@example.com\"\n }\n ]\n }\n}" + } + ] + }, + { + "name": "Unlink Customer from Vehicle", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"customer_id\": 1,\n \"vehicle_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/unlink-customer-from-vehicle", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "unlink-customer-from-vehicle" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"customer_id\": 1,\n \"vehicle_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/unlink-customer-from-vehicle", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "unlink-customer-from-vehicle" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Removed successfully.\",\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"vehicle_body_type_id\": 1,\n \"vehicle_fuel_type_id\": 1,\n \"vehicle_transmission_id\": 1,\n \"vehicle_color_id\": 1,\n \"image\": null,\n \"image_url\": null,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": \"2024\",\n \"sub_model\": \"LE\",\n \"license_plate\": \"ABC-123\",\n \"vin_number\": \"1HGBH41JXMN109186\",\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"mileage\": \"10000\",\n \"note\": \"New vehicle\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"customers\": []\n }\n}" + } + ] + } + ] + }, + { + "name": "Document Types", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/document-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "document-types" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/document-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "document-types" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Registration\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/document-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "document-types" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Registration\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/document-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "document-types" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Customer remark updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"customer_remarks\": [\n {\n \"id\": 1,\n \"job_card_id\": 1,\n \"remark\": \"Updated remark\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n ]\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Registration\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/document-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "document-types", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Registration\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/document-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "document-types", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/document-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "document-types", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/document-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "document-types", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Customer remark deleted successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"customer_remarks\": []\n }\n}" + } + ] + } + ] + }, + { + "name": "Vehicle Documents", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-documents", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-documents" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-documents", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-documents" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"vehicle_id\": 1,\n \"document_type_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-documents", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-documents" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"vehicle_id\": 1,\n \"document_type_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-documents", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-documents" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Shop recommendation added successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"shop_recommendations\": [\n {\n \"id\": 1,\n \"job_card_id\": 1,\n \"recommendation\": \"Replace brake pads\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ]\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-documents/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-documents", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-documents/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-documents", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-documents/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-documents", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-documents/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-documents", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Vehicle Mile and Kms", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-mile-and-kms", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-mile-and-kms" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-mile-and-kms", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-mile-and-kms" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"vehicle_id\": 1,\n \"mileage\": 50000\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-mile-and-kms", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-mile-and-kms" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"vehicle_id\": 1,\n \"mileage\": 50000\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-mile-and-kms", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-mile-and-kms" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Shop recommendation updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"shop_recommendations\": [\n {\n \"id\": 1,\n \"job_card_id\": 1,\n \"recommendation\": \"Updated recommendation\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n ]\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"mileage\": 51000\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-mile-and-kms/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-mile-and-kms", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"mileage\": 51000\n}" + }, + "url": { + "raw": "{{base_url}}/api/vehicle-mile-and-kms/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-mile-and-kms", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-mile-and-kms/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-mile-and-kms", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/vehicle-mile-and-kms/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vehicle-mile-and-kms", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Shop recommendation deleted successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"shop_recommendations\": []\n }\n}" + } + ] + } + ] + }, + { + "name": "Departments", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/departments", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "departments" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/departments", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "departments" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"Mechanical\",\n \"assignment_type\": \"bays\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/departments", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "departments" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"Mechanical\",\n \"assignment_type\": \"bays\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/departments", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "departments" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Customer remark added successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"customer_remarks\": [\n {\n \"id\": 1,\n \"job_card_id\": 1,\n \"remark\": \"Customer requested wash\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ]\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"Mechanical\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/departments/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "departments", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"Mechanical\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/departments/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "departments", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/departments/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "departments", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/departments/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "departments", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Set Favorite", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-favorite-department", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-favorite-department" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-favorite-department", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-favorite-department" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Remove Favorite", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/remove-favorite-department", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "remove-favorite-department" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/remove-favorite-department", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "remove-favorite-department" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Removed successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Employees", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/employees", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "employees" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/employees", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "employees" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"email\": \"jane@example.com\",\n \"phone\": \"0501234567\",\n \"department_id\": 1,\n \"position\": \"Technician\",\n \"status\": \"active\",\n \"type\": \"employee\",\n \"track_attendance\": true,\n \"notify_owner_when_punch_in_out\": false,\n \"shop_calender_id\": 1,\n \"shop_timing_id\": 1,\n \"geo_fence_radius\": 100,\n \"created_at\": \"2026-03-24T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T12:00:00.000000Z\",\n \"department\": {\n \"id\": 1,\n \"name\": \"Mechanical\"\n },\n \"shop_calender\": {\n \"id\": 1,\n \"title\": \"Default Calendar\"\n },\n \"shop_timing\": {\n \"id\": 1,\n \"title\": \"Regular Shift\"\n },\n \"has_active_time_sheet\": false,\n \"active_time_sheet\": null\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Show", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/employees/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "employees", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/employees/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "employees", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": {\n \"id\": 1,\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"email\": \"jane@example.com\",\n \"phone\": \"0501234567\",\n \"department_id\": 1,\n \"position\": \"Technician\",\n \"status\": \"active\",\n \"type\": \"employee\",\n \"track_attendance\": true,\n \"notify_owner_when_punch_in_out\": false,\n \"shop_calender_id\": 1,\n \"shop_timing_id\": 1,\n \"geo_fence_radius\": 100,\n \"created_at\": \"2026-03-24T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T12:00:00.000000Z\",\n \"department\": {\n \"id\": 1,\n \"name\": \"Mechanical\"\n },\n \"shop_calender\": {\n \"id\": 1,\n \"title\": \"Default Calender\"\n },\n \"shop_timing\": {\n \"id\": 1,\n \"title\": \"Default Shift\"\n }\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"email\": \"jane@example.com\",\n \"phone\": \"0501234567\",\n \"department_id\": 1,\n \"position\": \"Technician\",\n \"status\": \"active\",\n \"type\": \"employee\",\n \"track_attendance\": true,\n \"notify_owner_when_punch_in_out\": false,\n \"shop_calender_id\": 1,\n \"shop_timing_id\": 1,\n \"geo_fence_radius\": 100\n}" + }, + "url": { + "raw": "{{base_url}}/api/employees", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "employees" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"email\": \"jane@example.com\",\n \"phone\": \"0501234567\",\n \"department_id\": 1,\n \"position\": \"Technician\",\n \"status\": \"active\",\n \"type\": \"employee\",\n \"track_attendance\": true,\n \"notify_owner_when_punch_in_out\": false,\n \"shop_calender_id\": 1,\n \"shop_timing_id\": 1,\n \"geo_fence_radius\": 100\n}" + }, + "url": { + "raw": "{{base_url}}/api/employees", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "employees" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Employee created successfully.\",\n \"data\": {\n \"id\": 1,\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"email\": \"jane@example.com\",\n \"phone\": \"0501234567\",\n \"department_id\": 1,\n \"position\": \"Technician\",\n \"status\": \"active\",\n \"type\": \"employee\",\n \"track_attendance\": true,\n \"notify_owner_when_punch_in_out\": false,\n \"shop_calender_id\": 1,\n \"shop_timing_id\": 1,\n \"geo_fence_radius\": 100,\n \"created_at\": \"2026-03-24T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T12:00:00.000000Z\",\n \"department\": {\n \"id\": 1,\n \"name\": \"Mechanical\"\n },\n \"has_active_time_sheet\": false,\n \"active_time_sheet\": null\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"status\": \"inactive\",\n \"position\": \"Senior Technician\",\n \"shop_timing_id\": 2\n}" + }, + "url": { + "raw": "{{base_url}}/api/employees/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "employees", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"status\": \"inactive\",\n \"position\": \"Senior Technician\",\n \"shop_timing_id\": 2\n}" + }, + "url": { + "raw": "{{base_url}}/api/employees/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "employees", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Employee updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"email\": \"jane@example.com\",\n \"phone\": \"0501234567\",\n \"department_id\": 1,\n \"position\": \"Senior Technician\",\n \"status\": \"inactive\",\n \"type\": \"employee\",\n \"track_attendance\": true,\n \"notify_owner_when_punch_in_out\": false,\n \"shop_calender_id\": 1,\n \"shop_timing_id\": 2,\n \"geo_fence_radius\": 100,\n \"created_at\": \"2026-03-24T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T12:10:00.000000Z\",\n \"has_active_time_sheet\": false,\n \"active_time_sheet\": null\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/employees/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "employees", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/employees/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "employees", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Employee deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Unit Types", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/unit-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "unit-types" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/unit-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "unit-types" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Hour\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/unit-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "unit-types" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Hour\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/unit-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "unit-types" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Customer remark updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"customer_remarks\": [\n {\n \"id\": 1,\n \"job_card_id\": 1,\n \"remark\": \"Updated remark\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n ]\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Hour\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/unit-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "unit-types", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Hour\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/unit-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "unit-types", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/unit-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "unit-types", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/unit-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "unit-types", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Customer remark deleted successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"customer_remarks\": []\n }\n}" + } + ] + }, + { + "name": "Set Favorite", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-favorite-unit-type", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-favorite-unit-type" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-favorite-unit-type", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-favorite-unit-type" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Remove Favorite", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/remove-favorite-unit-type", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "remove-favorite-unit-type" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/remove-favorite-unit-type", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "remove-favorite-unit-type" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Removed successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Inventory Categories", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/inventory-categories", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inventory-categories" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/inventory-categories", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inventory-categories" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Parts\",\n \"shop_type_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/inventory-categories", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inventory-categories" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Parts\",\n \"shop_type_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/inventory-categories", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inventory-categories" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Shop recommendation added successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"shop_recommendations\": [\n {\n \"id\": 1,\n \"job_card_id\": 1,\n \"recommendation\": \"Replace brake pads\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ]\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Parts\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/inventory-categories/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inventory-categories", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Parts\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/inventory-categories/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inventory-categories", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/inventory-categories/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inventory-categories", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/inventory-categories/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inventory-categories", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Set Favorite", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-favorite-inventory-category", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-favorite-inventory-category" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-favorite-inventory-category", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-favorite-inventory-category" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Remove Favorite", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/remove-favorite-inventory-category", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "remove-favorite-inventory-category" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/remove-favorite-inventory-category", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "remove-favorite-inventory-category" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Removed successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Labor Rates", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/labor-rates", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "labor-rates" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/labor-rates", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "labor-rates" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Standard\",\n \"rate\": 75\n}" + }, + "url": { + "raw": "{{base_url}}/api/labor-rates", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "labor-rates" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Standard\",\n \"rate\": 75\n}" + }, + "url": { + "raw": "{{base_url}}/api/labor-rates", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "labor-rates" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Shop recommendation updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"shop_recommendations\": [\n {\n \"id\": 1,\n \"job_card_id\": 1,\n \"recommendation\": \"Updated recommendation\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n ]\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Standard\",\n \"rate\": 80\n}" + }, + "url": { + "raw": "{{base_url}}/api/labor-rates/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "labor-rates", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Standard\",\n \"rate\": 80\n}" + }, + "url": { + "raw": "{{base_url}}/api/labor-rates/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "labor-rates", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/labor-rates/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "labor-rates", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/labor-rates/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "labor-rates", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Shop recommendation deleted successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"shop_recommendations\": []\n }\n}" + } + ] + }, + { + "name": "Set Favorite", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-favorite-labor-rate", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-favorite-labor-rate" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-favorite-labor-rate", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-favorite-labor-rate" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Remove Favorite", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/remove-favorite-labor-rate", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "remove-favorite-labor-rate" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/remove-favorite-labor-rate", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "remove-favorite-labor-rate" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Removed successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Vendors", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vendors", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendors" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vendors", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendors" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"first_name\": \"Vendor\",\n \"last_name\": \"Name\",\n \"company_name\": \"ACME\",\n \"email\": \"vendor@example.com\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vendors", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendors" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"first_name\": \"Vendor\",\n \"last_name\": \"Name\",\n \"company_name\": \"ACME\",\n \"email\": \"vendor@example.com\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vendors", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendors" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"company_name\": \"ACME Inc\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vendors/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendors", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"company_name\": \"ACME Inc\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vendors/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendors", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/vendors/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendors", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/vendors/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendors", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Toggle Status", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/toggle-vendor-status", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "toggle-vendor-status" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/toggle-vendor-status", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "toggle-vendor-status" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Create Vendor Address", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"vendor_id\": 1,\n \"address_line_1\": \"123 Main St\",\n \"address_line_2\": \"Suite 100\",\n \"country_id\": 1,\n \"state_id\": 1,\n \"city\": \"New York\",\n \"zip_code\": \"10001\",\n \"phone_number\": \"555-1234\",\n \"title\": \"Main Office\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/create-vendor-address", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "create-vendor-address" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"vendor_id\": 1,\n \"address_line_1\": \"123 Main St\",\n \"address_line_2\": \"Suite 100\",\n \"country_id\": 1,\n \"state_id\": 1,\n \"city\": \"New York\",\n \"zip_code\": \"10001\",\n \"phone_number\": \"555-1234\",\n \"title\": \"Main Office\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/create-vendor-address", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "create-vendor-address" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Get Vendor Address", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vendor-address/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendor-address", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vendor-address/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendor-address", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + } + ] + }, + { + "name": "Inspection Categories", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/inspection-categories", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-categories" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/inspection-categories", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-categories" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"inspection_name\": \"Brake Check\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/inspection-categories", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-categories" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"inspection_name\": \"Brake Check\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/inspection-categories", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-categories" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"inspection_name\": \"Brake Check\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/inspection-categories/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-categories", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"inspection_name\": \"Brake Check\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/inspection-categories/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-categories", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/inspection-categories/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-categories", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/inspection-categories/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-categories", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Inspections", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/inspections", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspections" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/inspections", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspections" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Pre-purchase\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"department_id\": 1,\n \"inspection_category_id\": 1,\n \"employee_id\": 1,\n \"order_number\": \"ORD-001\",\n \"date\": \"2026-03-16\",\n \"time\": \"10:00:00\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/inspections", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspections" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Pre-purchase\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"department_id\": 1,\n \"inspection_category_id\": 1,\n \"employee_id\": 1,\n \"order_number\": \"ORD-001\",\n \"date\": \"2026-03-16\",\n \"time\": \"10:00:00\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/inspections", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspections" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Pre-purchase\",\n \"note\": \"Updated note\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/inspections/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspections", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Pre-purchase\",\n \"note\": \"Updated note\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/inspections/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspections", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/inspections/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspections", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/inspections/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspections", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Change Inspection Status", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1,\n \"status\": \"completed\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/change-inspection-status", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "change-inspection-status" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1,\n \"status\": \"completed\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/change-inspection-status", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "change-inspection-status" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + } + ] + }, + { + "name": "Labels", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/labels", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "labels" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/labels", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "labels" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Urgent\",\n \"color_code\": \"#FF0000\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/labels", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "labels" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Urgent\",\n \"color_code\": \"#FF0000\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/labels", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "labels" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Urgent\",\n \"color_code\": \"#FF0000\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/labels/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "labels", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Urgent\",\n \"color_code\": \"#FF0000\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/labels/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "labels", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/labels/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "labels", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/labels/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "labels", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Insurance Types", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/insurance-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "insurance-types" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/insurance-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "insurance-types" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Comprehensive\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/insurance-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "insurance-types" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Comprehensive\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/insurance-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "insurance-types" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Comprehensive\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/insurance-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "insurance-types", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Comprehensive\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/insurance-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "insurance-types", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/insurance-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "insurance-types", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/insurance-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "insurance-types", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Estimates", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/estimates", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "estimates" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/estimates", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "estimates" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Estimate 001\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"department_id\": 1,\n \"estimate_number\": \"EST-001\",\n \"date\": \"2026-03-16\",\n \"has_insurance\": false,\n \"label_ids\": [1],\n \"remarks\": [\"Customer note\"]\n}" + }, + "url": { + "raw": "{{base_url}}/api/estimates", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "estimates" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Estimate 001\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"department_id\": 1,\n \"estimate_number\": \"EST-001\",\n \"date\": \"2026-03-16\",\n \"has_insurance\": false,\n \"label_ids\": [1],\n \"remarks\": [\"Customer note\"]\n}" + }, + "url": { + "raw": "{{base_url}}/api/estimates", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "estimates" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Estimate 001\",\n \"label_ids\": [1, 2],\n \"remarks\": [\"Updated note\"]\n}" + }, + "url": { + "raw": "{{base_url}}/api/estimates/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "estimates", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Estimate 001\",\n \"label_ids\": [1, 2],\n \"remarks\": [\"Updated note\"]\n}" + }, + "url": { + "raw": "{{base_url}}/api/estimates/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "estimates", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/estimates/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "estimates", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/estimates/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "estimates", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Quick Remark", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/quick-remark", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "quick-remark" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/quick-remark", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "quick-remark" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"description\": \"Needs follow-up\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/quick-remark", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "quick-remark" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"description\": \"Needs follow-up\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/quick-remark", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "quick-remark" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"description\": \"Needs follow-up\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/quick-remark/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "quick-remark", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"description\": \"Needs follow-up\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/quick-remark/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "quick-remark", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/quick-remark/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "quick-remark", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/quick-remark/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "quick-remark", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Quick Notes", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/quick-notes", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "quick-notes" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/quick-notes", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "quick-notes" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"description\": \"Quick note text\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/quick-notes", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "quick-notes" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"description\": \"Quick note text\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/quick-notes", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "quick-notes" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"description\": \"Updated note\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/quick-notes/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "quick-notes", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"description\": \"Updated note\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/quick-notes/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "quick-notes", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/quick-notes/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "quick-notes", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/quick-notes/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "quick-notes", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Reasons", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/reasons", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "reasons" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/reasons", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "reasons" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"title\": \"Customer request\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ]\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Customer request\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/reasons", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "reasons" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Customer request\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/reasons", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "reasons" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Reason created successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Customer request\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Updated reason title\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/reasons/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "reasons", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Updated reason title\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/reasons/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "reasons", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Reason updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Updated reason title\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/reasons/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "reasons", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/reasons/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "reasons", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Reason deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Check Point Label", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/check-point-label", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "check-point-label" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/check-point-label", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "check-point-label" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Pass\",\n \"color_code\": \"#00FF00\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/check-point-label", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "check-point-label" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Pass\",\n \"color_code\": \"#00FF00\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/check-point-label", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "check-point-label" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Pass\",\n \"color_code\": \"#00FF00\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/check-point-label/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "check-point-label", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Pass\",\n \"color_code\": \"#00FF00\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/check-point-label/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "check-point-label", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/check-point-label/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "check-point-label", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/check-point-label/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "check-point-label", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Inspection Check Points", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/inspection-check-points?inspection_id=1", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-check-points" + ], + "query": [ + { + "key": "inspection_id", + "value": "1" + } + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/inspection-check-points?inspection_id=1", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-check-points" + ], + "query": [ + { + "key": "inspection_id", + "value": "1" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"inspection_id\": 1,\n \"name\": \"Brake pads\",\n \"description\": \"Check thickness\",\n \"record_type\": \"record_conditions\",\n \"condition_rate\": 85\n}" + }, + "url": { + "raw": "{{base_url}}/api/inspection-check-points", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-check-points" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"inspection_id\": 1,\n \"name\": \"Brake pads\",\n \"description\": \"Check thickness\",\n \"record_type\": \"record_conditions\",\n \"condition_rate\": 85\n}" + }, + "url": { + "raw": "{{base_url}}/api/inspection-check-points", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-check-points" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"Brake pads\",\n \"record_type\": \"record_conditions\",\n \"condition_rate\": 90,\n \"file\": null\n}" + }, + "url": { + "raw": "{{base_url}}/api/inspection-check-points/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-check-points", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"Brake pads\",\n \"record_type\": \"record_conditions\",\n \"condition_rate\": 90,\n \"file\": null\n}" + }, + "url": { + "raw": "{{base_url}}/api/inspection-check-points/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-check-points", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/inspection-check-points/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-check-points", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/inspection-check-points/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-check-points", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Toggle Label to Checkpoint", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"inspection_check_point_id\": 1,\n \"check_point_label_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/toggle-label-to-checkpoint", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "toggle-label-to-checkpoint" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"inspection_check_point_id\": 1,\n \"check_point_label_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/toggle-label-to-checkpoint", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "toggle-label-to-checkpoint" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Change Status", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"inspection_check_point_id\": 1,\n \"status\": \"passed\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/inspection-check-points/change-status", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-check-points", + "change-status" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"inspection_check_point_id\": 1,\n \"status\": \"passed\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/inspection-check-points/change-status", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-check-points", + "change-status" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Add Attachment", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "inspection_check_point_id", + "value": "1", + "type": "text" + }, + { + "key": "attachment", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/inspection-check-points/add-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-check-points", + "add-attachment" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "inspection_check_point_id", + "value": "1", + "type": "text" + }, + { + "key": "attachment", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/inspection-check-points/add-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-check-points", + "add-attachment" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Upload Media", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/inspection-check-points/{{id}}/upload-media", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-check-points", + "{{id}}", + "upload-media" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/inspection-check-points/{{id}}/upload-media", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-check-points", + "{{id}}", + "upload-media" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Remove Media", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/inspection-check-points/{{id}}/media", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-check-points", + "{{id}}", + "media" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/inspection-check-points/{{id}}/media", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inspection-check-points", + "{{id}}", + "media" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Job Cards", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/job-cards?start_date=2026-03-01&end_date=2026-03-31&service_writer_id=1&department_id=1&has_start_or_delivery_date=true&has_start_date=true&has_delivery_date=false&has_both_dates=false", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards" + ], + "query": [ + { + "key": "start_date", + "value": "2026-03-01" + }, + { + "key": "end_date", + "value": "2026-03-31" + }, + { + "key": "service_writer_id", + "value": "1" + }, + { + "key": "department_id", + "value": "1" + }, + { + "key": "has_start_or_delivery_date", + "value": "true" + }, + { + "key": "has_start_date", + "value": "true" + }, + { + "key": "has_delivery_date", + "value": "false" + }, + { + "key": "has_both_dates", + "value": "false" + } + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/job-cards?start_date=2026-03-01&end_date=2026-03-31&service_writer_id=1&department_id=1&has_start_or_delivery_date=true&has_start_date=true&has_delivery_date=false&has_both_dates=false", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards" + ], + "query": [ + { + "key": "start_date", + "value": "2026-03-01" + }, + { + "key": "end_date", + "value": "2026-03-31" + }, + { + "key": "service_writer_id", + "value": "1" + }, + { + "key": "department_id", + "value": "1" + }, + { + "key": "has_start_or_delivery_date", + "value": "true" + }, + { + "key": "has_start_date", + "value": "true" + }, + { + "key": "has_delivery_date", + "value": "false" + }, + { + "key": "has_both_dates", + "value": "false" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"sales_person_id\": 1,\n \"status\": \"draft\",\n \"department_id\": 1,\n \"check_in_date\": \"2026-03-18\",\n \"km_in\": 50000,\n \"tax_inclusive\": \"Tax Inclusive\",\n \"discount_type\": \"no\",\n \"discount_at\": \"inclusive_of_tax\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"labels\": [],\n \"documents\": [],\n \"purchase_orders_count\": 0,\n \"bills_count\": 0,\n \"expenses_count\": 0,\n \"tasks_count\": 0,\n \"appointments_count\": 0\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Job Card 001\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"status\": \"draft\",\n \"tax_inclusive\": \"Tax Inclusive\",\n \"discount_type\": \"no\",\n \"discount_at\": \"inclusive_of_tax\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/job-cards", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Job Card 001\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"status\": \"draft\",\n \"tax_inclusive\": \"Tax Inclusive\",\n \"discount_type\": \"no\",\n \"discount_at\": \"inclusive_of_tax\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/job-cards", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"sales_person_id\": 1,\n \"status\": \"draft\",\n \"department_id\": null,\n \"check_in_date\": null,\n \"km_in\": null,\n \"tax_inclusive\": \"Tax Inclusive\",\n \"discount_type\": \"no\",\n \"discount_at\": \"inclusive_of_tax\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Job Card 001 Updated\",\n \"status\": \"check_in\",\n \"department_id\": 1,\n \"check_in_date\": \"2026-03-18\",\n \"km_in\": 50000,\n \"label_ids\": [1],\n \"tax_inclusive\": \"Tax Exclusive\",\n \"discount_type\": \"transaction_level\",\n \"discount_at\": \"exclusive_of_tax\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Job Card 001 Updated\",\n \"status\": \"check_in\",\n \"department_id\": 1,\n \"check_in_date\": \"2026-03-18\",\n \"km_in\": 50000,\n \"label_ids\": [1],\n \"tax_inclusive\": \"Tax Exclusive\",\n \"discount_type\": \"transaction_level\",\n \"discount_at\": \"exclusive_of_tax\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001 Updated\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"sales_person_id\": 1,\n \"status\": \"check_in\",\n \"department_id\": 1,\n \"check_in_date\": \"2026-03-18\",\n \"km_in\": 50000,\n \"tax_inclusive\": \"Tax Exclusive\",\n \"discount_type\": \"transaction_level\",\n \"discount_at\": \"exclusive_of_tax\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Change Date", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"order_date\": \"2026-03-18\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/change-date", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "change-date" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"order_date\": \"2026-03-18\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/change-date", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "change-date" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"order_date\": \"2026-03-18\",\n \"status\": \"draft\",\n \"tax_inclusive\": \"Tax Inclusive\",\n \"discount_type\": \"no\",\n \"discount_at\": \"inclusive_of_tax\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Change Status", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"status\": \"in_progress\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/change-status", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "change-status" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"status\": \"in_progress\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/change-status", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "change-status" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"status\": \"in_progress\",\n \"tax_inclusive\": \"Tax Inclusive\",\n \"discount_type\": \"no\",\n \"discount_at\": \"inclusive_of_tax\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Add Customer Remark", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"remark\": \"Customer requested wash\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/add-customer-remark", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "add-customer-remark" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"remark\": \"Customer requested wash\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/add-customer-remark", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "add-customer-remark" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Customer remark added successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"customer_remarks\": [\n {\n \"id\": 1,\n \"job_card_id\": 1,\n \"remark\": \"Customer requested wash\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ]\n }\n}" + } + ] + }, + { + "name": "Edit Customer Remark", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"customer_remark_id\": 1,\n \"remark\": \"Updated remark\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/edit-customer-remark", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "edit-customer-remark" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"customer_remark_id\": 1,\n \"remark\": \"Updated remark\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/edit-customer-remark", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "edit-customer-remark" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Customer remark updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"customer_remarks\": [\n {\n \"id\": 1,\n \"job_card_id\": 1,\n \"remark\": \"Updated remark\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n ]\n }\n}" + } + ] + }, + { + "name": "Delete Customer Remark", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/delete-customer-remark?customer_remark_id=1", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "delete-customer-remark" + ], + "query": [ + { + "key": "customer_remark_id", + "value": "1" + } + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/delete-customer-remark?customer_remark_id=1", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "delete-customer-remark" + ], + "query": [ + { + "key": "customer_remark_id", + "value": "1" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Customer remark deleted successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"customer_remarks\": []\n }\n}" + } + ] + }, + { + "name": "Add Shop Recommendation", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"recommendation\": \"Replace brake pads\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/add-shop-recommendation", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "add-shop-recommendation" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"recommendation\": \"Replace brake pads\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/add-shop-recommendation", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "add-shop-recommendation" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Shop recommendation added successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"shop_recommendations\": [\n {\n \"id\": 1,\n \"job_card_id\": 1,\n \"recommendation\": \"Replace brake pads\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ]\n }\n}" + } + ] + }, + { + "name": "Edit Shop Recommendation", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"shop_recommendation_id\": 1,\n \"recommendation\": \"Updated recommendation\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/edit-shop-recommendation", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "edit-shop-recommendation" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"shop_recommendation_id\": 1,\n \"recommendation\": \"Updated recommendation\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/edit-shop-recommendation", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "edit-shop-recommendation" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Shop recommendation updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"shop_recommendations\": [\n {\n \"id\": 1,\n \"job_card_id\": 1,\n \"recommendation\": \"Updated recommendation\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n ]\n }\n}" + } + ] + }, + { + "name": "Delete Shop Recommendation", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/delete-shop-recommendation?shop_recommendation_id=1", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "delete-shop-recommendation" + ], + "query": [ + { + "key": "shop_recommendation_id", + "value": "1" + } + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/delete-shop-recommendation?shop_recommendation_id=1", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "delete-shop-recommendation" + ], + "query": [ + { + "key": "shop_recommendation_id", + "value": "1" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Shop recommendation deleted successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"shop_recommendations\": []\n }\n}" + } + ] + }, + { + "name": "Add Attachment", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "attachments[]", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/add-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "add-attachment" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "attachments[]", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/add-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "add-attachment" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"attachments\": \"[\\\"job_card_attachments/file1.jpg\\\"]\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete Attachment", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"attachment_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/delete-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "delete-attachment" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"attachment_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/delete-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "delete-attachment" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Removed successfully.\"\n}" + } + ] + }, + { + "name": "Change Service Writer", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"service_writer_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/change-service-writer-id", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "change-service-writer-id" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"service_writer_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/change-service-writer-id", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "change-service-writer-id" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"service_writer_id\": 1,\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Change Sales Person", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"sales_person_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/change-sales-person-id", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "change-sales-person-id" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"sales_person_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/job-cards/{{id}}/change-sales-person-id", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "job-cards", + "{{id}}", + "change-sales-person-id" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Job Card 001\",\n \"sales_person_id\": 1,\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + } + ] + }, + { + "name": "Payment Modes", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/payment-mode", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-mode" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/payment-mode", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-mode" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Cash\",\n \"is_default\": true\n}" + }, + "url": { + "raw": "{{base_url}}/api/payment-mode", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-mode" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Cash\",\n \"is_default\": true\n}" + }, + "url": { + "raw": "{{base_url}}/api/payment-mode", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-mode" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Bank Transfer\",\n \"is_default\": false\n}" + }, + "url": { + "raw": "{{base_url}}/api/payment-mode/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-mode", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Bank Transfer\",\n \"is_default\": false\n}" + }, + "url": { + "raw": "{{base_url}}/api/payment-mode/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-mode", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/payment-mode/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-mode", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/payment-mode/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-mode", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Payment Received", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/payment-recieved", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-recieved" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/payment-recieved", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-recieved" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "job_card_id", + "value": "1", + "type": "text" + }, + { + "key": "payment_mode_id", + "value": "1", + "type": "text" + }, + { + "key": "customer_id", + "value": "1", + "type": "text" + }, + { + "key": "amount_received", + "value": "5000", + "type": "text" + }, + { + "key": "payment_number", + "value": "PAY-001", + "type": "text" + }, + { + "key": "payment_date", + "value": "2026-03-18", + "type": "text" + }, + { + "key": "note", + "value": "First payment", + "type": "text" + }, + { + "key": "attachment_files[]", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/payment-recieved", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-recieved" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "job_card_id", + "value": "1", + "type": "text" + }, + { + "key": "payment_mode_id", + "value": "1", + "type": "text" + }, + { + "key": "customer_id", + "value": "1", + "type": "text" + }, + { + "key": "amount_received", + "value": "5000", + "type": "text" + }, + { + "key": "payment_number", + "value": "PAY-001", + "type": "text" + }, + { + "key": "payment_date", + "value": "2026-03-18", + "type": "text" + }, + { + "key": "note", + "value": "First payment", + "type": "text" + }, + { + "key": "attachment_files[]", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/payment-recieved", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-recieved" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "_method", + "value": "PUT", + "type": "text" + }, + { + "key": "amount_received", + "value": "6000", + "type": "text" + }, + { + "key": "note", + "value": "Updated payment", + "type": "text" + }, + { + "key": "delete_attachment_ids[]", + "value": "1", + "type": "text" + }, + { + "key": "attachment_files[]", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/payment-recieved/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-recieved", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "_method", + "value": "PUT", + "type": "text" + }, + { + "key": "amount_received", + "value": "6000", + "type": "text" + }, + { + "key": "note", + "value": "Updated payment", + "type": "text" + }, + { + "key": "delete_attachment_ids[]", + "value": "1", + "type": "text" + }, + { + "key": "attachment_files[]", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/payment-recieved/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-recieved", + "{{id}}" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/payment-recieved/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-recieved", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/payment-recieved/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-recieved", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Parts", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/parts", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "parts" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/parts", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "parts" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"category_id\": 1,\n \"title\": \"Brake Pad\",\n \"sku\": \"BP-001\",\n \"part_number\": \"BP-001-A\",\n \"unit_type_id\": 1,\n \"manufactured_by\": \"Bosch\",\n \"description\": \"Front brake pad set\",\n \"location\": \"Rack A-3\",\n \"pricing_matrix\": \"Standard\",\n \"department_id\": 1,\n \"sales_information\": true,\n \"selling_price\": \"45.00\",\n \"sales_chart_of_account\": 4000,\n \"purchase_information\": true,\n \"purchase_chart_of_account\": 5000,\n \"purchase_preferred_vendor_id\": 1,\n \"purchase_price\": \"25.00\",\n \"track_inventory\": true,\n \"opening_stock\": 10,\n \"as_on_date\": \"2026-03-20\",\n \"min_stock\": 2,\n \"max_stock\": 50,\n \"inventory_chart_of_account\": 3000,\n \"tracking_type\": 1,\n \"inventory_purchase_price\": \"24.00\",\n \"is_active\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ]\n}" + } + ] + }, + { + "name": "Show", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/parts/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "parts", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/parts/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "parts", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"category_id\": 1,\n \"title\": \"Brake Pad\",\n \"sku\": \"BP-001\",\n \"part_number\": \"BP-001-A\",\n \"unit_type_id\": 1,\n \"manufactured_by\": \"Bosch\",\n \"description\": \"Front brake pad set\",\n \"location\": \"Rack A-3\",\n \"pricing_matrix\": \"Standard\",\n \"department_id\": 1,\n \"sales_information\": true,\n \"selling_price\": \"45.00\",\n \"sales_chart_of_account\": 4000,\n \"purchase_information\": true,\n \"purchase_chart_of_account\": 5000,\n \"purchase_preferred_vendor_id\": 1,\n \"purchase_price\": \"25.00\",\n \"track_inventory\": true,\n \"opening_stock\": 10,\n \"as_on_date\": \"2026-03-20\",\n \"min_stock\": 2,\n \"max_stock\": 50,\n \"inventory_chart_of_account\": 3000,\n \"tracking_type\": 1,\n \"inventory_purchase_price\": \"24.00\",\n \"is_active\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"shop_type_id\": 1,\n \"category_id\": 1,\n \"title\": \"Brake Pad\",\n \"sku\": \"BP-001\",\n \"unit_type_id\": 1,\n \"department_id\": 1,\n \"description\": \"Front brake pad set\",\n \"selling_price\": 45.00,\n \"purchase_price\": 25.00\n}" + }, + "url": { + "raw": "{{base_url}}/api/parts", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "parts" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"shop_type_id\": 1,\n \"category_id\": 1,\n \"title\": \"Brake Pad\",\n \"sku\": \"BP-001\",\n \"unit_type_id\": 1,\n \"department_id\": 1,\n \"description\": \"Front brake pad set\",\n \"selling_price\": 45.00,\n \"purchase_price\": 25.00\n}" + }, + "url": { + "raw": "{{base_url}}/api/parts", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "parts" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"category_id\": 1,\n \"title\": \"Brake Pad\",\n \"sku\": \"BP-001\",\n \"part_number\": \"BP-001-A\",\n \"unit_type_id\": 1,\n \"manufactured_by\": \"Bosch\",\n \"description\": \"Front brake pad set\",\n \"location\": \"Rack A-3\",\n \"pricing_matrix\": \"Standard\",\n \"department_id\": 1,\n \"sales_information\": true,\n \"selling_price\": \"45.00\",\n \"sales_chart_of_account\": 4000,\n \"purchase_information\": true,\n \"purchase_chart_of_account\": 5000,\n \"purchase_preferred_vendor_id\": 1,\n \"purchase_price\": \"25.00\",\n \"track_inventory\": true,\n \"opening_stock\": 10,\n \"as_on_date\": \"2026-03-20\",\n \"min_stock\": 2,\n \"max_stock\": 50,\n \"inventory_chart_of_account\": 3000,\n \"tracking_type\": 1,\n \"inventory_purchase_price\": \"24.00\",\n \"is_active\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Brake Pad Updated\",\n \"selling_price\": 50.00\n}" + }, + "url": { + "raw": "{{base_url}}/api/parts/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "parts", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Brake Pad Updated\",\n \"selling_price\": 50.00\n}" + }, + "url": { + "raw": "{{base_url}}/api/parts/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "parts", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"category_id\": 1,\n \"title\": \"Brake Pad Updated\",\n \"sku\": \"BP-001\",\n \"part_number\": \"BP-001-A\",\n \"unit_type_id\": 1,\n \"manufactured_by\": \"Bosch\",\n \"description\": \"Front brake pad set\",\n \"location\": \"Rack A-3\",\n \"pricing_matrix\": \"Standard\",\n \"department_id\": 1,\n \"sales_information\": true,\n \"selling_price\": \"50.00\",\n \"sales_chart_of_account\": 4000,\n \"purchase_information\": true,\n \"purchase_chart_of_account\": 5000,\n \"purchase_preferred_vendor_id\": 1,\n \"purchase_price\": \"25.00\",\n \"track_inventory\": true,\n \"opening_stock\": 10,\n \"as_on_date\": \"2026-03-20\",\n \"min_stock\": 2,\n \"max_stock\": 50,\n \"inventory_chart_of_account\": 3000,\n \"tracking_type\": 1,\n \"inventory_purchase_price\": \"24.00\",\n \"is_active\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/parts/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "parts", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/parts/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "parts", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Import", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/import-parts", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "import-parts" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/import-parts", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "import-parts" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Import completed successfully.\",\n \"data\": {\n \"imported_count\": 8,\n \"failed_count\": 1,\n \"failed_rows\": [\n {\n \"row\": 4,\n \"errors\": [\n \"The sku has already been taken.\"\n ],\n \"values\": {\n \"sku\": \"BP-001\"\n }\n }\n ]\n }\n}" + } + ] + }, + { + "name": "Export", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"search\": \"\",\n \"shop_type_id\": null,\n \"category_id\": null,\n \"department_id\": null\n}" + }, + "url": { + "raw": "{{base_url}}/api/export-parts", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "export-parts" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"search\": \"\",\n \"shop_type_id\": null,\n \"category_id\": null,\n \"department_id\": null\n}" + }, + "url": { + "raw": "{{base_url}}/api/export-parts", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "export-parts" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Export generated successfully.\"\n}" + } + ] + }, + { + "name": "Toggle Status", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/toggle-part-status", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "toggle-part-status" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/toggle-part-status", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "toggle-part-status" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Status updated successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Purchase Orders", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/purchase-orders", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "purchase-orders" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/purchase-orders", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "purchase-orders" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"service_name\": \"Engine Service Group\",\n \"shop_type_id\": 1,\n \"code\": \"SG-001\",\n \"inventory_category_id\": 1,\n \"unit_type_id\": 1,\n \"department_id\": 1,\n \"service_description\": \"Common engine services\",\n \"show_as_lump_sum\": false,\n \"mark_as_recommended\": true,\n \"set_packaged_pricing\": false,\n \"selling_price\": \"100.00\",\n \"selling_chart_of_account\": \"4000\",\n \"is_active\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"inventory_category\": {\n \"id\": 1,\n \"title\": \"Engine\"\n },\n \"unit_type\": {\n \"id\": 1,\n \"name\": \"Hour\"\n },\n \"department\": {\n \"id\": 1,\n \"name\": \"Service Department\"\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"job_card_id\": 1,\n \"vendor_id\": 1,\n \"title\": \"PO-001\",\n \"order_number\": \"PO-2026-001\",\n \"order_date\": \"2026-03-19\",\n \"delivery_date\": \"2026-03-25\",\n \"department_id\": 1,\n \"notes\": \"Urgent order\",\n \"label_ids\": [1],\n \"items\": [\n {\n \"part_id\": 1,\n \"quantity\": 5,\n \"rate\": 25.00,\n \"description\": \"Brake pads\"\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/purchase-orders", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "purchase-orders" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"job_card_id\": 1,\n \"vendor_id\": 1,\n \"title\": \"PO-001\",\n \"order_number\": \"PO-2026-001\",\n \"order_date\": \"2026-03-19\",\n \"delivery_date\": \"2026-03-25\",\n \"department_id\": 1,\n \"notes\": \"Urgent order\",\n \"label_ids\": [1],\n \"items\": [\n {\n \"part_id\": 1,\n \"quantity\": 5,\n \"rate\": 25.00,\n \"description\": \"Brake pads\"\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/purchase-orders", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "purchase-orders" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Service group created successfully.\",\n \"data\": {\n \"id\": 1,\n \"service_name\": \"Engine Service Group\",\n \"shop_type_id\": 1,\n \"code\": \"SG-001\",\n \"inventory_category_id\": 1,\n \"unit_type_id\": 1,\n \"department_id\": 1,\n \"service_description\": \"Common engine services\",\n \"show_as_lump_sum\": false,\n \"mark_as_recommended\": true,\n \"set_packaged_pricing\": false,\n \"selling_price\": \"100.00\",\n \"selling_chart_of_account\": \"4000\",\n \"is_active\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"inventory_category\": {\n \"id\": 1,\n \"title\": \"Engine\"\n },\n \"unit_type\": {\n \"id\": 1,\n \"name\": \"Hour\"\n },\n \"department\": {\n \"id\": 1,\n \"name\": \"Service Department\"\n }\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"PO-001 Updated\",\n \"notes\": \"Updated notes\",\n \"label_ids\": [1, 2],\n \"items\": [\n {\n \"part_id\": 1,\n \"quantity\": 10,\n \"rate\": 22.00,\n \"description\": \"Brake pads bulk\"\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/purchase-orders/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "purchase-orders", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"PO-001 Updated\",\n \"notes\": \"Updated notes\",\n \"label_ids\": [1, 2],\n \"items\": [\n {\n \"part_id\": 1,\n \"quantity\": 10,\n \"rate\": 22.00,\n \"description\": \"Brake pads bulk\"\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/purchase-orders/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "purchase-orders", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Service group updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"service_name\": \"Engine Service Group Updated\",\n \"shop_type_id\": 1,\n \"code\": \"SG-001\",\n \"inventory_category_id\": 1,\n \"unit_type_id\": 1,\n \"department_id\": 1,\n \"service_description\": \"Common engine services\",\n \"show_as_lump_sum\": false,\n \"mark_as_recommended\": true,\n \"set_packaged_pricing\": false,\n \"selling_price\": \"125.00\",\n \"selling_chart_of_account\": \"4000\",\n \"is_active\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"inventory_category\": {\n \"id\": 1,\n \"title\": \"Engine\"\n },\n \"unit_type\": {\n \"id\": 1,\n \"name\": \"Hour\"\n },\n \"department\": {\n \"id\": 1,\n \"name\": \"Service Department\"\n }\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/purchase-orders/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "purchase-orders", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/purchase-orders/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "purchase-orders", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Service group deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Services", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/services", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "services" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/services", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "services" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Show", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/services/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "services", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/services/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "services", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"category_id\": 1,\n \"labor_name\": \"Oil Change\",\n \"service_code\": \"SVC-001\",\n \"unit_type_id\": 1,\n \"labor_matrix\": \"Standard\",\n \"description\": \"Full synthetic oil change\",\n \"department_id\": 1,\n \"sales_information\": true,\n \"rate_type\": \"hourly\",\n \"labor_rate_id\": 1,\n \"labor_hours\": \"1.00\",\n \"sales_chart_of_account\": 4000,\n \"selling_price\": \"75.00\",\n \"purchase_information\": false,\n \"purchase_chart_of_account\": null,\n \"purchase_preferred_vendor_id\": null,\n \"purchase_price\": null,\n \"is_active\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"shop_type_id\": 1,\n \"category_id\": 1,\n \"labor_name\": \"Oil Change\",\n \"service_code\": \"SVC-001\",\n \"unit_type_id\": 1,\n \"labor_matrix\": \"Standard\",\n \"department_id\": 1,\n \"description\": \"Full synthetic oil change\",\n \"selling_price\": 75.00\n}" + }, + "url": { + "raw": "{{base_url}}/api/services", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "services" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"shop_type_id\": 1,\n \"category_id\": 1,\n \"labor_name\": \"Oil Change\",\n \"service_code\": \"SVC-001\",\n \"unit_type_id\": 1,\n \"labor_matrix\": \"Standard\",\n \"department_id\": 1,\n \"description\": \"Full synthetic oil change\",\n \"selling_price\": 75.00\n}" + }, + "url": { + "raw": "{{base_url}}/api/services", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "services" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"labor_name\": \"Oil Change Premium\",\n \"selling_price\": 85.00\n}" + }, + "url": { + "raw": "{{base_url}}/api/services/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "services", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"labor_name\": \"Oil Change Premium\",\n \"selling_price\": 85.00\n}" + }, + "url": { + "raw": "{{base_url}}/api/services/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "services", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/services/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "services", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/services/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "services", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Import", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/import-services", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "import-services" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/import-services", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "import-services" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Import completed successfully.\"\n}" + } + ] + }, + { + "name": "Export", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"search\": \"\",\n \"shop_type_id\": null,\n \"category_id\": null,\n \"department_id\": null\n}" + }, + "url": { + "raw": "{{base_url}}/api/export-services", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "export-services" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"search\": \"\",\n \"shop_type_id\": null,\n \"category_id\": null,\n \"department_id\": null\n}" + }, + "url": { + "raw": "{{base_url}}/api/export-services", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "export-services" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Export generated successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Expense Items", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/expense-items", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "expense-items" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/expense-items", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "expense-items" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"item_type\": \"Office Supply\",\n \"category_id\": 1,\n \"item_name\": \"Printer Paper\",\n \"sku\": \"EXP-001\",\n \"unit_type_id\": 1,\n \"department_id\": 1,\n \"description\": \"A4 printer paper\",\n \"selling_price\": 15.00,\n \"purchase_price\": 10.00\n}" + }, + "url": { + "raw": "{{base_url}}/api/expense-items", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "expense-items" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"item_type\": \"Office Supply\",\n \"category_id\": 1,\n \"item_name\": \"Printer Paper\",\n \"sku\": \"EXP-001\",\n \"unit_type_id\": 1,\n \"department_id\": 1,\n \"description\": \"A4 printer paper\",\n \"selling_price\": 15.00,\n \"purchase_price\": 10.00\n}" + }, + "url": { + "raw": "{{base_url}}/api/expense-items", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "expense-items" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"item_name\": \"Printer Paper A4\",\n \"selling_price\": 18.00\n}" + }, + "url": { + "raw": "{{base_url}}/api/expense-items/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "expense-items", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"item_name\": \"Printer Paper A4\",\n \"selling_price\": 18.00\n}" + }, + "url": { + "raw": "{{base_url}}/api/expense-items/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "expense-items", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/expense-items/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "expense-items", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/expense-items/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "expense-items", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Toggle Status", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/toggle-expense-item-status", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "toggle-expense-item-status" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/toggle-expense-item-status", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "toggle-expense-item-status" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + } + ] + }, + { + "name": "Bills", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/bills", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "bills" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/bills", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "bills" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Bill 001\",\n \"job_card_id\": 1,\n \"vendor_id\": 1,\n \"vendor_address_id\": 1,\n \"bill_date\": \"2026-03-19\",\n \"bill_due_date\": \"2026-04-19\",\n \"payment_terms_id\": 1,\n \"department_id\": 1,\n \"notes\": \"Monthly bill\",\n \"label_ids\": [1],\n \"items\": [\n {\n \"part_id\": 1,\n \"quantity\": 3,\n \"rate\": 25.00,\n \"chart_of_account\": null,\n \"description\": \"Brake pads\"\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/bills", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "bills" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Bill 001\",\n \"job_card_id\": 1,\n \"vendor_id\": 1,\n \"vendor_address_id\": 1,\n \"bill_date\": \"2026-03-19\",\n \"bill_due_date\": \"2026-04-19\",\n \"payment_terms_id\": 1,\n \"department_id\": 1,\n \"notes\": \"Monthly bill\",\n \"label_ids\": [1],\n \"items\": [\n {\n \"part_id\": 1,\n \"quantity\": 3,\n \"rate\": 25.00,\n \"chart_of_account\": null,\n \"description\": \"Brake pads\"\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/bills", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "bills" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Bill 001 Updated\",\n \"notes\": \"Updated notes\",\n \"label_ids\": [1, 2],\n \"items\": [\n {\n \"part_id\": 1,\n \"quantity\": 5,\n \"rate\": 22.00,\n \"description\": \"Brake pads bulk\"\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/bills/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "bills", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Bill 001 Updated\",\n \"notes\": \"Updated notes\",\n \"label_ids\": [1, 2],\n \"items\": [\n {\n \"part_id\": 1,\n \"quantity\": 5,\n \"rate\": 22.00,\n \"description\": \"Brake pads bulk\"\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/bills/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "bills", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/bills/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "bills", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/bills/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "bills", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Expenses", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/expenses", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "expenses" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/expenses", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "expenses" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"job_card_id\": 1,\n \"title\": \"Office Supplies\",\n \"category_id\": 1,\n \"vendor_id\": 1,\n \"invoice_number\": \"INV-001\",\n \"expense_date\": \"2026-03-19\",\n \"department_id\": 1,\n \"notes\": \"Monthly office expense\",\n \"status\": \"open\",\n \"label_ids\": [1],\n \"items\": [\n {\n \"expense_item_id\": 1,\n \"quantity\": 2,\n \"rate\": 15.00,\n \"chart_of_account\": null,\n \"description\": \"Printer paper\"\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/expenses", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "expenses" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"job_card_id\": 1,\n \"title\": \"Office Supplies\",\n \"category_id\": 1,\n \"vendor_id\": 1,\n \"invoice_number\": \"INV-001\",\n \"expense_date\": \"2026-03-19\",\n \"department_id\": 1,\n \"notes\": \"Monthly office expense\",\n \"status\": \"open\",\n \"label_ids\": [1],\n \"items\": [\n {\n \"expense_item_id\": 1,\n \"quantity\": 2,\n \"rate\": 15.00,\n \"chart_of_account\": null,\n \"description\": \"Printer paper\"\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/expenses", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "expenses" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Office Supplies Updated\",\n \"status\": \"paid\",\n \"label_ids\": [1, 2],\n \"items\": [\n {\n \"expense_item_id\": 1,\n \"quantity\": 5,\n \"rate\": 12.00,\n \"description\": \"Printer paper bulk\"\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/expenses/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "expenses", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Office Supplies Updated\",\n \"status\": \"paid\",\n \"label_ids\": [1, 2],\n \"items\": [\n {\n \"expense_item_id\": 1,\n \"quantity\": 5,\n \"rate\": 12.00,\n \"description\": \"Printer paper bulk\"\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/expenses/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "expenses", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/expenses/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "expenses", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/expenses/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "expenses", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Task Types", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/task-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "task-types" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/task-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "task-types" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Maintenance\",\n \"is_default\": false\n}" + }, + "url": { + "raw": "{{base_url}}/api/task-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "task-types" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Maintenance\",\n \"is_default\": false\n}" + }, + "url": { + "raw": "{{base_url}}/api/task-types", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "task-types" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Maintenance Updated\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/task-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "task-types", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Maintenance Updated\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/task-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "task-types", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/task-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "task-types", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/task-types/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "task-types", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Set Default", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-default-task-type", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-default-task-type" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-default-task-type", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-default-task-type" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Remove Default", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/remove-default-task-type", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "remove-default-task-type" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/remove-default-task-type", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "remove-default-task-type" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Removed successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Task Sections", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/task-sections", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "task-sections" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/task-sections", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "task-sections" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"To Do\",\n \"arrangement\": 1,\n \"is_default\": false\n}" + }, + "url": { + "raw": "{{base_url}}/api/task-sections", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "task-sections" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"To Do\",\n \"arrangement\": 1,\n \"is_default\": false\n}" + }, + "url": { + "raw": "{{base_url}}/api/task-sections", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "task-sections" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"To Do Updated\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/task-sections/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "task-sections", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"To Do Updated\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/task-sections/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "task-sections", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/task-sections/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "task-sections", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/task-sections/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "task-sections", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Set Default", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-default-task-section", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-default-task-section" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-default-task-section", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-default-task-section" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Remove Default", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/remove-default-task-section", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "remove-default-task-section" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/remove-default-task-section", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "remove-default-task-section" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Removed successfully.\"\n}" + } + ] + }, + { + "name": "Change Arrangement", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1,\n \"arrangement\": 3\n}" + }, + "url": { + "raw": "{{base_url}}/api/change-task-section-arrangement", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "change-task-section-arrangement" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1,\n \"arrangement\": 3\n}" + }, + "url": { + "raw": "{{base_url}}/api/change-task-section-arrangement", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "change-task-section-arrangement" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + } + ] + }, + { + "name": "Tasks", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/tasks", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "tasks" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/tasks", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "tasks" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"task_type_id\": 1,\n \"task_section_id\": 1,\n \"job_card_id\": 1,\n \"subject\": \"Replace brake pads\",\n \"description\": \"Front and rear brake pads need replacement\",\n \"owner_id\": 1,\n \"department_id\": 1,\n \"priority\": 2,\n \"due_date\": \"2026-03-25\",\n \"task_number\": \"TSK-001\",\n \"status\": \"pending\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/tasks", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "tasks" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"task_type_id\": 1,\n \"task_section_id\": 1,\n \"job_card_id\": 1,\n \"subject\": \"Replace brake pads\",\n \"description\": \"Front and rear brake pads need replacement\",\n \"owner_id\": 1,\n \"department_id\": 1,\n \"priority\": 2,\n \"due_date\": \"2026-03-25\",\n \"task_number\": \"TSK-001\",\n \"status\": \"pending\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/tasks", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "tasks" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"subject\": \"Replace brake pads - Updated\",\n \"priority\": 3,\n \"due_date\": \"2026-03-28\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/tasks/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "tasks", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"subject\": \"Replace brake pads - Updated\",\n \"priority\": 3,\n \"due_date\": \"2026-03-28\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/tasks/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "tasks", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/tasks/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "tasks", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/tasks/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "tasks", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Complete", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{base_url}}/api/tasks/{{id}}/complete", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "tasks", + "{{id}}", + "complete" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [], + "url": { + "raw": "{{base_url}}/api/tasks/{{id}}/complete", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "tasks", + "{{id}}", + "complete" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + } + ] + }, + { + "name": "Appointments", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/appointments", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "appointments" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/appointments", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "appointments" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Brake Inspection\",\n \"date\": \"2026-03-25\",\n \"from_time\": \"09:00\",\n \"to_time\": \"10:00\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"service_writer_id\": 1,\n \"technician_id\": 1,\n \"department_id\": 1,\n \"job_card_id\": 1,\n \"notes\": \"Customer requested morning slot\",\n \"label_ids\": [1]\n}" + }, + "url": { + "raw": "{{base_url}}/api/appointments", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "appointments" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Brake Inspection\",\n \"date\": \"2026-03-25\",\n \"from_time\": \"09:00\",\n \"to_time\": \"10:00\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"service_writer_id\": 1,\n \"technician_id\": 1,\n \"department_id\": 1,\n \"job_card_id\": 1,\n \"notes\": \"Customer requested morning slot\",\n \"label_ids\": [1]\n}" + }, + "url": { + "raw": "{{base_url}}/api/appointments", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "appointments" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Brake Inspection Updated\",\n \"date\": \"2026-03-26\",\n \"from_time\": \"14:00\",\n \"to_time\": \"15:00\",\n \"label_ids\": [1, 2]\n}" + }, + "url": { + "raw": "{{base_url}}/api/appointments/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "appointments", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Brake Inspection Updated\",\n \"date\": \"2026-03-26\",\n \"from_time\": \"14:00\",\n \"to_time\": \"15:00\",\n \"label_ids\": [1, 2]\n}" + }, + "url": { + "raw": "{{base_url}}/api/appointments/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "appointments", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/appointments/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "appointments", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/appointments/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "appointments", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Unlink Job Card", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{base_url}}/api/appointments/{{id}}/un-link-job-card", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "appointments", + "{{id}}", + "un-link-job-card" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [], + "url": { + "raw": "{{base_url}}/api/appointments/{{id}}/un-link-job-card", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "appointments", + "{{id}}", + "un-link-job-card" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Removed successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Invoice Sequences", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/invoice-sequences", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-sequences" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/invoice-sequences", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-sequences" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Default Invoice Sequence\",\n \"sequence_title\": \"INV 2026\",\n \"is_default\": true,\n \"auto_generate\": true,\n \"prefix\": \"INV-\",\n \"start_number\": 1,\n \"department_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/invoice-sequences", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-sequences" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Default Invoice Sequence\",\n \"sequence_title\": \"INV 2026\",\n \"is_default\": true,\n \"auto_generate\": true,\n \"prefix\": \"INV-\",\n \"start_number\": 1,\n \"department_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/invoice-sequences", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-sequences" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Updated Sequence\",\n \"prefix\": \"INV-2026-\",\n \"start_number\": 100\n}" + }, + "url": { + "raw": "{{base_url}}/api/invoice-sequences/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-sequences", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Updated Sequence\",\n \"prefix\": \"INV-2026-\",\n \"start_number\": 100\n}" + }, + "url": { + "raw": "{{base_url}}/api/invoice-sequences/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-sequences", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/invoice-sequences/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-sequences", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/invoice-sequences/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-sequences", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Set Default", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-default-invoice-sequence", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-default-invoice-sequence" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-default-invoice-sequence", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-default-invoice-sequence" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Remove Default", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/remove-default-invoice-sequence", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "remove-default-invoice-sequence" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/remove-default-invoice-sequence", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "remove-default-invoice-sequence" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Removed successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Service Groups", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/service-groups", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-groups" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/service-groups", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-groups" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Show", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/service-groups/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-groups", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/service-groups/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-groups", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": {\n \"id\": 1,\n \"service_name\": \"Engine Service Group\",\n \"shop_type_id\": 1,\n \"code\": \"SG-001\",\n \"inventory_category_id\": 1,\n \"unit_type_id\": 1,\n \"department_id\": 1,\n \"service_description\": \"Common engine services\",\n \"show_as_lump_sum\": false,\n \"mark_as_recommended\": true,\n \"set_packaged_pricing\": false,\n \"selling_price\": \"100.00\",\n \"selling_chart_of_account\": \"4000\",\n \"is_active\": true,\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"inventory_category\": {\n \"id\": 1,\n \"title\": \"Engine\"\n },\n \"unit_type\": {\n \"id\": 1,\n \"title\": \"Hour\"\n },\n \"department\": {\n \"id\": 1,\n \"name\": \"Service Department\"\n },\n \"labels\": [\n {\n \"id\": 1,\n \"title\": \"Recommended\",\n \"color_code\": \"#00AAFF\"\n }\n ]\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"service_name\": \"Engine Service Group\",\n \"shop_type_id\": 1,\n \"code\": \"SG-001\",\n \"inventory_category_id\": 1,\n \"unit_type_id\": 1,\n \"department_id\": 1,\n \"service_description\": \"Common engine services\",\n \"show_as_lump_sum\": false,\n \"mark_as_recommended\": true,\n \"set_packaged_pricing\": false,\n \"selling_price\": 100,\n \"selling_chart_of_account\": \"4000\",\n \"is_active\": true\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-groups", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-groups" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"service_name\": \"Engine Service Group\",\n \"shop_type_id\": 1,\n \"code\": \"SG-001\",\n \"inventory_category_id\": 1,\n \"unit_type_id\": 1,\n \"department_id\": 1,\n \"service_description\": \"Common engine services\",\n \"show_as_lump_sum\": false,\n \"mark_as_recommended\": true,\n \"set_packaged_pricing\": false,\n \"selling_price\": 100,\n \"selling_chart_of_account\": \"4000\",\n \"is_active\": true\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-groups", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-groups" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"service_name\": \"Engine Service Group Updated\",\n \"selling_price\": 125,\n \"is_active\": true\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-groups/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-groups", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"service_name\": \"Engine Service Group Updated\",\n \"selling_price\": 125,\n \"is_active\": true\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-groups/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-groups", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/service-groups/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-groups", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/service-groups/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-groups", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Toggle Status", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{}" + }, + "url": { + "raw": "{{base_url}}/api/service-groups/{{id}}/toggle-status", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-groups", + "{{id}}", + "toggle-status" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{}" + }, + "url": { + "raw": "{{base_url}}/api/service-groups/{{id}}/toggle-status", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-groups", + "{{id}}", + "toggle-status" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Service group status updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"is_active\": false\n }\n}" + } + ] + } + ] + }, + { + "name": "Service Group Details", + "item": [ + { + "name": "Add Label", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"label_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-groups/{{id}}/add-label", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-groups", + "{{id}}", + "add-label" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"label_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-groups/{{id}}/add-label", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-groups", + "{{id}}", + "add-label" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Label added to service group successfully.\",\n \"data\": {\n \"id\": 1,\n \"service_name\": \"Engine Service Group\",\n \"labels\": [\n {\n \"id\": 1,\n \"title\": \"Recommended\",\n \"color_code\": \"#00AAFF\"\n }\n ]\n }\n}" + } + ] + }, + { + "name": "Delete Label", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"label_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-groups/{{id}}/delete-label", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-groups", + "{{id}}", + "delete-label" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"label_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-groups/{{id}}/delete-label", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-groups", + "{{id}}", + "delete-label" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Label removed from service group successfully.\",\n \"data\": {\n \"id\": 1,\n \"service_name\": \"Engine Service Group\",\n \"labels\": []\n }\n}" + } + ] + }, + { + "name": "Includes List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/service-group-includes", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-includes" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/service-group-includes", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-includes" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"service_group_id\": 1,\n \"title\": \"Basic inspection\",\n \"arrangement\": 1,\n \"created_at\": \"2026-03-26T18:40:00.000000Z\",\n \"updated_at\": \"2026-03-26T18:40:00.000000Z\",\n \"service_group\": {\n \"id\": 1,\n \"service_name\": \"Engine Service Group\"\n }\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Includes Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"service_group_id\": 1,\n \"title\": \"Basic inspection\",\n \"arrangement\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-group-includes", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-includes" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"service_group_id\": 1,\n \"title\": \"Basic inspection\",\n \"arrangement\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-group-includes", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-includes" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Service group include created successfully.\",\n \"data\": {\n \"id\": 1,\n \"service_group_id\": 1,\n \"title\": \"Basic inspection\",\n \"arrangement\": 1\n }\n}" + } + ] + }, + { + "name": "Includes Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Basic inspection updated\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-group-includes/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-includes", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Basic inspection updated\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-group-includes/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-includes", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Service group include updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"service_group_id\": 1,\n \"title\": \"Basic inspection updated\",\n \"arrangement\": 1\n }\n}" + } + ] + }, + { + "name": "Includes Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/service-group-includes/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-includes", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/service-group-includes/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-includes", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Service group include deleted successfully.\"\n}" + } + ] + }, + { + "name": "Includes Change Arrangement", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"arrangement\": 2\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-group-includes/{{id}}/change-arrangement", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-includes", + "{{id}}", + "change-arrangement" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"arrangement\": 2\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-group-includes/{{id}}/change-arrangement", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-includes", + "{{id}}", + "change-arrangement" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Service group include arrangement updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"service_group_id\": 1,\n \"title\": \"Basic inspection\",\n \"arrangement\": 2\n }\n}" + } + ] + }, + { + "name": "Pricings List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/service-group-pricings", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-pricings" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/service-group-pricings", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-pricings" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"service_group_id\": 1,\n \"shop_type_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"fuel_type_id\": 1,\n \"body_type_id\": 1,\n \"rate_type\": \"hourly\",\n \"labor_rate_id\": 1,\n \"labor_hours\": \"2.00\",\n \"selling_price\": \"120.00\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Pricings Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"service_group_id\": 1,\n \"shop_type_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"fuel_type_id\": 1,\n \"body_type_id\": 1,\n \"rate_type\": \"hourly\",\n \"labor_rate_id\": 1,\n \"labor_hours\": 2,\n \"selling_price\": 120\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-group-pricings", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-pricings" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"service_group_id\": 1,\n \"shop_type_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"fuel_type_id\": 1,\n \"body_type_id\": 1,\n \"rate_type\": \"hourly\",\n \"labor_rate_id\": 1,\n \"labor_hours\": 2,\n \"selling_price\": 120\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-group-pricings", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-pricings" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Service group pricing created successfully.\",\n \"data\": {\n \"id\": 1,\n \"service_group_id\": 1,\n \"shop_type_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"fuel_type_id\": 1,\n \"body_type_id\": 1,\n \"rate_type\": \"hourly\",\n \"labor_rate_id\": 1,\n \"labor_hours\": \"2.00\",\n \"selling_price\": \"120.00\"\n }\n}" + } + ] + }, + { + "name": "Pricings Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"selling_price\": 150\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-group-pricings/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-pricings", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"selling_price\": 150\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-group-pricings/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-pricings", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Service group pricing updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"service_group_id\": 1,\n \"selling_price\": \"150.00\"\n }\n}" + } + ] + }, + { + "name": "Pricings Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/service-group-pricings/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-pricings", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/service-group-pricings/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-pricings", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Service group pricing deleted successfully.\"\n}" + } + ] + }, + { + "name": "Services List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/service-group-services", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-services" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/service-group-services", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-services" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"service_group_id\": 1,\n \"service_id\": 1,\n \"rate_type\": \"hourly\",\n \"labor_rate_id\": 1,\n \"rate\": \"100.00\",\n \"hours\": \"1.50\",\n \"tax_id\": 1,\n \"chart_of_account\": \"4000\",\n \"description\": \"Labor line\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Services Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"service_group_id\": 1,\n \"service_id\": 1,\n \"rate_type\": \"hourly\",\n \"labor_rate_id\": 1,\n \"rate\": 100,\n \"hours\": 1.5,\n \"tax_id\": 1,\n \"chart_of_account\": \"4000\",\n \"description\": \"Labor line\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-group-services", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-services" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"service_group_id\": 1,\n \"service_id\": 1,\n \"rate_type\": \"hourly\",\n \"labor_rate_id\": 1,\n \"rate\": 100,\n \"hours\": 1.5,\n \"tax_id\": 1,\n \"chart_of_account\": \"4000\",\n \"description\": \"Labor line\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-group-services", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-services" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Service group service created successfully.\",\n \"data\": {\n \"id\": 1,\n \"service_group_id\": 1,\n \"service_id\": 1,\n \"rate_type\": \"hourly\",\n \"labor_rate_id\": 1,\n \"rate\": \"100.00\",\n \"hours\": \"1.50\",\n \"tax_id\": 1,\n \"chart_of_account\": \"4000\",\n \"description\": \"Labor line\"\n }\n}" + } + ] + }, + { + "name": "Services Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"rate\": 120,\n \"hours\": 2\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-group-services/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-services", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"rate\": 120,\n \"hours\": 2\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-group-services/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-services", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Service group service updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"rate\": \"120.00\",\n \"hours\": \"2.00\"\n }\n}" + } + ] + }, + { + "name": "Services Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/service-group-services/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-services", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/service-group-services/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-services", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Service group service deleted successfully.\"\n}" + } + ] + }, + { + "name": "Parts List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/service-group-parts", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-parts" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/service-group-parts", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-parts" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"service_group_id\": 1,\n \"part_id\": 1,\n \"quantity\": \"2.00\",\n \"rate\": \"50.00\",\n \"tax_id\": 1,\n \"chart_of_account\": \"5000\",\n \"description\": \"Parts line\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Parts Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"service_group_id\": 1,\n \"part_id\": 1,\n \"quantity\": 2,\n \"rate\": 50,\n \"tax_id\": 1,\n \"chart_of_account\": \"5000\",\n \"description\": \"Parts line\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-group-parts", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-parts" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"service_group_id\": 1,\n \"part_id\": 1,\n \"quantity\": 2,\n \"rate\": 50,\n \"tax_id\": 1,\n \"chart_of_account\": \"5000\",\n \"description\": \"Parts line\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-group-parts", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-parts" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Service group part created successfully.\",\n \"data\": {\n \"id\": 1,\n \"service_group_id\": 1,\n \"part_id\": 1,\n \"quantity\": \"2.00\",\n \"rate\": \"50.00\",\n \"tax_id\": 1,\n \"chart_of_account\": \"5000\",\n \"description\": \"Parts line\"\n }\n}" + } + ] + }, + { + "name": "Parts Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"quantity\": 3,\n \"rate\": 55\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-group-parts/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-parts", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"quantity\": 3,\n \"rate\": 55\n}" + }, + "url": { + "raw": "{{base_url}}/api/service-group-parts/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-parts", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Service group part updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"quantity\": \"3.00\",\n \"rate\": \"55.00\"\n }\n}" + } + ] + }, + { + "name": "Parts Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/service-group-parts/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-parts", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/service-group-parts/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "service-group-parts", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Service group part deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Invoice Labels", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/invoice-labels", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-labels" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/invoice-labels", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-labels" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Urgent Invoice\",\n \"color_code\": \"#FF0000\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/invoice-labels", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-labels" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Urgent Invoice\",\n \"color_code\": \"#FF0000\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/invoice-labels", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-labels" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Urgent\",\n \"color_code\": \"#D60000\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/invoice-labels/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-labels", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Urgent\",\n \"color_code\": \"#D60000\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/invoice-labels/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-labels", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/invoice-labels/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-labels", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/invoice-labels/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-labels", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Invoices", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/invoices", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoices" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/invoices", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoices" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"subject\": \"Invoice 001\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"invoice_date\": \"2026-03-23\",\n \"due_date\": \"2026-03-30\",\n \"invoice_sequence_id\": 1,\n \"invoice_number\": \"INV-0001\",\n \"department_id\": 1,\n \"status\": \"draft\",\n \"inspection_categories\": [\n {\n \"inspection_category_id\": 1,\n \"rate\": 100\n }\n ],\n \"parts\": [\n {\n \"part_id\": 1,\n \"quantity\": 1,\n \"rate\": 25\n }\n ],\n \"services\": [\n {\n \"service_id\": 1,\n \"rate\": 50\n }\n ],\n \"expenses\": [\n {\n \"expense_id\": 1,\n \"quantity\": 1,\n \"rate\": 10\n }\n ],\n \"service_groups\": [\n {\n \"service_group_id\": 1,\n \"rate\": 120\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/invoices", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoices" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"subject\": \"Invoice 001\",\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"invoice_date\": \"2026-03-23\",\n \"due_date\": \"2026-03-30\",\n \"invoice_sequence_id\": 1,\n \"invoice_number\": \"INV-0001\",\n \"department_id\": 1,\n \"status\": \"draft\",\n \"inspection_categories\": [\n {\n \"inspection_category_id\": 1,\n \"rate\": 100\n }\n ],\n \"parts\": [\n {\n \"part_id\": 1,\n \"quantity\": 1,\n \"rate\": 25\n }\n ],\n \"services\": [\n {\n \"service_id\": 1,\n \"rate\": 50\n }\n ],\n \"expenses\": [\n {\n \"expense_id\": 1,\n \"quantity\": 1,\n \"rate\": 10\n }\n ],\n \"service_groups\": [\n {\n \"service_group_id\": 1,\n \"rate\": 120\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/invoices", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoices" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"subject\": \"Invoice 001 Updated\",\n \"status\": \"open\",\n \"notes\": \"Updated note\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/invoices/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoices", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"subject\": \"Invoice 001 Updated\",\n \"status\": \"open\",\n \"notes\": \"Updated note\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/invoices/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoices", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/invoices/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoices", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/invoices/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoices", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Add Attachment", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "attachments[]", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/invoices/{{id}}/add-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoices", + "{{id}}", + "add-attachment" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "attachments[]", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/invoices/{{id}}/add-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoices", + "{{id}}", + "add-attachment" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete Attachment", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"attachment_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/invoices/{{id}}/delete-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoices", + "{{id}}", + "delete-attachment" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"attachment_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/invoices/{{id}}/delete-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoices", + "{{id}}", + "delete-attachment" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Invoice Documents", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/invoice-documents", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-documents" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/invoice-documents", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-documents" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"invoice_id\": 1,\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"document_type_id\": 1,\n \"document_number\": \"DOC-001\",\n \"show_in_invoice\": true,\n \"show_in_estimate\": false,\n \"show_in_statement\": false\n}" + }, + "url": { + "raw": "{{base_url}}/api/invoice-documents", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-documents" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"invoice_id\": 1,\n \"customer_id\": 1,\n \"vehicle_id\": 1,\n \"document_type_id\": 1,\n \"document_number\": \"DOC-001\",\n \"show_in_invoice\": true,\n \"show_in_estimate\": false,\n \"show_in_statement\": false\n}" + }, + "url": { + "raw": "{{base_url}}/api/invoice-documents", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-documents" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"document_number\": \"DOC-001-UPDATED\",\n \"show_in_statement\": true\n}" + }, + "url": { + "raw": "{{base_url}}/api/invoice-documents/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-documents", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"document_number\": \"DOC-001-UPDATED\",\n \"show_in_statement\": true\n}" + }, + "url": { + "raw": "{{base_url}}/api/invoice-documents/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-documents", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/invoice-documents/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-documents", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/invoice-documents/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-documents", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Invoice Notes", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/invoice-notes", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-notes" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/invoice-notes", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-notes" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"invoice_id\": 1,\n \"note\": \"Call customer before delivery\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/invoice-notes", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-notes" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"invoice_id\": 1,\n \"note\": \"Call customer before delivery\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/invoice-notes", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-notes" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"note\": \"Updated internal note\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/invoice-notes/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-notes", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"note\": \"Updated internal note\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/invoice-notes/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-notes", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/invoice-notes/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-notes", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/invoice-notes/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "invoice-notes", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Credit Notes", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/credit-notes", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "credit-notes" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/credit-notes", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "credit-notes" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"subject\": \"Credit Note 001\",\n \"customer_id\": 1,\n \"date\": \"2026-03-23\",\n \"status\": \"open\",\n \"labels\": [\n { \"label_id\": 1 }\n ],\n \"inspections\": [\n {\n \"inspection_category_id\": 1,\n \"rate\": 20\n }\n ],\n \"parts\": [\n {\n \"part_id\": 1,\n \"quantity\": 1,\n \"rate\": 10\n }\n ],\n \"services\": [\n {\n \"service_id\": 1,\n \"rate\": 15\n }\n ],\n \"expenses\": [\n {\n \"expense_id\": 1,\n \"quantity\": 1,\n \"rate\": 5\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/credit-notes", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "credit-notes" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"subject\": \"Credit Note 001\",\n \"customer_id\": 1,\n \"date\": \"2026-03-23\",\n \"status\": \"open\",\n \"labels\": [\n { \"label_id\": 1 }\n ],\n \"inspections\": [\n {\n \"inspection_category_id\": 1,\n \"rate\": 20\n }\n ],\n \"parts\": [\n {\n \"part_id\": 1,\n \"quantity\": 1,\n \"rate\": 10\n }\n ],\n \"services\": [\n {\n \"service_id\": 1,\n \"rate\": 15\n }\n ],\n \"expenses\": [\n {\n \"expense_id\": 1,\n \"quantity\": 1,\n \"rate\": 5\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/credit-notes", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "credit-notes" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"subject\": \"Credit Note 001 Updated\",\n \"notes\": \"Adjusted amount\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/credit-notes/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "credit-notes", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"subject\": \"Credit Note 001 Updated\",\n \"notes\": \"Adjusted amount\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/credit-notes/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "credit-notes", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/credit-notes/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "credit-notes", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/credit-notes/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "credit-notes", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Add Attachment", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "attachments[]", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/credit-notes/{{id}}/add-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "credit-notes", + "{{id}}", + "add-attachment" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "attachments[]", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/credit-notes/{{id}}/add-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "credit-notes", + "{{id}}", + "add-attachment" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete Attachment", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"attachment_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/credit-notes/{{id}}/delete-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "credit-notes", + "{{id}}", + "delete-attachment" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"attachment_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/credit-notes/{{id}}/delete-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "credit-notes", + "{{id}}", + "delete-attachment" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Add Internal Note", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"note\": \"Internal review needed\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/credit-notes/{{id}}/add-internal-note", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "credit-notes", + "{{id}}", + "add-internal-note" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"note\": \"Internal review needed\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/credit-notes/{{id}}/add-internal-note", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "credit-notes", + "{{id}}", + "add-internal-note" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Edit Internal Note", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"internal_note_id\": 1,\n \"note\": \"Updated internal note\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/credit-notes/{{id}}/edit-internal-note", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "credit-notes", + "{{id}}", + "edit-internal-note" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"internal_note_id\": 1,\n \"note\": \"Updated internal note\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/credit-notes/{{id}}/edit-internal-note", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "credit-notes", + "{{id}}", + "edit-internal-note" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Delete Internal Note", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"internal_note_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/credit-notes/{{id}}/delete-internal-note", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "credit-notes", + "{{id}}", + "delete-internal-note" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"internal_note_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/credit-notes/{{id}}/delete-internal-note", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "credit-notes", + "{{id}}", + "delete-internal-note" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Payment Mades", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/payment-mades", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-mades" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/payment-mades", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-mades" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"vendor_id\": 1,\n \"employee_id\": null,\n \"payment_for\": \"bill\",\n \"payment_made\": \"100.00\",\n \"payment_number\": \"PM-001\",\n \"payment_reference\": \"REF-001\",\n \"payment_date\": \"2026-03-23\",\n \"payment_mode_id\": 1,\n \"paid_through\": 1,\n \"notes\": \"Payment against vendor bills\",\n \"excess_amount_will_be_deposited\": null,\n \"amount_paid\": \"100.00\",\n \"amount_used_for_payments\": \"100.00\",\n \"amount_in_excess\": \"0.00\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"vendor\": {\n \"id\": 1,\n \"first_name\": \"Vendor\",\n \"last_name\": \"One\",\n \"company_name\": \"ACME Parts\",\n \"email\": \"vendor1@example.com\"\n },\n \"payment_mode\": {\n \"id\": 1,\n \"title\": \"Cash\"\n },\n \"details\": [\n {\n \"id\": 1,\n \"payment_made_id\": 1,\n \"bill_id\": 10,\n \"expense_id\": null,\n \"amount_paid\": \"60.00\",\n \"bill\": {\n \"id\": 10,\n \"title\": \"Bill #10\",\n \"status\": \"partially_paid\"\n },\n \"expense\": null\n },\n {\n \"id\": 2,\n \"payment_made_id\": 1,\n \"bill_id\": 11,\n \"expense_id\": null,\n \"amount_paid\": \"40.00\",\n \"bill\": {\n \"id\": 11,\n \"title\": \"Bill #11\",\n \"status\": \"paid\"\n },\n \"expense\": null\n }\n ],\n \"attachments\": [\n {\n \"id\": 1,\n \"payment_made_id\": 1,\n \"attachment_path\": \"payment_made_attachments/sample-receipt.pdf\",\n \"original_name\": \"receipt.pdf\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ]\n }\n ]\n}" + } + ] + }, + { + "name": "Create (Bill)", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"vendor_id\": 1,\n \"payment_for\": \"bill\",\n \"payment_made\": 100,\n \"payment_number\": \"PM-001\",\n \"payment_reference\": \"REF-001\",\n \"payment_date\": \"2026-03-23\",\n \"payment_mode_id\": 1,\n \"paid_through\": 1,\n \"notes\": \"Payment against bills\",\n \"details\": [\n {\n \"bill_id\": 1,\n \"amount_paid\": 60\n },\n {\n \"bill_id\": 2,\n \"amount_paid\": 40\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/payment-mades", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-mades" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"vendor_id\": 1,\n \"payment_for\": \"bill\",\n \"payment_made\": 100,\n \"payment_number\": \"PM-001\",\n \"payment_reference\": \"REF-001\",\n \"payment_date\": \"2026-03-23\",\n \"payment_mode_id\": 1,\n \"paid_through\": 1,\n \"notes\": \"Payment against bills\",\n \"details\": [\n {\n \"bill_id\": 1,\n \"amount_paid\": 60\n },\n {\n \"bill_id\": 2,\n \"amount_paid\": 40\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/payment-mades", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-mades" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Payment made created successfully.\",\n \"data\": {\n \"id\": 1,\n \"vendor_id\": 1,\n \"employee_id\": null,\n \"payment_for\": \"bill\",\n \"payment_made\": \"100.00\",\n \"payment_number\": \"PM-001\",\n \"payment_reference\": \"REF-001\",\n \"payment_date\": \"2026-03-23\",\n \"payment_mode_id\": 1,\n \"paid_through\": 1,\n \"notes\": \"Payment against bills\",\n \"excess_amount_will_be_deposited\": null,\n \"amount_paid\": \"100.00\",\n \"amount_used_for_payments\": \"100.00\",\n \"amount_in_excess\": \"0.00\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\",\n \"vendor\": {\n \"id\": 1,\n \"first_name\": \"Vendor\",\n \"last_name\": \"One\",\n \"company_name\": \"ACME Parts\",\n \"email\": \"vendor1@example.com\"\n },\n \"payment_mode\": {\n \"id\": 1,\n \"title\": \"Cash\"\n },\n \"details\": [\n {\n \"id\": 1,\n \"payment_made_id\": 1,\n \"bill_id\": 1,\n \"expense_id\": null,\n \"amount_paid\": \"60.00\"\n },\n {\n \"id\": 2,\n \"payment_made_id\": 1,\n \"bill_id\": 2,\n \"expense_id\": null,\n \"amount_paid\": \"40.00\"\n }\n ],\n \"attachments\": []\n }\n}" + } + ] + }, + { + "name": "Create (Expense)", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"employee_id\": 1,\n \"payment_for\": \"expense\",\n \"payment_made\": 50,\n \"payment_number\": \"PM-002\",\n \"payment_reference\": \"REF-002\",\n \"payment_date\": \"2026-03-23\",\n \"payment_mode_id\": 1,\n \"paid_through\": 1,\n \"notes\": \"Office expense reimbursement\",\n \"details\": [\n {\n \"expense_id\": 1,\n \"amount_paid\": 50\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/payment-mades", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-mades" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"employee_id\": 1,\n \"payment_for\": \"expense\",\n \"payment_made\": 50,\n \"payment_number\": \"PM-002\",\n \"payment_reference\": \"REF-002\",\n \"payment_date\": \"2026-03-23\",\n \"payment_mode_id\": 1,\n \"paid_through\": 1,\n \"notes\": \"Office expense reimbursement\",\n \"details\": [\n {\n \"expense_id\": 1,\n \"amount_paid\": 50\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/payment-mades", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-mades" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Payment made created successfully.\",\n \"data\": {\n \"id\": 2,\n \"vendor_id\": null,\n \"employee_id\": 1,\n \"payment_for\": \"expense\",\n \"payment_made\": \"50.00\",\n \"payment_number\": \"PM-002\",\n \"payment_reference\": \"REF-002\",\n \"payment_date\": \"2026-03-23\",\n \"payment_mode_id\": 1,\n \"paid_through\": 1,\n \"notes\": \"Office expense reimbursement\",\n \"excess_amount_will_be_deposited\": null,\n \"amount_paid\": \"50.00\",\n \"amount_used_for_payments\": \"50.00\",\n \"amount_in_excess\": \"0.00\",\n \"created_at\": \"2026-03-23T12:05:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:05:00.000000Z\",\n \"vendor\": null,\n \"payment_mode\": {\n \"id\": 1,\n \"title\": \"Cash\"\n },\n \"details\": [\n {\n \"id\": 3,\n \"payment_made_id\": 2,\n \"bill_id\": null,\n \"expense_id\": 1,\n \"amount_paid\": \"50.00\"\n }\n ],\n \"attachments\": []\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"notes\": \"Updated payment made\",\n \"details\": [\n {\n \"bill_id\": 1,\n \"amount_paid\": 75\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/payment-mades/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-mades", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"notes\": \"Updated payment made\",\n \"details\": [\n {\n \"bill_id\": 1,\n \"amount_paid\": 75\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/payment-mades/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-mades", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Payment made updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"vendor_id\": 1,\n \"employee_id\": null,\n \"payment_for\": \"bill\",\n \"payment_made\": \"100.00\",\n \"payment_number\": \"PM-001\",\n \"payment_reference\": \"REF-001\",\n \"payment_date\": \"2026-03-23\",\n \"payment_mode_id\": 1,\n \"paid_through\": 1,\n \"notes\": \"Updated payment made\",\n \"excess_amount_will_be_deposited\": null,\n \"amount_paid\": \"100.00\",\n \"amount_used_for_payments\": \"75.00\",\n \"amount_in_excess\": \"25.00\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:20:00.000000Z\",\n \"vendor\": {\n \"id\": 1,\n \"first_name\": \"Vendor\",\n \"last_name\": \"One\",\n \"company_name\": \"ACME Parts\",\n \"email\": \"vendor1@example.com\"\n },\n \"payment_mode\": {\n \"id\": 1,\n \"title\": \"Cash\"\n },\n \"details\": [\n {\n \"id\": 4,\n \"payment_made_id\": 1,\n \"bill_id\": 1,\n \"expense_id\": null,\n \"amount_paid\": \"75.00\"\n }\n ],\n \"attachments\": [\n {\n \"id\": 1,\n \"payment_made_id\": 1,\n \"attachment_path\": \"payment_made_attachments/sample-receipt.pdf\",\n \"original_name\": \"receipt.pdf\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ]\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/payment-mades/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-mades", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/payment-mades/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-mades", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Add Attachment", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "attachments[]", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/payment-mades/{{id}}/add-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-mades", + "{{id}}", + "add-attachment" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "attachments[]", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/payment-mades/{{id}}/add-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-mades", + "{{id}}", + "add-attachment" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Payment made attachments added successfully.\",\n \"data\": {\n \"id\": 1,\n \"attachments\": [\n {\n \"id\": 1,\n \"payment_made_id\": 1,\n \"attachment_path\": \"payment_made_attachments/sample-receipt.pdf\",\n \"original_name\": \"receipt.pdf\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n },\n {\n \"id\": 2,\n \"payment_made_id\": 1,\n \"attachment_path\": \"payment_made_attachments/new-proof.jpg\",\n \"original_name\": \"proof.jpg\",\n \"created_at\": \"2026-03-23T12:25:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:25:00.000000Z\"\n }\n ]\n }\n}" + } + ] + }, + { + "name": "Delete Attachment", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"attachment_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/payment-mades/{{id}}/delete-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-mades", + "{{id}}", + "delete-attachment" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"attachment_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/payment-mades/{{id}}/delete-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "payment-mades", + "{{id}}", + "delete-attachment" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Payment made attachment deleted successfully.\",\n \"data\": {\n \"id\": 1,\n \"attachments\": [\n {\n \"id\": 2,\n \"payment_made_id\": 1,\n \"attachment_path\": \"payment_made_attachments/new-proof.jpg\",\n \"original_name\": \"proof.jpg\",\n \"created_at\": \"2026-03-23T12:25:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:25:00.000000Z\"\n }\n ]\n }\n}" + } + ] + } + ] + }, + { + "name": "Vendor Credits", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vendor-credits", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendor-credits" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/vendor-credits", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendor-credits" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"subject\": \"Vendor Credit 001\",\n \"credit_number\": \"VC-001\",\n \"vendor_id\": 1,\n \"vendor_credit_date\": \"2026-03-23\",\n \"department_id\": 1,\n \"labels\": [\n { \"label_id\": 1 }\n ],\n \"parts\": [\n {\n \"part_id\": 1,\n \"quantity\": 1,\n \"rate\": 25\n }\n ],\n \"services\": [\n {\n \"service_id\": 1,\n \"quantity\": 1,\n \"rate\": 50\n }\n ],\n \"expenses\": [\n {\n \"expense_id\": 1,\n \"quantity\": 1,\n \"rate\": 10\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/vendor-credits", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendor-credits" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"subject\": \"Vendor Credit 001\",\n \"credit_number\": \"VC-001\",\n \"vendor_id\": 1,\n \"vendor_credit_date\": \"2026-03-23\",\n \"department_id\": 1,\n \"labels\": [\n { \"label_id\": 1 }\n ],\n \"parts\": [\n {\n \"part_id\": 1,\n \"quantity\": 1,\n \"rate\": 25\n }\n ],\n \"services\": [\n {\n \"service_id\": 1,\n \"quantity\": 1,\n \"rate\": 50\n }\n ],\n \"expenses\": [\n {\n \"expense_id\": 1,\n \"quantity\": 1,\n \"rate\": 10\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/vendor-credits", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendor-credits" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"subject\": \"Vendor Credit 001 Updated\",\n \"notes\": \"Updated notes\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vendor-credits/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendor-credits", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"subject\": \"Vendor Credit 001 Updated\",\n \"notes\": \"Updated notes\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vendor-credits/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendor-credits", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/vendor-credits/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendor-credits", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/vendor-credits/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendor-credits", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Add Attachment", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "attachments[]", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/vendor-credits/{{id}}/add-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendor-credits", + "{{id}}", + "add-attachment" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "attachments[]", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/vendor-credits/{{id}}/add-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendor-credits", + "{{id}}", + "add-attachment" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete Attachment", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"attachment_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/vendor-credits/{{id}}/delete-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendor-credits", + "{{id}}", + "delete-attachment" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"attachment_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/vendor-credits/{{id}}/delete-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendor-credits", + "{{id}}", + "delete-attachment" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Add Internal Note", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"note\": \"Internal note\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vendor-credits/{{id}}/add-internal-note", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendor-credits", + "{{id}}", + "add-internal-note" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"note\": \"Internal note\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vendor-credits/{{id}}/add-internal-note", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendor-credits", + "{{id}}", + "add-internal-note" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Edit Internal Note", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"internal_note_id\": 1,\n \"note\": \"Updated internal note\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vendor-credits/{{id}}/edit-internal-note", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendor-credits", + "{{id}}", + "edit-internal-note" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"internal_note_id\": 1,\n \"note\": \"Updated internal note\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/vendor-credits/{{id}}/edit-internal-note", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendor-credits", + "{{id}}", + "edit-internal-note" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Delete Internal Note", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"internal_note_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/vendor-credits/{{id}}/delete-internal-note", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendor-credits", + "{{id}}", + "delete-internal-note" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"internal_note_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/vendor-credits/{{id}}/delete-internal-note", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "vendor-credits", + "{{id}}", + "delete-internal-note" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Inventory Adjustments", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/inventory-adjustments", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inventory-adjustments" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/inventory-adjustments", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inventory-adjustments" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"reference_number\": \"IA-001\",\n \"date\": \"2026-03-23\",\n \"chart_of_account\": 1,\n \"reason_id\": 1,\n \"job_card_id\": 1,\n \"invoice_id\": 1,\n \"notes\": \"Stock correction\",\n \"parts\": [\n {\n \"part_id\": 1,\n \"quantity\": 2,\n \"rate\": 25,\n \"description\": \"Adjustment line\"\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/inventory-adjustments", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inventory-adjustments" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"reference_number\": \"IA-001\",\n \"date\": \"2026-03-23\",\n \"chart_of_account\": 1,\n \"reason_id\": 1,\n \"job_card_id\": 1,\n \"invoice_id\": 1,\n \"notes\": \"Stock correction\",\n \"parts\": [\n {\n \"part_id\": 1,\n \"quantity\": 2,\n \"rate\": 25,\n \"description\": \"Adjustment line\"\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/inventory-adjustments", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inventory-adjustments" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"notes\": \"Updated adjustment\",\n \"parts\": [\n {\n \"part_id\": 1,\n \"quantity\": 3,\n \"rate\": 25\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/inventory-adjustments/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inventory-adjustments", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"notes\": \"Updated adjustment\",\n \"parts\": [\n {\n \"part_id\": 1,\n \"quantity\": 3,\n \"rate\": 25\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url}}/api/inventory-adjustments/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inventory-adjustments", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/inventory-adjustments/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inventory-adjustments", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/inventory-adjustments/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inventory-adjustments", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Add Attachment", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "attachments[]", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/inventory-adjustments/{{id}}/add-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inventory-adjustments", + "{{id}}", + "add-attachment" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "attachments[]", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/inventory-adjustments/{{id}}/add-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inventory-adjustments", + "{{id}}", + "add-attachment" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete Attachment", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"attachment_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/inventory-adjustments/{{id}}/delete-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inventory-adjustments", + "{{id}}", + "delete-attachment" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"attachment_id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/inventory-adjustments/{{id}}/delete-attachment", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "inventory-adjustments", + "{{id}}", + "delete-attachment" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Time Sheets", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/time-sheets", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "time-sheets" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/time-sheets", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "time-sheets" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"employee_id\": 1,\n \"date\": \"2026-03-23\",\n \"clock_in\": \"09:00:00\",\n \"clock_out\": \"17:00:00\",\n \"note\": \"Regular shift\",\n \"activity_type\": \"general\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/time-sheets", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "time-sheets" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"employee_id\": 1,\n \"date\": \"2026-03-23\",\n \"clock_in\": \"09:00:00\",\n \"clock_out\": \"17:00:00\",\n \"note\": \"Regular shift\",\n \"activity_type\": \"general\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/time-sheets", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "time-sheets" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Created successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"clock_out\": \"18:00:00\",\n \"note\": \"Overtime\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/time-sheets/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "time-sheets", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"clock_out\": \"18:00:00\",\n \"note\": \"Overtime\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/time-sheets/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "time-sheets", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/time-sheets/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "time-sheets", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/time-sheets/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "time-sheets", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Deleted successfully.\"\n}" + } + ] + }, + { + "name": "Clock In", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"employee_id\": 1,\n \"date\": \"2026-03-23\",\n \"activity_type\": \"general\",\n \"note\": \"Clock in\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/time-sheet/clock-in", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "time-sheet", + "clock-in" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"employee_id\": 1,\n \"date\": \"2026-03-23\",\n \"activity_type\": \"general\",\n \"note\": \"Clock in\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/time-sheet/clock-in", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "time-sheet", + "clock-in" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Clock Out", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"employee_id\": 1,\n \"date\": \"2026-03-23\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/time-sheet/clock-out", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "time-sheet", + "clock-out" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"employee_id\": 1,\n \"date\": \"2026-03-23\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/time-sheet/clock-out", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "time-sheet", + "clock-out" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Sample Item\",\n \"created_at\": \"2026-03-23T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-23T12:10:00.000000Z\"\n }\n}" + } + ] + } + ] + }, + { + "name": "Shop Timings", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/shop-timings", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-timings" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/shop-timings", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-timings" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"title\": \"Regular Shift\",\n \"in_time\": \"10:00:00\",\n \"out_time\": \"19:00:00\",\n \"full_day_hours\": \"09:00:00\",\n \"half_day_hours\": \"04:30:00\",\n \"punch_in\": \"10:00:00\",\n \"punch_out\": \"19:00:00\",\n \"before_time\": \"01:00:00\",\n \"after_time\": \"01:00:00\",\n \"is_default\": true,\n \"created_at\": \"2026-03-24T10:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T10:00:00.000000Z\"\n }\n ]\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Regular Shift\",\n \"in_time\": \"10:00:00\",\n \"out_time\": \"19:00:00\",\n \"full_day_hours\": \"09:00:00\",\n \"half_day_hours\": \"04:30:00\",\n \"punch_in\": \"10:00:00\",\n \"punch_out\": \"19:00:00\",\n \"before_time\": \"01:00:00\",\n \"after_time\": \"01:00:00\",\n \"is_default\": true\n}" + }, + "url": { + "raw": "{{base_url}}/api/shop-timings", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-timings" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Regular Shift\",\n \"in_time\": \"10:00:00\",\n \"out_time\": \"19:00:00\",\n \"full_day_hours\": \"09:00:00\",\n \"half_day_hours\": \"04:30:00\",\n \"punch_in\": \"10:00:00\",\n \"punch_out\": \"19:00:00\",\n \"before_time\": \"01:00:00\",\n \"after_time\": \"01:00:00\",\n \"is_default\": true\n}" + }, + "url": { + "raw": "{{base_url}}/api/shop-timings", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-timings" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Shop timing created successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Regular Shift\",\n \"in_time\": \"10:00:00\",\n \"out_time\": \"19:00:00\",\n \"full_day_hours\": \"09:00:00\",\n \"half_day_hours\": \"04:30:00\",\n \"punch_in\": \"10:00:00\",\n \"punch_out\": \"19:00:00\",\n \"before_time\": \"01:00:00\",\n \"after_time\": \"01:00:00\",\n \"is_default\": true,\n \"created_at\": \"2026-03-24T10:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T10:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Weekend Shift\",\n \"in_time\": \"09:00:00\",\n \"out_time\": \"15:00:00\",\n \"is_default\": false\n}" + }, + "url": { + "raw": "{{base_url}}/api/shop-timings/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-timings", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Weekend Shift\",\n \"in_time\": \"09:00:00\",\n \"out_time\": \"15:00:00\",\n \"is_default\": false\n}" + }, + "url": { + "raw": "{{base_url}}/api/shop-timings/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-timings", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Shop timing updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Weekend Shift\",\n \"in_time\": \"09:00:00\",\n \"out_time\": \"15:00:00\",\n \"full_day_hours\": \"06:00:00\",\n \"half_day_hours\": \"03:00:00\",\n \"punch_in\": \"09:00:00\",\n \"punch_out\": \"15:00:00\",\n \"before_time\": \"00:30:00\",\n \"after_time\": \"00:30:00\",\n \"is_default\": false,\n \"created_at\": \"2026-03-24T10:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T10:20:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/shop-timings/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-timings", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/shop-timings/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-timings", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Shop timing deleted successfully.\"\n}" + } + ] + }, + { + "name": "Set Default", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-default-shop-timing", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-default-shop-timing" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-default-shop-timing", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-default-shop-timing" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Default shop timing updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Regular Shift\",\n \"is_default\": true\n }\n}" + } + ] + }, + { + "name": "Remove Default", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/remove-default-shop-timing", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "remove-default-shop-timing" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/remove-default-shop-timing", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "remove-default-shop-timing" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Default shop timing removed successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Regular Shift\",\n \"is_default\": false\n }\n}" + } + ] + } + ] + }, + { + "name": "Holiday Years", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/holiday-years", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "holiday-years" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/holiday-years", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "holiday-years" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"year\": 2026,\n \"created_at\": \"2026-03-24T11:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T11:00:00.000000Z\"\n }\n ]\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"year\": 2026\n}" + }, + "url": { + "raw": "{{base_url}}/api/holiday-years", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "holiday-years" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"year\": 2026\n}" + }, + "url": { + "raw": "{{base_url}}/api/holiday-years", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "holiday-years" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Holiday year created successfully.\",\n \"data\": {\n \"id\": 1,\n \"year\": 2026,\n \"created_at\": \"2026-03-24T11:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T11:00:00.000000Z\"\n }\n}" + } + ] + } + ] + }, + { + "name": "Shop Calenders", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/shop-calenders", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-calenders" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/shop-calenders", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-calenders" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"title\": \"Default Calendar\",\n \"is_default\": true,\n \"created_at\": \"2026-03-24T10:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T10:00:00.000000Z\",\n \"shop_calender_days\": [\n {\n \"id\": 1,\n \"shop_calender_id\": 1,\n \"day_number\": 1,\n \"type\": \"full_day\",\n \"created_at\": \"2026-03-24T10:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T10:00:00.000000Z\"\n }\n ]\n }\n ],\n \"meta\": {\n \"current_page\": 1,\n \"last_page\": 1,\n \"per_page\": 15,\n \"total\": 1,\n \"from\": 1,\n \"to\": 1\n }\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Default Calendar\",\n \"is_default\": true\n}" + }, + "url": { + "raw": "{{base_url}}/api/shop-calenders", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-calenders" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"Default Calendar\",\n \"is_default\": true\n}" + }, + "url": { + "raw": "{{base_url}}/api/shop-calenders", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-calenders" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Shop calender created successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Default Calendar\",\n \"is_default\": true,\n \"created_at\": \"2026-03-24T10:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T10:00:00.000000Z\",\n \"shop_calender_days\": [\n {\n \"id\": 1,\n \"shop_calender_id\": 1,\n \"day_number\": 1,\n \"type\": \"full_day\"\n }\n ]\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/shop-calenders/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-calenders", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/shop-calenders/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-calenders", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Shop calender deleted successfully.\"\n}" + } + ] + }, + { + "name": "Set Default", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-default-shop-calender", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-default-shop-calender" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-default-shop-calender", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-default-shop-calender" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Default shop calender updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Default Calendar\",\n \"is_default\": true\n }\n}" + } + ] + }, + { + "name": "Remove Default", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/remove-default-shop-calender", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "remove-default-shop-calender" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/remove-default-shop-calender", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "remove-default-shop-calender" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Default shop calender removed successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Default Calendar\",\n \"is_default\": false\n }\n}" + } + ] + }, + { + "name": "Update Day Type", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"day_number\": 1,\n \"type\": \"week_off\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/shop-calenders/{{id}}/update-day-type", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-calenders", + "{{id}}", + "update-day-type" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"day_number\": 1,\n \"type\": \"week_off\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/shop-calenders/{{id}}/update-day-type", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "shop-calenders", + "{{id}}", + "update-day-type" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Shop calender day type updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"Default Calendar\",\n \"is_default\": true,\n \"shop_calender_days\": [\n {\n \"id\": 1,\n \"shop_calender_id\": 1,\n \"day_number\": 1,\n \"type\": \"week_off\"\n }\n ]\n }\n}" + } + ] + } + ] + }, + { + "name": "Holidays", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/holidays?holiday_year_id=1", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "holidays" + ], + "query": [ + { + "key": "holiday_year_id", + "value": "1" + } + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/holidays?holiday_year_id=1", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "holidays" + ], + "query": [ + { + "key": "holiday_year_id", + "value": "1" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"holiday_year_id\": 1,\n \"date\": \"2026-12-02\",\n \"name\": \"National Day\",\n \"created_at\": \"2026-03-24T11:10:00.000000Z\",\n \"updated_at\": \"2026-03-24T11:10:00.000000Z\",\n \"holiday_year\": {\n \"id\": 1,\n \"year\": 2026,\n \"created_at\": \"2026-03-24T11:00:00.000000Z\",\n \"updated_at\": \"2026-03-24T11:00:00.000000Z\"\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"holiday_year_id\": 1,\n \"date\": \"2026-12-02\",\n \"name\": \"National Day\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/holidays", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "holidays" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"holiday_year_id\": 1,\n \"date\": \"2026-12-02\",\n \"name\": \"National Day\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/holidays", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "holidays" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Holiday created successfully.\",\n \"data\": {\n \"id\": 1,\n \"holiday_year_id\": 1,\n \"date\": \"2026-12-02\",\n \"name\": \"National Day\",\n \"created_at\": \"2026-03-24T11:10:00.000000Z\",\n \"updated_at\": \"2026-03-24T11:10:00.000000Z\",\n \"holiday_year\": {\n \"id\": 1,\n \"year\": 2026\n }\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"National Day Holiday\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/holidays/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "holidays", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"National Day Holiday\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/holidays/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "holidays", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Holiday updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"holiday_year_id\": 1,\n \"date\": \"2026-12-02\",\n \"name\": \"National Day Holiday\",\n \"created_at\": \"2026-03-24T11:10:00.000000Z\",\n \"updated_at\": \"2026-03-24T11:20:00.000000Z\",\n \"holiday_year\": {\n \"id\": 1,\n \"year\": 2026\n }\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/holidays/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "holidays", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/holidays/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "holidays", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Holiday deleted successfully.\"\n}" + } + ] + } + ] + }, + { + "name": "Settings", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/settings", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "settings" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/settings", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "settings" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": {\n \"id\": 1,\n \"name\": \"Reparee\",\n \"email\": \"support@reparee.com\",\n \"phone\": \"1234567890\",\n \"alternative_phone\": \"0987654321\",\n \"website\": \"https://reparee.com\",\n \"time_zone\": \"Asia/Kolkata\",\n \"upi_id\": \"reparee@upi\",\n \"first_day_of_work\": \"monday\",\n \"latitude\": \"23.0225\",\n \"longitude\": \"72.5714\",\n \"bank_details\": \"Bank: Example Bank, A/C: 1234567890, IFSC: EXMP0001234\",\n \"first_address_line\": \"123 Business Park\",\n \"second_address_line\": \"Near Central Plaza\",\n \"country_id\": \"101\",\n \"state_id\": \"12\",\n \"city\": \"Ahmedabad\",\n \"zip_code\": \"380001\",\n \"logo\": \"settings/logo.png\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "name", + "value": "Reparee", + "type": "text" + }, + { + "key": "email", + "value": "support@reparee.com", + "type": "text" + }, + { + "key": "phone", + "value": "1234567890", + "type": "text" + }, + { + "key": "first_day_of_work", + "value": "monday", + "type": "text" + }, + { + "key": "logo", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/settings", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "settings" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "name", + "value": "Reparee", + "type": "text" + }, + { + "key": "email", + "value": "support@reparee.com", + "type": "text" + }, + { + "key": "phone", + "value": "1234567890", + "type": "text" + }, + { + "key": "first_day_of_work", + "value": "monday", + "type": "text" + }, + { + "key": "logo", + "value": "", + "type": "file" + } + ] + }, + "url": { + "raw": "{{base_url}}/api/settings", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "settings" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Settings updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"name\": \"Reparee\",\n \"email\": \"support@reparee.com\",\n \"phone\": \"1234567890\",\n \"alternative_phone\": \"0987654321\",\n \"website\": \"https://reparee.com\",\n \"time_zone\": \"Asia/Kolkata\",\n \"upi_id\": \"reparee@upi\",\n \"first_day_of_work\": \"monday\",\n \"latitude\": \"23.0225\",\n \"longitude\": \"72.5714\",\n \"bank_details\": \"Bank: Example Bank, A/C: 1234567890, IFSC: EXMP0001234\",\n \"first_address_line\": \"123 Business Park\",\n \"second_address_line\": \"Near Central Plaza\",\n \"country_id\": \"101\",\n \"state_id\": \"12\",\n \"city\": \"Ahmedabad\",\n \"zip_code\": \"380001\",\n \"logo\": \"settings/logo.png\"\n }\n}" + } + ] + } + ] + }, + { + "name": "Taxes", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/taxes", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "taxes" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/taxes", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "taxes" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"title\": \"VAT\",\n \"note\": \"Standard rate\",\n \"rate\": \"18.00\",\n \"is_default\": true,\n \"created_at\": \"2026-03-25T10:00:00.000000Z\",\n \"updated_at\": \"2026-03-25T10:00:00.000000Z\"\n }\n ]\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"VAT\",\n \"note\": \"Standard rate\",\n \"rate\": 18,\n \"is_default\": true\n}" + }, + "url": { + "raw": "{{base_url}}/api/taxes", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "taxes" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"VAT\",\n \"note\": \"Standard rate\",\n \"rate\": 18,\n \"is_default\": true\n}" + }, + "url": { + "raw": "{{base_url}}/api/taxes", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "taxes" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Tax created successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"VAT\",\n \"note\": \"Standard rate\",\n \"rate\": \"18.00\",\n \"is_default\": true,\n \"created_at\": \"2026-03-25T10:00:00.000000Z\",\n \"updated_at\": \"2026-03-25T10:00:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"VAT (updated)\",\n \"note\": \"Revised rate\",\n \"rate\": 20,\n \"is_default\": false\n}" + }, + "url": { + "raw": "{{base_url}}/api/taxes/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "taxes", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"VAT (updated)\",\n \"note\": \"Revised rate\",\n \"rate\": 20,\n \"is_default\": false\n}" + }, + "url": { + "raw": "{{base_url}}/api/taxes/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "taxes", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Tax updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"VAT (updated)\",\n \"note\": \"Revised rate\",\n \"rate\": \"20.00\",\n \"is_default\": false,\n \"created_at\": \"2026-03-25T10:00:00.000000Z\",\n \"updated_at\": \"2026-03-25T10:15:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/taxes/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "taxes", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/taxes/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "taxes", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Tax deleted successfully.\"\n}" + } + ] + }, + { + "name": "Set Default", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-default-tax", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-default-tax" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/set-default-tax", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "set-default-tax" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Default tax updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"VAT\",\n \"note\": \"Standard rate\",\n \"rate\": \"18.00\",\n \"is_default\": true,\n \"created_at\": \"2026-03-25T10:00:00.000000Z\",\n \"updated_at\": \"2026-03-25T10:20:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Remove Default", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/remove-default-tax", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "remove-default-tax" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/remove-default-tax", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "remove-default-tax" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Default tax removed successfully.\",\n \"data\": {\n \"id\": 1,\n \"title\": \"VAT\",\n \"note\": \"Standard rate\",\n \"rate\": \"18.00\",\n \"is_default\": false,\n \"created_at\": \"2026-03-25T10:00:00.000000Z\",\n \"updated_at\": \"2026-03-25T10:25:00.000000Z\"\n }\n}" + } + ] + } + ] + }, + { + "name": "Configurations", + "item": [ + { + "name": "Update Sales Tax Discount", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"sell_rates_tax_inclusive\": \"Tax Exclusive\",\n \"give_discounts\": \"transaction_level\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/configurations/sales_tax_discount", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "configurations", + "sales_tax_discount" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"sell_rates_tax_inclusive\": \"Tax Exclusive\",\n \"give_discounts\": \"transaction_level\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/configurations/sales_tax_discount", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "configurations", + "sales_tax_discount" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Sales tax and discount settings updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"sell_rates_tax_inclusive\": \"Tax Exclusive\",\n \"give_discounts\": \"transaction_level\",\n \"purchase_rates_tax_inclusive\": \"Tax Inclusive\",\n \"receive_discounts\": \"no\",\n \"enable_parts_issuing\": false,\n \"enable_digital_authorisation\": false,\n \"is_taxable_order\": false,\n \"customer_search_by_vehicle\": false,\n \"vehicle_search_by_customer\": false,\n \"odometer_in_check_in\": false,\n \"odometer_in_check_out\": false,\n \"customer_signature_in_check_in\": false,\n \"customer_signature_in_check_out\": false,\n \"set_packaged_pricing\": false,\n \"show_as_lump_sum\": false,\n \"mark_as_recommended\": false,\n \"created_at\": \"2026-03-30T16:00:00.000000Z\",\n \"updated_at\": \"2026-03-30T16:05:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update Purchase Tax Discount", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"purchase_rates_tax_inclusive\": \"Tax Exclusive\",\n \"receive_discounts\": \"line_item_level\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/configurations/purchase_tax_discount", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "configurations", + "purchase_tax_discount" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"purchase_rates_tax_inclusive\": \"Tax Exclusive\",\n \"receive_discounts\": \"line_item_level\"\n}" + }, + "url": { + "raw": "{{base_url}}/api/configurations/purchase_tax_discount", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "configurations", + "purchase_tax_discount" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Purchase tax and discount settings updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"sell_rates_tax_inclusive\": \"Tax Inclusive\",\n \"give_discounts\": \"no\",\n \"purchase_rates_tax_inclusive\": \"Tax Exclusive\",\n \"receive_discounts\": \"line_item_level\",\n \"enable_parts_issuing\": false,\n \"enable_digital_authorisation\": false,\n \"is_taxable_order\": false,\n \"customer_search_by_vehicle\": false,\n \"vehicle_search_by_customer\": false,\n \"odometer_in_check_in\": false,\n \"odometer_in_check_out\": false,\n \"customer_signature_in_check_in\": false,\n \"customer_signature_in_check_out\": false,\n \"set_packaged_pricing\": false,\n \"show_as_lump_sum\": false,\n \"mark_as_recommended\": false,\n \"created_at\": \"2026-03-30T16:00:00.000000Z\",\n \"updated_at\": \"2026-03-30T16:10:00.000000Z\"\n }\n}" + } + ] + }, + { + "name": "Update General Preferences", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"enable_parts_issuing\": true,\n \"enable_digital_authorisation\": true,\n \"is_taxable_order\": true,\n \"customer_search_by_vehicle\": true,\n \"vehicle_search_by_customer\": false,\n \"odometer_in_check_in\": true,\n \"odometer_in_check_out\": true,\n \"customer_signature_in_check_in\": true,\n \"customer_signature_in_check_out\": false,\n \"set_packaged_pricing\": true,\n \"show_as_lump_sum\": false,\n \"mark_as_recommended\": true\n}" + }, + "url": { + "raw": "{{base_url}}/api/configurations/general_preferences", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "configurations", + "general_preferences" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"enable_parts_issuing\": true,\n \"enable_digital_authorisation\": true,\n \"is_taxable_order\": true,\n \"customer_search_by_vehicle\": true,\n \"vehicle_search_by_customer\": false,\n \"odometer_in_check_in\": true,\n \"odometer_in_check_out\": true,\n \"customer_signature_in_check_in\": true,\n \"customer_signature_in_check_out\": false,\n \"set_packaged_pricing\": true,\n \"show_as_lump_sum\": false,\n \"mark_as_recommended\": true\n}" + }, + "url": { + "raw": "{{base_url}}/api/configurations/general_preferences", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "configurations", + "general_preferences" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"General preferences updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"sell_rates_tax_inclusive\": \"Tax Inclusive\",\n \"give_discounts\": \"no\",\n \"purchase_rates_tax_inclusive\": \"Tax Inclusive\",\n \"receive_discounts\": \"no\",\n \"enable_parts_issuing\": true,\n \"enable_digital_authorisation\": true,\n \"is_taxable_order\": true,\n \"customer_search_by_vehicle\": true,\n \"vehicle_search_by_customer\": false,\n \"odometer_in_check_in\": true,\n \"odometer_in_check_out\": true,\n \"customer_signature_in_check_in\": true,\n \"customer_signature_in_check_out\": false,\n \"set_packaged_pricing\": true,\n \"show_as_lump_sum\": false,\n \"mark_as_recommended\": true,\n \"created_at\": \"2026-03-30T16:00:00.000000Z\",\n \"updated_at\": \"2026-03-30T16:15:00.000000Z\"\n }\n}" + } + ] + } + ] + }, + { + "name": "Make and Models", + "item": [ + { + "name": "List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/make-and-models", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "make-and-models" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/api/make-and-models", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "make-and-models" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": 2024,\n \"sub_model\": \"LE\",\n \"body_type_id\": 1,\n \"fuel_id\": 1,\n \"transmission_id\": 1,\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"is_active\": true,\n \"is_default\": false,\n \"created_at\": \"2026-03-25T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-25T12:00:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"body_type\": {\n \"id\": 1,\n \"title\": \"Sedan\"\n },\n \"fuel\": {\n \"id\": 1,\n \"title\": \"Petrol\"\n },\n \"transmission\": {\n \"id\": 1,\n \"title\": \"Automatic\"\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"shop_type_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": 2024,\n \"sub_model\": \"LE\",\n \"body_type_id\": 1,\n \"fuel_id\": 1,\n \"transmission_id\": 1,\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"is_active\": true\n}" + }, + "url": { + "raw": "{{base_url}}/api/make-and-models", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "make-and-models" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"shop_type_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": 2024,\n \"sub_model\": \"LE\",\n \"body_type_id\": 1,\n \"fuel_id\": 1,\n \"transmission_id\": 1,\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"is_active\": true\n}" + }, + "url": { + "raw": "{{base_url}}/api/make-and-models", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "make-and-models" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Make and model created successfully.\",\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": 2024,\n \"sub_model\": \"LE\",\n \"body_type_id\": 1,\n \"fuel_id\": 1,\n \"transmission_id\": 1,\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"is_active\": true,\n \"is_default\": false,\n \"created_at\": \"2026-03-25T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-25T12:00:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"body_type\": {\n \"id\": 1,\n \"title\": \"Sedan\"\n },\n \"fuel\": {\n \"id\": 1,\n \"title\": \"Petrol\"\n },\n \"transmission\": {\n \"id\": 1,\n \"title\": \"Automatic\"\n }\n }\n}" + } + ] + }, + { + "name": "Update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"make\": \"Toyota\",\n \"model\": \"Camry Hybrid\",\n \"year\": 2025,\n \"is_active\": true\n}" + }, + "url": { + "raw": "{{base_url}}/api/make-and-models/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "make-and-models", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"make\": \"Toyota\",\n \"model\": \"Camry Hybrid\",\n \"year\": 2025,\n \"is_active\": true\n}" + }, + "url": { + "raw": "{{base_url}}/api/make-and-models/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "make-and-models", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Make and model updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry Hybrid\",\n \"year\": 2025,\n \"sub_model\": \"LE\",\n \"body_type_id\": 1,\n \"fuel_id\": 1,\n \"transmission_id\": 1,\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"is_active\": true,\n \"is_default\": false,\n \"created_at\": \"2026-03-25T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-25T12:30:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"body_type\": {\n \"id\": 1,\n \"title\": \"Sedan\"\n },\n \"fuel\": {\n \"id\": 1,\n \"title\": \"Petrol\"\n },\n \"transmission\": {\n \"id\": 1,\n \"title\": \"Automatic\"\n }\n }\n}" + } + ] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/make-and-models/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "make-and-models", + "{{id}}" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/api/make-and-models/{{id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "make-and-models", + "{{id}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Make and model deleted successfully.\"\n}" + } + ] + }, + { + "name": "Toggle Status", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/toggle-make-and-model-status", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "toggle-make-and-model-status" + ] + } + }, + "response": [ + { + "name": "Success Example", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": 1\n}" + }, + "url": { + "raw": "{{base_url}}/api/toggle-make-and-model-status", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "toggle-make-and-model-status" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Make and model status updated successfully.\",\n \"data\": {\n \"id\": 1,\n \"shop_type_id\": 1,\n \"make\": \"Toyota\",\n \"model\": \"Camry\",\n \"year\": 2024,\n \"sub_model\": \"LE\",\n \"body_type_id\": 1,\n \"fuel_id\": 1,\n \"transmission_id\": 1,\n \"engine_size\": \"2.5L\",\n \"drivetrain\": \"FWD\",\n \"is_active\": false,\n \"is_default\": false,\n \"created_at\": \"2026-03-25T12:00:00.000000Z\",\n \"updated_at\": \"2026-03-25T12:45:00.000000Z\",\n \"shop_type\": {\n \"id\": 1,\n \"title\": \"Main Workshop\"\n },\n \"body_type\": {\n \"id\": 1,\n \"title\": \"Sedan\"\n },\n \"fuel\": {\n \"id\": 1,\n \"title\": \"Petrol\"\n },\n \"transmission\": {\n \"id\": 1,\n \"title\": \"Automatic\"\n }\n }\n}" + } + ] + } + ] + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{auth_token}}", + "type": "string" + } + ] + }, + "variable": [ + { + "key": "base_url", + "value": "http://localhost:8000" + }, + { + "key": "auth_token", + "value": "YOUR_SANCTUM_TOKEN" + }, + { + "key": "id", + "value": "1" + } + ] } \ No newline at end of file diff --git a/packages/api/src/api.ts b/packages/api/src/api.ts index d61e558..08eee64 100644 --- a/packages/api/src/api.ts +++ b/packages/api/src/api.ts @@ -27,6 +27,10 @@ import { TasksClient } from "./clients/tasks" import { AppointmentsClient } from "./clients/appointments" import { ShopTimingsClient } from "./clients/shop-timings" import { ShopCalendarsClient } from "./clients/shop-calendars" +import { HolidayYearsClient } from "./clients/holiday-years" +import { TaxesClient } from "./clients/taxes" +import { InvoicesClient } from "./clients/invoices" +import { HomeClient } from "./clients/home" export function createApi(options?: ApiClientOptions) { return { @@ -58,6 +62,10 @@ export function createApi(options?: ApiClientOptions) { appointments: new AppointmentsClient(undefined, options), shopTimings: new ShopTimingsClient(undefined, options), shopCalendars: new ShopCalendarsClient(undefined, options), + holidayYears: new HolidayYearsClient(undefined, options), + taxes: new TaxesClient(undefined, options), + invoices: new InvoicesClient(undefined, options), + home: new HomeClient(undefined, options), } } diff --git a/packages/api/src/clients/expenses.ts b/packages/api/src/clients/expenses.ts index 5755a10..1db880c 100644 --- a/packages/api/src/clients/expenses.ts +++ b/packages/api/src/clients/expenses.ts @@ -3,6 +3,8 @@ import type { ApiPath, ApiRequestBody } from "../infra/types" import type { ApiListQueryParams } from "../contracts/types" export const EXPENSE_ROUTES = { + INDEX: "/api/expenses", + BY_ID: "/api/expenses/{id}", ITEMS: "/api/expense-items", ITEM_BY_ID: "/api/expense-items/{id}", TOGGLE_ITEM_STATUS: "/api/toggle-expense-item-status", @@ -71,4 +73,21 @@ export class ExpensesClient extends ApiClient { async destroyExpense(id: string) { return this.delete(EXPENSE_ROUTES.EXPENSE_BY_ID, { params: { id } }) } + + // ── Standard CRUD aliases (for ResourcePage compatibility) ── + async list(query?: ApiListQueryParams) { + return this.listExpenses(query) + } + + async create(payload: ApiRequestBody) { + return this.createExpense(payload) + } + + async update(id: string, payload: ApiRequestBody) { + return this.updateExpense(id, payload) + } + + async destroy(id: string) { + return this.destroyExpense(id) + } } diff --git a/packages/api/src/clients/holiday-years.ts b/packages/api/src/clients/holiday-years.ts new file mode 100644 index 0000000..b1f5323 --- /dev/null +++ b/packages/api/src/clients/holiday-years.ts @@ -0,0 +1,21 @@ +import { ApiClient, type ApiClientOptions } from "../infra/client" +import type { ApiPath, ApiRequestBody } from "../infra/types" +import type { ApiListQueryParams } from "../contracts/types" + +export const HOLIDAY_YEAR_ROUTES = { + INDEX: "/api/holiday-years", +} as const satisfies Record + +export class HolidayYearsClient extends ApiClient { + constructor(baseUrl?: string, defaultOptions?: ApiClientOptions) { + super(baseUrl, defaultOptions) + } + + async list(query?: ApiListQueryParams) { + return this.get(HOLIDAY_YEAR_ROUTES.INDEX, query ? { query } as never : undefined) + } + + async create(payload: ApiRequestBody) { + return this.post(HOLIDAY_YEAR_ROUTES.INDEX, payload) + } +} diff --git a/packages/api/src/clients/home.ts b/packages/api/src/clients/home.ts new file mode 100644 index 0000000..e245809 --- /dev/null +++ b/packages/api/src/clients/home.ts @@ -0,0 +1,18 @@ +import { ApiClient, type ApiClientOptions } from "../infra/client" +import type { ApiPath, ApiResponse } from "../infra/types" + +export const HOME_ROUTES = { + DASHBOARD: "/api/home", +} as const satisfies Record + +export type HomeDashboardResponse = ApiResponse + +export class HomeClient extends ApiClient { + constructor(baseUrl?: string, defaultOptions?: ApiClientOptions) { + super(baseUrl, defaultOptions) + } + + async dashboard() { + return this.get(HOME_ROUTES.DASHBOARD) + } +} diff --git a/packages/api/src/clients/index.ts b/packages/api/src/clients/index.ts index ca3baf6..66f894f 100644 --- a/packages/api/src/clients/index.ts +++ b/packages/api/src/clients/index.ts @@ -26,3 +26,7 @@ export { TasksClient, TASK_ROUTES } from "./tasks" export { AppointmentsClient, APPOINTMENT_ROUTES } from "./appointments" export { ShopTimingsClient, SHOP_TIMING_ROUTES } from "./shop-timings" export { ShopCalendarsClient, SHOP_CALENDAR_ROUTES } from "./shop-calendars" +export { HolidayYearsClient, HOLIDAY_YEAR_ROUTES } from "./holiday-years" +export { TaxesClient, TAX_ROUTES } from "./taxes" +export { InvoicesClient, INVOICE_ROUTES } from "./invoices" +export { HomeClient, HOME_ROUTES, type HomeDashboardResponse } from "./home" diff --git a/packages/api/src/clients/invoices.ts b/packages/api/src/clients/invoices.ts new file mode 100644 index 0000000..845c052 --- /dev/null +++ b/packages/api/src/clients/invoices.ts @@ -0,0 +1,109 @@ +import { CrudClient } from "../infra/crud-client" +import { ApiClient, type ApiClientOptions } from "../infra/client" +import type { ApiPath, ApiRequestBody } from "../infra/types" +import type { ApiListQueryParams } from "../contracts/types" + +export const INVOICE_ROUTES = { + INDEX: "/api/invoices", + BY_ID: "/api/invoices/{id}", + ADD_ATTACHMENT: "/api/invoices/{id}/add-attachment", + DELETE_ATTACHMENT: "/api/invoices/{id}/delete-attachment", + DOCUMENTS: "/api/invoice-documents", + DOCUMENT_BY_ID: "/api/invoice-documents/{id}", + NOTES: "/api/invoice-notes", + NOTE_BY_ID: "/api/invoice-notes/{id}", + LABELS: "/api/invoice-labels", + LABEL_BY_ID: "/api/invoice-labels/{id}", +} as const satisfies Record + +export class InvoicesClient extends ApiClient { + constructor(baseUrl?: string, defaultOptions?: ApiClientOptions) { + super(baseUrl, defaultOptions) + } + + // ── Invoices ── + async list(query?: ApiListQueryParams) { + return this.get(INVOICE_ROUTES.INDEX, query ? { query } as never : undefined) + } + + async show(id: string) { + return this.get(INVOICE_ROUTES.BY_ID, { params: { id } } as never) + } + + async create(payload: ApiRequestBody) { + return this.post(INVOICE_ROUTES.INDEX, payload) + } + + async update(id: string, payload: ApiRequestBody) { + return this.put(INVOICE_ROUTES.BY_ID, payload, { params: { id } }) + } + + async destroy(id: string) { + return this.delete(INVOICE_ROUTES.BY_ID, { params: { id } }) + } + + // ── Attachments ── + async addAttachment(id: string, file: File) { + const fd = new FormData() + fd.append("attachments[]", file) + return this.postFormData(`/api/invoices/${id}/add-attachment`, fd) + } + + async deleteAttachment(invoiceId: string, attachmentId: number) { + return this.delete(INVOICE_ROUTES.DELETE_ATTACHMENT, { + params: { id: invoiceId }, + body: { attachment_id: attachmentId }, + } as never) + } + + // ── Documents ── + async listDocuments(query?: ApiListQueryParams & { invoice_id?: string | number }) { + return this.get(INVOICE_ROUTES.DOCUMENTS, query ? { query } as never : undefined) + } + + async createDocument(payload: ApiRequestBody) { + return this.post(INVOICE_ROUTES.DOCUMENTS, payload) + } + + async updateDocument(id: string, payload: ApiRequestBody) { + return this.put(INVOICE_ROUTES.DOCUMENT_BY_ID, payload, { params: { id } }) + } + + async destroyDocument(id: string) { + return this.delete(INVOICE_ROUTES.DOCUMENT_BY_ID, { params: { id } }) + } + + // ── Notes ── + async listNotes(query?: ApiListQueryParams & { invoice_id?: string | number }) { + return this.get(INVOICE_ROUTES.NOTES, query ? { query } as never : undefined) + } + + async createNote(payload: ApiRequestBody) { + return this.post(INVOICE_ROUTES.NOTES, payload) + } + + async updateNote(id: string, payload: ApiRequestBody) { + return this.put(INVOICE_ROUTES.NOTE_BY_ID, payload, { params: { id } }) + } + + async destroyNote(id: string) { + return this.delete(INVOICE_ROUTES.NOTE_BY_ID, { params: { id } }) + } + + // ── Labels ── + async listLabels(query?: ApiListQueryParams) { + return this.get(INVOICE_ROUTES.LABELS, query ? { query } as never : undefined) + } + + async createLabel(payload: ApiRequestBody) { + return this.post(INVOICE_ROUTES.LABELS, payload) + } + + async updateLabel(id: string, payload: ApiRequestBody) { + return this.put(INVOICE_ROUTES.LABEL_BY_ID, payload, { params: { id } }) + } + + async destroyLabel(id: string) { + return this.delete(INVOICE_ROUTES.LABEL_BY_ID, { params: { id } }) + } +} diff --git a/packages/api/src/clients/job-cards.ts b/packages/api/src/clients/job-cards.ts index c300949..489509c 100644 --- a/packages/api/src/clients/job-cards.ts +++ b/packages/api/src/clients/job-cards.ts @@ -28,6 +28,11 @@ export class JobCardsClient extends ApiClient { return this.get(JOB_CARD_ROUTES.INDEX, query ? { query } as never : undefined) } + async show(id: string) { + const res = await this.get(JOB_CARD_ROUTES.INDEX, { params: { id }, query: { id } } as never) + return { ...res, data: res.data?.[0] ?? null, } + } + async create(payload: ApiRequestBody) { return this.post(JOB_CARD_ROUTES.INDEX, payload) } @@ -72,12 +77,16 @@ export class JobCardsClient extends ApiClient { return this.delete(JOB_CARD_ROUTES.DELETE_SHOP_RECOMMENDATION, { params: { id } }) } - async addAttachment(id: string, payload: ApiRequestBody) { - return this.post(JOB_CARD_ROUTES.ADD_ATTACHMENT, payload, { params: { id } }) + async addAttachment(id: string, files: File[]) { + const fd = new FormData() + for (const file of files) { + fd.append("attachments[]", file) + } + return this.postFormData(`/api/job-cards/${id}/add-attachment`, fd) } - async deleteAttachment(id: string, payload: ApiRequestBody) { - return this.post(JOB_CARD_ROUTES.DELETE_ATTACHMENT, payload, { params: { id } }) + async deleteAttachment(id: string, attachmentId: number) { + return this.post(JOB_CARD_ROUTES.DELETE_ATTACHMENT, { attachment_id: attachmentId } as never, { params: { id } }) } async changeServiceWriter(id: string, payload: ApiRequestBody) { diff --git a/packages/api/src/clients/taxes.ts b/packages/api/src/clients/taxes.ts new file mode 100644 index 0000000..23a7e0f --- /dev/null +++ b/packages/api/src/clients/taxes.ts @@ -0,0 +1,40 @@ +import { ApiClient, type ApiClientOptions } from "../infra/client" +import type { ApiPath, ApiRequestBody } from "../infra/types" +import type { ApiListQueryParams } from "../contracts/types" + +export const TAX_ROUTES = { + INDEX: "/api/taxes", + BY_ID: "/api/taxes/{id}", + SET_DEFAULT: "/api/set-default-tax", + REMOVE_DEFAULT: "/api/remove-default-tax", +} as const satisfies Record + +export class TaxesClient extends ApiClient { + constructor(baseUrl?: string, defaultOptions?: ApiClientOptions) { + super(baseUrl, defaultOptions) + } + + async list(query?: ApiListQueryParams) { + return this.get(TAX_ROUTES.INDEX, query ? { query } as never : undefined) + } + + async create(payload: ApiRequestBody) { + return this.post(TAX_ROUTES.INDEX, payload) + } + + async update(id: string, payload: ApiRequestBody) { + return this.put(TAX_ROUTES.BY_ID, payload, { params: { id } }) + } + + async destroy(id: string) { + return this.delete(TAX_ROUTES.BY_ID, { params: { id } }) + } + + async setDefault(payload: ApiRequestBody) { + return this.post(TAX_ROUTES.SET_DEFAULT, payload) + } + + async removeDefault(payload: ApiRequestBody) { + return this.post(TAX_ROUTES.REMOVE_DEFAULT, payload) + } +} diff --git a/packages/api/src/clients/vehicle-documents.ts b/packages/api/src/clients/vehicle-documents.ts index 0a9550e..c40d06f 100644 --- a/packages/api/src/clients/vehicle-documents.ts +++ b/packages/api/src/clients/vehicle-documents.ts @@ -34,16 +34,36 @@ export class VehicleDocumentsClient extends ApiClient { } // ── Vehicle Documents ── - async listDocuments(query?: ApiListQueryParams) { + async listDocuments(query?: ApiListQueryParams & { vehicle_id?: string | number }) { return this.get(VEHICLE_DOCUMENT_ROUTES.DOCUMENTS, query ? { query } as never : undefined) } - async createDocument(payload: ApiRequestBody) { - return this.post(VEHICLE_DOCUMENT_ROUTES.DOCUMENTS, payload) + async createDocument(payload: Record) { + const fd = new FormData() + for (const [key, value] of Object.entries(payload)) { + if (value == null) continue + if (value instanceof File) { + fd.append(key, value) + } else { + fd.append(key, String(value)) + } + } + return this.postFormData(VEHICLE_DOCUMENT_ROUTES.DOCUMENTS, fd) } - async updateDocument(id: string, payload: ApiRequestBody) { - return this.put(VEHICLE_DOCUMENT_ROUTES.DOCUMENT_BY_ID, payload, { params: { id } }) + async updateDocument(id: string, payload: Record) { + const fd = new FormData() + for (const [key, value] of Object.entries(payload)) { + if (value == null) continue + if (value instanceof File) { + fd.append(key, value) + } else { + fd.append(key, String(value)) + } + } + fd.append("_method", "PUT") + const url = VEHICLE_DOCUMENT_ROUTES.DOCUMENT_BY_ID.replace("{id}", id) + return this.postFormData(url, fd) } async destroyDocument(id: string) { @@ -51,7 +71,7 @@ export class VehicleDocumentsClient extends ApiClient { } // ── Mileage ── - async listMileage(query?: ApiListQueryParams) { + async listMileage(query?: ApiListQueryParams & { vehicle_id?: string | number }) { return this.get(VEHICLE_DOCUMENT_ROUTES.MILEAGE, query ? { query } as never : undefined) } diff --git a/packages/api/src/clients/vehicles.ts b/packages/api/src/clients/vehicles.ts index 160d7b4..57e8ff0 100644 --- a/packages/api/src/clients/vehicles.ts +++ b/packages/api/src/clients/vehicles.ts @@ -12,6 +12,19 @@ export const VEHICLE_ROUTES = { UNLINK_CUSTOMER: "/api/unlink-customer-from-vehicle", } as const satisfies Record +function buildVehicleFormData(payload: Record): FormData { + const fd = new FormData() + for (const [key, value] of Object.entries(payload)) { + if (value == null) continue + if (value instanceof File) { + fd.append(key, value) + } else { + fd.append(key, String(value)) + } + } + return fd +} + export class VehiclesClient extends ApiClient { constructor(baseUrl?: string, defaultOptions?: ApiClientOptions) { super(baseUrl, defaultOptions) @@ -21,12 +34,23 @@ export class VehiclesClient extends ApiClient { return this.get(VEHICLE_ROUTES.INDEX, query ? { query } as never : undefined) } - async create(payload: ApiRequestBody) { - return this.post(VEHICLE_ROUTES.INDEX, payload) + + async getById(id: string) { + return this.get(VEHICLE_ROUTES.BY_ID, { params: { id } }) } + async create(payload: ApiRequestBody) { + const fd = buildVehicleFormData(payload) + return this.postFormData(VEHICLE_ROUTES.INDEX, fd) + } + + + async update(id: string, payload: ApiRequestBody) { - return this.put(VEHICLE_ROUTES.BY_ID, payload, { params: { id } }) + const fd = buildVehicleFormData(payload) + fd.append("_method", "PUT") + const url = VEHICLE_ROUTES.BY_ID.replace("{id}", id) + return this.postFormData(url, fd) } async destroy(id: string) { @@ -41,8 +65,8 @@ export class VehiclesClient extends ApiClient { return this.post(VEHICLE_ROUTES.IMPORT, payload) } - async getOwners() { - return this.get(VEHICLE_ROUTES.GET_OWNERS) + async getOwners(vehicleId: string | number, query?: ApiListQueryParams) { + return this.get(VEHICLE_ROUTES.GET_OWNERS, { query: { vehicle_id: vehicleId, ...query } } as never) } async linkCustomer(payload: ApiRequestBody) { diff --git a/packages/api/types/index.ts b/packages/api/types/index.ts index ac8e2b4..f448eea 100644 --- a/packages/api/types/index.ts +++ b/packages/api/types/index.ts @@ -170,6 +170,534 @@ export interface paths { patch?: never; trace?: never; }; + "/api/home": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Home Dashboard */ + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** + * @example { + * "filters": { + * "period": "this_month", + * "start_date": "2026-03-01", + * "end_date": "2026-03-30", + * "available_periods": [ + * "today", + * "yesterday", + * "this_week", + * "this_month", + * "last_month", + * "last_3_months", + * "last_6_months", + * "last_year", + * "year_to_date", + * "all_time", + * "custom" + * ] + * }, + * "financial_filters": { + * "period": "this_month", + * "start_date": "2026-03-01", + * "end_date": "2026-03-30", + * "available_periods": [ + * "today", + * "yesterday", + * "this_week", + * "this_month", + * "last_month", + * "last_3_months", + * "last_6_months", + * "last_year", + * "year_to_date", + * "all_time", + * "custom" + * ] + * }, + * "work_orders_filters": { + * "period": "this_month", + * "start_date": "2026-03-01", + * "end_date": "2026-03-30", + * "available_periods": [ + * "today", + * "yesterday", + * "this_week", + * "this_month", + * "last_month", + * "last_3_months", + * "last_6_months", + * "last_year", + * "year_to_date", + * "all_time", + * "custom" + * ] + * }, + * "appointments_filters": { + * "period": "this_month", + * "start_date": "2026-03-01", + * "end_date": "2026-03-30", + * "available_periods": [ + * "today", + * "yesterday", + * "this_week", + * "this_month", + * "last_month", + * "last_3_months", + * "last_6_months", + * "last_year", + * "year_to_date", + * "all_time", + * "custom" + * ] + * }, + * "sales_filters": { + * "period": "this_month", + * "start_date": "2026-03-01", + * "end_date": "2026-03-30", + * "available_periods": [ + * "today", + * "yesterday", + * "this_week", + * "this_month", + * "last_month", + * "last_3_months", + * "last_6_months", + * "last_year", + * "year_to_date", + * "all_time", + * "custom" + * ] + * }, + * "purchase_filters": { + * "period": "this_month", + * "start_date": "2026-03-01", + * "end_date": "2026-03-30", + * "available_periods": [ + * "today", + * "yesterday", + * "this_week", + * "this_month", + * "last_month", + * "last_3_months", + * "last_6_months", + * "last_year", + * "year_to_date", + * "all_time", + * "custom" + * ] + * }, + * "chart": { + * "currency": "AED", + * "series": [ + * { + * "date": "2026-03-29", + * "income": 25000, + * "expense": 0 + * }, + * { + * "date": "2026-03-30", + * "income": 0, + * "expense": 0 + * } + * ] + * }, + * "totals": { + * "currency": "AED", + * "income": 25000, + * "expense": 0, + * "total_income_text": "AED 25,000.00", + * "total_expense_text": "AED 0.00" + * }, + * "financial_summary": { + * "currency": "AED", + * "chart": [ + * { + * "label": "Invoices", + * "count": 1, + * "amount": 25000 + * }, + * { + * "label": "Expenses", + * "count": 0, + * "amount": 0 + * }, + * { + * "label": "Bills", + * "count": 0, + * "amount": 0 + * } + * ] + * }, + * "work_orders_status": { + * "currency": "AED", + * "cards": [ + * { + * "status": "draft", + * "label": "Draft", + * "count": 1, + * "orders_text": "1 Orders", + * "amount": 0, + * "amount_text": "AED 0.00" + * }, + * { + * "status": "check_in", + * "label": "Check In", + * "count": 1, + * "orders_text": "1 Orders", + * "amount": 0, + * "amount_text": "AED 0.00" + * } + * ], + * "totals": { + * "orders": 2, + * "orders_text": "2 Orders", + * "amount": 0, + * "amount_text": "AED 0.00" + * } + * }, + * "appointments_summary": { + * "totals": { + * "completed": { + * "count": 0, + * "text": "0 Appt." + * }, + * "no_shows": { + * "count": 0, + * "text": "0 Appt." + * }, + * "no_shows_rate": { + * "value": 0, + * "text": "0%" + * }, + * "cancelled": { + * "count": 0, + * "text": "0 Appt." + * } + * } + * }, + * "upcoming_appointments": { + * "selected_filter": "today", + * "pagination": { + * "current_page": 1, + * "last_page": 1, + * "per_page": 10, + * "total": 1, + * "from": 1, + * "to": 1, + * "filter": "today" + * }, + * "today": { + * "count": 1, + * "text": "1 Appt.", + * "date": "2026-03-30", + * "details": [ + * { + * "id": 1, + * "job_card_id": 1, + * "title": "Oil Change Appointment", + * "date": "2026-03-30", + * "from_time": "10:00:00", + * "to_time": "11:00:00", + * "customer_id": 1, + * "vehicle_id": 1, + * "service_writer_id": 1, + * "technician_id": 2, + * "department_id": 1, + * "status": "confirmed", + * "notes": "Customer requested quick service" + * } + * ] + * }, + * "tomorrow": { + * "count": 0, + * "text": "0 Appt.", + * "date": "2026-03-31", + * "details": [] + * }, + * "this_week": { + * "count": 1, + * "text": "1 Appt.", + * "start_date": "2026-03-30", + * "end_date": "2026-04-05", + * "details": [] + * }, + * "next_week": { + * "count": 0, + * "text": "0 Appt.", + * "start_date": "2026-04-06", + * "end_date": "2026-04-12", + * "details": [] + * } + * }, + * "items_totals": { + * "parts": 10, + * "services": 8, + * "service_groups": 3, + * "total_items": 21 + * }, + * "customers_totals": { + * "individuals": 5, + * "companies": 2, + * "fleets": 1, + * "insurers": 1, + * "total_customers": 9 + * }, + * "body_types_vehicle_totals": [ + * { + * "body_type_id": 1, + * "body_type": "Sedan", + * "vehicles_count": 4 + * } + * ], + * "make_model_vehicle_totals": { + * "makes": [ + * { + * "make": "Toyota", + * "vehicles_count": 3 + * } + * ], + * "models": [ + * { + * "make": "Toyota", + * "model": "Camry", + * "vehicles_count": 2 + * } + * ] + * }, + * "sales_totals": { + * "inspections": 2, + * "estimates": 1, + * "invoices": 1, + * "total_sales_documents": 4 + * }, + * "purchase_totals": { + * "purchase_orders": 1, + * "bills": 0, + * "expenses": 0, + * "total_purchase_documents": 1 + * } + * } + */ + "application/json": { + filters?: { + period?: string; + start_date?: string; + end_date?: string; + available_periods?: string[]; + }; + financial_filters?: { + period?: string; + start_date?: string; + end_date?: string; + available_periods?: string[]; + }; + work_orders_filters?: { + period?: string; + start_date?: string; + end_date?: string; + available_periods?: string[]; + }; + appointments_filters?: { + period?: string; + start_date?: string; + end_date?: string; + available_periods?: string[]; + }; + sales_filters?: { + period?: string; + start_date?: string; + end_date?: string; + available_periods?: string[]; + }; + purchase_filters?: { + period?: string; + start_date?: string; + end_date?: string; + available_periods?: string[]; + }; + chart?: { + currency?: string; + series?: { + date?: string; + income?: number; + expense?: number; + }[]; + }; + totals?: { + currency?: string; + income?: number; + expense?: number; + total_income_text?: string; + total_expense_text?: string; + }; + financial_summary?: { + currency?: string; + chart?: { + label?: string; + count?: number; + amount?: number; + }[]; + }; + work_orders_status?: { + currency?: string; + cards?: { + status?: string; + label?: string; + count?: number; + orders_text?: string; + amount?: number; + amount_text?: string; + }[]; + totals?: { + orders?: number; + orders_text?: string; + amount?: number; + amount_text?: string; + }; + }; + appointments_summary?: { + totals?: { + completed?: { + count?: number; + text?: string; + }; + no_shows?: { + count?: number; + text?: string; + }; + no_shows_rate?: { + value?: number; + text?: string; + }; + cancelled?: { + count?: number; + text?: string; + }; + }; + }; + upcoming_appointments?: { + selected_filter?: string; + pagination?: { + current_page?: number; + last_page?: number; + per_page?: number; + total?: number; + from?: number; + to?: number; + filter?: string; + }; + today?: { + count?: number; + text?: string; + date?: string; + details?: { + id?: number; + job_card_id?: number; + title?: string; + date?: string; + from_time?: string; + to_time?: string; + customer_id?: number; + vehicle_id?: number; + service_writer_id?: number; + technician_id?: number; + department_id?: number; + status?: string; + notes?: string; + }[]; + }; + tomorrow?: { + count?: number; + text?: string; + date?: string; + details?: unknown[]; + }; + this_week?: { + count?: number; + text?: string; + start_date?: string; + end_date?: string; + details?: unknown[]; + }; + next_week?: { + count?: number; + text?: string; + start_date?: string; + end_date?: string; + details?: unknown[]; + }; + }; + items_totals?: { + parts?: number; + services?: number; + service_groups?: number; + total_items?: number; + }; + customers_totals?: { + individuals?: number; + companies?: number; + fleets?: number; + insurers?: number; + total_customers?: number; + }; + body_types_vehicle_totals?: { + body_type_id?: number; + body_type?: string; + vehicles_count?: number; + }[]; + make_model_vehicle_totals?: { + makes?: { + make?: string; + vehicles_count?: number; + }[]; + models?: { + make?: string; + model?: string; + vehicles_count?: number; + }[]; + }; + sales_totals?: { + inspections?: number; + estimates?: number; + invoices?: number; + total_sales_documents?: number; + }; + purchase_totals?: { + purchase_orders?: number; + bills?: number; + expenses?: number; + total_purchase_documents?: number; + }; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/api/referral-sources": { parameters: { query?: never; @@ -808,7 +1336,130 @@ export interface paths { path?: never; cookie?: never; }; - get?: never; + /** Show */ + get: { + parameters: { + query?: never; + header?: never; + path: { + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** + * @example { + * "data": { + * "id": 1, + * "customer_type_id": 1, + * "salutation": "Mr", + * "first_name": "John", + * "last_name": "Doe", + * "company_name": "Doe Holdings", + * "email": "john@example.com", + * "phone": "0501234567", + * "alternate_phone": "0551234567", + * "opening_balance": 0, + * "credit_limit": 5000, + * "website": "https://example.com", + * "referral_source_id": 1, + * "payment_terms_id": 1, + * "address_line_1": "Street 10", + * "address_line_2": "Near Central Plaza", + * "country_id": 1, + * "state_id": 1, + * "city": "Dubai", + * "zip_code": "00000", + * "created_at": "2026-03-23T12:00:00.000000Z", + * "updated_at": "2026-03-23T12:00:00.000000Z", + * "customer_type": { + * "id": 1, + * "name": "Retail" + * }, + * "referral_source": { + * "id": 1, + * "name": "Website" + * }, + * "payment_term": { + * "id": 1, + * "title": "Net 30", + * "days": 30 + * }, + * "country": { + * "id": 1, + * "name": "United Arab Emirates", + * "code": "AE" + * }, + * "state": { + * "id": 1, + * "name": "Dubai", + * "code": "DU" + * } + * } + * } + */ + "application/json": { + data?: { + id?: number; + customer_type_id?: number; + salutation?: string; + first_name?: string; + last_name?: string; + company_name?: string; + email?: string; + phone?: string; + alternate_phone?: string; + opening_balance?: number; + credit_limit?: number; + website?: string; + referral_source_id?: number; + payment_terms_id?: number; + address_line_1?: string; + address_line_2?: string; + country_id?: number; + state_id?: number; + city?: string; + zip_code?: string; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + customer_type?: { + id?: number; + name?: string; + }; + referral_source?: { + id?: number; + name?: string; + }; + payment_term?: { + id?: number; + title?: string; + days?: number; + }; + country?: { + id?: number; + name?: string; + code?: string; + }; + state?: { + id?: number; + name?: string; + code?: string; + }; + }; + }; + }; + }; + }; + }; /** Update */ put: { parameters: { @@ -1109,6 +1760,251 @@ export interface paths { patch?: never; trace?: never; }; + "/api/customers/{id}/add-note": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Add Note */ + post: { + parameters: { + query?: never; + header?: never; + path: { + id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + /** + * @example { + * "note": "Customer prefers afternoon appointments." + * } + */ + "application/json": { + note?: string; + }; + }; + }; + responses: { + /** @description Created */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** + * @example { + * "message": "Customer note added successfully.", + * "data": { + * "id": 1, + * "customer_id": 1, + * "note": "Customer prefers afternoon appointments.", + * "created_at": "2026-03-27T15:00:00.000000Z", + * "updated_at": "2026-03-27T15:00:00.000000Z" + * } + * } + */ + "application/json": { + message?: string; + data?: { + id?: number; + customer_id?: number; + note?: string; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }; + }; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/customers/{id}/delete-note": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** Delete Note */ + delete: { + parameters: { + query?: never; + header?: never; + path: { + id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + /** + * @example { + * "note_id": 1 + * } + */ + "application/json": { + note_id?: number; + }; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** + * @example { + * "message": "Customer note deleted successfully." + * } + */ + "application/json": { + message?: string; + }; + }; + }; + }; + }; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/customers/{id}/update-permissions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Update Permissions */ + post: { + parameters: { + query?: never; + header?: never; + path: { + id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + /** + * @example { + * "can_view_customers": true, + * "can_create_customers": false, + * "can_update_customers": true, + * "can_delete_customers": false, + * "can_view_invoices": true, + * "can_create_invoices": false + * } + */ + "application/json": { + can_view_customers?: boolean; + can_create_customers?: boolean; + can_update_customers?: boolean; + can_delete_customers?: boolean; + can_view_invoices?: boolean; + can_create_invoices?: boolean; + }; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** + * @example { + * "message": "Customer permissions updated successfully.", + * "data": { + * "id": 1, + * "first_name": "John", + * "last_name": "Doe", + * "email": "john@example.com", + * "can_view_customers": true, + * "can_create_customers": false, + * "can_update_customers": true, + * "can_delete_customers": false, + * "can_view_invoices": true, + * "can_create_invoices": false, + * "updated_at": "2026-03-27T16:00:00.000000Z" + * } + * } + */ + "application/json": { + message?: string; + data?: { + id?: number; + first_name?: string; + last_name?: string; + email?: string; + can_view_customers?: boolean; + can_create_customers?: boolean; + can_update_customers?: boolean; + can_delete_customers?: boolean; + can_view_invoices?: boolean; + can_create_invoices?: boolean; + /** Format: date-time */ + updated_at?: string; + }; + }; + }; + }; + /** @description Unprocessable Entity */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + /** + * @example { + * "message": "Validation failed.", + * "errors": { + * "permissions": [ + * "At least one permission field (can_*) is required." + * ] + * } + * } + */ + "application/json": { + message?: string; + errors?: { + permissions?: string[]; + }; + }; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/api/customer-types": { parameters: { query?: never; @@ -1549,7 +2445,7 @@ export interface paths { * "message": "Updated successfully.", * "data": { * "id": 1, - * "name": "Sample Item", + * "title": "Black", * "created_at": "2026-03-23T12:00:00.000000Z", * "updated_at": "2026-03-23T12:10:00.000000Z" * } @@ -1559,7 +2455,7 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; + title?: string; /** Format: date-time */ created_at?: string; /** Format: date-time */ @@ -1647,7 +2543,7 @@ export interface paths { * "message": "Updated successfully.", * "data": { * "id": 1, - * "name": "Sample Item", + * "title": "Black", * "created_at": "2026-03-23T12:00:00.000000Z", * "updated_at": "2026-03-23T12:10:00.000000Z" * } @@ -1657,7 +2553,7 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; + title?: string; /** Format: date-time */ created_at?: string; /** Format: date-time */ @@ -2571,7 +3467,7 @@ export interface paths { * "data": [ * { * "id": 1, - * "name": "Sample Item", + * "title": "Automatic", * "created_at": "2026-03-23T12:00:00.000000Z", * "updated_at": "2026-03-23T12:00:00.000000Z" * } @@ -2589,7 +3485,7 @@ export interface paths { "application/json": { data?: { id?: number; - name?: string; + title?: string; /** Format: date-time */ created_at?: string; /** Format: date-time */ @@ -2641,7 +3537,7 @@ export interface paths { * "message": "Created successfully.", * "data": { * "id": 1, - * "name": "Sample Item", + * "title": "Automatic", * "created_at": "2026-03-23T12:00:00.000000Z", * "updated_at": "2026-03-23T12:00:00.000000Z" * } @@ -2651,7 +3547,7 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; + title?: string; /** Format: date-time */ created_at?: string; /** Format: date-time */ @@ -2710,7 +3606,7 @@ export interface paths { * "message": "Updated successfully.", * "data": { * "id": 1, - * "name": "Sample Item", + * "title": "Automatic", * "created_at": "2026-03-23T12:00:00.000000Z", * "updated_at": "2026-03-23T12:10:00.000000Z" * } @@ -2720,7 +3616,7 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; + title?: string; /** Format: date-time */ created_at?: string; /** Format: date-time */ @@ -2795,7 +3691,7 @@ export interface paths { * "data": [ * { * "id": 1, - * "name": "Sample Item", + * "title": "Black", * "created_at": "2026-03-23T12:00:00.000000Z", * "updated_at": "2026-03-23T12:00:00.000000Z" * } @@ -2813,7 +3709,7 @@ export interface paths { "application/json": { data?: { id?: number; - name?: string; + title?: string; /** Format: date-time */ created_at?: string; /** Format: date-time */ @@ -2865,7 +3761,7 @@ export interface paths { * "message": "Created successfully.", * "data": { * "id": 1, - * "name": "Sample Item", + * "title": "Black", * "created_at": "2026-03-23T12:00:00.000000Z", * "updated_at": "2026-03-23T12:00:00.000000Z" * } @@ -2875,7 +3771,7 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; + title?: string; /** Format: date-time */ created_at?: string; /** Format: date-time */ @@ -2934,7 +3830,7 @@ export interface paths { * "message": "Updated successfully.", * "data": { * "id": 1, - * "name": "Sample Item", + * "title": "Black", * "created_at": "2026-03-23T12:00:00.000000Z", * "updated_at": "2026-03-23T12:10:00.000000Z" * } @@ -2944,7 +3840,7 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; + title?: string; /** Format: date-time */ created_at?: string; /** Format: date-time */ @@ -3019,9 +3915,26 @@ export interface paths { * "data": [ * { * "id": 1, - * "name": "Sample Item", + * "title": "Job Card 001", + * "customer_id": 1, + * "vehicle_id": 1, + * "sales_person_id": 1, + * "status": "draft", + * "department_id": 1, + * "check_in_date": "2026-03-18", + * "km_in": 50000, + * "tax_inclusive": "Tax Inclusive", + * "discount_type": "no", + * "discount_at": "inclusive_of_tax", * "created_at": "2026-03-23T12:00:00.000000Z", - * "updated_at": "2026-03-23T12:00:00.000000Z" + * "updated_at": "2026-03-23T12:00:00.000000Z", + * "labels": [], + * "documents": [], + * "purchase_orders_count": 0, + * "bills_count": 0, + * "expenses_count": 0, + * "tasks_count": 0, + * "appointments_count": 0 * } * ], * "meta": { @@ -3037,11 +3950,28 @@ export interface paths { "application/json": { data?: { id?: number; - name?: string; + title?: string; + customer_id?: number; + vehicle_id?: number; + sales_person_id?: number; + status?: string; + department_id?: number; + check_in_date?: string; + km_in?: number; + tax_inclusive?: string; + discount_type?: string; + discount_at?: string; /** Format: date-time */ created_at?: string; /** Format: date-time */ updated_at?: string; + labels?: unknown[]; + documents?: unknown[]; + purchase_orders_count?: number; + bills_count?: number; + expenses_count?: number; + tasks_count?: number; + appointments_count?: number; }[]; meta?: { current_page?: number; @@ -3241,7 +4171,136 @@ export interface paths { path?: never; cookie?: never; }; - get?: never; + /** Show */ + get: { + parameters: { + query?: never; + header?: never; + path: { + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** + * @example { + * "data": { + * "id": 1, + * "shop_type_id": 1, + * "vehicle_body_type_id": 1, + * "vehicle_fuel_type_id": 1, + * "vehicle_transmission_id": 1, + * "vehicle_color_id": 1, + * "image": null, + * "image_url": null, + * "make": "Toyota", + * "model": "Camry", + * "year": "2024", + * "sub_model": "LE", + * "license_plate": "ABC-123", + * "vin_number": "1HGBH41JXMN109186", + * "engine_number": null, + * "engine_size": "2.5L", + * "drivetrain": "FWD", + * "reg_date": null, + * "mfg_date": null, + * "parked_at": null, + * "mileage": "10000", + * "owners_number": "1", + * "front_tire_size": null, + * "rear_tire_size": null, + * "note": "New vehicle", + * "created_at": "2026-03-23T12:00:00.000000Z", + * "updated_at": "2026-03-23T12:00:00.000000Z", + * "shop_type": { + * "id": 1, + * "title": "Main Workshop" + * }, + * "vehicle_body_type": { + * "id": 1, + * "title": "Sedan" + * }, + * "vehicle_fuel_type": { + * "id": 1, + * "title": "Petrol" + * }, + * "vehicle_transmission": { + * "id": 1, + * "title": "Automatic" + * }, + * "vehicle_color": { + * "id": 1, + * "title": "Red", + * "code": "RD" + * } + * } + * } + */ + "application/json": { + data?: { + id?: number; + shop_type_id?: number; + vehicle_body_type_id?: number; + vehicle_fuel_type_id?: number; + vehicle_transmission_id?: number; + vehicle_color_id?: number; + image?: string | null; + image_url?: string | null; + make?: string; + model?: string; + year?: string; + sub_model?: string; + license_plate?: string; + vin_number?: string; + engine_number?: string | null; + engine_size?: string; + drivetrain?: string; + reg_date?: string | null; + mfg_date?: string | null; + parked_at?: string | null; + mileage?: string; + owners_number?: string; + front_tire_size?: string | null; + rear_tire_size?: string | null; + note?: string; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + shop_type?: { + id?: number; + title?: string; + }; + vehicle_body_type?: { + id?: number; + title?: string; + }; + vehicle_fuel_type?: { + id?: number; + title?: string; + }; + vehicle_transmission?: { + id?: number; + title?: string; + }; + vehicle_color?: { + id?: number; + title?: string; + code?: string; + }; + }; + }; + }; + }; + }; + }; /** Update */ put: { parameters: { @@ -3257,12 +4316,14 @@ export interface paths { /** * @example { * "mileage": "12000", - * "license_plate": "ABC-123" + * "license_plate": "ABC-123", + * "drivetrain": "FWD" * } */ "application/json": { mileage?: string; license_plate?: string; + drivetrain?: string; }; }; }; @@ -3598,6 +4659,122 @@ export interface paths { patch?: never; trace?: never; }; + "/api/get-makes": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Makes */ + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** + * @example { + * "data": [ + * "Toyota", + * "Honda" + * ] + * } + */ + "application/json": { + data?: string[]; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/get-models": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Models */ + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** + * @example { + * "data": [ + * "Camry", + * "Corolla" + * ] + * } + */ + "application/json": { + data?: string[]; + }; + }; + }; + /** @description Unprocessable Entity */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + /** + * @example { + * "message": "Validation failed.", + * "errors": { + * "make": [ + * "The make field is required." + * ] + * } + * } + */ + "application/json": { + message?: string; + errors?: { + make?: string[]; + }; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/api/get-vehicle-owners": { parameters: { query?: never; @@ -3986,12 +5163,19 @@ export interface paths { content: { /** * @example { - * "message": "Created successfully.", + * "message": "Customer remark updated successfully.", * "data": { * "id": 1, - * "name": "Sample Item", - * "created_at": "2026-03-23T12:00:00.000000Z", - * "updated_at": "2026-03-23T12:00:00.000000Z" + * "title": "Job Card 001", + * "customer_remarks": [ + * { + * "id": 1, + * "job_card_id": 1, + * "remark": "Updated remark", + * "created_at": "2026-03-23T12:00:00.000000Z", + * "updated_at": "2026-03-23T12:10:00.000000Z" + * } + * ] * } * } */ @@ -3999,11 +5183,16 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; - /** Format: date-time */ - created_at?: string; - /** Format: date-time */ - updated_at?: string; + title?: string; + customer_remarks?: { + id?: number; + job_card_id?: number; + remark?: string; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }[]; }; }; }; @@ -4100,11 +5289,21 @@ export interface paths { content: { /** * @example { - * "message": "Deleted successfully." + * "message": "Customer remark deleted successfully.", + * "data": { + * "id": 1, + * "title": "Job Card 001", + * "customer_remarks": [] + * } * } */ "application/json": { message?: string; + data?: { + id?: number; + title?: string; + customer_remarks?: unknown[]; + }; }; }; }; @@ -4212,12 +5411,19 @@ export interface paths { content: { /** * @example { - * "message": "Created successfully.", + * "message": "Shop recommendation added successfully.", * "data": { * "id": 1, - * "name": "Sample Item", - * "created_at": "2026-03-23T12:00:00.000000Z", - * "updated_at": "2026-03-23T12:00:00.000000Z" + * "title": "Job Card 001", + * "shop_recommendations": [ + * { + * "id": 1, + * "job_card_id": 1, + * "recommendation": "Replace brake pads", + * "created_at": "2026-03-23T12:00:00.000000Z", + * "updated_at": "2026-03-23T12:00:00.000000Z" + * } + * ] * } * } */ @@ -4225,11 +5431,16 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; - /** Format: date-time */ - created_at?: string; - /** Format: date-time */ - updated_at?: string; + title?: string; + shop_recommendations?: { + id?: number; + job_card_id?: number; + recommendation?: string; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }[]; }; }; }; @@ -4432,12 +5643,19 @@ export interface paths { content: { /** * @example { - * "message": "Created successfully.", + * "message": "Shop recommendation updated successfully.", * "data": { * "id": 1, - * "name": "Sample Item", - * "created_at": "2026-03-23T12:00:00.000000Z", - * "updated_at": "2026-03-23T12:00:00.000000Z" + * "title": "Job Card 001", + * "shop_recommendations": [ + * { + * "id": 1, + * "job_card_id": 1, + * "recommendation": "Updated recommendation", + * "created_at": "2026-03-23T12:00:00.000000Z", + * "updated_at": "2026-03-23T12:10:00.000000Z" + * } + * ] * } * } */ @@ -4445,11 +5663,16 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; - /** Format: date-time */ - created_at?: string; - /** Format: date-time */ - updated_at?: string; + title?: string; + shop_recommendations?: { + id?: number; + job_card_id?: number; + recommendation?: string; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }[]; }; }; }; @@ -4546,11 +5769,21 @@ export interface paths { content: { /** * @example { - * "message": "Deleted successfully." + * "message": "Shop recommendation deleted successfully.", + * "data": { + * "id": 1, + * "title": "Job Card 001", + * "shop_recommendations": [] + * } * } */ "application/json": { message?: string; + data?: { + id?: number; + title?: string; + shop_recommendations?: unknown[]; + }; }; }; }; @@ -4658,12 +5891,19 @@ export interface paths { content: { /** * @example { - * "message": "Created successfully.", + * "message": "Customer remark added successfully.", * "data": { * "id": 1, - * "name": "Sample Item", - * "created_at": "2026-03-23T12:00:00.000000Z", - * "updated_at": "2026-03-23T12:00:00.000000Z" + * "title": "Job Card 001", + * "customer_remarks": [ + * { + * "id": 1, + * "job_card_id": 1, + * "remark": "Customer requested wash", + * "created_at": "2026-03-23T12:00:00.000000Z", + * "updated_at": "2026-03-23T12:00:00.000000Z" + * } + * ] * } * } */ @@ -4671,11 +5911,16 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; - /** Format: date-time */ - created_at?: string; - /** Format: date-time */ - updated_at?: string; + title?: string; + customer_remarks?: { + id?: number; + job_card_id?: number; + remark?: string; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }[]; }; }; }; @@ -5153,7 +6398,96 @@ export interface paths { path?: never; cookie?: never; }; - get?: never; + /** Show */ + get: { + parameters: { + query?: never; + header?: never; + path: { + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** + * @example { + * "data": { + * "id": 1, + * "first_name": "Jane", + * "last_name": "Smith", + * "email": "jane@example.com", + * "phone": "0501234567", + * "department_id": 1, + * "position": "Technician", + * "status": "active", + * "type": "employee", + * "track_attendance": true, + * "notify_owner_when_punch_in_out": false, + * "shop_calender_id": 1, + * "shop_timing_id": 1, + * "geo_fence_radius": 100, + * "created_at": "2026-03-24T12:00:00.000000Z", + * "updated_at": "2026-03-24T12:00:00.000000Z", + * "department": { + * "id": 1, + * "name": "Mechanical" + * }, + * "shop_calender": { + * "id": 1, + * "title": "Default Calender" + * }, + * "shop_timing": { + * "id": 1, + * "title": "Default Shift" + * } + * } + * } + */ + "application/json": { + data?: { + id?: number; + first_name?: string; + last_name?: string; + email?: string; + phone?: string; + department_id?: number; + position?: string; + status?: string; + type?: string; + track_attendance?: boolean; + notify_owner_when_punch_in_out?: boolean; + shop_calender_id?: number; + shop_timing_id?: number; + geo_fence_radius?: number; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + department?: { + id?: number; + name?: string; + }; + shop_calender?: { + id?: number; + title?: string; + }; + shop_timing?: { + id?: number; + title?: string; + }; + }; + }; + }; + }; + }; + }; /** Update */ put: { parameters: { @@ -5376,12 +6710,19 @@ export interface paths { content: { /** * @example { - * "message": "Created successfully.", + * "message": "Customer remark updated successfully.", * "data": { * "id": 1, - * "name": "Sample Item", - * "created_at": "2026-03-23T12:00:00.000000Z", - * "updated_at": "2026-03-23T12:00:00.000000Z" + * "title": "Job Card 001", + * "customer_remarks": [ + * { + * "id": 1, + * "job_card_id": 1, + * "remark": "Updated remark", + * "created_at": "2026-03-23T12:00:00.000000Z", + * "updated_at": "2026-03-23T12:10:00.000000Z" + * } + * ] * } * } */ @@ -5389,11 +6730,16 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; - /** Format: date-time */ - created_at?: string; - /** Format: date-time */ - updated_at?: string; + title?: string; + customer_remarks?: { + id?: number; + job_card_id?: number; + remark?: string; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }[]; }; }; }; @@ -5490,11 +6836,21 @@ export interface paths { content: { /** * @example { - * "message": "Deleted successfully." + * "message": "Customer remark deleted successfully.", + * "data": { + * "id": 1, + * "title": "Job Card 001", + * "customer_remarks": [] + * } * } */ "application/json": { message?: string; + data?: { + id?: number; + title?: string; + customer_remarks?: unknown[]; + }; }; }; }; @@ -5724,12 +7080,19 @@ export interface paths { content: { /** * @example { - * "message": "Created successfully.", + * "message": "Shop recommendation added successfully.", * "data": { * "id": 1, - * "name": "Sample Item", - * "created_at": "2026-03-23T12:00:00.000000Z", - * "updated_at": "2026-03-23T12:00:00.000000Z" + * "title": "Job Card 001", + * "shop_recommendations": [ + * { + * "id": 1, + * "job_card_id": 1, + * "recommendation": "Replace brake pads", + * "created_at": "2026-03-23T12:00:00.000000Z", + * "updated_at": "2026-03-23T12:00:00.000000Z" + * } + * ] * } * } */ @@ -5737,11 +7100,16 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; - /** Format: date-time */ - created_at?: string; - /** Format: date-time */ - updated_at?: string; + title?: string; + shop_recommendations?: { + id?: number; + job_card_id?: number; + recommendation?: string; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }[]; }; }; }; @@ -6072,12 +7440,19 @@ export interface paths { content: { /** * @example { - * "message": "Created successfully.", + * "message": "Shop recommendation updated successfully.", * "data": { * "id": 1, - * "name": "Sample Item", - * "created_at": "2026-03-23T12:00:00.000000Z", - * "updated_at": "2026-03-23T12:00:00.000000Z" + * "title": "Job Card 001", + * "shop_recommendations": [ + * { + * "id": 1, + * "job_card_id": 1, + * "recommendation": "Updated recommendation", + * "created_at": "2026-03-23T12:00:00.000000Z", + * "updated_at": "2026-03-23T12:10:00.000000Z" + * } + * ] * } * } */ @@ -6085,11 +7460,16 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; - /** Format: date-time */ - created_at?: string; - /** Format: date-time */ - updated_at?: string; + title?: string; + shop_recommendations?: { + id?: number; + job_card_id?: number; + recommendation?: string; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }[]; }; }; }; @@ -6188,11 +7568,21 @@ export interface paths { content: { /** * @example { - * "message": "Deleted successfully." + * "message": "Shop recommendation deleted successfully.", + * "data": { + * "id": 1, + * "title": "Job Card 001", + * "shop_recommendations": [] + * } * } */ "application/json": { message?: string; + data?: { + id?: number; + title?: string; + shop_recommendations?: unknown[]; + }; }; }; }; @@ -9471,9 +10861,26 @@ export interface paths { * "data": [ * { * "id": 1, - * "name": "Sample Item", + * "title": "Job Card 001", + * "customer_id": 1, + * "vehicle_id": 1, + * "sales_person_id": 1, + * "status": "draft", + * "department_id": 1, + * "check_in_date": "2026-03-18", + * "km_in": 50000, + * "tax_inclusive": "Tax Inclusive", + * "discount_type": "no", + * "discount_at": "inclusive_of_tax", * "created_at": "2026-03-23T12:00:00.000000Z", - * "updated_at": "2026-03-23T12:00:00.000000Z" + * "updated_at": "2026-03-23T12:00:00.000000Z", + * "labels": [], + * "documents": [], + * "purchase_orders_count": 0, + * "bills_count": 0, + * "expenses_count": 0, + * "tasks_count": 0, + * "appointments_count": 0 * } * ], * "meta": { @@ -9489,11 +10896,28 @@ export interface paths { "application/json": { data?: { id?: number; - name?: string; + title?: string; + customer_id?: number; + vehicle_id?: number; + sales_person_id?: number; + status?: string; + department_id?: number; + check_in_date?: string; + km_in?: number; + tax_inclusive?: string; + discount_type?: string; + discount_at?: string; /** Format: date-time */ created_at?: string; /** Format: date-time */ updated_at?: string; + labels?: unknown[]; + documents?: unknown[]; + purchase_orders_count?: number; + bills_count?: number; + expenses_count?: number; + tasks_count?: number; + appointments_count?: number; }[]; meta?: { current_page?: number; @@ -9524,7 +10948,10 @@ export interface paths { * "title": "Job Card 001", * "customer_id": 1, * "vehicle_id": 1, - * "status": "draft" + * "status": "draft", + * "tax_inclusive": "Tax Inclusive", + * "discount_type": "no", + * "discount_at": "inclusive_of_tax" * } */ "application/json": { @@ -9532,6 +10959,9 @@ export interface paths { customer_id?: number; vehicle_id?: number; status?: string; + tax_inclusive?: string; + discount_type?: string; + discount_at?: string; }; }; }; @@ -9547,7 +10977,17 @@ export interface paths { * "message": "Created successfully.", * "data": { * "id": 1, - * "name": "Sample Item", + * "title": "Job Card 001", + * "customer_id": 1, + * "vehicle_id": 1, + * "sales_person_id": 1, + * "status": "draft", + * "department_id": null, + * "check_in_date": null, + * "km_in": null, + * "tax_inclusive": "Tax Inclusive", + * "discount_type": "no", + * "discount_at": "inclusive_of_tax", * "created_at": "2026-03-23T12:00:00.000000Z", * "updated_at": "2026-03-23T12:00:00.000000Z" * } @@ -9557,7 +10997,17 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; + title?: string; + customer_id?: number; + vehicle_id?: number; + sales_person_id?: number; + status?: string; + department_id?: string | null; + check_in_date?: string | null; + km_in?: string | null; + tax_inclusive?: string; + discount_type?: string; + discount_at?: string; /** Format: date-time */ created_at?: string; /** Format: date-time */ @@ -9603,7 +11053,10 @@ export interface paths { * "km_in": 50000, * "label_ids": [ * 1 - * ] + * ], + * "tax_inclusive": "Tax Exclusive", + * "discount_type": "transaction_level", + * "discount_at": "exclusive_of_tax" * } */ "application/json": { @@ -9613,6 +11066,9 @@ export interface paths { check_in_date?: string; km_in?: number; label_ids?: number[]; + tax_inclusive?: string; + discount_type?: string; + discount_at?: string; }; }; }; @@ -9628,8 +11084,17 @@ export interface paths { * "message": "Updated successfully.", * "data": { * "id": 1, - * "name": "Sample Item", - * "created_at": "2026-03-23T12:00:00.000000Z", + * "title": "Job Card 001 Updated", + * "customer_id": 1, + * "vehicle_id": 1, + * "sales_person_id": 1, + * "status": "check_in", + * "department_id": 1, + * "check_in_date": "2026-03-18", + * "km_in": 50000, + * "tax_inclusive": "Tax Exclusive", + * "discount_type": "transaction_level", + * "discount_at": "exclusive_of_tax", * "updated_at": "2026-03-23T12:10:00.000000Z" * } * } @@ -9638,9 +11103,17 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; - /** Format: date-time */ - created_at?: string; + title?: string; + customer_id?: number; + vehicle_id?: number; + sales_person_id?: number; + status?: string; + department_id?: number; + check_in_date?: string; + km_in?: number; + tax_inclusive?: string; + discount_type?: string; + discount_at?: string; /** Format: date-time */ updated_at?: string; }; @@ -9728,8 +11201,12 @@ export interface paths { * "message": "Updated successfully.", * "data": { * "id": 1, - * "name": "Sample Item", - * "created_at": "2026-03-23T12:00:00.000000Z", + * "title": "Job Card 001", + * "order_date": "2026-03-18", + * "status": "draft", + * "tax_inclusive": "Tax Inclusive", + * "discount_type": "no", + * "discount_at": "inclusive_of_tax", * "updated_at": "2026-03-23T12:10:00.000000Z" * } * } @@ -9738,9 +11215,12 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; - /** Format: date-time */ - created_at?: string; + title?: string; + order_date?: string; + status?: string; + tax_inclusive?: string; + discount_type?: string; + discount_at?: string; /** Format: date-time */ updated_at?: string; }; @@ -9798,8 +11278,11 @@ export interface paths { * "message": "Updated successfully.", * "data": { * "id": 1, - * "name": "Sample Item", - * "created_at": "2026-03-23T12:00:00.000000Z", + * "title": "Job Card 001", + * "status": "in_progress", + * "tax_inclusive": "Tax Inclusive", + * "discount_type": "no", + * "discount_at": "inclusive_of_tax", * "updated_at": "2026-03-23T12:10:00.000000Z" * } * } @@ -9808,9 +11291,11 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; - /** Format: date-time */ - created_at?: string; + title?: string; + status?: string; + tax_inclusive?: string; + discount_type?: string; + discount_at?: string; /** Format: date-time */ updated_at?: string; }; @@ -9865,12 +11350,19 @@ export interface paths { content: { /** * @example { - * "message": "Created successfully.", + * "message": "Customer remark added successfully.", * "data": { * "id": 1, - * "name": "Sample Item", - * "created_at": "2026-03-23T12:00:00.000000Z", - * "updated_at": "2026-03-23T12:00:00.000000Z" + * "title": "Job Card 001", + * "customer_remarks": [ + * { + * "id": 1, + * "job_card_id": 1, + * "remark": "Customer requested wash", + * "created_at": "2026-03-23T12:00:00.000000Z", + * "updated_at": "2026-03-23T12:00:00.000000Z" + * } + * ] * } * } */ @@ -9878,11 +11370,16 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; - /** Format: date-time */ - created_at?: string; - /** Format: date-time */ - updated_at?: string; + title?: string; + customer_remarks?: { + id?: number; + job_card_id?: number; + remark?: string; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }[]; }; }; }; @@ -9937,12 +11434,19 @@ export interface paths { content: { /** * @example { - * "message": "Created successfully.", + * "message": "Customer remark updated successfully.", * "data": { * "id": 1, - * "name": "Sample Item", - * "created_at": "2026-03-23T12:00:00.000000Z", - * "updated_at": "2026-03-23T12:00:00.000000Z" + * "title": "Job Card 001", + * "customer_remarks": [ + * { + * "id": 1, + * "job_card_id": 1, + * "remark": "Updated remark", + * "created_at": "2026-03-23T12:00:00.000000Z", + * "updated_at": "2026-03-23T12:10:00.000000Z" + * } + * ] * } * } */ @@ -9950,11 +11454,16 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; - /** Format: date-time */ - created_at?: string; - /** Format: date-time */ - updated_at?: string; + title?: string; + customer_remarks?: { + id?: number; + job_card_id?: number; + remark?: string; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }[]; }; }; }; @@ -9997,11 +11506,21 @@ export interface paths { content: { /** * @example { - * "message": "Deleted successfully." + * "message": "Customer remark deleted successfully.", + * "data": { + * "id": 1, + * "title": "Job Card 001", + * "customer_remarks": [] + * } * } */ "application/json": { message?: string; + data?: { + id?: number; + title?: string; + customer_remarks?: unknown[]; + }; }; }; }; @@ -10052,12 +11571,19 @@ export interface paths { content: { /** * @example { - * "message": "Created successfully.", + * "message": "Shop recommendation added successfully.", * "data": { * "id": 1, - * "name": "Sample Item", - * "created_at": "2026-03-23T12:00:00.000000Z", - * "updated_at": "2026-03-23T12:00:00.000000Z" + * "title": "Job Card 001", + * "shop_recommendations": [ + * { + * "id": 1, + * "job_card_id": 1, + * "recommendation": "Replace brake pads", + * "created_at": "2026-03-23T12:00:00.000000Z", + * "updated_at": "2026-03-23T12:00:00.000000Z" + * } + * ] * } * } */ @@ -10065,11 +11591,16 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; - /** Format: date-time */ - created_at?: string; - /** Format: date-time */ - updated_at?: string; + title?: string; + shop_recommendations?: { + id?: number; + job_card_id?: number; + recommendation?: string; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }[]; }; }; }; @@ -10124,12 +11655,19 @@ export interface paths { content: { /** * @example { - * "message": "Created successfully.", + * "message": "Shop recommendation updated successfully.", * "data": { * "id": 1, - * "name": "Sample Item", - * "created_at": "2026-03-23T12:00:00.000000Z", - * "updated_at": "2026-03-23T12:00:00.000000Z" + * "title": "Job Card 001", + * "shop_recommendations": [ + * { + * "id": 1, + * "job_card_id": 1, + * "recommendation": "Updated recommendation", + * "created_at": "2026-03-23T12:00:00.000000Z", + * "updated_at": "2026-03-23T12:10:00.000000Z" + * } + * ] * } * } */ @@ -10137,11 +11675,16 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; - /** Format: date-time */ - created_at?: string; - /** Format: date-time */ - updated_at?: string; + title?: string; + shop_recommendations?: { + id?: number; + job_card_id?: number; + recommendation?: string; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }[]; }; }; }; @@ -10184,11 +11727,21 @@ export interface paths { content: { /** * @example { - * "message": "Deleted successfully." + * "message": "Shop recommendation deleted successfully.", + * "data": { + * "id": 1, + * "title": "Job Card 001", + * "shop_recommendations": [] + * } * } */ "application/json": { message?: string; + data?: { + id?: number; + title?: string; + shop_recommendations?: unknown[]; + }; }; }; }; @@ -10238,8 +11791,8 @@ export interface paths { * "message": "Updated successfully.", * "data": { * "id": 1, - * "name": "Sample Item", - * "created_at": "2026-03-23T12:00:00.000000Z", + * "title": "Job Card 001", + * "attachments": "[\"job_card_attachments/file1.jpg\"]", * "updated_at": "2026-03-23T12:10:00.000000Z" * } * } @@ -10248,9 +11801,8 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; - /** Format: date-time */ - created_at?: string; + title?: string; + attachments?: string; /** Format: date-time */ updated_at?: string; }; @@ -10364,8 +11916,8 @@ export interface paths { * "message": "Updated successfully.", * "data": { * "id": 1, - * "name": "Sample Item", - * "created_at": "2026-03-23T12:00:00.000000Z", + * "title": "Job Card 001", + * "service_writer_id": 1, * "updated_at": "2026-03-23T12:10:00.000000Z" * } * } @@ -10374,9 +11926,8 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; - /** Format: date-time */ - created_at?: string; + title?: string; + service_writer_id?: number; /** Format: date-time */ updated_at?: string; }; @@ -10434,8 +11985,8 @@ export interface paths { * "message": "Updated successfully.", * "data": { * "id": 1, - * "name": "Sample Item", - * "created_at": "2026-03-23T12:00:00.000000Z", + * "title": "Job Card 001", + * "sales_person_id": 1, * "updated_at": "2026-03-23T12:10:00.000000Z" * } * } @@ -10444,9 +11995,8 @@ export interface paths { message?: string; data?: { id?: number; - name?: string; - /** Format: date-time */ - created_at?: string; + title?: string; + sales_person_id?: number; /** Format: date-time */ updated_at?: string; }; @@ -11152,7 +12702,100 @@ export interface paths { path?: never; cookie?: never; }; - get?: never; + /** Show */ + get: { + parameters: { + query?: never; + header?: never; + path: { + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** + * @example { + * "data": { + * "id": 1, + * "shop_type_id": 1, + * "category_id": 1, + * "title": "Brake Pad", + * "sku": "BP-001", + * "part_number": "BP-001-A", + * "unit_type_id": 1, + * "manufactured_by": "Bosch", + * "description": "Front brake pad set", + * "location": "Rack A-3", + * "pricing_matrix": "Standard", + * "department_id": 1, + * "sales_information": true, + * "selling_price": "45.00", + * "sales_chart_of_account": 4000, + * "purchase_information": true, + * "purchase_chart_of_account": 5000, + * "purchase_preferred_vendor_id": 1, + * "purchase_price": "25.00", + * "track_inventory": true, + * "opening_stock": 10, + * "as_on_date": "2026-03-20", + * "min_stock": 2, + * "max_stock": 50, + * "inventory_chart_of_account": 3000, + * "tracking_type": 1, + * "inventory_purchase_price": "24.00", + * "is_active": true, + * "created_at": "2026-03-23T12:00:00.000000Z", + * "updated_at": "2026-03-23T12:00:00.000000Z" + * } + * } + */ + "application/json": { + data?: { + id?: number; + shop_type_id?: number; + category_id?: number; + title?: string; + sku?: string; + part_number?: string; + unit_type_id?: number; + manufactured_by?: string; + description?: string; + location?: string; + pricing_matrix?: string; + department_id?: number; + sales_information?: boolean; + selling_price?: string; + sales_chart_of_account?: number; + purchase_information?: boolean; + purchase_chart_of_account?: number; + purchase_preferred_vendor_id?: number; + purchase_price?: string; + track_inventory?: boolean; + opening_stock?: number; + as_on_date?: string; + min_stock?: number; + max_stock?: number; + inventory_chart_of_account?: number; + tracking_type?: number; + inventory_purchase_price?: string; + is_active?: boolean; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }; + }; + }; + }; + }; + }; /** Update */ put: { parameters: { @@ -12065,7 +13708,84 @@ export interface paths { path?: never; cookie?: never; }; - get?: never; + /** Show */ + get: { + parameters: { + query?: never; + header?: never; + path: { + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** + * @example { + * "data": { + * "id": 1, + * "shop_type_id": 1, + * "category_id": 1, + * "labor_name": "Oil Change", + * "service_code": "SVC-001", + * "unit_type_id": 1, + * "labor_matrix": "Standard", + * "description": "Full synthetic oil change", + * "department_id": 1, + * "sales_information": true, + * "rate_type": "hourly", + * "labor_rate_id": 1, + * "labor_hours": "1.00", + * "sales_chart_of_account": 4000, + * "selling_price": "75.00", + * "purchase_information": false, + * "purchase_chart_of_account": null, + * "purchase_preferred_vendor_id": null, + * "purchase_price": null, + * "is_active": true, + * "created_at": "2026-03-23T12:00:00.000000Z", + * "updated_at": "2026-03-23T12:00:00.000000Z" + * } + * } + */ + "application/json": { + data?: { + id?: number; + shop_type_id?: number; + category_id?: number; + labor_name?: string; + service_code?: string; + unit_type_id?: number; + labor_matrix?: string; + description?: string; + department_id?: number; + sales_information?: boolean; + rate_type?: string; + labor_rate_id?: number; + labor_hours?: string; + sales_chart_of_account?: number; + selling_price?: string; + purchase_information?: boolean; + purchase_chart_of_account?: string | null; + purchase_preferred_vendor_id?: string | null; + purchase_price?: string | null; + is_active?: boolean; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }; + }; + }; + }; + }; + }; /** Update */ put: { parameters: { @@ -15038,7 +16758,116 @@ export interface paths { path?: never; cookie?: never; }; - get?: never; + /** Show */ + get: { + parameters: { + query?: never; + header?: never; + path: { + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** + * @example { + * "data": { + * "id": 1, + * "service_name": "Engine Service Group", + * "shop_type_id": 1, + * "code": "SG-001", + * "inventory_category_id": 1, + * "unit_type_id": 1, + * "department_id": 1, + * "service_description": "Common engine services", + * "show_as_lump_sum": false, + * "mark_as_recommended": true, + * "set_packaged_pricing": false, + * "selling_price": "100.00", + * "selling_chart_of_account": "4000", + * "is_active": true, + * "created_at": "2026-03-23T12:00:00.000000Z", + * "updated_at": "2026-03-23T12:00:00.000000Z", + * "shop_type": { + * "id": 1, + * "title": "Main Workshop" + * }, + * "inventory_category": { + * "id": 1, + * "title": "Engine" + * }, + * "unit_type": { + * "id": 1, + * "title": "Hour" + * }, + * "department": { + * "id": 1, + * "name": "Service Department" + * }, + * "labels": [ + * { + * "id": 1, + * "title": "Recommended", + * "color_code": "#00AAFF" + * } + * ] + * } + * } + */ + "application/json": { + data?: { + id?: number; + service_name?: string; + shop_type_id?: number; + code?: string; + inventory_category_id?: number; + unit_type_id?: number; + department_id?: number; + service_description?: string; + show_as_lump_sum?: boolean; + mark_as_recommended?: boolean; + set_packaged_pricing?: boolean; + selling_price?: string; + selling_chart_of_account?: string; + is_active?: boolean; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + shop_type?: { + id?: number; + title?: string; + }; + inventory_category?: { + id?: number; + title?: string; + }; + unit_type?: { + id?: number; + title?: string; + }; + department?: { + id?: number; + name?: string; + }; + labels?: { + id?: number; + title?: string; + color_code?: string; + }[]; + }; + }; + }; + }; + }; + }; /** Update */ put: { parameters: { @@ -15134,6 +16963,64 @@ export interface paths { patch?: never; trace?: never; }; + "/api/service-groups/{id}/toggle-status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Toggle Status */ + post: { + parameters: { + query?: never; + header?: never; + path: { + id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + /** @example {} */ + "application/json": Record; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** + * @example { + * "message": "Service group status updated successfully.", + * "data": { + * "id": 1, + * "is_active": false + * } + * } + */ + "application/json": { + message?: string; + data?: { + id?: number; + is_active?: boolean; + }; + }; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/api/service-groups/{id}/add-label": { parameters: { query?: never; @@ -21803,6 +23690,326 @@ export interface paths { patch?: never; trace?: never; }; + "/api/configurations/sales_tax_discount": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Update Sales Tax Discount */ + put: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + /** + * @example { + * "sell_rates_tax_inclusive": "Tax Exclusive", + * "give_discounts": "transaction_level" + * } + */ + "application/json": { + sell_rates_tax_inclusive?: string; + give_discounts?: string; + }; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** + * @example { + * "message": "Sales tax and discount settings updated successfully.", + * "data": { + * "id": 1, + * "sell_rates_tax_inclusive": "Tax Exclusive", + * "give_discounts": "transaction_level", + * "purchase_rates_tax_inclusive": "Tax Inclusive", + * "receive_discounts": "no", + * "enable_parts_issuing": false, + * "enable_digital_authorisation": false, + * "is_taxable_order": false, + * "customer_search_by_vehicle": false, + * "vehicle_search_by_customer": false, + * "odometer_in_check_in": false, + * "odometer_in_check_out": false, + * "customer_signature_in_check_in": false, + * "customer_signature_in_check_out": false, + * "set_packaged_pricing": false, + * "show_as_lump_sum": false, + * "mark_as_recommended": false, + * "created_at": "2026-03-30T16:00:00.000000Z", + * "updated_at": "2026-03-30T16:05:00.000000Z" + * } + * } + */ + "application/json": { + message?: string; + data?: { + id?: number; + sell_rates_tax_inclusive?: string; + give_discounts?: string; + purchase_rates_tax_inclusive?: string; + receive_discounts?: string; + enable_parts_issuing?: boolean; + enable_digital_authorisation?: boolean; + is_taxable_order?: boolean; + customer_search_by_vehicle?: boolean; + vehicle_search_by_customer?: boolean; + odometer_in_check_in?: boolean; + odometer_in_check_out?: boolean; + customer_signature_in_check_in?: boolean; + customer_signature_in_check_out?: boolean; + set_packaged_pricing?: boolean; + show_as_lump_sum?: boolean; + mark_as_recommended?: boolean; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }; + }; + }; + }; + }; + }; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/configurations/purchase_tax_discount": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Update Purchase Tax Discount */ + put: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + /** + * @example { + * "purchase_rates_tax_inclusive": "Tax Exclusive", + * "receive_discounts": "line_item_level" + * } + */ + "application/json": { + purchase_rates_tax_inclusive?: string; + receive_discounts?: string; + }; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** + * @example { + * "message": "Purchase tax and discount settings updated successfully.", + * "data": { + * "id": 1, + * "sell_rates_tax_inclusive": "Tax Inclusive", + * "give_discounts": "no", + * "purchase_rates_tax_inclusive": "Tax Exclusive", + * "receive_discounts": "line_item_level", + * "enable_parts_issuing": false, + * "enable_digital_authorisation": false, + * "is_taxable_order": false, + * "customer_search_by_vehicle": false, + * "vehicle_search_by_customer": false, + * "odometer_in_check_in": false, + * "odometer_in_check_out": false, + * "customer_signature_in_check_in": false, + * "customer_signature_in_check_out": false, + * "set_packaged_pricing": false, + * "show_as_lump_sum": false, + * "mark_as_recommended": false, + * "created_at": "2026-03-30T16:00:00.000000Z", + * "updated_at": "2026-03-30T16:10:00.000000Z" + * } + * } + */ + "application/json": { + message?: string; + data?: { + id?: number; + sell_rates_tax_inclusive?: string; + give_discounts?: string; + purchase_rates_tax_inclusive?: string; + receive_discounts?: string; + enable_parts_issuing?: boolean; + enable_digital_authorisation?: boolean; + is_taxable_order?: boolean; + customer_search_by_vehicle?: boolean; + vehicle_search_by_customer?: boolean; + odometer_in_check_in?: boolean; + odometer_in_check_out?: boolean; + customer_signature_in_check_in?: boolean; + customer_signature_in_check_out?: boolean; + set_packaged_pricing?: boolean; + show_as_lump_sum?: boolean; + mark_as_recommended?: boolean; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }; + }; + }; + }; + }; + }; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/configurations/general_preferences": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Update General Preferences */ + put: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + /** + * @example { + * "enable_parts_issuing": true, + * "enable_digital_authorisation": true, + * "is_taxable_order": true, + * "customer_search_by_vehicle": true, + * "vehicle_search_by_customer": false, + * "odometer_in_check_in": true, + * "odometer_in_check_out": true, + * "customer_signature_in_check_in": true, + * "customer_signature_in_check_out": false, + * "set_packaged_pricing": true, + * "show_as_lump_sum": false, + * "mark_as_recommended": true + * } + */ + "application/json": { + enable_parts_issuing?: boolean; + enable_digital_authorisation?: boolean; + is_taxable_order?: boolean; + customer_search_by_vehicle?: boolean; + vehicle_search_by_customer?: boolean; + odometer_in_check_in?: boolean; + odometer_in_check_out?: boolean; + customer_signature_in_check_in?: boolean; + customer_signature_in_check_out?: boolean; + set_packaged_pricing?: boolean; + show_as_lump_sum?: boolean; + mark_as_recommended?: boolean; + }; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** + * @example { + * "message": "General preferences updated successfully.", + * "data": { + * "id": 1, + * "sell_rates_tax_inclusive": "Tax Inclusive", + * "give_discounts": "no", + * "purchase_rates_tax_inclusive": "Tax Inclusive", + * "receive_discounts": "no", + * "enable_parts_issuing": true, + * "enable_digital_authorisation": true, + * "is_taxable_order": true, + * "customer_search_by_vehicle": true, + * "vehicle_search_by_customer": false, + * "odometer_in_check_in": true, + * "odometer_in_check_out": true, + * "customer_signature_in_check_in": true, + * "customer_signature_in_check_out": false, + * "set_packaged_pricing": true, + * "show_as_lump_sum": false, + * "mark_as_recommended": true, + * "created_at": "2026-03-30T16:00:00.000000Z", + * "updated_at": "2026-03-30T16:15:00.000000Z" + * } + * } + */ + "application/json": { + message?: string; + data?: { + id?: number; + sell_rates_tax_inclusive?: string; + give_discounts?: string; + purchase_rates_tax_inclusive?: string; + receive_discounts?: string; + enable_parts_issuing?: boolean; + enable_digital_authorisation?: boolean; + is_taxable_order?: boolean; + customer_search_by_vehicle?: boolean; + vehicle_search_by_customer?: boolean; + odometer_in_check_in?: boolean; + odometer_in_check_out?: boolean; + customer_signature_in_check_in?: boolean; + customer_signature_in_check_out?: boolean; + set_packaged_pricing?: boolean; + show_as_lump_sum?: boolean; + mark_as_recommended?: boolean; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }; + }; + }; + }; + }; + }; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/api/make-and-models": { parameters: { query?: never; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 93189d8..6319557 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,12 +23,12 @@ importers: '@base-ui/react': specifier: ^1.3.0 version: 1.3.0(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) - '@hookform/resolvers': - specifier: ^5.2.2 - version: 5.2.2(react-hook-form@7.72.0(react@19.2.4)) '@garage/api': specifier: workspace:* version: link:../../packages/api + '@hookform/resolvers': + specifier: ^5.2.2 + version: 5.2.2(react-hook-form@7.72.0(react@19.2.4)) '@tanstack/react-query': specifier: ^5.95.2 version: 5.95.2(react@19.2.4) @@ -65,6 +65,9 @@ importers: nuqs: specifier: ^2.8.9 version: 2.8.9(next@16.1.7(@babel/core@7.29.0)(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(react@19.2.4) + object-to-formdata: + specifier: ^4.5.1 + version: 4.5.1 radix-ui: specifier: ^1.4.3 version: 1.4.3(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) @@ -3747,6 +3750,9 @@ packages: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} engines: {node: '>= 0.4'} + object-to-formdata@4.5.1: + resolution: {integrity: sha512-QiM9D0NiU5jV6J6tjE1g7b4Z2tcUnKs1OPUi4iMb2zH+7jwlcUrASghgkFk9GtzqNNq8rTQJtT8AzjBAvLoNMw==} + object-treeify@1.1.33: resolution: {integrity: sha512-EFVjAYfzWqWsBMRHPMAXLCDIJnpMhdWAqR7xG6M6a2cs6PMFpl/+Z20w9zDW4vkxOFfddegBKq9Rehd0bxWE7A==} engines: {node: '>= 10'} @@ -8662,6 +8668,8 @@ snapshots: object-keys@1.1.1: {} + object-to-formdata@4.5.1: {} + object-treeify@1.1.33: {} object.assign@4.1.7: