@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Intelligent Search API
@base https://apiexamples.vtexcommercestable.com.br/api/io/_v/api/intelligent-search
@version 0.1.12
@endpoints 8
@toc top_searches(1), autocomplete_suggestions(1), correction_search(1), banners(1), search_suggestions(1), product_search(1), facets(1), pickup-point-availability(1)

@group top_searches
@endpoint GET /top_searches
@optional {locale: str}
@returns(200) {searches: [map]}

@endgroup

@group autocomplete_suggestions
@endpoint GET /autocomplete_suggestions
@optional {query: str, locale: str}
@returns(200) {searches: [map]}

@endgroup

@group correction_search
@endpoint GET /correction_search
@optional {query: str, locale: str}
@returns(200) {correction: map{misspelled: bool, correction: bool, text: str, highlighted: str}}

@endgroup

@group banners
@endpoint GET /banners/{facets}
@required {facets: str=/}
@optional {query: str, locale: str}
@returns(200) {banners: [map]}

@endgroup

@group search_suggestions
@endpoint GET /search_suggestions
@optional {query: str, locale: str}
@returns(200) {searches: [map]}

@endgroup

@group product_search
@endpoint GET /product_search/{facets}
@required {facets: str=/}
@optional {query: str, count: num=24, page: num=1, sort: str(price:desc/price:asc/orders:desc/name:desc/name:asc/release:desc/discount:desc), locale: str, hideUnavailableItems: bool=false, simulationBehavior: str(default/skip/only1P)=default, showSponsored: bool=false, sponsoredCount: str, advertisementPlacement: str(top_search/middle_search/search_shelf/cart_shelf/plp_shelf/autocomplete/homepage), repeatSponsoredProducts: bool}
@returns(200) {products: [map], recordsFiltered: num, correction: map{misspelled: bool}, fuzzy: str, operator: str, translated: bool, pagination: map{count: num, current: map{index: num, proxyUrl: str}, before: [map], after: [map], perPage: num, next: map{index: num, proxyUrl: str}, previous: map{index: num}, first: map{index: num}, last: map{index: num}}}
@errors {400}

@endgroup

@group facets
@endpoint GET /facets/{facets}
@required {facets: str=/}
@optional {query: str, locale: str, hideUnavailableItems: bool=false}
@returns(200) {facets: [map], sampling: bool, breadcrumb: [map], queryArgs: map{query: str, selectedFacets: [map]}, translated: bool}

@endgroup

@group pickup-point-availability
@endpoint GET /pickup-point-availability/{facets}
@required {facets: str=/, an: str}
@optional {query: str, coordinates: str, zip-code: str, country: str, deliveryZonesHash: str, pickupsHash: str}
@returns(200) {pickupPointDistances: [map]}

@endgroup

@end
