Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Preview smart listing

Read-only evaluation of rules. Returns the variants that match; nothing is written.

POST/api/v2/{team_slug}/{app_slug}/smart-listings/preview
Authorization
AuthorizationBearer token · headerrequired

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

Path parameters
team_slugstringrequired
app_slugstringrequired
Request body
requiredapplication/json
rulesSmartListingRule[]required
min items 1
Show properties
Array of SmartListingRule
idUUID
targetstringrequired
Allowed:stockpricetitleattributecategory
target_idUUID | null
Show properties
Any of:
UUID
string<uuid>
null
null
operatorstringrequired
Allowed:less-thangreater-thanequalnot-equalcontains
value_stringstring | null
value_liststring[] | null
value_floatnumber<double> | null
Responses
200

OK

dataSmartListingVariant[]required
Show properties
Array of SmartListingVariant
idUUIDrequired
app_idUUID
product_idUUIDrequired
variant_namestringrequired
product_namestringrequired
variant_numberstringrequired
custom_fieldsobject | null
image_urlsstring[] | null
total_stockinteger
category_slugsstring[] | null
400

Request-level failure

errorErrorBodyrequired
Show properties
messagestringrequired
detailsstring[]required
401

Request-level failure

errorErrorBodyrequired
Show properties
messagestringrequired
detailsstring[]required
403

Request-level failure

errorErrorBodyrequired
Show properties
messagestringrequired
detailsstring[]required
500

Request-level failure

errorErrorBodyrequired
Show properties
messagestringrequired
detailsstring[]required
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://api.enad.io/api/v2/string/string/smart-listings/preview' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "rules": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "target": "stock",
      "target_id": "d3bcdc92-4191-401b-ad0c-42056c6efab9",
      "operator": "less-than",
      "value_string": "string",
      "value_list": [
        "string"
      ],
      "value_float": 0
    }
  ]
}'
Response
{
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "app_id": "affd1d10-9538-4fc8-9e0b-4594a28c1335",
      "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
      "variant_name": "string",
      "product_name": "string",
      "variant_number": "string",
      "custom_fields": {
        "property1": "string",
        "property2": "string"
      },
      "image_urls": [
        "string"
      ],
      "total_stock": 0,
      "category_slugs": [
        "string"
      ]
    }
  ]
}