openapi: 3.0.1
info:
title: Coveo Activity Activities Listings API
description: API for Coveo Platform
termsOfService: https://www.coveo.com/en/support/terms-agreements
contact:
name: Coveo
url: https://connect.coveo.com/s/discussions
version: 1.0.0
servers:
- url: https://platform.cloud.coveo.com
description: Coveo public API endpoint
security:
- oauth2:
- full
tags:
- name: Listings
paths:
/rest/organizations/{organizationId}/commerce/v2/listing:
post:
tags:
- Listings
summary: Get a Listing Page
description: 'Shows products linked to a [product listing](https://docs.coveo.com/en/m1sf3187/) URL.**Required privilege:** Execute QueryPrivilege required
```
{"owner":"SEARCH_API","targetDomain":"EXECUTE_QUERY","targetId":"*"}
```
**Example:** `acmecorporation8tp8wu3`
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ListingRequestModel_V2ProductView'
required: true
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/ListingResponseModel_V2ProductView'
x-pretty-name: getListing
x-required-privilege:
owner: SEARCH_API
targetDomain: EXECUTE_QUERY
targetId: '*'
x-required-privileges:
- owner: SEARCH_API
targetDomain: EXECUTE_QUERY
targetId: '*'
x-ui-operation-id: /rest/organizations/paramId/commerce/v2/listing_post
components:
schemas:
DateRangeFacetResultValue_V2ProductView:
type: object
properties:
state:
type: string
enum:
- idle
- selected
numberOfResults:
type: integer
format: int64
isAutoSelected:
type: boolean
isSuggested:
type: boolean
moreValuesAvailable:
type: boolean
start:
type: string
end:
type: string
endInclusive:
type: boolean
NumericalRangeFacetResult_V2ProductView:
type: object
allOf:
- $ref: '#/components/schemas/AbstractFacetResultObject_V2ProductView'
- type: object
properties:
values:
type: array
items:
$ref: '#/components/schemas/NumericalRangeFacetResultValue_V2ProductView'
moreValuesAvailable:
type: boolean
fromAutoSelect:
type: boolean
domain:
$ref: '#/components/schemas/RangeDomain_V2ProductView'
interval:
type: string
enum:
- continuous
- discrete
- even
- equiprobable
isFieldExpanded:
type: boolean
description: 'The value received in the `isFieldExpanded` property of the request. If the facet was
not part of the request, `false` is returned.
'
RegularFacetModel_V2ProductView:
required:
- field
- values
type: object
description: Regular (single string value) facet.
example:
facetId: ec_brand
field: ec_brand
displayNames:
- value: Brand
language: en
- value: Marque
language: fr
values:
- state: selected
preventAutoSelect: false
value: Aqua Sports
- state: idle
preventAutoSelect: false
value: Aqua Marina
- state: idle
preventAutoSelect: false
value: HO Sports
numberOfValues: 3
preventAutoSelect: false
sortCriteria: score
isFieldExpanded: true
type: regular
customOrder:
- string
allOf:
- $ref: '#/components/schemas/RequestFacetBaseObject_V2ProductView'
- type: object
properties:
values:
minItems: 1
type: array
description: The values displayed by the facet in the search interface at the moment of the request.
items:
$ref: '#/components/schemas/RegularValueModel_V2ProductView'
preventAutoSelect:
type: boolean
description: Whether to prevent Coveo ML from automatically selecting facet values.
sortCriteria:
type: string
description: The criterion to use for sorting returned facet values.
enum:
- score
- alphanumericNatural
- alphanumeric
- occurrences
customOrder:
type: array
description: A custom sort order for the facet values.
items:
type: string
freezeCurrentValues:
type: boolean
description: Should always be set to `false` except when selecting/unselecting facet values. See [here](https://docs.coveo.com/en/3199/build-a-search-ui/implement-facets#toggle-facet-values) for more guidance.
resultsMustMatch:
type: string
description: Specifies how a result must match the selected values.
default: atLeastOneValue
enum:
- atLeastOneValue
- allValues
isFieldExpanded:
type: boolean
description: The value provided is only copied back in the `isFieldExpanded` property of the response. It does not affect the behaviour of the Commerce Service in any way.
RegularValueModel_V2ProductView:
required:
- value
type: object
properties:
state:
type: string
description: The current facet value state in the search interface.
enum:
- idle
- selected
preventAutoSelect:
type: boolean
description: Whether to prevent Coveo ML from automatically selecting facet values.
value:
minLength: 1
type: string
description: The facet value name.
description: The values displayed by the facet in the search interface at the moment of the request.
ListingResponseModel_V2ProductView:
type: object
properties:
responseId:
type: string
description: The unique identifier of the API response. It can be attached to any subsequent impression or click event to attribute them to the request.
format: uuid
example: 123e4567-e89b-12d3-a456-426614174000
products:
type: array
description: The subset of products returned by the query.
items:
oneOf:
- $ref: '#/components/schemas/Product_V2ProductView'
- $ref: '#/components/schemas/ChildProduct_V2ProductView'
- $ref: '#/components/schemas/ProductForPreview_V2ProductView'
results:
type: array
description: List of results including products and spotlight content
items:
oneOf:
- $ref: '#/components/schemas/ChildProduct_V2ProductView'
- $ref: '#/components/schemas/ProductForPreview_V2ProductView'
- $ref: '#/components/schemas/Product_V2ProductView'
- $ref: '#/components/schemas/SpotlightContentModel_V2ProductView'
facets:
type: array
description: The available facets. Note that this array will always be empty in the '/productSuggest' endpoint.
items:
oneOf:
- $ref: '#/components/schemas/DateRangeFacetResult_V2ProductView'
- $ref: '#/components/schemas/HierarchicalFacetResult_V2ProductView'
- $ref: '#/components/schemas/NumericalRangeFacetResult_V2ProductView'
- $ref: '#/components/schemas/RegularFacetResult_V2ProductView'
pagination:
$ref: '#/components/schemas/PaginationResponseModel_V2ProductView'
sort:
$ref: '#/components/schemas/SortResponseModel_V2ProductView'
triggers:
type: array
description: The actions for the client to perform based on the Trigger statements defined.
example:
- type: redirect
content: https://www.example.com
items:
$ref: '#/components/schemas/TriggerModel_V2ProductView'
LegacyFacetOptions_V2ProductView:
type: object
properties:
freezeFacetOrder:
type: boolean
description: 'Default: `false`
Whether facets should be returned in the same order in which they were requested.'
description: Facet Options for legacy (v1) facets.
NumericalRangeValueModel_V2ProductView:
required:
- end
- start
type: object
properties:
state:
type: string
description: The current facet value state in the search interface.
enum:
- idle
- selected
preventAutoSelect:
type: boolean
description: Whether to prevent Coveo ML from automatically selecting facet values.
start:
type: number
description: The value to start the range at.
end:
type: number
description: The value to end the range at. Must be greater (or later) than the start value.
endInclusive:
type: boolean
description: Whether to include the end value in the range. It should typically be set to the value last received in the `endInclusive` property of the facet response.
description: The values displayed by the facet in the search interface at the moment of the request.
BadgeViewModel_V2ProductView:
type: object
properties:
text:
type: string
description: The localized text displayed on the badge.
example: Bestseller!
backgroundColor:
type: string
description: The badge background color in the format `#RRGGBB`.
example: '#FFFFFF'
textColor:
type: string
description: The badge text color in the format `#RRGGBB`.
example: '#000000'
iconUrl:
type: string
description: The url of an icon to render with the badge text.
example: https://example.com/icon.png
description: The list of badges associated with this placement
ContextModel_V2ProductView:
required:
- view
type: object
properties:
user:
$ref: '#/components/schemas/UserModel_V2ProductView'
view:
$ref: '#/components/schemas/ViewModel_V2ProductView'
cart:
type: array
description: The cart information.
items:
$ref: '#/components/schemas/CartItemModel_V2ProductView'
source:
type: array
description: Defines one or more client side libraries that generated the analytics event. The format should be the library's name followed by '@', and then the version. For example, '[custom.library.js@2.0.0]'.
example:
- '@coveo/headless@2.61.0'
- custom.library.js@2.0.0
items:
minLength: 1
pattern: ^[^@]*@.*$
type: string
description: A context source
example: '@coveo/headless@2.61.0'
capture:
type: boolean
description: Whether the request should be tracked for analytics and machine learning purposes. When set to `true`, this will trigger a server-side event to be logged. When set to `false`, the server-side event will not be logged.
example: true
labels:
type: object
additionalProperties:
type: string
description: Deprecated - The context labels.
example: '{"category":"garden > garden-tools > chainsaws","brand":"ACME"}'
description: Deprecated - The context labels.
example:
category: garden > garden-tools > chainsaws
brand: ACME
custom:
type: object
additionalProperties:
type: object
description: Custom context values under context.custom. Use this for context mapping.
example:
fitmentProducts:
- sku_123
- sku_456
description: Custom context values under context.custom. Use this for context mapping.
example:
fitmentProducts:
- sku_123
- sku_456
description: Contextual information about the query.
Product_V2ProductView:
type: object
allOf:
- $ref: '#/components/schemas/Result_V2ProductView'
- type: object
properties:
additionalFields:
type: object
additionalProperties:
type: object
description: The product additional fields.
example:
size: M
material: cotton
description: The product additional fields.
example:
size: M
material: cotton
queryPinned:
type: boolean
description: Indicates whether the product was pinned by a reserved position rule.
example: true
badgePlacements:
type: array
description: The list of badge placements associated with this product.
items:
$ref: '#/components/schemas/BadgePlacementViewModel_V2ProductView'
ec_name:
type: string
description: The product name.
example: ACME T-Shirt.
ec_description:
type: string
description: The product description.
example: A very nice T-Shirt. Comes in blue and green colors.
ec_shortdesc:
type: string
description: The product short description.
example: A very nice T-Shirt.
ec_brand:
type: string
description: The product brand.
example: ACME
ec_category:
type: array
description: The product category.
example:
- T-Shirts
items:
type: string
description: The product category.
example: '["T-Shirts"]'
ec_thumbnails:
type: array
description: The product thumbnails.
example:
- https://example.com/thumbnail1.jpg
- https://example.com/thumbnail2.jpg
items:
type: string
description: The product thumbnails.
example: '["https://example.com/thumbnail1.jpg","https://example.com/thumbnail2.jpg"]'
ec_images:
type: array
description: The product images.
example:
- https://example.com/image1.jpg
- https://example.com/image2.jpg
items:
type: string
description: The product images.
example: '["https://example.com/image1.jpg","https://example.com/image2.jpg"]'
ec_price:
type: number
description: The product price.
format: double
example: 19.99
ec_promo_price:
type: number
description: The product promotional price.
format: double
example: 14.99
ec_in_stock:
type: boolean
description: The product availability.
example: true
ec_item_group_id:
type: string
description: The product item group identifier.
example: '0000003035'
ec_rating:
type: number
description: The product rating.
format: double
example: 4.5
ec_product_id:
type: string
description: The product identifier.
example: 0000003035-45
ec_gender:
type: string
description: The intended gender of the product user.
example: M
ec_color:
type: string
description: The product color.
example: Blue
ec_listing:
type: string
description: The product listing.
example: T-Shirt
clickUri:
type: string
description: The product click URI.
example: https://example.com/product/0000003035-45
permanentid:
type: string
description: The product permanent identifier.
example: 0000003035-45
children:
type: array
description: The product child results.
items:
$ref: '#/components/schemas/ChildProduct_V2ProductView'
totalNumberOfChildren:
type: integer
description: The total number of child results.
format: int32
example: 2
DateRangeFacetResult_V2ProductView:
type: object
allOf:
- $ref: '#/components/schemas/AbstractFacetResultObject_V2ProductView'
- type: object
properties:
values:
type: array
items:
$ref: '#/components/schemas/DateRangeFacetResultValue_V2ProductView'
moreValuesAvailable:
type: boolean
fromAutoSelect:
type: boolean
isFieldExpanded:
type: boolean
description: 'The value received in the `isFieldExpanded` property of the request. If the facet was
not part of the request, `false` is returned.
'
SortResponseModel_V2ProductView:
type: object
properties:
appliedSort:
oneOf:
- $ref: '#/components/schemas/SortByFieldsRequestResponseModel_V2ProductView'
- $ref: '#/components/schemas/SortByRelevanceRequestResponseModel_V2ProductView'
availableSorts:
type: array
description: The list of available sorting methods.
example:
- sortCriteria: relevance
- sortCriteria: fields
fields:
- field: ec_price
direction: desc
displayName: Price
items:
oneOf:
- $ref: '#/components/schemas/SortByFieldsRequestResponseModel_V2ProductView'
- $ref: '#/components/schemas/SortByRelevanceRequestResponseModel_V2ProductView'
description: The applied and available sort options for the query.
example:
appliedSort:
sortCriteria: fields
fields:
- field: ec_brand
direction: asc
displayName: Brand
availableSorts:
- sortCriteria: relevance
- sortCriteria: fields
fields:
- field: ec_price
direction: desc
displayName: Price
HierarchicalFacetModel_V2ProductView:
required:
- field
- values
type: object
description: Hierarchical (tree-like) facet.
example:
facetId: ec_category
field: ec_category
displayNames:
- value: Category
language: en
- value: Catégorie
language: fr
values:
- state: selected
preventAutoSelect: true
value: Canoes & Kayaks
children:
- state: selected
preventAutoSelect: true
value: Kayaks
children:
- state: selected
preventAutoSelect: true
value: Folding Kayaks
- state: idle
preventAutoSelect: true
value: Sea Kayaks
- state: selected
preventAutoSelect: false
value: Canoes
numberOfValues: 5
preventAutoSelect: true
sortCriteria: score
isFieldExpanded: true
type: hierarchical
delimitingCharacter: '|'
basePath:
- Boats
filterByBasePath: true
allOf:
- $ref: '#/components/schemas/RequestFacetBaseObject_V2ProductView'
- type: object
properties:
values:
minItems: 1
type: array
description: The values displayed by the facet in the search interface at the moment of the request.
items:
$ref: '#/components/schemas/HierarchicalValueModel_V2ProductView'
preventAutoSelect:
type: boolean
description: Whether to prevent Coveo ML from automatically selecting facet values.
sortCriteria:
type: string
description: The criterion to use for sorting returned facet values.
enum:
- score
- alphanumericNatural
- alphanumeric
- occurrences
delimitingCharacter:
type: string
description: The character to use to split field values into a hierarchical sequence.
filterByBasePath:
type: boolean
description: Whether to use basePath as a filter for the results.
retrieveCount:
type: object
properties:
empty:
type: boolean
present:
type: boolean
asInt:
type: integer
format: int32
description: The maximum number of children to retrieve for this hierarchical facet values.
isFieldExpanded:
type: boolean
description: The value provided is only copied back in the `isFieldExpanded` property of the response. It does not affect the behaviour of the Commerce Service in any way.
SortByFieldRequestResponseModel_V2ProductView:
required:
- field
type: object
properties:
field:
minLength: 1
type: string
description: The name of a field to sort by.
direction:
type: string
description: 'Sort order:
Default: `ascending`