GET Suggestions

Search suggestion return suggestion keyword.

GET#

https://api.altoshift.com/v1/suggestions

Permission: all

Example Usage#

GET /v1/suggestions?query=iphon&token=5cd3f3042cd48000372c64fd-1557394180073-88706995

Parameter#

FieldTypeDescription
queryStringSearch query given by user
tokenStringSearch token
r optionalStringNumber

Success 200#

FieldTypeDescription
categoriesString[]Categories items
categoryIdsString[]Categories Id's
popularProductsObject[]Popular product's Item
    text optionalStringPopular product's text
    link optionalStringPopular product's link
    thumb_link optionalStringPopular product's thumb_link
    itemId optionalStringPopular product's itemId
    price optionalStringPopular producs's Price
termsObject[]Suggested terms or keywords
    textStringSuggestion text

Success Response Example#

{
"categories": [],
"categoryIds": [
"152",
"115"
],
"popularProducts": [
{
"text": "JJC ES-898 Easy Switch Controller iPhone / iPad",
"link": "http://www.shop.com/shop/jjc-es-898-easy-switch-controller-iphone-ipad/",
"thumb_link": "http://www.shop.com/wp-content/uploads/2014/11/JJC-ES-898-Easy-Switch-Controller-iPhone-iPad.jpg",
"productId": "4966",
"itemId": "5cd39dde49dcc7001bff1123-5cd39e6a9efea40038642043-4966",
"price": 590000
},
{
"text": "Rode smartLav Microphone for iPhone and Smartphones",
"link": "http://www.shop.com/shop/rode-smartlav-microphone-for-iphone-and-smartphones/",
"thumb_link": "http://www.shop.com/wp-content/uploads/2015/03/RODE-SmartLav-a.jpg",
"productId": "16396",
"itemId": "5cd39dde49dcc7001bff1123-5cd39e6a9efea40038642043-16396",
"price": 760000
}
],
"terms": [
{
"text": "iphone"
},
{
"text": "idrone"
},
{
"text": "indonesia"
},
{
"text": "ion"
},
{
"text": "ionic"
},
{
"text": "iron"
}
]
}

Error Response Example#

HTTP/1.1 422 Unprocessable Entity
{
"errors": [
"Invalid param 'query'"
]
}