> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search NetSuite sales orders

> Matching NetSuite sales orders

### Path parameters

<ParamField path="tenant_id" type="string" required>
  Tenant identifier
</ParamField>

### Request body

`object`

<ParamField body="query" type="object">
  Query parameters as key-value pairs
</ParamField>

### Response

`object`

<ResponseField name="items" type="object[]" required>
  List of matching sales orders
</ResponseField>

<ResponseField name="totalResults" type="integer">
  Total number of results
</ResponseField>

<ResponseField name="links" type="object[]">
  Pagination links
</ResponseField>

<ResponseField name="raw" type="object" required>
  Raw API response
</ResponseField>

### Status codes

| Code  | Meaning                             |
| ----- | ----------------------------------- |
| `200` | Matching NetSuite sales orders      |
| `401` | Unauthorized                        |
| `424` | NetSuite integration not configured |
| `502` | NetSuite API error                  |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.sync.stateset.com/v1/tenants/{tenant_id}/netsuite/sales-orders/search' \
    --header 'x-stateset-api-key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "query": {}
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "items": [
      {}
    ],
    "totalResults": 1,
    "links": [
      {}
    ],
    "raw": {}
  }
  ```
</ResponseExample>
