From 9f12ded8e533ea879fabf305dc72e8545b077f5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Rabello?= <77292838+julia-rabello@users.noreply.github.com> Date: Mon, 26 Aug 2024 19:21:20 -0300 Subject: [PATCH] edit sort + add 400 error response --- VTEX - Intelligent Search API.json | 50 +++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/VTEX - Intelligent Search API.json b/VTEX - Intelligent Search API.json index 6b4cf025d..b7d926a5d 100644 --- a/VTEX - Intelligent Search API.json +++ b/VTEX - Intelligent Search API.json @@ -349,7 +349,7 @@ { "in": "query", "name": "sort", - "description": "Defines the sort type. The possible values are: \r\n- `price:desc`: The results will be sorted by price in descending order, from highest to lowest.\r\n- `price:asc`: The results will be sorted by price in ascending order, from lowest to highest.\r\n- `orders:desc`: The results will be sorted by the amount of orders in the past 90 days, in descending order.\r\n- `name:desc`: The results will be sorted by name in descending alphabetical order.\r\n- `name:asc`: The results will be sorted by name in ascending alphabetical order.\r\n- `release:desc`: The results will be sorted by release date in descending order, from most recent to least recent.\r\n- `discount:desc`: The results will be sorted by discount percentage in descending order, from highest to lowest.\r\n\r\nIf `null`, the products will be sorted by relevance.", + "description": "Defines the sort type. The possible values are: \r\n- `price:desc`: The results will be sorted by price in descending order, from highest to lowest.\r\n- `price:asc`: The results will be sorted by price in ascending order, from lowest to highest.\r\n- `orders:desc`: The results will be sorted by the amount of orders in the past 90 days, in descending order.\r\n- `name:desc`: The results will be sorted by name in descending alphabetical order.\r\n- `name:asc`: The results will be sorted by name in ascending alphabetical order.\r\n- `release:desc`: The results will be sorted by release date in descending order, from most recent to least recent.\r\n- `discount:desc`: The results will be sorted by discount percentage in descending order, from highest to lowest.\r\n\r\nIf this query parameter is not used, the products will be sorted by relevance.", "schema": { "type": "string", "nullable": true, @@ -920,6 +920,54 @@ } } } + }, + "400": { + "description": "Bad Request.", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Error response information.", + "properties": { + "status": { + "type": "integer", + "description": "Status code." + }, + "code": { + "type": "string", + "description": "Error code." + }, + "name": { + "type": "string", + "description": "Error name." + }, + "level": { + "type": "string", + "description": "Error severity level." + }, + "response": { + "type": "object", + "description": "Response details.", + "properties": { + "data": { + "type": "string", + "description": "Error response message." + } + } + } + } + }, + "example": { + "status": 400, + "code": "RESOLVER_WARNING", + "name": "ResolverWarning", + "level": "warn", + "response": { + "data": "Unsupported sort null" + } + } + } + } } } }