Skip to content
Esc
↑↓navigate↵open⌘Jpreview

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
Authorization
AuthorizationBearer token · headerrequired

Management API token, sent as Authorization: Bearer <token>.

Path parameters
app_slugstringrequired

App slug

team_slugstringrequired

Team slug

Request body
requiredapplication/json

smart-listing configuration

rulesinternal_pkg_webserver_v1.ListingRuleRequest[]required
Show properties
Array of internal_pkg_webserver_v1.ListingRuleRequest
operatorgithub_com_enadhq_nabbit_internal_pkg_webserver_models.ListingRuleOperatorrequired
Allowed:equalnot-equalgreater-thanless-thancontains
targetgithub_com_enadhq_nabbit_internal_pkg_webserver_models.ListingRuleTargetrequired
Allowed:stockpriceattributetitlecategory
target_idstring

used for warehouse stock validation

value_floatnumber
value_liststring[]
value_stringstring
slugstringrequired
Responses
200

All product-variants affected by the listing rules

datagithub_com_enadhq_nabbit_internal_pkg_webserver_models.ListingProductVariant[]required
Show properties
Array of github_com_enadhq_nabbit_internal_pkg_webserver_models.ListingProductVariant
app_idstring
attributesgithub_com_enadhq_nabbit_internal_pkg_webserver_models.ProductListingAttribute[] | null
Show properties
Array of github_com_enadhq_nabbit_internal_pkg_webserver_models.ProductListingAttribute
template_idstring
template_namestring
valuesstring[] | null
category_slugsstring[] | null
custom_fieldsobject | null
idstring
image_urlsstring[] | null
pricesgithub_com_enadhq_nabbit_internal_pkg_webserver_models.Price[] | null
Show properties
Array of github_com_enadhq_nabbit_internal_pkg_webserver_models.Price
amountnumber
currencystring
on_saleboolean
product_idstring
product_namestring
total_stockinteger
variant_namestring
variant_numberstring
warehouse_stocksgithub_com_enadhq_nabbit_internal_pkg_webserver_models.WarehouseStock[] | null
Show properties
Array of github_com_enadhq_nabbit_internal_pkg_webserver_models.WarehouseStock
stockinteger
warehouse_idstring
detailsstring[]

Additional contextual information about the response. Used to provide supplementary details beyond the main data payload, such as validation warnings or processing notes

successbooleanrequired
400

Invalid request (e.g. bad UUID, validation error)

detailsstring[]
messagestring
successbooleanrequired
401

Unauthorized access

detailsstring[]
messagestring
successbooleanrequired
422

Invalid request and not parsable by backend

detailsstring[]
messagestring
successbooleanrequired
500

Internal server error

detailsstring[]
messagestring
successbooleanrequired
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://api.enad.io/api/v1/string/string/smart-listings/preview' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "rules": [
    {
      "operator": "equal",
      "target": "stock",
      "target_id": "string",
      "value_float": 0,
      "value_list": [
        "string"
      ],
      "value_string": "string"
    }
  ],
  "slug": "string"
}'
Response
{
  "data": [
    {
      "app_id": "string",
      "attributes": [
        {
          "template_id": "string",
          "template_name": "string",
          "values": [
            "string"
          ]
        }
      ],
      "category_slugs": [
        "string"
      ],
      "custom_fields": {
        "property1": "string",
        "property2": "string"
      },
      "id": "string",
      "image_urls": [
        "string"
      ],
      "prices": [
        {
          "amount": 0,
          "currency": "string",
          "on_sale": true
        }
      ],
      "product_id": "string",
      "product_name": "string",
      "total_stock": 0,
      "variant_name": "string",
      "variant_number": "string",
      "warehouse_stocks": [
        {
          "stock": 0,
          "warehouse_id": "string"
        }
      ]
    }
  ],
  "details": [
    "string"
  ],
  "success": true
}