---
title: "Search globally"
method: POST
path: "/global-search"
tags: ["Search"]
---

# Search globally

`POST /global-search`

Search across multiple entity types simultaneously (shipments, customers, carriers, users, vendors).

**Use Cases:**
- Unified search bar for finding any type of record
- Quick lookup by name, ID, or reference number
- Cross-entity discovery

**Search Behavior:**
- Searches across default searchable fields for each entity type
- Results are sorted by object type priority: SHIPMENT → CUSTOMER → CARRIER → USER → VENDOR
- Within each object type, results are sorted by most recently updated

**Prefix Filtering:**
Use "type:query" syntax to search specific object types:
- `carrier:acme` - searches only carriers
- `shipment:12345` - searches only shipments
- `customer:west` - searches only customers

**IMPORTANT: Eventually Consistent**
This endpoint queries OpenSearch indices which are updated asynchronously.
Changes typically appear within 2 seconds, but this is not guaranteed.

## Request body

- GlobalSearchRequest — Request body for global search across multiple entity types
  - `query` string, required — Search query string. Searches across default searchable fields for each entity type. Supports prefix filtering using "type:query" syntax: - `carrier:acme` - searches only carriers for "acme" - `shipment:12345` - searches only shipments for "12345" - `user:john` - searches only users for "john"
  - `objects` GlobalSearchObjectType[] — Optional filter to limit search to specific object types. If not provided, searches across all object types.
  - `pagination` SearchPaginationInput — Pagination options for search requests
    - `pageNumber` integer — Page number (1-based)
    - `pageSize` integer — Number of results per page (max 250)

## Response `200`

Search results

- GlobalSearchResponse — Response for global search requests
  - `data` GlobalSearchRow[], required — Search results sorted by object type priority: SHIPMENT → CUSTOMER → CARRIER → USER → VENDOR
    - `object` 'SHIPMENT' | 'CUSTOMER' | 'CARRIER' | 'USER' | 'VENDOR', required — Object types available for global search: - `SHIPMENT`: Shipment records - `CUSTOMER`: Customer/shipper profiles - `CARRIER`: Carrier profiles - `USER`: User accounts - `VENDOR`: Vendor profiles
    - `id` string, uuid, required — Unique identifier of the matched record
    - `key` string, nullable — Client-defined reference identifier if set
    - `entityName` string, required — Internal entity type name (for backwards compatibility). Prefer using the `object` field instead.
    - `title` string, required — Primary display text for the result (e.g., name, friendlyId)
    - `subtitle` string, nullable — Secondary display text (varies by entity type)
    - `field` string, required — Name of the field that matched the search query
    - `highlight` string, nullable — Matched text with highlight markers. Contains HTML &lt;em&gt; tags around matched portions.
  - `pagination` SearchPaginationInfo, required — Pagination information for search results
    - `pageNumber` integer, required — Current page number
    - `pageSize` integer, required — Number of results returned on this page
    - `totalPages` integer, required — Total number of pages available
  - `totalResults` integer, required — Total number of matching results across all object types

## Other responses

- `400` — Bad request - invalid input
- `401` — Unauthorized - invalid or missing access token
- `422` — Validation error - invalid field values
- `429` — Rate limit exceeded

---

[API](https://skmtc.net/mvmnt/apis/mvmnt-api.md) · [All operations](https://skmtc.net/mvmnt/apis/mvmnt-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mvmnt/mvmnt-api/revisions/53b310bb74a0/schema)
