Order Lifecycle: Drafts, Export, And Work Orders

Every Tristar order type follows the same two-stage lifecycle: it starts as a draft identified by a web order id, and once it is exported it is assigned a final work order id (the Winserve work order). This page explains how the create, save-draft, export, and lookup endpoints fit together.

This applies to all order types that support drafts and export:

The Two Identifiers

Identifier Example Created by Used to look up Notes
webOrder (web order id) W123456 Saving a draft (Create without export, or SaveDraft) {OrderType}/GetDraft/{webOrder} and {OrderType}/GetDrafts A pre-export draft. Editable and deletable until it is exported.
workOrderId (work order id) C123456 Exporting the draft (Create with export: true, or OrderExport/Export) {OrderType}/GetExisting/{workOrder} The final Winserve work order. This is the production order number.

A draft always returns a webOrder id. The final workOrderId only exists after export.

Stage 1: Create Or Save A Draft

Two ways to create a draft, both returning the webOrder string:

Draft response (a bare JSON string):

"W123456"

To update an existing draft, send the same webOrder value back in the request body. If that draft no longer exists (for example, it was already exported), the API returns 400 Bad Request with Draft not found or already exported.

Read or list drafts with:

Stage 2: Export To A Work Order

Exporting promotes the draft to a production Winserve work order and returns both identifiers. There are two equivalent ways to export:

  1. Create and export in one call: {OrderType}/Create with export: true.
  2. Export an existing draft later: OrderExport/Export with { "orderType": "Court", "webOrderId": "W123456" }.

Exported response:

{
  "webOrderId": "W123456",
  "workOrderId": "C123456",
  "generatedWorkOrders": [
    {
      "workOrder": "C123456",
      "servee": null
    }
  ]
}

After export the draft is consumed: it can no longer be re-exported or deleted, and GetDraft/{webOrder} no longer returns it.

When an export creates multiple work orders (for example a process order with multiple servees, or file-and-serve court + process work orders), workOrderId is the primary/first work order and generatedWorkOrders lists every work order created. Use generatedWorkOrders to track each related work order.

Exported orders are already live Winserve work orders. They do not appear in WinServe's Import Webservice Orders queue — that queue is only for the legacy foreign-webservice import flow. Operations should search for the returned workOrderId as a normal process/court/delivery/etc. work order.

The letters at the start of a work order (for example WP, LA, or C) come from the customer's branch company prefix settings. Different customers can get different prefixes; this is unrelated to v1 vs v2.

Supported orderType values for OrderExport/Export: Delivery, Investigation, Court, Process, FileAndServe, CountyRecording (County_Recording), and PhotoCopy (Photo_Copy, Copy, X).

Stage 3: Look Up The Exported Order

Use the workOrderId from the export response with {OrderType}/GetExisting/{workOrder} to read the live order, including workflow status, milestones, invoice details, and downloads.

GetExisting does not resolve draft web orders. Until an order is exported, read it with GetDraft/{webOrder}; only after export should you switch to GetExisting/{workOrder}.

End-To-End Flow

SaveDraft / Create (export:false)  ->  "W123456"            (webOrder, draft)
        |
        v
GetDraft/W123456                   ->  draft detail          (edit/review)
        |
        v
Create (export:true)  OR  OrderExport/Export
                                   ->  { webOrderId: "W123456",
                                         workOrderId: "C123456" }
        |
        v
GetExisting/C123456                ->  live order detail      (workOrder)