Preview smart listing results
# Preview smart listing results
Returns all product variants that match the specified listing rules without creating a listing
POST
/api/v1/{team_slug}/{app_slug}/smart-listings/preview
PurposeReturns all product variants that match the specified listing rules without creating a listing
Required inputsapp_slug path team_slug path
Primary response200 ยท All product-variants affected by the listing rules
Operation keymanagement-api:POST:/api/v1/{team_slug}/{app_slug}/smart-listings/preview
## API ownership
- API family: Management API
- Best for: Trusted back-office workflows that create, update, organize, or delete merchant-owned data.
- Do not use from: Browser-only storefront code or public clients.
- Guide route: [/apis/management/latest](/apis/management/latest)
The OpenAPI contract defines the method, path, parameters, request body, and responses for this operation.
## Operation
- Method: `POST`
- Path: `/api/v1/{team_slug}/{app_slug}/smart-listings/preview`
- Summary: Preview smart listing results
- Description: Returns all product variants that match the specified listing rules without creating a listing
- OpenAPI contract:
management-api
- Operation ID: Not documented in the OpenAPI contract.
- Stable operation key: `management-api:POST:/api/v1/{team_slug}/{app_slug}/smart-listings/preview`
Operation key uses API family, method, and path because this OpenAPI contract does not publish an operation ID.
## Parameters
| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| app_slug | path | Yes | string | App slug |
| team_slug | path | Yes | string | Team slug |
## Request body
- Required: Yes
- Description: smart-listing configuration
- Content: application/json (object)
### Smart Listing Request
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `rules` | object[] | Yes | - |
| `slug` | string | Yes | - |
#### Listing Rule Request
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `operator` | enum("equal", "not-equal", "greater-than", "less-than", "contains") | Yes | - |
| `target` | enum("stock", "price", "attribute", "title", "category") | Yes | - |
| `target_id` | string | No | used for warehouse stock validation |
| `value_float` | number | No | - |
| `value_list` | string[] | No | - |
| `value_string` | string | No | - |
**Generated example (synthetic):**
```json
{
"rules": [
{
"operator": "equal",
"target": "stock",
"target_id": "string",
"value_float": 0,
"value_list": [
"string"
],
"value_string": "string"
}
],
"slug": "string"
}
```
## Responses
| Status | Description | Content |
| --- | --- | --- |
| 200 | All product-variants affected by the listing rules | application/json (object) |
| 400 | Invalid request (e.g. bad UUID, validation error) | application/json (object) |
| 401 | Unauthorized access | application/json (object) |
| 422 | Invalid request and not parsable by backend | application/json (object) |
| 500 | Internal server error | application/json (object) |
### 200 - object
#### Smart Listing Products
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `data` | object[] | No | - |
| `details` | string[] | No | Additional contextual information about the response. Used to provide supplementary details beyond the main data payload, such as validation warnings or processing notes |
| `success` | boolean | No | - |
##### Listing Product Variant
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `app_id` | string | No | - |
| `attributes` | object[] | No | - |
| `category_slugs` | string[] | No | - |
| `custom_fields` | object | No | - |
| `id` | string | No | - |
| `image_urls` | string[] | No | - |
| `prices` | object[] | No | - |
| `product_id` | string | No | - |
| `product_name` | string | No | - |
| `total_stock` | integer | No | - |
| `variant_name` | string | No | - |
| `variant_number` | string | No | - |
| `warehouse_stocks` | object[] | No | - |
##### Product Listing Attribute
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `template_id` | string | No | - |
| `template_name` | string | No | - |
| `values` | string[] | No | - |
##### Price
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `amount` | number | No | - |
| `currency` | string | No | - |
| `on_sale` | boolean | No | - |
##### Warehouse Stock
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `stock` | integer | No | - |
| `warehouse_id` | string | No | - |
Generated example (synthetic)
```json
{
"data": [
{
"app_id": "string",
"attributes": [
{
"template_id": null,
"template_name": null,
"values": null
}
],
"category_slugs": [
"string"
],
"custom_fields": {},
"id": "string",
"image_urls": [
"string"
],
"prices": [
{
"amount": null,
"currency": null,
"on_sale": null
}
],
"product_id": "string",
"product_name": "string",
"total_stock": 0,
"variant_name": "string",
"variant_number": "string",
"warehouse_stocks": [
{
"stock": null,
"warehouse_id": null
}
]
}
],
"details": [
"string"
],
"success": false
}
```
### 400 - object
#### Error Message
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `details` | string[] | No | - |
| `message` | string | No | - |
| `success` | boolean | No | - |
**Generated example (synthetic):**
```json
{
"details": [
"string"
],
"message": "string",
"success": false
}
```
### 401 - object
#### Error Message
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `details` | string[] | No | - |
| `message` | string | No | - |
| `success` | boolean | No | - |
**Generated example (synthetic):**
```json
{
"details": [
"string"
],
"message": "string",
"success": false
}
```
### 422 - object
#### Error Message
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `details` | string[] | No | - |
| `message` | string | No | - |
| `success` | boolean | No | - |
**Generated example (synthetic):**
```json
{
"details": [
"string"
],
"message": "string",
"success": false
}
```
### 500 - object
#### Error Message
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `details` | string[] | No | - |
| `message` | string | No | - |
| `success` | boolean | No | - |
**Generated example (synthetic):**
```json
{
"details": [
"string"
],
"message": "string",
"success": false
}
```
## Contract identity
Use these fields to confirm you are implementing the intended endpoint contract.
- API family: Management API
- Method: `POST`
- Path: `/api/v1/{team_slug}/{app_slug}/smart-listings/preview`
- Operation ID: Not documented in the OpenAPI contract.
- Stable operation key: `management-api:POST:/api/v1/{team_slug}/{app_slug}/smart-listings/preview`
- OpenAPI tag: Smart Listings
- OpenAPI summary: Preview smart listing results