Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Create smart listings

Bulk-creates smart listings. Successful entities are returned in data; per-item failures in errors keyed by slug.

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

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

Path parameters
team_slugstringrequired
app_slugstringrequired
Request body
requiredapplication/json
smart_listingsCreateSmartListingItem[]required
min items 1 · max items 20
Show properties
Array of CreateSmartListingItem
slugstringrequired
rulesSmartListingRule[]
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
201

Created (partial success possible)

dataSmartListing[]required
Show properties
Array of SmartListing
idUUIDrequired
slugstringrequired
created_atstring<date-time>required
updated_atstring<date-time> | null
rulesSmartListingRule[] | null
Show properties
Array of SmartListingRule
idUUID
targetstringrequired
Allowed:stockpricetitleattributecategory
target_idUUID | null
Show properties
Any of:
UUID
UUID
null
null
operatorstringrequired
Allowed:less-thangreater-thanequalnot-equalcontains
value_stringstring | null
value_liststring[] | null
value_floatnumber<double> | null
errorsSmartListingError[]required
Show properties
Array of SmartListingError
slugstring
idUUID | null
Show properties
Any of:
UUID
string<uuid>
null
null
messagestringrequired
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' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "smart_listings": [
    {
      "slug": "string",
      "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",
      "slug": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z",
      "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
        }
      ]
    }
  ],
  "errors": [
    {
      "slug": "string",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "message": "string"
    }
  ]
}