DraftOrder.Search

Try it in Swagger

Endpoint

Request Schema

Headers

Header Required Notes
X-Api-Key Required when tenant is not resolved by subdomain Resolves the tenant/customer database.
Authorization: Bearer {token} Required for authorized endpoints Get a token from Auth/Token or Session/Create.

JSON Body

Body type: DraftOrderSearchDto

Field Type Required Notes
customers string[] No Customer codes to search. Defaults to the authenticated customer when omitted.
contactCode int? No Contact code filter. Contacts with "limit search to my orders" enabled are locked to their own contact code.
caseNumber string No Partial match against draft case number.
customerLocation string No Partial match against the customer location name (Customer.Name or Customer.FullName).
fileNumber string No Partial match against client matter / file number (TheirFileNumber).
subjectName string No Partial match against the order-type subject field (for example servee, patient name, pickup name, or insured name).
facilityName string No Partial match against photocopy facility names. Only photocopy drafts are returned when this filter is supplied.
plaintiff string No Partial match against plaintiff name.
defendant string No Partial match against defendant name.
orderTypes string[] No Limit results to specific draft order types. Supported values: COURT, PROCESS, DELIVERY, FILEANDSERVE, RECORDING, INVESTIGATIONS, PHOTOCOPY. When omitted, all draft order types are included.

All supplied filters are combined with AND logic. Omit a field to ignore that filter.

Request Sample

{
  "customers": ["8888"],
  "contactCode": 47172,
  "caseNumber": "24STCV",
  "fileNumber": "REF-12345",
  "plaintiff": "Acme",
  "defendant": "Doe",
  "subjectName": "John",
  "orderTypes": ["PROCESS", "PHOTOCOPY"]
}

Expected Response Schema

Status Codes

Status Notes
200 OK Matching draft orders were returned. An empty array means no drafts matched the filters.
400 Bad Request One or more requested customer codes are outside the authenticated contact's allowed customer scope.
404 Not Found The authenticated contact code could not be parsed from the token context.

Success Body

Response type: IReadOnlyList<DraftOrderSearchResultDto>

Field Type Notes
webOrder string Draft web order id (W123456).
orderType string Draft order type (COURT, PROCESS, DELIVERY, FILEANDSERVE, RECORDING, INVESTIGATIONS, PHOTOCOPY).
customerCode string Customer code that owns the draft.
contactCode int? Contact code stored on the draft, when present.
customerLocation string Customer location name resolved from the customer record.
referenceNumber string Client matter / file number.
plaintiff string Plaintiff name.
defendant string Defendant name.
subjectName string Order-type subject value used for searching (servee, patient, pickup name, insured name, etc.).
facilityName string First facility name on photocopy drafts; otherwise empty.
dateOrdered DateTime? Draft creation / order date.
caseNumber string Case number.

Response Sample

[
  {
    "webOrder": "W123456",
    "orderType": "PROCESS",
    "customerCode": "8888",
    "contactCode": 47172,
    "customerLocation": "Example Law Firm - Los Angeles",
    "referenceNumber": "REF-12345",
    "plaintiff": "Acme Corporation",
    "defendant": "John Doe",
    "subjectName": "John Doe",
    "facilityName": "",
    "dateOrdered": "2026-05-07T00:00:00",
    "caseNumber": "24STCV12345"
  }
]

Use {OrderType}/GetDraft/{webOrder} to load the full draft payload after locating a draft with this search endpoint.