Create a custom benchmark
Start an empty custom benchmark in your default workspace.
/v1/benchmarksCreates an empty custom benchmark in your organization's default
workspace. Fill it with
Add images to a benchmark,
Upload an image to a benchmark
or Upload images to a benchmark in bulk.
Nothing can be scored against it until it holds minimum_images
visible images.
A hero benchmark holds hero images and a carousel benchmark holds
carousel images. Set asset_type to make a carousel benchmark of
Other assets, such as recipes.
Authorization
bearerAuth Short-lived access token issued by Create a token.
Send it on every request as Authorization: Bearer <token>.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Benchmark name. Surrounding whitespace is trimmed and a blank name is rejected.
length <= 255The image type a custom benchmark holds and scores: hero or
carousel. It is fixed when the benchmark is created.
"hero" | "carousel"Label for a benchmark of Other carousel assets. Surrounding whitespace
is trimmed and a blank label means none. A hero benchmark cannot
have one (422 HERO_ASSET_TYPE).
length <= 50Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://ext.vizit.com/v1/benchmarks" \ -H "Content-Type: application/json" \ -d '{ "name": "Spring refresh hero set", "scope": "hero" }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "Spring refresh hero set", "description": "string", "scope": "hero", "asset_type": "string", "image_count": 0, "minimum_images": 30, "recommended_images": 80, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "last_scoring": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "benchmark_id": "f1254acf-0c77-40a6-91d2-a34bd4970fd9", "retailer": "amazon", "product_category_id": "8df7b127-d8ab-4b5d-a571-ee2b3ab38511", "product_category_name": "Snack Bars", "status": "PROCESSING", "requested_at": "2019-08-24T14:15:22Z", "ready_at": "2019-08-24T14:15:22Z", "error_code": "ENQUEUE_FAILED" }}{ "detail": "string", "status_code": 0, "error_code": "IMAGE_DOWNLOAD_FAILED", "request_id": "266ea41d-adf5-480b-af50-15b940c2b846", "extra": { "failed_urls": [ { "url": "https://cdn.example.com/broken.jpg", "reason": "IMAGE_DOWNLOAD_TIMEOUT" }, { "url": "https://cdn.example.com/icon.svg", "reason": "UNSUPPORTED_IMAGE_FORMAT" } ] }, "timestamp": "2019-08-24T14:15:22Z"}{ "detail": "string", "status_code": 0, "error_code": "IMAGE_DOWNLOAD_FAILED", "request_id": "266ea41d-adf5-480b-af50-15b940c2b846", "extra": { "failed_urls": [ { "url": "https://cdn.example.com/broken.jpg", "reason": "IMAGE_DOWNLOAD_TIMEOUT" }, { "url": "https://cdn.example.com/icon.svg", "reason": "UNSUPPORTED_IMAGE_FORMAT" } ] }, "timestamp": "2019-08-24T14:15:22Z"}{ "detail": "string", "status_code": 0, "error_code": "IMAGE_DOWNLOAD_FAILED", "request_id": "266ea41d-adf5-480b-af50-15b940c2b846", "extra": { "failed_urls": [ { "url": "https://cdn.example.com/broken.jpg", "reason": "IMAGE_DOWNLOAD_TIMEOUT" }, { "url": "https://cdn.example.com/icon.svg", "reason": "UNSUPPORTED_IMAGE_FORMAT" } ] }, "timestamp": "2019-08-24T14:15:22Z"}GETList custom benchmarks
Lists the custom benchmarks in your organization's default workspace, sorted by `sort_by` and `sort_direction`. Deleted benchmarks and Vizit benchmarks are never listed. Page with `limit` and `offset`; the `Vizit-Total-Count` response header carries the number of benchmarks that match the filters. Custom benchmarks must be enabled for your organization. Until they are, every benchmark and collection route answers `404 NOT_FOUND`.
GETRetrieve a custom benchmark
Returns one custom benchmark from your organization's default workspace. Another workspace's benchmark, a deleted one, or a Vizit benchmark answers `404 BENCHMARK_NOT_FOUND`.