novinzodevelopers
API referenceCore for pluginsSearch

Save Records

PUT/api/search/records

Makes records of the calling plugin searchable in the store's dashboard search, or updates them, at most 500 a call. Write a record when it is created or changes; the dashboard shows what was written last, so a call can be retried whole. Titles and subtitles are shown as plain text: whitespace runs collapse to one space, control and direction-override characters are dropped, and text past 120 (title) or 160 (subtitle) characters is cut with "…". A record targeting a product or order the store does not have is refused with SearchTargetNotInStore, writing nothing.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

records*array<>
Items1 <= items <= 500

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/api/search/records" \  -H "Content-Type: application/json" \  -d '{    "records": [      {        "id": "string",        "title": "string",        "target": {          "type": "page"        }      }    ]  }'
Empty