# List WIP entries

**Work in Progress tracking with comprehensive financial lifecycle management**
This advanced endpoint provides complete WIP management including:
- WIP value tracking from creation through billing completion
- Outstanding balance calculations for unbilled work
- Multi-dimensional analysis (client, job, date-based)
- Financial aggregations for WIP reporting and analysis
- Integration with client and job data for complete context

**Financial Tracking Features:**
- WIP value recording and outstanding balance calculation
- Billed amount tracking for revenue recognition
- Write-off amount management for uncollectible WIP
- Job and client correlation for project profitability

**WIP Lifecycle Management:**
- Creation date logging for aging analysis
- WIP type categorization (TIME, EXPENSE, FIXED_FEE, etc.)
- Outstanding value calculation for billing preparation
- Billed amount reconciliation for revenue tracking

**Business Intelligence & Reporting:**
- Client-specific WIP analysis and aging
- Job-based profitability and WIP tracking
- WIP aging reports for collections management
- Revenue recognition and billing pipeline analysis

**Financial Aggregations:**
- Total WIP value across filtered records
- Outstanding WIP calculations for billing preparation
- Billed amount summaries for revenue analysis
- Write-off tracking for financial reporting

**Advanced Filtering:**
- Client-specific WIP retrieval and analysis
- Job-based WIP tracking for project management
- Date range queries for period-specific reporting
- WIP type filtering for category analysis

**Active Record Filtering:**
- Only active WIP records are returned by default (inactive records represent deletions)
- Each record includes `isActive` so clients can distinguish active from inactive when querying by ID

**Real Example:**

```bash
curl --location 'https://{{host}}/v1/wip' \
--header 'Authorization: bearer {{token}} \
--header 'Content-Type: application/json' \
--data '{
  "pageSize": 25,
  "page": 0
}'
```

Endpoint: POST /gql/v1/wip
Version: 1.0.0
Security: BearerAuth

## Request fields (application/json):

  - `pageSize` (integer)
    Maximum number of WIP records to return
    Example: 25

  - `page` (integer)
    Page number for pagination (0-based)
    Example: 0

  - `clientId` (integer)
    Filter WIP records by specific client ID
    Example: 1561

  - `jobId` (integer)
    Filter WIP records by specific job ID
    Example: 2514

  - `wipType` (string)
    Filter by WIP type
    Enum: "Time", "Expense", "Fixed_Fee", "Disbursement"

  - `startDate` (string)
    Start date for WIP logged date range filter
    Example: 2024-01-01T00:00:00

  - `endDate` (string)
    End date for WIP logged date range filter
    Example: 2024-12-31T23:59:59

  - `sortOrder` (string)
    Sort order for logged date
    Enum: "asc", "desc"

## Response 200 fields (application/json):

  - `deid_wip` (array)

  - `deid_wip.id` (integer)
    Unique WIP record identifier
    Example: 850321

  - `deid_wip.pmsRef` (string)
    Practice management system reference
    Example: 1789456

  - `deid_wip.wipType` (string)
    Type of WIP entry
    Example: Time

  - `deid_wip.loggedDate` (string)
    Date when WIP was logged
    Example: 2024-01-17T05:00:00

  - `deid_wip.wipValue` (number)
    Original WIP value recorded
    Example: 1250

  - `deid_wip.wipValueOutstanding` (number)
    Outstanding WIP value yet to be billed
    Example: 0

  - `deid_wip.billedAmount` (number)
    Amount that has been billed from this WIP
    Example: 1225

  - `deid_wip.writeOffAmount` (number)
    Amount written off as uncollectible
    Example: 25

  - `deid_wip.notes` (string)
    Additional notes or description for the WIP entry
    Example: Consultation and analysis for Q1 financial review

  - `deid_wip.clientId` (integer)
    Associated client identifier
    Example: 1561

  - `deid_wip.jobId` (integer)
    Associated job identifier
    Example: 2514

  - `deid_wip.isActive` (boolean)
    Whether the WIP record is active (inactive records represent deletions)
    Example: true

  - `deid_wip.createdAt` (string)
    WIP record creation timestamp
    Example: 2024-05-12T23:02:33.24516+00:00

  - `deid_wip.updatedAt` (string)
    WIP record last update timestamp
    Example: 2024-05-12T23:02:33.24516+00:00

  - `deid_wip.client` (object)
    Associated client information

  - `deid_wip.client.id` (integer)
    Example: 1561

  - `deid_wip.client.name` (string)
    Example: TechFlow Enterprises

  - `deid_wip.job` (object)
    Associated job information

  - `deid_wip.job.id` (integer)
    Example: 2514

  - `deid_wip.job.name` (string)
    Example: Q1 Financial Review 2024

  - `deid_wip_aggregate` (object)

  - `deid_wip_aggregate.aggregate` (object)

  - `deid_wip_aggregate.aggregate.count` (integer)
    Total number of WIP records matching criteria
    Example: 84

  - `deid_wip_aggregate.aggregate.sum` (object)

  - `deid_wip_aggregate.aggregate.sum.wipValue` (number)
    Total WIP value across all matching records
    Example: 24186.15

  - `deid_wip_aggregate.aggregate.sum.billedAmount` (number)
    Total billed amount across all matching records
    Example: 19612.07

  - `deid_wip_aggregate.aggregate.sum.wipValueOutstanding` (number)
    Total outstanding WIP value
    Example: 0

## Response 400 fields (application/json):

  - `error` (string)

  - `code` (string)

## Response 401 fields (application/json):

  - `error` (string)

  - `code` (string)

## Response 500 fields (application/json):

  - `error` (string)

  - `code` (string)

