From 85d322902a60991c8fa1edf16209b50a4da6b7c4 Mon Sep 17 00:00:00 2001 From: Mustafa Almaasrawi Date: Fri, 17 Jan 2020 15:27:30 -0800 Subject: [PATCH] Changes as per the final review before publishing --- README.md | 37 +- .../Bing-Commerce-Ingestion.swagger.json | 1498 +++++++++++++- search/Bing-Commerce-Search.OAS3.swagger.json | 4 +- search/Bing-Commerce-Search.swagger.json | 1817 ++++++++++++++++- 4 files changed, 3330 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index bda146d..88aebd6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,19 @@ +# Overview + +This repostitory contains the swagger and open api specifications for the [Bing for Commerce Platforms](http://commerce.bing.com), including the search and ingestion services. This can help you write your application and services to target the Bing for Commerce Services. + +For more details about the proejct, please refer to the [Bing for Commerce API Documentation](https://commerce.bing.com/docs/product-search/). + +# Generating The Libraries + Although you can totally use the swagger specs as a guide to manually call our services, it would be a lot easier if you tried using a tool like [AutoRest](https://github.com/Azure/AutoRest) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to generate a library that you can use with the language of your choice. To take some burden off your shoulders, and to make it easier to write your applications, we have already genrated the libraries for: +* [dotnet](https://github.com/microsoft/bing-ecommerce-sdk-for-net). +* [Java](https://github.com/microsoft/bing-ecommerce-sdk-for-java). +* [Python](https://github.com/microsoft/bing-ecommerce-sdk-for-python). + +# Authentication +Bing for Commerce APIs use Bearer Tokens for authentication. You can use the [Bing for Commerce Portal Documentation](https://commerce.bing.com/docs/Portal%20Documentation/#manage-keys-and-tokens) for help creating one. + # Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a @@ -12,25 +27,3 @@ provided by the bot. You will only need to do this once across all repos using o This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. - - -# Overview - -This repostitory contains the swagger and open api specifications for the [Bing ECommerce Platforms](), including the search and ingestion services. This can help you write your application and services to target the Bing ECommerce Services. - -# Generating The Libraries - Although you can totally use the swagger specs as a guide to manually call our services, it would be a lot easier if you tried using a tool like [AutoRest](https://github.com/Azure/AutoRest) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to generate a library that you can use with the language of your choice. To take some burden off your shoulders, and to make it easier to write your applications, we have already genrated the libraries for: -* [dotnet](https://github.com/microsoft/bing-ecommerce-sdk-for-net). -* [Java](https://github.com/microsoft/bing-ecommerce-sdk-for-java). -* [Python](https://github.com/microsoft/bing-ecommerce-sdk-for-python). - -# Authentication -In order to inject the authentication in the language of your choice, you will need to use an interceptor to add the required authentication to the request before sending it to the service. You can look at the [dotnet sdk](https://github.com/microsoft/bing-ecommerce-sdk-for-net/tree/master/src/search/src/AppIdCredentials.cs), [java sdk](https://github.com/microsoft/bing-ecommerce-sdk-for-java/tree/master/src/search/src/main/java/com/microsoft/bing/ecommerce/search/util) for exapmles on how you can accomplish that using appid. The services currently support two methods of authentication: -### Query parameter -For any of the existing APIs, you can add a parameter `appid` containing your Bing API Developer AppId. Example would be: -
-https://www.bingapis.com/api/v1/retail/search/<<MY TENANT ID>>/indexes/<<MY INDEX ID>>?q=tshirts&appid=<<MY APP ID>>
-
- -### JSON Web Token -You can use the portal to create a token, which you can then use it as a bearer token when issuing a request to any of our apis. \ No newline at end of file diff --git a/ingestion/Bing-Commerce-Ingestion.swagger.json b/ingestion/Bing-Commerce-Ingestion.swagger.json index 08d8118..04af3d2 100644 --- a/ingestion/Bing-Commerce-Ingestion.swagger.json +++ b/ingestion/Bing-Commerce-Ingestion.swagger.json @@ -1 +1,1497 @@ -{"swagger":"2.0","info":{"title":"Bing Commerce Ingestion","version":"1"},"host":"commerce.bing.com","basePath":"/api/ingestion/v1","schemes":["https"],"paths":{"/{tenantid}/indexes":{"post":{"tags":["RetailSearchIngestionService"],"summary":"Create an index.","description":"Creates a definition of the tenant's index.","operationId":"CreateIndex","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"header","name":"SubscriptionId","description":"Bing developer subcription id","type":"string"},{"in":"body","name":"body","description":"An Index object that describes the index definition to add.","schema":{"$ref":"#/definitions/Index"}}],"responses":{"200":{"description":"Ok","schema":{"$ref":"#/definitions/IndexResponse"}}}},"get":{"tags":["RetailSearchIngestionService"],"summary":"Get list of index definitions.","description":"Get list of index definitions that you defined for a tenant.","operationId":"GetAllIndexes","produces":["application/json"],"parameters":[{"in":"header","name":"SubscriptionId","description":"Bing developer subcription id","type":"string"}],"responses":{"200":{"description":"Ok","schema":{"$ref":"#/definitions/IndexResponse"}}}},"parameters":[{"in":"path","name":"tenantid","description":"The ID that uniquely identifies the tenant that the index belongs to.","required":true,"type":"string"}]},"/{tenantid}/indexes/{indexid}":{"delete":{"tags":["RetailSearchIngestionService"],"summary":"Delete an index.","description":"Delete an index definition along with all the catalog.","operationId":"DeleteIndex","produces":["application/json"],"parameters":[{"in":"header","name":"SubscriptionId","description":"Bing developer subcription id","type":"string"}],"responses":{"200":{"description":"Ok","schema":{"$ref":"#/definitions/IndexResponse"}}}},"put":{"tags":["RetailSearchIngestionService"],"summary":"Updates an index with id.","description":"Update the definition for your index.","operationId":"UpdateIndex","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"header","name":"SubscriptionId","description":"Bing developer subcription id","type":"string"},{"in":"body","name":"body","description":"The ID that uniquely identifies the index definition to manage.","schema":{"$ref":"#/definitions/Index"}}],"responses":{"200":{"description":"Ok","schema":{"$ref":"#/definitions/IndexResponse"}}}},"get":{"tags":["RetailSearchIngestionService"],"summary":"Get index definition by id.","description":"Get a specific index definition for a tenant.","operationId":"GetIndex","produces":["application/json"],"parameters":[{"in":"header","name":"SubscriptionId","description":"Bing developer subcription id","type":"string"}],"responses":{"200":{"description":"Ok","schema":{"$ref":"#/definitions/IndexResponse"}}}},"parameters":[{"in":"path","name":"tenantid","description":"The ID that uniquely identifies the tenant that the index belongs to.","required":true,"type":"string"},{"in":"path","name":"indexid","description":"The ID that uniquely identifies the index definition to manage.","required":true,"type":"string"}]},"/{tenantid}/indexes/{indexid}/deletedata":{"post":{"tags":["RetailSearchIngestionService"],"summary":"Delete documents from your catalog.","description":"Delete documents from your index's catalog.","operationId":"DeleteDocuments","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"header","name":"SubscriptionId","description":"Bing developer subcription id","type":"string"},{"in":"body","name":"body","description":"The set of document ids to delete.","schema":{"$ref":"#/definitions/Requests.StringSet"}}],"responses":{"200":{"description":"Succeeded","schema":{"$ref":"#/definitions/DeleteDocumentsResponse"}},"206":{"description":"PartiallySucceeded","schema":{"$ref":"#/definitions/DeleteDocumentsResponse"}},"400":{"description":"Failed","schema":{"$ref":"#/definitions/DeleteDocumentsResponse"}}}},"parameters":[{"in":"path","name":"tenantid","description":"The ID that uniquely identifies the tenant that the index belongs to.","required":true,"type":"string"},{"in":"path","name":"indexid","description":"The ID that uniquely identifies the index definition to manage.","required":true,"type":"string"}]},"/{tenantid}/indexes/{indexid}/status":{"get":{"tags":["RetailSearchIngestionService"],"summary":"Get index status by id.","description":"Get the detailed status of your index in each supported region.","operationId":"GetIndexStatus","produces":["application/json"],"parameters":[{"in":"header","name":"SubscriptionId","description":"Bing developer subcription id","type":"string"}],"responses":{"200":{"description":"Ok","schema":{"$ref":"#/definitions/IndexStatusResponse"}}}},"parameters":[{"in":"path","name":"tenantid","description":"The ID that uniquely identifies the tenant that the index belongs to.","required":true,"type":"string"},{"in":"path","name":"indexid","description":"The ID that uniquely identifies the index definition to manage.","required":true,"type":"string"}]},"/{tenantid}/indexes/{indexid}/pushdata":{"post":{"tags":["RetailSearchIngestionService"],"summary":"Push catalog data.","description":"This method pushes updates to your your index data to Bing. This is an asynchronous process. To upload your index data to Bing, you'll send a push request that contains your index data.","operationId":"PushDataUpdate","consumes":["text/plain"],"produces":["application/json"],"parameters":[{"in":"header","name":"SubscriptionId","description":"Bing developer subcription id","type":"string"},{"in":"query","name":"notransform","description":"This disables transformation config processing if the config was uploaded for some index. It's useful when the data is already transformed and is matching the index definition. Default is `false`","type":"boolean"},{"in":"query","name":"updateid","description":"An id to uniquely identify the push update request in order to be able to track it down later.","type":"string"},{"in":"body","name":"body","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Ok","schema":{"$ref":"#/definitions/PushDataUpdateResponse"}}}},"parameters":[{"in":"path","name":"tenantid","description":"The ID that uniquely identifies the tenant that the index belongs to.","required":true,"type":"string"},{"in":"path","name":"indexid","description":"The ID that uniquely identifies the index definition to manage.","required":true,"type":"string"}]},"/{tenantid}/indexes/{indexid}/status/{updateid}":{"get":{"tags":["RetailSearchIngestionService"],"summary":".","description":".","operationId":"PushDataStatus","produces":["application/json"],"parameters":[{"in":"header","name":"SubscriptionId","description":"Bing developer subcription id","type":"string"}],"responses":{"200":{"description":"Ok","schema":{"$ref":"#/definitions/PushUpdateStatusResponse"}}}},"parameters":[{"in":"path","name":"tenantid","description":"The ID that uniquely identifies the tenant that the index belongs to.","required":true,"type":"string"},{"in":"path","name":"indexid","description":"The ID that uniquely identifies the index definition to manage.","required":true,"type":"string"},{"in":"path","name":"updateid","description":"An id to uniquely identify the push update request in order to be able to track it down later.","required":true,"type":"string"}]},"/{tenantid}/indexes/{indexid}/transformation":{"delete":{"tags":["RetailSearchIngestionService"],"summary":"Delete your index's transformation config.","description":"Delete the transformation config that currently aplies to data you push to your index.","operationId":"DeleteTransformationConfig","produces":["application/json"],"parameters":[{"in":"header","name":"SubscriptionId","description":"Bing developer subcription id","type":"string"}],"responses":{"200":{"description":"Ok","schema":{"$ref":"#/definitions/TransformationConfigResponse"}}}},"put":{"tags":["RetailSearchIngestionService"],"summary":"Retrieve your current index's transformation config.","description":"Retrieve the transformation config that currently applies to data you push to your index.","operationId":"CreateOrUpdateTransformationConfig","consumes":["text/plain"],"produces":["application/json"],"parameters":[{"in":"header","name":"SubscriptionId","description":"Bing developer subcription id","type":"string"},{"in":"body","name":"body","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Ok","schema":{"$ref":"#/definitions/TransformationConfigResponse"}}}},"get":{"tags":["RetailSearchIngestionService"],"summary":"Get ingestion status.","description":"Track your ingestion by querying the status.","operationId":"GetTransformationConfig","produces":["application/json"],"parameters":[{"in":"header","name":"SubscriptionId","description":"Bing developer subcription id","type":"string"}],"responses":{"200":{"description":"Ok","schema":{"$ref":"#/definitions/TransformationConfigResponse"}}}},"parameters":[{"in":"path","name":"tenantid","description":"The ID that uniquely identifies the tenant that the index belongs to.","required":true,"type":"string"},{"in":"path","name":"indexid","description":"The ID that uniquely identifies the index definition to manage.","required":true,"type":"string"}]},"/transformation/tryout":{"post":{"tags":["RetailSearchIngestionService"],"summary":"Create a transformation config.","description":"Upload a new transformation config and set it as the transformation config that applies to data you push to your index.","operationId":"UploadTryOutConfig","consumes":["text/plain"],"produces":["application/json"],"parameters":[{"in":"header","name":"SubscriptionId","description":"Bing developer subcription id","type":"string"},{"in":"body","name":"body","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Ok","schema":{"$ref":"#/definitions/TransformationConfigResponse"}}}}},"/transformation/tryout/{tryoutid}":{"post":{"tags":["RetailSearchIngestionService"],"summary":"Upload a trytout config.","description":"Upload a transformation config that you can use to test data transformation on the cloud.","operationId":"ExecuteTryOutConfig","consumes":["text/plain"],"produces":["application/json"],"parameters":[{"in":"header","name":"SubscriptionId","description":"Bing developer subcription id","type":"string"},{"in":"body","name":"body","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Ok","schema":{"$ref":"#/definitions/TransformationTryoutResponse"}}}},"parameters":[{"in":"path","name":"tryoutid","description":"The transformation tryout config id.","required":true,"type":"string"}]},"/schemadetection":{"post":{"tags":["RetailSearchIngestionService"],"summary":"","description":"","operationId":"DetectSchema","produces":["application/json"],"parameters":[{"in":"header","name":"SubscriptionId","description":"Bing developer subcription id","type":"string"},{"in":"query","name":"format","description":"The push data update document format.","type":"string","enum":["Unknown","LDJson","CSV","TSV","JsonArray"]}],"responses":{"200":{"description":"Ok","schema":{"$ref":"#/definitions/SchemaDetectionResponse"}}}}}},"definitions":{"Response.PushStatus":{"enum":["Queued","Error"],"type":"string","x-ms-enum":{"name":"Response.PushStatus","values":[{"value":"Queued"},{"value":"Error"}]}},"Requests.StringSet":{"description":"Defines a set of strings","type":"object","properties":{"values":{"description":"A set of strings","uniqueItems":true,"type":"array","items":{"type":"string"}}}},"Index":{"description":"Contains the definition for the index. An index consists of a set of documents that search operations can be performed upon.","type":"object","properties":{"name":{"description":"The index's name. The name must be unique per tenant, contain only ASCII characters, and have a maximum length of 64 characters.","type":"string"},"description":{"description":"A description of the index. The description is for the tenant's use. The description must contain only ASCII characters and have a maximum length of 64 characters.","type":"string"},"regions":{"description":"The array of regions where the customer data will be processed and served.","uniqueItems":true,"type":"array","items":{"$ref":"#/definitions/Region"}},"searchScenario":{"description":"The type of search scenario that the user is using the index for, which includes Retail, Hotel, and Document.","default":"Retail","enum":["Unknown","Retail","Document","Hotel"],"type":"string"},"searchServices":{"description":"The array of additional search services that the user wants to include for the index, which includes Autosuggest and VisualSearch.","uniqueItems":false,"type":"array","items":{"enum":["Unknown","VisualSearch","Autosuggest","TextSearch"],"type":"string"}},"schemaVersion":{"description":"The version for the schema of the index.","type":"string"},"fields":{"description":"The fields that are associated with the index.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/IndexField"}}}},"IndexField":{"description":"Contains the definition for the index field. A field represents a single unit of data.","type":"object","properties":{"name":{"description":"Index field name.","type":"string"},"type":{"$ref":"#/definitions/IndexFieldType"},"facetable":{"description":"Enables using the field for facets and other field-based aggregations.","type":"boolean"},"filterable":{"description":"Enables using the field in filter and boost conditions.","type":"boolean"},"retrievable":{"description":"Enables using the field values in search response.","type":"boolean"},"searchable":{"description":"Enables text matching on the field.","type":"boolean"},"sortable":{"description":"Enables sorting results by the field.","type":"boolean"},"fieldLabel":{"description":"A label to use with the field.","type":"string"},"fields":{"description":"A child list of fields.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/IndexField"}}}},"Response.Index":{"allOf":[{"$ref":"#/definitions/Index"},{"type":"object","properties":{"id":{"description":"The ID that uniquely identifies the index definition that had the CRUD operation applied.","type":"string"},"provisioningState":{"description":"The current state of provisioning for the index definition.","enum":["Unknown","NotStarted","Provisioning","Deprovisioning","Succeeded","Failed"],"type":"string"},"createdDateTime":{"description":"The date and time when the index was created.","type":"string"}}}]},"IndexFieldType":{"enum":["Unknown","String","Boolean","Number","ProductId","DupId","StaticRank","Url","ImageUrl","Title","Description","Category","Price","Rating","Brand","Model","Color","Size","Material","Gender","AgeGroup","Array","Dictionary","ExcludeFlag","Identifier","Object","DocumentId","Author","CreatedAt","ModifiedAt","Paragraph","SubHeading","SectionHeader","Address","RatingCount","ReviewCount","RatingScale","Amenities","StreetAddress","Locality","SubRegion","AddressRegion","PostalCode","PostOfficeBoxNumber","Country","CountryIso","Neighborhood","OtherAreas","PhoneNumber","Barcode","SecondaryImageUrls"],"type":"string","x-ms-enum":{"name":"IndexFieldType","values":[{"value":"Unknown"},{"value":"String"},{"value":"Boolean"},{"value":"Number"},{"value":"ProductId"},{"value":"DupId"},{"value":"StaticRank"},{"value":"Url"},{"value":"ImageUrl"},{"value":"Title"},{"value":"Description"},{"value":"Category"},{"value":"Price"},{"value":"Rating"},{"value":"Brand"},{"value":"Model"},{"value":"Color"},{"value":"Size"},{"value":"Material"},{"value":"Gender"},{"value":"AgeGroup"},{"value":"Array"},{"value":"Dictionary"},{"value":"ExcludeFlag"},{"value":"Identifier"},{"value":"Object"},{"value":"DocumentId"},{"value":"Author"},{"value":"CreatedAt"},{"value":"ModifiedAt"},{"value":"Paragraph"},{"value":"SubHeading"},{"value":"SectionHeader"},{"value":"Address"},{"value":"RatingCount"},{"value":"ReviewCount"},{"value":"RatingScale"},{"value":"Amenities"},{"value":"StreetAddress"},{"value":"Locality"},{"value":"SubRegion"},{"value":"AddressRegion"},{"value":"PostalCode"},{"value":"PostOfficeBoxNumber"},{"value":"Country"},{"value":"CountryIso"},{"value":"Neighborhood"},{"value":"OtherAreas"},{"value":"PhoneNumber"},{"value":"Barcode"},{"value":"SecondaryImageUrls"}]}},"Region":{"enum":["Unknown","EastAsia","EastUS2","NorthCentralUS","NorthEurope","WestUS2","SoutheastAsia","AustraliaEast","AustraliaSoutheast","AustraliaCentral","AustraliaCentral2","BrazilSouth","CanadaCentral","CanadaEast","ChinaNorth","ChinaEast","ChinaNorth2","ChinaEast2","WestEurope","FranceCentral","FranceSouth","GermanyCentral","GermanyNortheast","CentralIndia","WestIndia","SouthIndia","JapanEast","JapanWest","KoreaCentral","KoreaSouth","EastUS","WestUS","CentralUS","SouthCentralUS","WestCentralUS","SouthAfricaNorth","SouthAfricaWest","UKWest","UKSouth","UAENorth","UAECentral"],"type":"string","x-ms-enum":{"name":"Region","values":[{"value":"Unknown"},{"value":"EastAsia"},{"value":"EastUS2"},{"value":"NorthCentralUS"},{"value":"NorthEurope"},{"value":"WestUS2"},{"value":"SoutheastAsia"},{"value":"AustraliaEast"},{"value":"AustraliaSoutheast"},{"value":"AustraliaCentral"},{"value":"AustraliaCentral2"},{"value":"BrazilSouth"},{"value":"CanadaCentral"},{"value":"CanadaEast"},{"value":"ChinaNorth"},{"value":"ChinaEast"},{"value":"ChinaNorth2"},{"value":"ChinaEast2"},{"value":"WestEurope"},{"value":"FranceCentral"},{"value":"FranceSouth"},{"value":"GermanyCentral"},{"value":"GermanyNortheast"},{"value":"CentralIndia"},{"value":"WestIndia"},{"value":"SouthIndia"},{"value":"JapanEast"},{"value":"JapanWest"},{"value":"KoreaCentral"},{"value":"KoreaSouth"},{"value":"EastUS"},{"value":"WestUS"},{"value":"CentralUS"},{"value":"SouthCentralUS"},{"value":"WestCentralUS"},{"value":"SouthAfricaNorth"},{"value":"SouthAfricaWest"},{"value":"UKWest"},{"value":"UKSouth"},{"value":"UAENorth"},{"value":"UAECentral"}]}},"IndexResponse":{"description":"A response containing a list of indexes.","type":"object","properties":{"indexes":{"description":"A list of indexes","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Response.Index"}}}},"DeleteDocumentsResponse":{"description":"A response containing the status for a request to delete documents from the index.","type":"object","properties":{"status":{"description":"The status for the document deletion request.","enum":["Succeeded","PartiallySucceeded","Failed"],"type":"string"},"errorMessage":{"description":"An aggregation of error messages for errors that happened while processing the request, if any.","type":"string"},"result":{"description":"A list of status results per document.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Response.DocumentDeletionResult"}}}},"Response.DocumentDeletionResult":{"description":"A response representing the result of a request to delete a document from your index's catalog","type":"object","properties":{"documentId":{"description":"The _itemid for the item item that has been deleted from the index.","type":"string"},"deleted":{"description":"A boolean flag that specifies whether or not the document has been successfully deleted.","type":"boolean"},"errorMessage":{"description":"An error message for the request, if any.","type":"string"}}},"IndexStatusResponse":{"description":"A response that represents the status of an index within its supported regions.","type":"object","properties":{"indexStatuses":{"description":"A list of objects containing the status of the index within a region.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Response.IndexStatus"}}}},"Response.IndexStatus":{"description":"A response that represents a query to an index status within a region.","type":"object","properties":{"region":{"$ref":"#/definitions/Region"},"provisioningState":{"description":"The provisioning state for the index within the specified region.","enum":["Unknown","NotStarted","Provisioning","Deprovisioning","Succeeded","Failed"],"type":"string"},"provisioningPercentage":{"format":"double","description":"The percentage of provisioning for the index withing the region.","type":"number"}}},"PushDataUpdateResponse":{"description":"A response to a push data update.","type":"object","properties":{"updateId":{"description":"The id of the push data update that you can use to track it down.","type":"string"}}},"PushUpdateStatusResponse":{"description":"A response that represents the status of a push data update given an update id.","type":"object","properties":{"updateId":{"description":"The id that uniquely identifies the push data update.","type":"string"},"status":{"description":"The wholistic update status for the push data update.","enum":["InProgress","Succeeded","PartiallySucceeded","Failed"],"type":"string"},"totalKeys":{"format":"int32","description":"The total number of items that are part of the upate.","type":"integer"},"successfulKeys":{"format":"int32","description":"The total number of items that have successfully been updated.","type":"integer"},"failureMessages":{"description":"An aggregation of any error messages that happened while ingesting any of the records.","uniqueItems":false,"type":"array","items":{"type":"string"}},"records":{"description":"A drill down for the push update status for each record.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Response.RecordStatus"}}}},"Response.RecordStatus":{"description":"A response that represents a status to a push data update for a record.","type":"object","properties":{"recordId":{"description":"The _itemid for the record being updated.","type":"string"},"status":{"description":"The status for the push data update regarding the specified item id","enum":["InProgress","Succeeded","PartiallySucceeded","Failed"],"type":"string"},"errorMessage":{"description":"An optional error message in case of an error while ingesting the record.","type":"string"}}},"TransformationConfigResponse":{"type":"object","properties":{"value":{"description":"The contents of the transformation config that's being managed.","type":"string"},"tryOutId":{"description":"An id that you can use to tryout your transformation on the cloud.","type":"string"}}},"TransformationTryoutResponse":{"description":"A response representing the status of a transformation config tryout requset.","type":"object","properties":{"status":{"description":"The status of the transformation config tryout.","type":"string"},"errorMessage":{"description":"Any error messages that happened while transforming, if any.","type":"string"},"results":{"description":"A list of records that the transformation config outputed.","uniqueItems":false,"type":"array","items":{"type":"string"}},"consoleOutput":{"description":"The console output of the transformation config, if any. Can be useful for debugging.","uniqueItems":false,"type":"array","items":{"type":"string"}}}},"SchemaDetectionResponse":{"type":"object","properties":{"index":{"$ref":"#/definitions/Response.Index"},"transformationConfig":{"$ref":"#/definitions/TransformationConfigResponse"},"warnings":{"uniqueItems":false,"type":"array","items":{"type":"string"}}}}},"securityDefinitions":{"AppId":{"type":"apiKey","name":"appid","in":"query"},"PortalBearerToken":{"type":"apiKey","name":"Authorization","in":"header"}},"security":[{"AppId":[]},{"PortalBearerToken":[]}],"tags":[{"name":"RetailSearchIngestionService"}]} \ No newline at end of file +{ + "swagger": "2.0", + "info": { + "title": "Bing Commerce Ingestion", + "version": "1" + }, + "host": "commerce.bing.com", + "basePath": "/api/ingestion/v1", + "schemes": [ + "https" + ], + "paths": { + "/{tenantid}/indexes": { + "post": { + "tags": [ + "RetailSearchIngestionService" + ], + "summary": "Create an index.", + "description": "Creates a definition of the tenant's index.", + "operationId": "CreateIndex", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "SubscriptionId", + "description": "Bing developer subcription id", + "type": "string" + }, + { + "in": "body", + "name": "body", + "description": "An Index object that describes the index definition to add.", + "schema": { + "$ref": "#/definitions/Index" + } + } + ], + "responses": { + "200": { + "description": "Ok", + "schema": { + "$ref": "#/definitions/IndexResponse" + } + } + } + }, + "get": { + "tags": [ + "RetailSearchIngestionService" + ], + "summary": "Get list of index definitions.", + "description": "Get list of index definitions that you defined for a tenant.", + "operationId": "GetAllIndexes", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "SubscriptionId", + "description": "Bing developer subcription id", + "type": "string" + } + ], + "responses": { + "200": { + "description": "Ok", + "schema": { + "$ref": "#/definitions/IndexResponse" + } + } + } + }, + "parameters": [ + { + "in": "path", + "name": "tenantid", + "description": "The ID that uniquely identifies the tenant that the index belongs to.", + "required": true, + "type": "string" + } + ] + }, + "/{tenantid}/indexes/{indexid}": { + "delete": { + "tags": [ + "RetailSearchIngestionService" + ], + "summary": "Delete an index.", + "description": "Delete an index definition along with all the catalog.", + "operationId": "DeleteIndex", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "SubscriptionId", + "description": "Bing developer subcription id", + "type": "string" + } + ], + "responses": { + "200": { + "description": "Ok", + "schema": { + "$ref": "#/definitions/IndexResponse" + } + } + } + }, + "put": { + "tags": [ + "RetailSearchIngestionService" + ], + "summary": "Updates an index with id.", + "description": "Update the definition for your index.", + "operationId": "UpdateIndex", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "SubscriptionId", + "description": "Bing developer subcription id", + "type": "string" + }, + { + "in": "body", + "name": "body", + "description": "The ID that uniquely identifies the index definition to manage.", + "schema": { + "$ref": "#/definitions/Index" + } + } + ], + "responses": { + "200": { + "description": "Ok", + "schema": { + "$ref": "#/definitions/IndexResponse" + } + } + } + }, + "get": { + "tags": [ + "RetailSearchIngestionService" + ], + "summary": "Get index definition by id.", + "description": "Get a specific index definition for a tenant.", + "operationId": "GetIndex", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "SubscriptionId", + "description": "Bing developer subcription id", + "type": "string" + } + ], + "responses": { + "200": { + "description": "Ok", + "schema": { + "$ref": "#/definitions/IndexResponse" + } + } + } + }, + "parameters": [ + { + "in": "path", + "name": "tenantid", + "description": "The ID that uniquely identifies the tenant that the index belongs to.", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "indexid", + "description": "The ID that uniquely identifies the index definition to manage.", + "required": true, + "type": "string" + } + ] + }, + "/{tenantid}/indexes/{indexid}/deletedata": { + "post": { + "tags": [ + "RetailSearchIngestionService" + ], + "summary": "Delete documents from your catalog.", + "description": "Delete documents from your index's catalog.", + "operationId": "DeleteDocuments", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "SubscriptionId", + "description": "Bing developer subcription id", + "type": "string" + }, + { + "in": "body", + "name": "body", + "description": "The set of document ids to delete.", + "schema": { + "$ref": "#/definitions/Requests.StringSet" + } + } + ], + "responses": { + "200": { + "description": "Succeeded", + "schema": { + "$ref": "#/definitions/DeleteDocumentsResponse" + } + }, + "206": { + "description": "PartiallySucceeded", + "schema": { + "$ref": "#/definitions/DeleteDocumentsResponse" + } + }, + "400": { + "description": "Failed", + "schema": { + "$ref": "#/definitions/DeleteDocumentsResponse" + } + } + } + }, + "parameters": [ + { + "in": "path", + "name": "tenantid", + "description": "The ID that uniquely identifies the tenant that the index belongs to.", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "indexid", + "description": "The ID that uniquely identifies the index definition to manage.", + "required": true, + "type": "string" + } + ] + }, + "/{tenantid}/indexes/{indexid}/status": { + "get": { + "tags": [ + "RetailSearchIngestionService" + ], + "summary": "Get index status by id.", + "description": "Get the detailed status of your index in each supported region.", + "operationId": "GetIndexStatus", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "SubscriptionId", + "description": "Bing developer subcription id", + "type": "string" + } + ], + "responses": { + "200": { + "description": "Ok", + "schema": { + "$ref": "#/definitions/IndexStatusResponse" + } + } + } + }, + "parameters": [ + { + "in": "path", + "name": "tenantid", + "description": "The ID that uniquely identifies the tenant that the index belongs to.", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "indexid", + "description": "The ID that uniquely identifies the index definition to manage.", + "required": true, + "type": "string" + } + ] + }, + "/{tenantid}/indexes/{indexid}/pushdata": { + "post": { + "tags": [ + "RetailSearchIngestionService" + ], + "summary": "Push catalog data.", + "description": "This method pushes updates to your your index data to Bing. This is an asynchronous process. To upload your index data to Bing, you'll send a push request that contains your index data.", + "operationId": "PushDataUpdate", + "consumes": [ + "text/plain" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "SubscriptionId", + "description": "Bing developer subcription id", + "type": "string" + }, + { + "in": "query", + "name": "notransform", + "description": "This disables transformation config processing if the config was uploaded for some index. It's useful when the data is already transformed and is matching the index definition. Default is `false`", + "type": "boolean" + }, + { + "in": "query", + "name": "updateid", + "description": "An id to uniquely identify the push update request in order to be able to track it down later.", + "type": "string" + }, + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Ok", + "schema": { + "$ref": "#/definitions/PushDataUpdateResponse" + } + } + } + }, + "parameters": [ + { + "in": "path", + "name": "tenantid", + "description": "The ID that uniquely identifies the tenant that the index belongs to.", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "indexid", + "description": "The ID that uniquely identifies the index definition to manage.", + "required": true, + "type": "string" + } + ] + }, + "/{tenantid}/indexes/{indexid}/status/{updateid}": { + "get": { + "tags": [ + "RetailSearchIngestionService" + ], + "summary": ".", + "description": ".", + "operationId": "PushDataStatus", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "SubscriptionId", + "description": "Bing developer subcription id", + "type": "string" + } + ], + "responses": { + "200": { + "description": "Ok", + "schema": { + "$ref": "#/definitions/PushUpdateStatusResponse" + } + } + } + }, + "parameters": [ + { + "in": "path", + "name": "tenantid", + "description": "The ID that uniquely identifies the tenant that the index belongs to.", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "indexid", + "description": "The ID that uniquely identifies the index definition to manage.", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "updateid", + "description": "An id to uniquely identify the push update request in order to be able to track it down later.", + "required": true, + "type": "string" + } + ] + }, + "/{tenantid}/indexes/{indexid}/transformation": { + "delete": { + "tags": [ + "RetailSearchIngestionService" + ], + "summary": "Delete your index's transformation config.", + "description": "Delete the transformation config that currently aplies to data you push to your index.", + "operationId": "DeleteTransformationConfig", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "SubscriptionId", + "description": "Bing developer subcription id", + "type": "string" + } + ], + "responses": { + "200": { + "description": "Ok", + "schema": { + "$ref": "#/definitions/TransformationConfigResponse" + } + } + } + }, + "put": { + "tags": [ + "RetailSearchIngestionService" + ], + "summary": "Retrieve your current index's transformation config.", + "description": "Retrieve the transformation config that currently applies to data you push to your index.", + "operationId": "CreateOrUpdateTransformationConfig", + "consumes": [ + "text/plain" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "SubscriptionId", + "description": "Bing developer subcription id", + "type": "string" + }, + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Ok", + "schema": { + "$ref": "#/definitions/TransformationConfigResponse" + } + } + } + }, + "get": { + "tags": [ + "RetailSearchIngestionService" + ], + "summary": "Get ingestion status.", + "description": "Track your ingestion by querying the status.", + "operationId": "GetTransformationConfig", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "SubscriptionId", + "description": "Bing developer subcription id", + "type": "string" + } + ], + "responses": { + "200": { + "description": "Ok", + "schema": { + "$ref": "#/definitions/TransformationConfigResponse" + } + } + } + }, + "parameters": [ + { + "in": "path", + "name": "tenantid", + "description": "The ID that uniquely identifies the tenant that the index belongs to.", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "indexid", + "description": "The ID that uniquely identifies the index definition to manage.", + "required": true, + "type": "string" + } + ] + }, + "/transformation/tryout": { + "post": { + "tags": [ + "RetailSearchIngestionService" + ], + "summary": "Create a transformation config.", + "description": "Upload a new transformation config and set it as the transformation config that applies to data you push to your index.", + "operationId": "UploadTryOutConfig", + "consumes": [ + "text/plain" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "SubscriptionId", + "description": "Bing developer subcription id", + "type": "string" + }, + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Ok", + "schema": { + "$ref": "#/definitions/TransformationConfigResponse" + } + } + } + } + }, + "/transformation/tryout/{tryoutid}": { + "post": { + "tags": [ + "RetailSearchIngestionService" + ], + "summary": "Upload a trytout config.", + "description": "Upload a transformation config that you can use to test data transformation on the cloud.", + "operationId": "ExecuteTryOutConfig", + "consumes": [ + "text/plain" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "SubscriptionId", + "description": "Bing developer subcription id", + "type": "string" + }, + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Ok", + "schema": { + "$ref": "#/definitions/TransformationTryoutResponse" + } + } + } + }, + "parameters": [ + { + "in": "path", + "name": "tryoutid", + "description": "The transformation tryout config id.", + "required": true, + "type": "string" + } + ] + }, + "/schemadetection": { + "post": { + "tags": [ + "RetailSearchIngestionService" + ], + "summary": "", + "description": "", + "operationId": "DetectSchema", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "SubscriptionId", + "description": "Bing developer subcription id", + "type": "string" + }, + { + "in": "query", + "name": "format", + "description": "The push data update document format.", + "type": "string", + "enum": [ + "Unknown", + "LDJson", + "CSV", + "TSV", + "JsonArray" + ] + } + ], + "responses": { + "200": { + "description": "Ok", + "schema": { + "$ref": "#/definitions/SchemaDetectionResponse" + } + } + } + } + } + }, + "definitions": { + "Response.PushStatus": { + "enum": [ + "Queued", + "Error" + ], + "type": "string", + "x-ms-enum": { + "name": "Response.PushStatus", + "values": [ + { + "value": "Queued" + }, + { + "value": "Error" + } + ] + } + }, + "Requests.StringSet": { + "description": "Defines a set of strings", + "type": "object", + "properties": { + "values": { + "description": "A set of strings", + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "Index": { + "description": "Contains the definition for the index. An index consists of a set of documents that search operations can be performed upon.", + "type": "object", + "properties": { + "name": { + "description": "The index's name. The name must be unique per tenant, contain only ASCII characters, and have a maximum length of 64 characters.", + "type": "string" + }, + "description": { + "description": "A description of the index. The description is for the tenant's use. The description must contain only ASCII characters and have a maximum length of 64 characters.", + "type": "string" + }, + "regions": { + "description": "The array of regions where the customer data will be processed and served.", + "uniqueItems": true, + "type": "array", + "items": { + "$ref": "#/definitions/Region" + } + }, + "searchScenario": { + "description": "The type of search scenario that the user is using the index for, which includes Retail, Hotel, and Document.", + "default": "Retail", + "enum": [ + "Unknown", + "Retail", + "Document", + "Hotel" + ], + "type": "string" + }, + "searchServices": { + "description": "The array of additional search services that the user wants to include for the index, which includes Autosuggest and VisualSearch.", + "uniqueItems": false, + "type": "array", + "items": { + "enum": [ + "Unknown", + "VisualSearch", + "Autosuggest", + "TextSearch" + ], + "type": "string" + } + }, + "schemaVersion": { + "description": "The version for the schema of the index.", + "type": "string" + }, + "fields": { + "description": "The fields that are associated with the index.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/IndexField" + } + } + } + }, + "IndexField": { + "description": "Contains the definition for the index field. A field represents a single unit of data.", + "type": "object", + "properties": { + "name": { + "description": "Index field name.", + "type": "string" + }, + "type": { + "$ref": "#/definitions/IndexFieldType" + }, + "facetable": { + "description": "Enables using the field for facets and other field-based aggregations.", + "type": "boolean" + }, + "filterable": { + "description": "Enables using the field in filter and boost conditions.", + "type": "boolean" + }, + "retrievable": { + "description": "Enables using the field values in search response.", + "type": "boolean" + }, + "searchable": { + "description": "Enables text matching on the field.", + "type": "boolean" + }, + "sortable": { + "description": "Enables sorting results by the field.", + "type": "boolean" + }, + "fieldLabel": { + "description": "A label to use with the field.", + "type": "string" + }, + "fields": { + "description": "A child list of fields.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/IndexField" + } + } + } + }, + "Response.Index": { + "allOf": [ + { + "$ref": "#/definitions/Index" + }, + { + "type": "object", + "properties": { + "id": { + "description": "The ID that uniquely identifies the index definition that had the CRUD operation applied.", + "type": "string" + }, + "provisioningState": { + "description": "The current state of provisioning for the index definition.", + "enum": [ + "Unknown", + "NotStarted", + "Provisioning", + "Deprovisioning", + "Succeeded", + "Failed" + ], + "type": "string" + }, + "createdDateTime": { + "description": "The date and time when the index was created.", + "type": "string" + } + } + } + ] + }, + "IndexFieldType": { + "enum": [ + "Unknown", + "String", + "Boolean", + "Number", + "ProductId", + "DupId", + "StaticRank", + "Url", + "ImageUrl", + "Title", + "Description", + "Category", + "Price", + "Rating", + "Brand", + "Model", + "Color", + "Size", + "Material", + "Gender", + "AgeGroup", + "Array", + "Dictionary", + "ExcludeFlag", + "Identifier", + "Object", + "DocumentId", + "Author", + "CreatedAt", + "ModifiedAt", + "Paragraph", + "SubHeading", + "SectionHeader", + "Address", + "RatingCount", + "ReviewCount", + "RatingScale", + "Amenities", + "StreetAddress", + "Locality", + "SubRegion", + "AddressRegion", + "PostalCode", + "PostOfficeBoxNumber", + "Country", + "CountryIso", + "Neighborhood", + "OtherAreas", + "PhoneNumber", + "Barcode", + "SecondaryImageUrls" + ], + "type": "string", + "x-ms-enum": { + "name": "IndexFieldType", + "values": [ + { + "value": "Unknown" + }, + { + "value": "String" + }, + { + "value": "Boolean" + }, + { + "value": "Number" + }, + { + "value": "ProductId" + }, + { + "value": "DupId" + }, + { + "value": "StaticRank" + }, + { + "value": "Url" + }, + { + "value": "ImageUrl" + }, + { + "value": "Title" + }, + { + "value": "Description" + }, + { + "value": "Category" + }, + { + "value": "Price" + }, + { + "value": "Rating" + }, + { + "value": "Brand" + }, + { + "value": "Model" + }, + { + "value": "Color" + }, + { + "value": "Size" + }, + { + "value": "Material" + }, + { + "value": "Gender" + }, + { + "value": "AgeGroup" + }, + { + "value": "Array" + }, + { + "value": "Dictionary" + }, + { + "value": "ExcludeFlag" + }, + { + "value": "Identifier" + }, + { + "value": "Object" + }, + { + "value": "DocumentId" + }, + { + "value": "Author" + }, + { + "value": "CreatedAt" + }, + { + "value": "ModifiedAt" + }, + { + "value": "Paragraph" + }, + { + "value": "SubHeading" + }, + { + "value": "SectionHeader" + }, + { + "value": "Address" + }, + { + "value": "RatingCount" + }, + { + "value": "ReviewCount" + }, + { + "value": "RatingScale" + }, + { + "value": "Amenities" + }, + { + "value": "StreetAddress" + }, + { + "value": "Locality" + }, + { + "value": "SubRegion" + }, + { + "value": "AddressRegion" + }, + { + "value": "PostalCode" + }, + { + "value": "PostOfficeBoxNumber" + }, + { + "value": "Country" + }, + { + "value": "CountryIso" + }, + { + "value": "Neighborhood" + }, + { + "value": "OtherAreas" + }, + { + "value": "PhoneNumber" + }, + { + "value": "Barcode" + }, + { + "value": "SecondaryImageUrls" + } + ] + } + }, + "Region": { + "enum": [ + "Unknown", + "EastAsia", + "EastUS2", + "NorthCentralUS", + "NorthEurope", + "WestUS2", + "SoutheastAsia", + "AustraliaEast", + "AustraliaSoutheast", + "AustraliaCentral", + "AustraliaCentral2", + "BrazilSouth", + "CanadaCentral", + "CanadaEast", + "ChinaNorth", + "ChinaEast", + "ChinaNorth2", + "ChinaEast2", + "WestEurope", + "FranceCentral", + "FranceSouth", + "GermanyCentral", + "GermanyNortheast", + "CentralIndia", + "WestIndia", + "SouthIndia", + "JapanEast", + "JapanWest", + "KoreaCentral", + "KoreaSouth", + "EastUS", + "WestUS", + "CentralUS", + "SouthCentralUS", + "WestCentralUS", + "SouthAfricaNorth", + "SouthAfricaWest", + "UKWest", + "UKSouth", + "UAENorth", + "UAECentral" + ], + "type": "string", + "x-ms-enum": { + "name": "Region", + "values": [ + { + "value": "Unknown" + }, + { + "value": "EastAsia" + }, + { + "value": "EastUS2" + }, + { + "value": "NorthCentralUS" + }, + { + "value": "NorthEurope" + }, + { + "value": "WestUS2" + }, + { + "value": "SoutheastAsia" + }, + { + "value": "AustraliaEast" + }, + { + "value": "AustraliaSoutheast" + }, + { + "value": "AustraliaCentral" + }, + { + "value": "AustraliaCentral2" + }, + { + "value": "BrazilSouth" + }, + { + "value": "CanadaCentral" + }, + { + "value": "CanadaEast" + }, + { + "value": "ChinaNorth" + }, + { + "value": "ChinaEast" + }, + { + "value": "ChinaNorth2" + }, + { + "value": "ChinaEast2" + }, + { + "value": "WestEurope" + }, + { + "value": "FranceCentral" + }, + { + "value": "FranceSouth" + }, + { + "value": "GermanyCentral" + }, + { + "value": "GermanyNortheast" + }, + { + "value": "CentralIndia" + }, + { + "value": "WestIndia" + }, + { + "value": "SouthIndia" + }, + { + "value": "JapanEast" + }, + { + "value": "JapanWest" + }, + { + "value": "KoreaCentral" + }, + { + "value": "KoreaSouth" + }, + { + "value": "EastUS" + }, + { + "value": "WestUS" + }, + { + "value": "CentralUS" + }, + { + "value": "SouthCentralUS" + }, + { + "value": "WestCentralUS" + }, + { + "value": "SouthAfricaNorth" + }, + { + "value": "SouthAfricaWest" + }, + { + "value": "UKWest" + }, + { + "value": "UKSouth" + }, + { + "value": "UAENorth" + }, + { + "value": "UAECentral" + } + ] + } + }, + "IndexResponse": { + "description": "A response containing a list of indexes.", + "type": "object", + "properties": { + "indexes": { + "description": "A list of indexes", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Response.Index" + } + } + } + }, + "DeleteDocumentsResponse": { + "description": "A response containing the status for a request to delete documents from the index.", + "type": "object", + "properties": { + "status": { + "description": "The status for the document deletion request.", + "enum": [ + "Succeeded", + "PartiallySucceeded", + "Failed" + ], + "type": "string" + }, + "errorMessage": { + "description": "An aggregation of error messages for errors that happened while processing the request, if any.", + "type": "string" + }, + "result": { + "description": "A list of status results per document.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Response.DocumentDeletionResult" + } + } + } + }, + "Response.DocumentDeletionResult": { + "description": "A response representing the result of a request to delete a document from your index's catalog", + "type": "object", + "properties": { + "documentId": { + "description": "The _itemid for the item item that has been deleted from the index.", + "type": "string" + }, + "deleted": { + "description": "A boolean flag that specifies whether or not the document has been successfully deleted.", + "type": "boolean" + }, + "errorMessage": { + "description": "An error message for the request, if any.", + "type": "string" + } + } + }, + "IndexStatusResponse": { + "description": "A response that represents the status of an index within its supported regions.", + "type": "object", + "properties": { + "indexStatuses": { + "description": "A list of objects containing the status of the index within a region.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Response.IndexStatus" + } + } + } + }, + "Response.IndexStatus": { + "description": "A response that represents a query to an index status within a region.", + "type": "object", + "properties": { + "region": { + "$ref": "#/definitions/Region" + }, + "provisioningState": { + "description": "The provisioning state for the index within the specified region.", + "enum": [ + "Unknown", + "NotStarted", + "Provisioning", + "Deprovisioning", + "Succeeded", + "Failed" + ], + "type": "string" + }, + "provisioningPercentage": { + "format": "double", + "description": "The percentage of provisioning for the index withing the region.", + "type": "number" + } + } + }, + "PushDataUpdateResponse": { + "description": "A response to a push data update.", + "type": "object", + "properties": { + "updateId": { + "description": "The id of the push data update that you can use to track it down.", + "type": "string" + } + } + }, + "PushUpdateStatusResponse": { + "description": "A response that represents the status of a push data update given an update id.", + "type": "object", + "properties": { + "updateId": { + "description": "The id that uniquely identifies the push data update.", + "type": "string" + }, + "status": { + "description": "The wholistic update status for the push data update.", + "enum": [ + "InProgress", + "Succeeded", + "PartiallySucceeded", + "Failed" + ], + "type": "string" + }, + "totalKeys": { + "format": "int32", + "description": "The total number of items that are part of the upate.", + "type": "integer" + }, + "successfulKeys": { + "format": "int32", + "description": "The total number of items that have successfully been updated.", + "type": "integer" + }, + "failureMessages": { + "description": "An aggregation of any error messages that happened while ingesting any of the records.", + "uniqueItems": false, + "type": "array", + "items": { + "type": "string" + } + }, + "records": { + "description": "A drill down for the push update status for each record.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Response.RecordStatus" + } + } + } + }, + "Response.RecordStatus": { + "description": "A response that represents a status to a push data update for a record.", + "type": "object", + "properties": { + "recordId": { + "description": "The _itemid for the record being updated.", + "type": "string" + }, + "status": { + "description": "The status for the push data update regarding the specified item id", + "enum": [ + "InProgress", + "Succeeded", + "PartiallySucceeded", + "Failed" + ], + "type": "string" + }, + "errorMessage": { + "description": "An optional error message in case of an error while ingesting the record.", + "type": "string" + } + } + }, + "TransformationConfigResponse": { + "type": "object", + "properties": { + "value": { + "description": "The contents of the transformation config that's being managed.", + "type": "string" + }, + "tryOutId": { + "description": "An id that you can use to tryout your transformation on the cloud.", + "type": "string" + } + } + }, + "TransformationTryoutResponse": { + "description": "A response representing the status of a transformation config tryout requset.", + "type": "object", + "properties": { + "status": { + "description": "The status of the transformation config tryout.", + "type": "string" + }, + "errorMessage": { + "description": "Any error messages that happened while transforming, if any.", + "type": "string" + }, + "results": { + "description": "A list of records that the transformation config outputed.", + "uniqueItems": false, + "type": "array", + "items": { + "type": "string" + } + }, + "consoleOutput": { + "description": "The console output of the transformation config, if any. Can be useful for debugging.", + "uniqueItems": false, + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "SchemaDetectionResponse": { + "type": "object", + "properties": { + "index": { + "$ref": "#/definitions/Response.Index" + }, + "transformationConfig": { + "$ref": "#/definitions/TransformationConfigResponse" + }, + "warnings": { + "uniqueItems": false, + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "securityDefinitions": { + "AppId": { + "type": "apiKey", + "name": "appid", + "in": "query" + }, + "PortalBearerToken": { + "type": "apiKey", + "name": "Authorization", + "in": "header" + } + }, + "security": [ + { + "AppId": [] + }, + { + "PortalBearerToken": [] + } + ], + "tags": [ + { + "name": "RetailSearchIngestionService" + } + ] +} \ No newline at end of file diff --git a/search/Bing-Commerce-Search.OAS3.swagger.json b/search/Bing-Commerce-Search.OAS3.swagger.json index 4d6f2cb..749884b 100644 --- a/search/Bing-Commerce-Search.OAS3.swagger.json +++ b/search/Bing-Commerce-Search.OAS3.swagger.json @@ -52,7 +52,7 @@ { "name": "mkt", "in": "query", - "description": "The market where the results come from. Thypically, `mkt` is the country where the user is making the request from.", + "description": "The market where the results come from. Typically, `mkt` is the country where the user is making the request from.", "schema": { "type": "string" } @@ -184,7 +184,7 @@ "properties": { "market": { "type": "string", - "description": "The market where the results come from. Thypically, `mkt` is the country where the user is making the request from." + "description": "The market where the results come from. Typically, `mkt` is the country where the user is making the request from." }, "client": { "$ref": "#/components/schemas/Request.Client" diff --git a/search/Bing-Commerce-Search.swagger.json b/search/Bing-Commerce-Search.swagger.json index 05cde9d..2e26e9b 100644 --- a/search/Bing-Commerce-Search.swagger.json +++ b/search/Bing-Commerce-Search.swagger.json @@ -1 +1,1816 @@ -{"swagger":"2.0","info":{"title":"Bing Commerce Search","version":"1"},"host":"commerce.bing.com","basePath":"/api/search/v1/","schemes":["https"],"paths":{"/{tenant}/indexes/{index}":{"post":{"tags":["RetailSearchService"],"summary":"Bing Commerce Custom Search Query.","description":"POST requests accept complex search request options.","operationId":"Search_Post","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/CommerceSearchPostRequest"}}],"responses":{"200":{"description":"Ok","schema":{"$ref":"#/definitions/CommerceSearchResponse"}}}},"get":{"tags":["RetailSearchService"],"summary":"Bing Commerce Basic Search Query.","description":"GET requests can search an index using only URL parameters. Only limited request options are available. GET requests will always do simple item search and support only a default facet discovery aggregation.","operationId":"Search_Get","produces":["application/json"],"parameters":[{"in":"query","name":"mkt","description":"The market where the results come from. Thypically, `mkt` is the country where the user is making the request from.","type":"string"},{"in":"query","name":"setlang","description":"The language to use for user interface strings. You may specify the language using either a 2-letter or 4-letter code. Using 4-letter codes is preferred.","type":"string"},{"in":"query","name":"q","description":"The query to match against all eligible fields.","required":true,"type":"string"},{"in":"query","name":"select","description":"A comma-separated list of fields to return. unspecified or empty to select only _itemId, or `*` to select all fields.","type":"string"},{"in":"query","name":"orderby","description":"A comma-separated list of OData order syntax expressions.","type":"string"},{"in":"query","name":"top","description":"The maximum count of items to return for pagination. Default is 24.","type":"integer","format":"int32"},{"in":"query","name":"skip","description":"The offset to the first item to return for pagination. Default is 0.","type":"integer","format":"int32"},{"in":"query","name":"discoverfacets","description":"Default value is false. When true, requests a facet discovery aggregation.","type":"boolean","default":false},{"in":"query","name":"alteration","description":"A boolean flag to enable or disable query alteration. Default is true.","type":"boolean","default":true},{"in":"query","name":"debug","type":"boolean","default":false},{"in":"query","name":"searchinstanceid","description":"A saved search instance configuration to apply to current request.","type":"string","default":"Default"}],"responses":{"200":{"description":"Ok","schema":{"$ref":"#/definitions/CommerceSearchResponse"}}}},"parameters":[{"in":"path","name":"tenant","required":true,"type":"string"},{"in":"path","name":"index","required":true,"type":"string"}]}},"definitions":{"CommerceSearchPostRequest":{"type":"object","properties":{"market":{"description":"The market where the results come from. Thypically, `mkt` is the country where the user is making the request from.","type":"string"},"client":{"$ref":"#/definitions/Request.Client"},"language":{"description":"The language to use for user interface strings. You may specify the language using either a 2-letter or 4-letter code. Using 4-letter codes is preferred.","type":"string"},"query":{"$ref":"#/definitions/Request.Query","description":"The query that determines the result set match criteria."},"items":{"$ref":"#/definitions/Request.Items","description":"A description for how the items in the result set would look like."},"aggregations":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Request.AggregationBase"}},"debug":{"default":false,"type":"boolean"},"searchInstanceId":{"description":"A saved search instance configuration to apply to current request.","default":"Default","type":"string"}}},"Request.Client":{"type":"object","properties":{"ids":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Request.ClientId"}}}},"Request.ClientId":{"type":"object","properties":{"kind":{"default":"MUID","enum":["MUID","UID"],"type":"string"},"value":{"type":"string"}}},"Request.Query":{"description":"Represents the query that determines the result set. Note that query must have a matchAll, value, or filter field. The matchAll and value fields cannot both be present. You may create a query with only a filter to **browse** (for example: a category).","type":"object","properties":{"matchAll":{"description":"A query that matches against all searchable fields.","type":"string"},"value":{"$ref":"#/definitions/Request.QueryClauseBase","description":"An instance of queryclausebase specifying search conditions. Its mutually exclusive with matchall."},"filter":{"$ref":"#/definitions/ConditionBase","description":"A filter to apply on the matching result set, or on all items if no match is specified."},"boosts":{"description":"The set of boosts to apply to the result set.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Request.BoostExpression"}},"alteration":{"description":"A boolean flag to enable or disable query alteration.","default":true,"type":"boolean"},"synonyms":{"description":"A set of alternate terms (or phrases) that can be applied to request query. The applied synonyms are used for both text-matching and result-ranking stages of search.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Synonym"}},"excludeBusinessRules":{"description":"Business rule ids to skip applying from request search instance.","uniqueItems":false,"type":"array","items":{"type":"string"}}}},"Request.QueryClauseBase":{"description":"Defines the abstract base type for a query clause.","required":["_type"],"type":"object","properties":{"_type":{"type":"string"}},"discriminator":"_type"},"Request.Match":{"description":"Defines a type of query to search specific fields.","required":["_type"],"allOf":[{"$ref":"#/definitions/Request.QueryClauseBase"},{"type":"object","properties":{"value":{"description":"The search terms to match on the specified fields.","type":"string"}}}],"properties":{"_type":{"type":"string"}},"discriminator":"_type","x-ms-discriminator-value":"Match"},"Request.Bing.MatchStreams":{"allOf":[{"$ref":"#/definitions/Request.Match"},{"type":"object","properties":{"include":{"uniqueItems":false,"type":"array","items":{"type":"string"}},"exclude":{"uniqueItems":false,"type":"array","items":{"type":"string"}}}}],"x-ms-discriminator-value":"MatchStreams"},"Request.QueryClauseBlock":{"description":"Defines a list of QueryClauseBase objects that should all match. Nested QueryClauseBlock within QueryClauseBlock is not allowed.","allOf":[{"$ref":"#/definitions/Request.QueryClauseBase"},{"type":"object","properties":{"values":{"description":"A list of queryclausebase conditions to be applied.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Request.QueryClauseBase"}}}}],"x-ms-discriminator-value":"QueryClauseBlock"},"Request.LocationMatch":{"description":"Defines user location to match. If an explicit location is specified in a match query, this is ignored.","allOf":[{"$ref":"#/definitions/Request.QueryClauseBase"},{"type":"object","properties":{"center":{"$ref":"#/definitions/GeoPoint","description":"The geo-location that you wish for the search to be applied around."},"radius":{"format":"float","description":"The accuracy of the search on that location in meters.","type":"number"}}}],"x-ms-discriminator-value":"LocationMatch"},"GeoPoint":{"description":"Defines a geo-location based on lattitude and longitude.","type":"object","properties":{"lat":{"format":"float","description":"The lattitude of the location.","type":"number"},"lon":{"format":"float","description":"The longitude of the location.","type":"number"}}},"ConditionBase":{"description":"The condition that triggered a boost in ranking score.","required":["_type"],"type":"object","properties":{"_type":{"type":"string"}},"discriminator":"_type"},"ConditionBlock":{"description":"Defines a list of composite conditions for filtering and boosting.","allOf":[{"$ref":"#/definitions/ConditionBase"},{"type":"object","properties":{"conditions":{"description":"The set of operands.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/ConditionBase"}},"operator":{"$ref":"#/definitions/LogicalOperator","description":"and, or. Default is `And`."}}}],"x-ms-discriminator-value":"ConditionBlock"},"FieldConditionBase":{"description":"Defines the abstract base type for conditions with a field name.","required":["_type"],"allOf":[{"$ref":"#/definitions/ConditionBase"},{"type":"object","properties":{"field":{"description":"The name of the field.","type":"string"}}}],"properties":{"_type":{"type":"string"}},"discriminator":"_type"},"EquivalenceConditionBase":{"description":"Defines the abstract base type for conditions that does an exact match for a field.","required":["_type"],"allOf":[{"$ref":"#/definitions/FieldConditionBase"},{"type":"object","properties":{"operator":{"$ref":"#/definitions/EquivalenceOperator"}}}],"properties":{"_type":{"type":"string"}},"discriminator":"_type"},"StringCondition":{"description":"Defines an equivalence condition for a string field. It can appear in a filter, a boost, or a filter aggregation.","allOf":[{"$ref":"#/definitions/EquivalenceConditionBase"},{"type":"object","properties":{"value":{"description":"The value to compare the field against.","type":"string"}}}],"x-ms-discriminator-value":"StringCondition"},"BoolCondition":{"description":"Defines an equivalence condition for a Boolean field. It can appear in a filter, a boost, or a filter aggregation.","allOf":[{"$ref":"#/definitions/EquivalenceConditionBase"},{"type":"object","properties":{"value":{"description":"The value (true or false) to compare the field against.","type":"boolean"}}}],"x-ms-discriminator-value":"BoolCondition"},"NumericCondition":{"description":"Defines an equivalence condition for a numeric field. It can appear in a filter, a boost, or a filter aggregation.","allOf":[{"$ref":"#/definitions/FieldConditionBase"},{"type":"object","properties":{"value":{"format":"double","description":"The value to compare the field against.","type":"number"},"operator":{"$ref":"#/definitions/ComparisonOperator","description":"The comparison operator. Default is `gt`"}}}],"x-ms-discriminator-value":"NumericCondition"},"CategoryCondition":{"description":"Defines an inclusion condition for a category field. It can appear in a filter, a boost, or a filter aggregation.","allOf":[{"$ref":"#/definitions/FieldConditionBase"},{"type":"object","properties":{"value":{"description":"The category to match items against. The format for specifying hierarchical categories is a pipe-delimited string, such as `Meanswear|shirts|Dress Shirts`.","type":"string"},"operator":{"$ref":"#/definitions/CategoryOperator","description":"The category operator to apply. Default is `In`."}}}],"x-ms-discriminator-value":"CategoryCondition"},"SetConditionBase":{"description":"Defines the abstract base type for conditions that matches with a set of values.","required":["_type"],"allOf":[{"$ref":"#/definitions/FieldConditionBase"},{"type":"object","properties":{"operator":{"$ref":"#/definitions/SetOperator"}}}],"properties":{"_type":{"type":"string"}},"discriminator":"_type"},"StringSetCondition":{"description":"Defines a condition where the field must exactly match one of the values within the set to be included / excluded. It can appear in a filter, a boost, or a filter aggregation.","allOf":[{"$ref":"#/definitions/SetConditionBase"},{"type":"object","properties":{"values":{"description":"The set of values for the field to match against.","uniqueItems":false,"type":"array","items":{"type":"string"}}}}],"x-ms-discriminator-value":"StringSetCondition"},"GeoCondition":{"description":"Defines a condition that applies on a geo-location field. It can appear in a filter, a boost, or a filter aggregation.","allOf":[{"$ref":"#/definitions/ConditionBase"},{"type":"object","properties":{"boundary":{"$ref":"#/definitions/GeoBoundaryBase","description":"The geo-bondary to match the results against."}}}],"x-ms-discriminator-value":"GeoCondition"},"GeoBoundaryBase":{"description":"Defines the abstract base type for geo-location boundary.","required":["_type"],"type":"object","properties":{"_type":{"type":"string"}},"discriminator":"_type"},"GeoBoundingBox":{"description":"Defines a geographical box to match the results that lie within it.","allOf":[{"$ref":"#/definitions/GeoBoundaryBase"},{"type":"object","properties":{"topLeft":{"$ref":"#/definitions/GeoPoint","description":"The top-left corner geo-location of the box."},"bottomRight":{"$ref":"#/definitions/GeoPoint","description":"The bottom-right corner geo-location of the box."}}}],"x-ms-discriminator-value":"GeoBoundingBox"},"GeoDistance":{"description":"Defines a geographical boundary that matches location within a certain euclidean distance from a point.","allOf":[{"$ref":"#/definitions/GeoBoundaryBase"},{"type":"object","properties":{"center":{"$ref":"#/definitions/GeoPoint","description":"The geo-location for the center point to match around."},"radius":{"format":"float","description":"The accpeptable euclidean distance to the center.","type":"number"}}}],"x-ms-discriminator-value":"GeoDistance"},"Request.BoostExpression":{"description":"Defines an expression that modifies the ranking score of results based on a condition.","type":"object","properties":{"condition":{"$ref":"#/definitions/ConditionBase","description":"The condition that triggers a boost in ranking score."},"boost":{"format":"double","description":"The magnitude of a boost. The range is -10 million to 10 million.","type":"number"}}},"Synonym":{"description":"Defines a set of alternate terms (or phrases) that can be applied to request query.","type":"object","properties":{"synonymId":{"description":"The id for the saved synonym.","type":"string"},"synonyms":{"description":"The alternate terms to apply","uniqueItems":false,"type":"array","items":{"type":"string"}}}},"Request.Items":{"description":"Defines how to return items from the result set.","type":"object","properties":{"select":{"description":"A list of fields that should appear for each item of the response.","uniqueItems":false,"type":"array","items":{"type":"string"}},"orderBy":{"description":"A comma-separated list of OData order syntax expressions.","type":"string"},"top":{"format":"int32","description":"The number of results to return. It can be used for pagination.","type":"integer"},"skip":{"format":"int32","description":"The number of results to skip in the result set. Supports pagination.","type":"integer"},"dedupe":{"description":"A boolean to specify whether you want the result set to exclude duplicates. Default is `false`.","default":false,"type":"boolean"}}},"Request.AggregationBase":{"description":"Defines the abstract base type for an aggregation request.","required":["_type"],"type":"object","properties":{"name":{"description":"A label that you specify for your aggregations, which the API passes through and returns with the response.","type":"string"},"aggregations":{"description":"A list of child aggregations.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Request.AggregationBase"}},"_type":{"type":"string"}},"discriminator":"_type"},"Request.Filter":{"description":"Defines a filter aggregation.","allOf":[{"$ref":"#/definitions/Request.AggregationBase"},{"type":"object","properties":{"value":{"$ref":"#/definitions/ConditionBase","description":"The condition to match for the aggregation."},"includeCustomizations":{"default":true,"type":"boolean"}}}],"x-ms-discriminator-value":"Filter"},"Request.FieldAggregationBase":{"description":"Defines the abstract base type for an aggregation request that have a field.","required":["_type"],"allOf":[{"$ref":"#/definitions/Request.AggregationBase"},{"type":"object","properties":{"field":{"description":"The field name.","type":"string"}}}],"properties":{"_type":{"type":"string"}},"discriminator":"_type"},"Request.FacetBase":{"description":"Defines the abstract base type for a facet request.","required":["_type"],"allOf":[{"$ref":"#/definitions/Request.FieldAggregationBase"},{"type":"object","properties":{"orderBy":{"description":"A comma-separated list of OData order syntax expressions. Default is `_count desc`","type":"string"}}}],"properties":{"_type":{"type":"string"}},"discriminator":"_type"},"Request.Facet":{"description":"Defines a facet where each refinement is for a single value.","allOf":[{"$ref":"#/definitions/Request.FacetBase"},{"type":"object"}],"x-ms-discriminator-value":"Facet"},"Request.RangeFacet":{"description":"Defines a facet with refinements that have numerical ranges.","allOf":[{"$ref":"#/definitions/Request.FacetBase"},{"type":"object","properties":{"interval":{"format":"int32","description":"Defines the size of the interval that can be used to refine a search which utilizes numerical range faceting.","type":"integer"}}}],"x-ms-discriminator-value":"RangeFacet"},"Request.Min":{"description":"Aggregation type for getting the min value of a field. Only applicable to numeric data.","allOf":[{"$ref":"#/definitions/Request.FieldAggregationBase"},{"type":"object"}],"x-ms-discriminator-value":"Min"},"Request.Max":{"description":"Aggregation type for getting the max value of a field. Only applicable to numeric data.","allOf":[{"$ref":"#/definitions/Request.FieldAggregationBase"},{"type":"object"}],"x-ms-discriminator-value":"Max"},"Request.DiscoverFacets":{"description":"Defines an aggregation type that triggers facet discovery of significant facets.","allOf":[{"$ref":"#/definitions/Request.AggregationBase"},{"type":"object","properties":{"discoverFilter":{"description":"When true, if the top results share a filter then restrict facet discovery to that filter. Note that it attempts to discover category based filters.","default":false,"type":"boolean"},"refinements":{"description":"When true, returns refinement values in the response.","default":true,"type":"boolean"},"pin":{"description":"A list of facets to pin at the top positions of the DiscoveredFacets aggregations list.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Request.FacetBase"}},"include":{"description":"A list of facets to be included, but not necessarily at the top positions.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Request.FacetBase"}},"exclude":{"description":"A list of field names to exclude from consideration.","uniqueItems":false,"type":"array","items":{"type":"string"}},"facetDefaults":{"$ref":"#/definitions/Request.Facet","description":"default facets to apply."},"rangeFacetDefaults":{"$ref":"#/definitions/Request.RangeFacet","description":"default range facets to apply."}}}],"x-ms-discriminator-value":"DiscoverFacets"},"CommerceSearchResponse":{"description":"The response to a Bing Commerce Search Query.","allOf":[{"$ref":"#/definitions/Response.Task"},{"type":"object","properties":{"impressionId":{"description":"A random GUID to uniquely track the search response.","type":"string"},"queryContext":{"$ref":"#/definitions/Response.QueryContext","description":"The query alteration result."},"items":{"$ref":"#/definitions/Response.ItemsBase","description":"The item results"},"aggregations":{"description":"The aggregations result.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Response.Aggregation"}},"redirectUrl":{"description":"The redirect url for this the current query from the request search instance.","type":"string"},"customization":{"$ref":"#/definitions/Response.Customization","description":"The user defined customizations applied the search query."}}}],"x-ms-discriminator-value":"SearchResponse"},"Response.QueryContext":{"description":"Defines an object that contains the result of query alteration.","allOf":[{"$ref":"#/definitions/Response.Task"},{"type":"object","properties":{"originalQuery":{"description":"The user's query string as entered.","type":"string"},"alteredQuery":{"description":"The altered query string that the API actually uses for the query (for example, corrected spelling).","type":"string"}}}]},"Response.Task":{"required":["_type"],"type":"object","properties":{"errors":{"description":"A list of errors that happened to the task, if any.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Response.Error"}},"debug":{"description":"","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Response.DebugInfo"}},"_type":{"type":"string"}},"discriminator":"_type"},"Response.Error":{"description":"Defines The error details that happened to a task.","type":"object","properties":{"code":{"default":"None","enum":["None","ServerError","InvalidRequest","InsufficientAuthorization"],"type":"string"},"subCode":{"enum":["UnexpectedError","ResourceError","DeadlineExceeded","ParameterMissing","ParameterInvalidValue"],"type":"string"},"message":{"type":"string"},"moreDetails":{"type":"string"}}},"Response.DebugInfo":{"required":["_type"],"type":"object","properties":{"_type":{"type":"string"}},"discriminator":"_type"},"Response.Bing.BingItemDebugInfo":{"allOf":[{"$ref":"#/definitions/Response.DebugInfo"},{"type":"object","properties":{"perfectMatchingStreams":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Response.Bing.MatchingStream"}},"completeMatchingStreams":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Response.Bing.MatchingStream"}}}}],"x-ms-discriminator-value":"BingItemDebugInfo"},"Response.Bing.MatchingStream":{"type":"object","properties":{"name":{"type":"string"},"score":{"format":"int32","type":"integer"}}},"SetOperator":{"enum":["In","NotIn"],"type":"string","x-ms-enum":{"name":"SetOperator","values":[{"value":"In"},{"value":"NotIn"}]}},"Response.Customization":{"description":"Defines the customizations applied to the search operation.","allOf":[{"$ref":"#/definitions/Response.Task"},{"type":"object","properties":{"queryAlteration":{"description":"A boolean to determine if query alteration have been applied to the search operation.","type":"boolean"},"synonyms":{"description":"The synonyms used to apply the search query.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Synonym"}},"rules":{"description":"","uniqueItems":false,"type":"array","items":{"type":"string"}},"filter":{"$ref":"#/definitions/ConditionBase","description":"The filters applied to the search result."},"boosts":{"description":"The boost expressions applied to the search result.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Response.BoostExpression"}}}}]},"Response.BoostExpression":{"description":"Defines an expression that modifies the ranking score of results based on a condition.","type":"object","properties":{"condition":{"$ref":"#/definitions/ConditionBase","description":"The condition that triggered a boost in ranking score."},"boost":{"format":"double","description":"The magnitude of a boost applied.","type":"number"}}},"Response.ItemsBase":{"description":"Defines the abstract base type for item results.","required":["_type"],"allOf":[{"$ref":"#/definitions/Response.Task"},{"type":"object","properties":{"totalEstimatedMatches":{"format":"int64","description":"An estimated count of the items in the full result set.","type":"integer"}}}],"properties":{"_type":{"type":"string"}},"discriminator":"_type"},"Response.Items":{"description":"Defines a list of items from the result set.","allOf":[{"$ref":"#/definitions/Response.ItemsBase"},{"type":"object","properties":{"value":{"description":"The item results. May be limited by pagination.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Response.Item"}}}}],"x-ms-discriminator-value":"Items"},"Response.Item":{"description":"Defines an item from your content catalog.","type":"object","properties":{"indexId":{"description":"The ID of the index the item belongs to.","type":"string"},"itemId":{"description":"An ID that uniquely identifies an item within the index.","type":"string"},"score":{"format":"double","description":"A value that indicates how well the item matches the query. Higher values indicate a closer match.","type":"number"},"fields":{"type":"object","description":"An object with the selected fields as properties."},"debug":{"description":"","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Response.DebugInfo"}}}},"ComparisonOperator":{"enum":["Eq","Ne","Gt","Lt","Ge","Le"],"type":"string","x-ms-enum":{"name":"ComparisonOperator","values":[{"value":"Eq"},{"value":"Ne"},{"value":"Gt"},{"value":"Lt"},{"value":"Ge"},{"value":"Le"}]}},"CategoryOperator":{"enum":["In","NotIn"],"type":"string","x-ms-enum":{"name":"CategoryOperator","values":[{"value":"In"},{"value":"NotIn"}]}},"EquivalenceOperator":{"enum":["Eq","Ne"],"type":"string","x-ms-enum":{"name":"EquivalenceOperator","values":[{"value":"Eq"},{"value":"Ne"}]}},"LogicalOperator":{"enum":["And","Or"],"type":"string","x-ms-enum":{"name":"LogicalOperator","values":[{"value":"And"},{"value":"Or"}]}},"Response.Aggregation":{"description":"Defines an aggregation result.","required":["_type"],"allOf":[{"$ref":"#/definitions/Response.Task"},{"type":"object","properties":{"name":{"description":"The aggregation name as defined in the requset.","type":"string"},"estimatedCount":{"format":"int64","description":"An estimated count of items in this aggregation.","type":"integer"},"aggregations":{"description":"The list of child aggregations, if any.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Response.Aggregation"}}}}],"properties":{"_type":{"type":"string"}},"discriminator":"_type","x-ms-discriminator-value":"Aggregation"},"Response.Filter":{"description":"Defines the number of results that match filter aggregation.","allOf":[{"$ref":"#/definitions/Response.Aggregation"},{"type":"object"}],"properties":{"_type":{"type":"string"}},"x-ms-discriminator-value":"Filter"},"Response.DiscoveredFacets":{"description":"Defines the facets the API determines for you.","allOf":[{"$ref":"#/definitions/Response.Aggregation"},{"type":"object","properties":{"filter":{"$ref":"#/definitions/ConditionBase","description":"The filter condition that facet discovery was limited to, satisfied by the top results."}}}],"x-ms-discriminator-value":"DiscoveredFacets"},"Response.RefinementBase":{"description":"Defines the abstract base type for refinement based aggregation.","required":["_type"],"allOf":[{"$ref":"#/definitions/Response.Aggregation"},{"type":"object","properties":{"label":{"description":"The label to use for the aggregation, that you can use to render your UI.","type":"string"}}}],"properties":{"_type":{"type":"string"}},"discriminator":"_type"},"Response.RangeRefinement":{"description":"Defines a range facet refinement on a numeric field.","allOf":[{"$ref":"#/definitions/Response.RefinementBase"},{"type":"object","properties":{"ge":{"format":"double","description":"The inclusive lower bound of the range. Values in the refinement are greater than or equal to this lower bound.","type":"number"},"lt":{"format":"double","description":"The exclusive upper bound of the range. Values in the refinement are strictly less than this upper bound","type":"number"}}}],"x-ms-discriminator-value":"RangeRefinement"},"Response.NumberRefinement":{"description":"Defines a discrete number refinement on a numeric field.","allOf":[{"$ref":"#/definitions/Response.RefinementBase"},{"type":"object","properties":{"value":{"format":"double","description":"The actual filter value used to filter the list of items.","type":"number"}}}],"x-ms-discriminator-value":"NumberRefinement"},"Response.StringRefinement":{"description":"Defines a facet refinement on a string field.","required":["_type"],"allOf":[{"$ref":"#/definitions/Response.RefinementBase"},{"type":"object","properties":{"value":{"description":"The actual filter value used to filter the list of items.","type":"string"}}}],"properties":{"_type":{"type":"string"}},"discriminator":"_type","x-ms-discriminator-value":"StringRefinement"},"Response.CategoryRefinement":{"description":"Defines a facet refinement on a category field.","allOf":[{"$ref":"#/definitions/Response.StringRefinement"},{"type":"object","properties":{"refinements":{"description":"A list of child category refinements.","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Response.CategoryRefinement"}}}}],"x-ms-discriminator-value":"CategoryRefinement"},"Response.BoolRefinement":{"description":"Defines a facet refinement on a boolean field.","allOf":[{"$ref":"#/definitions/Response.RefinementBase"},{"type":"object","properties":{"value":{"description":"The actual filter value used to filter the list of items. The object includes this field only for filters with discrete values.","type":"boolean"}}}],"x-ms-discriminator-value":"BoolRefinement"},"Response.FieldAggregationBase":{"description":"Defines the abstract base type for aggregations based on fields.","required":["_type"],"allOf":[{"$ref":"#/definitions/Response.Aggregation"},{"type":"object","properties":{"field":{"description":"The name of the field.","type":"string"}}}],"properties":{"_type":{"type":"string"}},"discriminator":"_type"},"Response.FacetBase":{"required":["_type"],"allOf":[{"$ref":"#/definitions/Response.FieldAggregationBase"},{"type":"object","properties":{"label":{"description":"The facet label, that you can use to render your UI.","type":"string"}}}],"properties":{"_type":{"type":"string"}},"discriminator":"_type"},"Response.NumberFacet":{"description":"Defines a facet on a numeric field.","allOf":[{"$ref":"#/definitions/Response.FacetBase"},{"type":"object"}],"properties":{"refinements":{"type":"array","items":{"$ref":"#/definitions/Response.NumberRefinement"}}},"x-ms-discriminator-value":"NumberFacet"},"Response.StringFacet":{"description":"Defines a facet with a string refinement.","allOf":[{"$ref":"#/definitions/Response.FacetBase"},{"type":"object"}],"properties":{"refinements":{"type":"array","items":{"$ref":"#/definitions/Response.StringRefinement"}}},"x-ms-discriminator-value":"StringFacet"},"Response.CategoryFacet":{"description":"Defines a facet with a category refinement.","allOf":[{"$ref":"#/definitions/Response.FacetBase"},{"type":"object"}],"properties":{"refinements":{"type":"array","items":{"$ref":"#/definitions/Response.CategoryRefinement"}}},"x-ms-discriminator-value":"CategoryFacet"},"Response.BoolFacet":{"description":"Defines a facet on a Boolean field.","allOf":[{"$ref":"#/definitions/Response.FacetBase"},{"type":"object"}],"properties":{"refinements":{"type":"array","items":{"$ref":"#/definitions/Response.BoolRefinement"}}},"x-ms-discriminator-value":"BoolFacet"},"Response.RangeFacet":{"description":"Defines a facet with a range refinement.","allOf":[{"$ref":"#/definitions/Response.FacetBase"},{"type":"object"}],"properties":{"refinements":{"type":"array","items":{"$ref":"#/definitions/Response.RangeRefinement"}}},"x-ms-discriminator-value":"RangeFacet"},"Response.Min":{"description":"Returns the minimum value of the field encountered within the match set.","allOf":[{"$ref":"#/definitions/Response.FieldAggregationBase"},{"type":"object","properties":{"value":{"format":"double","description":"The minimum value of the field for the match set.","type":"number"}}}],"x-ms-discriminator-value":"Min"},"Response.Max":{"description":"Returns the maximum value of the field encountered within the match set.","allOf":[{"$ref":"#/definitions/Response.FieldAggregationBase"},{"type":"object","properties":{"value":{"format":"double","description":"The maximum value of the field for the match set.","type":"number"}}}],"x-ms-discriminator-value":"Max"}},"securityDefinitions":{"AppId":{"type":"apiKey","name":"appid","in":"query"},"PortalBearerToken":{"type":"apiKey","name":"Authorization","in":"header"}},"security":[{"AppId":[]},{"PortalBearerToken":[]}],"tags":[{"name":"RetailSearchService","description":"Bing Commerce Platform Search Service."}]} \ No newline at end of file +{ + "swagger": "2.0", + "info": { + "title": "Bing Commerce Search", + "version": "1" + }, + "host": "commerce.bing.com", + "basePath": "/api/search/v1/", + "schemes": [ + "https" + ], + "paths": { + "/{tenant}/indexes/{index}": { + "post": { + "tags": [ + "RetailSearchService" + ], + "summary": "Bing Commerce Custom Search Query.", + "description": "POST requests accept complex search request options.", + "operationId": "Search_Post", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CommerceSearchPostRequest" + } + } + ], + "responses": { + "200": { + "description": "Ok", + "schema": { + "$ref": "#/definitions/CommerceSearchResponse" + } + } + } + }, + "get": { + "tags": [ + "RetailSearchService" + ], + "summary": "Bing Commerce Basic Search Query.", + "description": "GET requests can search an index using only URL parameters. Only limited request options are available. GET requests will always do simple item search and support only a default facet discovery aggregation.", + "operationId": "Search_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "query", + "name": "mkt", + "description": "The market where the results come from. Typically, `mkt` is the country where the user is making the request from.", + "type": "string" + }, + { + "in": "query", + "name": "setlang", + "description": "The language to use for user interface strings. You may specify the language using either a 2-letter or 4-letter code. Using 4-letter codes is preferred.", + "type": "string" + }, + { + "in": "query", + "name": "q", + "description": "The query to match against all eligible fields.", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "select", + "description": "A comma-separated list of fields to return. unspecified or empty to select only _itemId, or `*` to select all fields.", + "type": "string" + }, + { + "in": "query", + "name": "orderby", + "description": "A comma-separated list of OData order syntax expressions.", + "type": "string" + }, + { + "in": "query", + "name": "top", + "description": "The maximum count of items to return for pagination. Default is 24.", + "type": "integer", + "format": "int32" + }, + { + "in": "query", + "name": "skip", + "description": "The offset to the first item to return for pagination. Default is 0.", + "type": "integer", + "format": "int32" + }, + { + "in": "query", + "name": "discoverfacets", + "description": "Default value is false. When true, requests a facet discovery aggregation.", + "type": "boolean", + "default": false + }, + { + "in": "query", + "name": "alteration", + "description": "A boolean flag to enable or disable query alteration. Default is true.", + "type": "boolean", + "default": true + }, + { + "in": "query", + "name": "debug", + "type": "boolean", + "default": false + }, + { + "in": "query", + "name": "searchinstanceid", + "description": "A saved search instance configuration to apply to current request.", + "type": "string", + "default": "Default" + } + ], + "responses": { + "200": { + "description": "Ok", + "schema": { + "$ref": "#/definitions/CommerceSearchResponse" + } + } + } + }, + "parameters": [ + { + "in": "path", + "name": "tenant", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "index", + "required": true, + "type": "string" + } + ] + } + }, + "definitions": { + "CommerceSearchPostRequest": { + "type": "object", + "properties": { + "market": { + "description": "The market where the results come from. Typically, `mkt` is the country where the user is making the request from.", + "type": "string" + }, + "client": { + "$ref": "#/definitions/Request.Client" + }, + "language": { + "description": "The language to use for user interface strings. You may specify the language using either a 2-letter or 4-letter code. Using 4-letter codes is preferred.", + "type": "string" + }, + "query": { + "$ref": "#/definitions/Request.Query", + "description": "The query that determines the result set match criteria." + }, + "items": { + "$ref": "#/definitions/Request.Items", + "description": "A description for how the items in the result set would look like." + }, + "aggregations": { + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Request.AggregationBase" + } + }, + "debug": { + "default": false, + "type": "boolean" + }, + "searchInstanceId": { + "description": "A saved search instance configuration to apply to current request.", + "default": "Default", + "type": "string" + } + } + }, + "Request.Client": { + "type": "object", + "properties": { + "ids": { + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Request.ClientId" + } + } + } + }, + "Request.ClientId": { + "type": "object", + "properties": { + "kind": { + "default": "MUID", + "enum": [ + "MUID", + "UID" + ], + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "Request.Query": { + "description": "Represents the query that determines the result set. Note that query must have a matchAll, value, or filter field. The matchAll and value fields cannot both be present. You may create a query with only a filter to **browse** (for example: a category).", + "type": "object", + "properties": { + "matchAll": { + "description": "A query that matches against all searchable fields.", + "type": "string" + }, + "value": { + "$ref": "#/definitions/Request.QueryClauseBase", + "description": "An instance of queryclausebase specifying search conditions. Its mutually exclusive with matchall." + }, + "filter": { + "$ref": "#/definitions/ConditionBase", + "description": "A filter to apply on the matching result set, or on all items if no match is specified." + }, + "boosts": { + "description": "The set of boosts to apply to the result set.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Request.BoostExpression" + } + }, + "alteration": { + "description": "A boolean flag to enable or disable query alteration.", + "default": true, + "type": "boolean" + }, + "synonyms": { + "description": "A set of alternate terms (or phrases) that can be applied to request query. The applied synonyms are used for both text-matching and result-ranking stages of search.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Synonym" + } + }, + "excludeBusinessRules": { + "description": "Business rule ids to skip applying from request search instance.", + "uniqueItems": false, + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "Request.QueryClauseBase": { + "description": "Defines the abstract base type for a query clause.", + "required": [ + "_type" + ], + "type": "object", + "properties": { + "_type": { + "type": "string" + } + }, + "discriminator": "_type" + }, + "Request.Match": { + "description": "Defines a type of query to search specific fields.", + "required": [ + "_type" + ], + "allOf": [ + { + "$ref": "#/definitions/Request.QueryClauseBase" + }, + { + "type": "object", + "properties": { + "value": { + "description": "The search terms to match on the specified fields.", + "type": "string" + } + } + } + ], + "properties": { + "_type": { + "type": "string" + } + }, + "discriminator": "_type", + "x-ms-discriminator-value": "Match" + }, + "Request.Bing.MatchStreams": { + "allOf": [ + { + "$ref": "#/definitions/Request.Match" + }, + { + "type": "object", + "properties": { + "include": { + "uniqueItems": false, + "type": "array", + "items": { + "type": "string" + } + }, + "exclude": { + "uniqueItems": false, + "type": "array", + "items": { + "type": "string" + } + } + } + } + ], + "x-ms-discriminator-value": "MatchStreams" + }, + "Request.QueryClauseBlock": { + "description": "Defines a list of QueryClauseBase objects that should all match. Nested QueryClauseBlock within QueryClauseBlock is not allowed.", + "allOf": [ + { + "$ref": "#/definitions/Request.QueryClauseBase" + }, + { + "type": "object", + "properties": { + "values": { + "description": "A list of queryclausebase conditions to be applied.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Request.QueryClauseBase" + } + } + } + } + ], + "x-ms-discriminator-value": "QueryClauseBlock" + }, + "Request.LocationMatch": { + "description": "Defines user location to match. If an explicit location is specified in a match query, this is ignored.", + "allOf": [ + { + "$ref": "#/definitions/Request.QueryClauseBase" + }, + { + "type": "object", + "properties": { + "center": { + "$ref": "#/definitions/GeoPoint", + "description": "The geo-location that you wish for the search to be applied around." + }, + "radius": { + "format": "float", + "description": "The accuracy of the search on that location in meters.", + "type": "number" + } + } + } + ], + "x-ms-discriminator-value": "LocationMatch" + }, + "GeoPoint": { + "description": "Defines a geo-location based on lattitude and longitude.", + "type": "object", + "properties": { + "lat": { + "format": "float", + "description": "The lattitude of the location.", + "type": "number" + }, + "lon": { + "format": "float", + "description": "The longitude of the location.", + "type": "number" + } + } + }, + "ConditionBase": { + "description": "The condition that triggered a boost in ranking score.", + "required": [ + "_type" + ], + "type": "object", + "properties": { + "_type": { + "type": "string" + } + }, + "discriminator": "_type" + }, + "ConditionBlock": { + "description": "Defines a list of composite conditions for filtering and boosting.", + "allOf": [ + { + "$ref": "#/definitions/ConditionBase" + }, + { + "type": "object", + "properties": { + "conditions": { + "description": "The set of operands.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/ConditionBase" + } + }, + "operator": { + "$ref": "#/definitions/LogicalOperator", + "description": "and, or. Default is `And`." + } + } + } + ], + "x-ms-discriminator-value": "ConditionBlock" + }, + "FieldConditionBase": { + "description": "Defines the abstract base type for conditions with a field name.", + "required": [ + "_type" + ], + "allOf": [ + { + "$ref": "#/definitions/ConditionBase" + }, + { + "type": "object", + "properties": { + "field": { + "description": "The name of the field.", + "type": "string" + } + } + } + ], + "properties": { + "_type": { + "type": "string" + } + }, + "discriminator": "_type" + }, + "EquivalenceConditionBase": { + "description": "Defines the abstract base type for conditions that does an exact match for a field.", + "required": [ + "_type" + ], + "allOf": [ + { + "$ref": "#/definitions/FieldConditionBase" + }, + { + "type": "object", + "properties": { + "operator": { + "$ref": "#/definitions/EquivalenceOperator" + } + } + } + ], + "properties": { + "_type": { + "type": "string" + } + }, + "discriminator": "_type" + }, + "StringCondition": { + "description": "Defines an equivalence condition for a string field. It can appear in a filter, a boost, or a filter aggregation.", + "allOf": [ + { + "$ref": "#/definitions/EquivalenceConditionBase" + }, + { + "type": "object", + "properties": { + "value": { + "description": "The value to compare the field against.", + "type": "string" + } + } + } + ], + "x-ms-discriminator-value": "StringCondition" + }, + "BoolCondition": { + "description": "Defines an equivalence condition for a Boolean field. It can appear in a filter, a boost, or a filter aggregation.", + "allOf": [ + { + "$ref": "#/definitions/EquivalenceConditionBase" + }, + { + "type": "object", + "properties": { + "value": { + "description": "The value (true or false) to compare the field against.", + "type": "boolean" + } + } + } + ], + "x-ms-discriminator-value": "BoolCondition" + }, + "NumericCondition": { + "description": "Defines an equivalence condition for a numeric field. It can appear in a filter, a boost, or a filter aggregation.", + "allOf": [ + { + "$ref": "#/definitions/FieldConditionBase" + }, + { + "type": "object", + "properties": { + "value": { + "format": "double", + "description": "The value to compare the field against.", + "type": "number" + }, + "operator": { + "$ref": "#/definitions/ComparisonOperator", + "description": "The comparison operator. Default is `gt`" + } + } + } + ], + "x-ms-discriminator-value": "NumericCondition" + }, + "CategoryCondition": { + "description": "Defines an inclusion condition for a category field. It can appear in a filter, a boost, or a filter aggregation.", + "allOf": [ + { + "$ref": "#/definitions/FieldConditionBase" + }, + { + "type": "object", + "properties": { + "value": { + "description": "The category to match items against. The format for specifying hierarchical categories is a pipe-delimited string, such as `Meanswear|shirts|Dress Shirts`.", + "type": "string" + }, + "operator": { + "$ref": "#/definitions/CategoryOperator", + "description": "The category operator to apply. Default is `In`." + } + } + } + ], + "x-ms-discriminator-value": "CategoryCondition" + }, + "SetConditionBase": { + "description": "Defines the abstract base type for conditions that matches with a set of values.", + "required": [ + "_type" + ], + "allOf": [ + { + "$ref": "#/definitions/FieldConditionBase" + }, + { + "type": "object", + "properties": { + "operator": { + "$ref": "#/definitions/SetOperator" + } + } + } + ], + "properties": { + "_type": { + "type": "string" + } + }, + "discriminator": "_type" + }, + "StringSetCondition": { + "description": "Defines a condition where the field must exactly match one of the values within the set to be included / excluded. It can appear in a filter, a boost, or a filter aggregation.", + "allOf": [ + { + "$ref": "#/definitions/SetConditionBase" + }, + { + "type": "object", + "properties": { + "values": { + "description": "The set of values for the field to match against.", + "uniqueItems": false, + "type": "array", + "items": { + "type": "string" + } + } + } + } + ], + "x-ms-discriminator-value": "StringSetCondition" + }, + "GeoCondition": { + "description": "Defines a condition that applies on a geo-location field. It can appear in a filter, a boost, or a filter aggregation.", + "allOf": [ + { + "$ref": "#/definitions/ConditionBase" + }, + { + "type": "object", + "properties": { + "boundary": { + "$ref": "#/definitions/GeoBoundaryBase", + "description": "The geo-bondary to match the results against." + } + } + } + ], + "x-ms-discriminator-value": "GeoCondition" + }, + "GeoBoundaryBase": { + "description": "Defines the abstract base type for geo-location boundary.", + "required": [ + "_type" + ], + "type": "object", + "properties": { + "_type": { + "type": "string" + } + }, + "discriminator": "_type" + }, + "GeoBoundingBox": { + "description": "Defines a geographical box to match the results that lie within it.", + "allOf": [ + { + "$ref": "#/definitions/GeoBoundaryBase" + }, + { + "type": "object", + "properties": { + "topLeft": { + "$ref": "#/definitions/GeoPoint", + "description": "The top-left corner geo-location of the box." + }, + "bottomRight": { + "$ref": "#/definitions/GeoPoint", + "description": "The bottom-right corner geo-location of the box." + } + } + } + ], + "x-ms-discriminator-value": "GeoBoundingBox" + }, + "GeoDistance": { + "description": "Defines a geographical boundary that matches location within a certain euclidean distance from a point.", + "allOf": [ + { + "$ref": "#/definitions/GeoBoundaryBase" + }, + { + "type": "object", + "properties": { + "center": { + "$ref": "#/definitions/GeoPoint", + "description": "The geo-location for the center point to match around." + }, + "radius": { + "format": "float", + "description": "The accpeptable euclidean distance to the center.", + "type": "number" + } + } + } + ], + "x-ms-discriminator-value": "GeoDistance" + }, + "Request.BoostExpression": { + "description": "Defines an expression that modifies the ranking score of results based on a condition.", + "type": "object", + "properties": { + "condition": { + "$ref": "#/definitions/ConditionBase", + "description": "The condition that triggers a boost in ranking score." + }, + "boost": { + "format": "double", + "description": "The magnitude of a boost. The range is -10 million to 10 million.", + "type": "number" + } + } + }, + "Synonym": { + "description": "Defines a set of alternate terms (or phrases) that can be applied to request query.", + "type": "object", + "properties": { + "synonymId": { + "description": "The id for the saved synonym.", + "type": "string" + }, + "synonyms": { + "description": "The alternate terms to apply", + "uniqueItems": false, + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "Request.Items": { + "description": "Defines how to return items from the result set.", + "type": "object", + "properties": { + "select": { + "description": "A list of fields that should appear for each item of the response.", + "uniqueItems": false, + "type": "array", + "items": { + "type": "string" + } + }, + "orderBy": { + "description": "A comma-separated list of OData order syntax expressions.", + "type": "string" + }, + "top": { + "format": "int32", + "description": "The number of results to return. It can be used for pagination.", + "type": "integer" + }, + "skip": { + "format": "int32", + "description": "The number of results to skip in the result set. Supports pagination.", + "type": "integer" + }, + "dedupe": { + "description": "A boolean to specify whether you want the result set to exclude duplicates. Default is `false`.", + "default": false, + "type": "boolean" + } + } + }, + "Request.AggregationBase": { + "description": "Defines the abstract base type for an aggregation request.", + "required": [ + "_type" + ], + "type": "object", + "properties": { + "name": { + "description": "A label that you specify for your aggregations, which the API passes through and returns with the response.", + "type": "string" + }, + "aggregations": { + "description": "A list of child aggregations.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Request.AggregationBase" + } + }, + "_type": { + "type": "string" + } + }, + "discriminator": "_type" + }, + "Request.Filter": { + "description": "Defines a filter aggregation.", + "allOf": [ + { + "$ref": "#/definitions/Request.AggregationBase" + }, + { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/ConditionBase", + "description": "The condition to match for the aggregation." + }, + "includeCustomizations": { + "default": true, + "type": "boolean" + } + } + } + ], + "x-ms-discriminator-value": "Filter" + }, + "Request.FieldAggregationBase": { + "description": "Defines the abstract base type for an aggregation request that have a field.", + "required": [ + "_type" + ], + "allOf": [ + { + "$ref": "#/definitions/Request.AggregationBase" + }, + { + "type": "object", + "properties": { + "field": { + "description": "The field name.", + "type": "string" + } + } + } + ], + "properties": { + "_type": { + "type": "string" + } + }, + "discriminator": "_type" + }, + "Request.FacetBase": { + "description": "Defines the abstract base type for a facet request.", + "required": [ + "_type" + ], + "allOf": [ + { + "$ref": "#/definitions/Request.FieldAggregationBase" + }, + { + "type": "object", + "properties": { + "orderBy": { + "description": "A comma-separated list of OData order syntax expressions. Default is `_count desc`", + "type": "string" + } + } + } + ], + "properties": { + "_type": { + "type": "string" + } + }, + "discriminator": "_type" + }, + "Request.Facet": { + "description": "Defines a facet where each refinement is for a single value.", + "allOf": [ + { + "$ref": "#/definitions/Request.FacetBase" + }, + { + "type": "object" + } + ], + "x-ms-discriminator-value": "Facet" + }, + "Request.RangeFacet": { + "description": "Defines a facet with refinements that have numerical ranges.", + "allOf": [ + { + "$ref": "#/definitions/Request.FacetBase" + }, + { + "type": "object", + "properties": { + "interval": { + "format": "int32", + "description": "Defines the size of the interval that can be used to refine a search which utilizes numerical range faceting.", + "type": "integer" + } + } + } + ], + "x-ms-discriminator-value": "RangeFacet" + }, + "Request.Min": { + "description": "Aggregation type for getting the min value of a field. Only applicable to numeric data.", + "allOf": [ + { + "$ref": "#/definitions/Request.FieldAggregationBase" + }, + { + "type": "object" + } + ], + "x-ms-discriminator-value": "Min" + }, + "Request.Max": { + "description": "Aggregation type for getting the max value of a field. Only applicable to numeric data.", + "allOf": [ + { + "$ref": "#/definitions/Request.FieldAggregationBase" + }, + { + "type": "object" + } + ], + "x-ms-discriminator-value": "Max" + }, + "Request.DiscoverFacets": { + "description": "Defines an aggregation type that triggers facet discovery of significant facets.", + "allOf": [ + { + "$ref": "#/definitions/Request.AggregationBase" + }, + { + "type": "object", + "properties": { + "discoverFilter": { + "description": "When true, if the top results share a filter then restrict facet discovery to that filter. Note that it attempts to discover category based filters.", + "default": false, + "type": "boolean" + }, + "refinements": { + "description": "When true, returns refinement values in the response.", + "default": true, + "type": "boolean" + }, + "pin": { + "description": "A list of facets to pin at the top positions of the DiscoveredFacets aggregations list.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Request.FacetBase" + } + }, + "include": { + "description": "A list of facets to be included, but not necessarily at the top positions.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Request.FacetBase" + } + }, + "exclude": { + "description": "A list of field names to exclude from consideration.", + "uniqueItems": false, + "type": "array", + "items": { + "type": "string" + } + }, + "facetDefaults": { + "$ref": "#/definitions/Request.Facet", + "description": "default facets to apply." + }, + "rangeFacetDefaults": { + "$ref": "#/definitions/Request.RangeFacet", + "description": "default range facets to apply." + } + } + } + ], + "x-ms-discriminator-value": "DiscoverFacets" + }, + "CommerceSearchResponse": { + "description": "The response to a Bing Commerce Search Query.", + "allOf": [ + { + "$ref": "#/definitions/Response.Task" + }, + { + "type": "object", + "properties": { + "impressionId": { + "description": "A random GUID to uniquely track the search response.", + "type": "string" + }, + "queryContext": { + "$ref": "#/definitions/Response.QueryContext", + "description": "The query alteration result." + }, + "items": { + "$ref": "#/definitions/Response.ItemsBase", + "description": "The item results" + }, + "aggregations": { + "description": "The aggregations result.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Response.Aggregation" + } + }, + "redirectUrl": { + "description": "The redirect url for this the current query from the request search instance.", + "type": "string" + }, + "customization": { + "$ref": "#/definitions/Response.Customization", + "description": "The user defined customizations applied the search query." + } + } + } + ], + "x-ms-discriminator-value": "SearchResponse" + }, + "Response.QueryContext": { + "description": "Defines an object that contains the result of query alteration.", + "allOf": [ + { + "$ref": "#/definitions/Response.Task" + }, + { + "type": "object", + "properties": { + "originalQuery": { + "description": "The user's query string as entered.", + "type": "string" + }, + "alteredQuery": { + "description": "The altered query string that the API actually uses for the query (for example, corrected spelling).", + "type": "string" + } + } + } + ] + }, + "Response.Task": { + "required": [ + "_type" + ], + "type": "object", + "properties": { + "errors": { + "description": "A list of errors that happened to the task, if any.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Response.Error" + } + }, + "debug": { + "description": "", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Response.DebugInfo" + } + }, + "_type": { + "type": "string" + } + }, + "discriminator": "_type" + }, + "Response.Error": { + "description": "Defines The error details that happened to a task.", + "type": "object", + "properties": { + "code": { + "default": "None", + "enum": [ + "None", + "ServerError", + "InvalidRequest", + "InsufficientAuthorization" + ], + "type": "string" + }, + "subCode": { + "enum": [ + "UnexpectedError", + "ResourceError", + "DeadlineExceeded", + "ParameterMissing", + "ParameterInvalidValue" + ], + "type": "string" + }, + "message": { + "type": "string" + }, + "moreDetails": { + "type": "string" + } + } + }, + "Response.DebugInfo": { + "required": [ + "_type" + ], + "type": "object", + "properties": { + "_type": { + "type": "string" + } + }, + "discriminator": "_type" + }, + "Response.Bing.BingItemDebugInfo": { + "allOf": [ + { + "$ref": "#/definitions/Response.DebugInfo" + }, + { + "type": "object", + "properties": { + "perfectMatchingStreams": { + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Response.Bing.MatchingStream" + } + }, + "completeMatchingStreams": { + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Response.Bing.MatchingStream" + } + } + } + } + ], + "x-ms-discriminator-value": "BingItemDebugInfo" + }, + "Response.Bing.MatchingStream": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "score": { + "format": "int32", + "type": "integer" + } + } + }, + "SetOperator": { + "enum": [ + "In", + "NotIn" + ], + "type": "string", + "x-ms-enum": { + "name": "SetOperator", + "values": [ + { + "value": "In" + }, + { + "value": "NotIn" + } + ] + } + }, + "Response.Customization": { + "description": "Defines the customizations applied to the search operation.", + "allOf": [ + { + "$ref": "#/definitions/Response.Task" + }, + { + "type": "object", + "properties": { + "queryAlteration": { + "description": "A boolean to determine if query alteration have been applied to the search operation.", + "type": "boolean" + }, + "synonyms": { + "description": "The synonyms used to apply the search query.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Synonym" + } + }, + "rules": { + "description": "", + "uniqueItems": false, + "type": "array", + "items": { + "type": "string" + } + }, + "filter": { + "$ref": "#/definitions/ConditionBase", + "description": "The filters applied to the search result." + }, + "boosts": { + "description": "The boost expressions applied to the search result.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Response.BoostExpression" + } + } + } + } + ] + }, + "Response.BoostExpression": { + "description": "Defines an expression that modifies the ranking score of results based on a condition.", + "type": "object", + "properties": { + "condition": { + "$ref": "#/definitions/ConditionBase", + "description": "The condition that triggered a boost in ranking score." + }, + "boost": { + "format": "double", + "description": "The magnitude of a boost applied.", + "type": "number" + } + } + }, + "Response.ItemsBase": { + "description": "Defines the abstract base type for item results.", + "required": [ + "_type" + ], + "allOf": [ + { + "$ref": "#/definitions/Response.Task" + }, + { + "type": "object", + "properties": { + "totalEstimatedMatches": { + "format": "int64", + "description": "An estimated count of the items in the full result set.", + "type": "integer" + } + } + } + ], + "properties": { + "_type": { + "type": "string" + } + }, + "discriminator": "_type" + }, + "Response.Items": { + "description": "Defines a list of items from the result set.", + "allOf": [ + { + "$ref": "#/definitions/Response.ItemsBase" + }, + { + "type": "object", + "properties": { + "value": { + "description": "The item results. May be limited by pagination.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Response.Item" + } + } + } + } + ], + "x-ms-discriminator-value": "Items" + }, + "Response.Item": { + "description": "Defines an item from your content catalog.", + "type": "object", + "properties": { + "indexId": { + "description": "The ID of the index the item belongs to.", + "type": "string" + }, + "itemId": { + "description": "An ID that uniquely identifies an item within the index.", + "type": "string" + }, + "score": { + "format": "double", + "description": "A value that indicates how well the item matches the query. Higher values indicate a closer match.", + "type": "number" + }, + "fields": { + "type": "object", + "description": "An object with the selected fields as properties." + }, + "debug": { + "description": "", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Response.DebugInfo" + } + } + } + }, + "ComparisonOperator": { + "enum": [ + "Eq", + "Ne", + "Gt", + "Lt", + "Ge", + "Le" + ], + "type": "string", + "x-ms-enum": { + "name": "ComparisonOperator", + "values": [ + { + "value": "Eq" + }, + { + "value": "Ne" + }, + { + "value": "Gt" + }, + { + "value": "Lt" + }, + { + "value": "Ge" + }, + { + "value": "Le" + } + ] + } + }, + "CategoryOperator": { + "enum": [ + "In", + "NotIn" + ], + "type": "string", + "x-ms-enum": { + "name": "CategoryOperator", + "values": [ + { + "value": "In" + }, + { + "value": "NotIn" + } + ] + } + }, + "EquivalenceOperator": { + "enum": [ + "Eq", + "Ne" + ], + "type": "string", + "x-ms-enum": { + "name": "EquivalenceOperator", + "values": [ + { + "value": "Eq" + }, + { + "value": "Ne" + } + ] + } + }, + "LogicalOperator": { + "enum": [ + "And", + "Or" + ], + "type": "string", + "x-ms-enum": { + "name": "LogicalOperator", + "values": [ + { + "value": "And" + }, + { + "value": "Or" + } + ] + } + }, + "Response.Aggregation": { + "description": "Defines an aggregation result.", + "required": [ + "_type" + ], + "allOf": [ + { + "$ref": "#/definitions/Response.Task" + }, + { + "type": "object", + "properties": { + "name": { + "description": "The aggregation name as defined in the requset.", + "type": "string" + }, + "estimatedCount": { + "format": "int64", + "description": "An estimated count of items in this aggregation.", + "type": "integer" + }, + "aggregations": { + "description": "The list of child aggregations, if any.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Response.Aggregation" + } + } + } + } + ], + "properties": { + "_type": { + "type": "string" + } + }, + "discriminator": "_type", + "x-ms-discriminator-value": "Aggregation" + }, + "Response.Filter": { + "description": "Defines the number of results that match filter aggregation.", + "allOf": [ + { + "$ref": "#/definitions/Response.Aggregation" + }, + { + "type": "object" + } + ], + "properties": { + "_type": { + "type": "string" + } + }, + "x-ms-discriminator-value": "Filter" + }, + "Response.DiscoveredFacets": { + "description": "Defines the facets the API determines for you.", + "allOf": [ + { + "$ref": "#/definitions/Response.Aggregation" + }, + { + "type": "object", + "properties": { + "filter": { + "$ref": "#/definitions/ConditionBase", + "description": "The filter condition that facet discovery was limited to, satisfied by the top results." + } + } + } + ], + "x-ms-discriminator-value": "DiscoveredFacets" + }, + "Response.RefinementBase": { + "description": "Defines the abstract base type for refinement based aggregation.", + "required": [ + "_type" + ], + "allOf": [ + { + "$ref": "#/definitions/Response.Aggregation" + }, + { + "type": "object", + "properties": { + "label": { + "description": "The label to use for the aggregation, that you can use to render your UI.", + "type": "string" + } + } + } + ], + "properties": { + "_type": { + "type": "string" + } + }, + "discriminator": "_type" + }, + "Response.RangeRefinement": { + "description": "Defines a range facet refinement on a numeric field.", + "allOf": [ + { + "$ref": "#/definitions/Response.RefinementBase" + }, + { + "type": "object", + "properties": { + "ge": { + "format": "double", + "description": "The inclusive lower bound of the range. Values in the refinement are greater than or equal to this lower bound.", + "type": "number" + }, + "lt": { + "format": "double", + "description": "The exclusive upper bound of the range. Values in the refinement are strictly less than this upper bound", + "type": "number" + } + } + } + ], + "x-ms-discriminator-value": "RangeRefinement" + }, + "Response.NumberRefinement": { + "description": "Defines a discrete number refinement on a numeric field.", + "allOf": [ + { + "$ref": "#/definitions/Response.RefinementBase" + }, + { + "type": "object", + "properties": { + "value": { + "format": "double", + "description": "The actual filter value used to filter the list of items.", + "type": "number" + } + } + } + ], + "x-ms-discriminator-value": "NumberRefinement" + }, + "Response.StringRefinement": { + "description": "Defines a facet refinement on a string field.", + "required": [ + "_type" + ], + "allOf": [ + { + "$ref": "#/definitions/Response.RefinementBase" + }, + { + "type": "object", + "properties": { + "value": { + "description": "The actual filter value used to filter the list of items.", + "type": "string" + } + } + } + ], + "properties": { + "_type": { + "type": "string" + } + }, + "discriminator": "_type", + "x-ms-discriminator-value": "StringRefinement" + }, + "Response.CategoryRefinement": { + "description": "Defines a facet refinement on a category field.", + "allOf": [ + { + "$ref": "#/definitions/Response.StringRefinement" + }, + { + "type": "object", + "properties": { + "refinements": { + "description": "A list of child category refinements.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Response.CategoryRefinement" + } + } + } + } + ], + "x-ms-discriminator-value": "CategoryRefinement" + }, + "Response.BoolRefinement": { + "description": "Defines a facet refinement on a boolean field.", + "allOf": [ + { + "$ref": "#/definitions/Response.RefinementBase" + }, + { + "type": "object", + "properties": { + "value": { + "description": "The actual filter value used to filter the list of items. The object includes this field only for filters with discrete values.", + "type": "boolean" + } + } + } + ], + "x-ms-discriminator-value": "BoolRefinement" + }, + "Response.FieldAggregationBase": { + "description": "Defines the abstract base type for aggregations based on fields.", + "required": [ + "_type" + ], + "allOf": [ + { + "$ref": "#/definitions/Response.Aggregation" + }, + { + "type": "object", + "properties": { + "field": { + "description": "The name of the field.", + "type": "string" + } + } + } + ], + "properties": { + "_type": { + "type": "string" + } + }, + "discriminator": "_type" + }, + "Response.FacetBase": { + "required": [ + "_type" + ], + "allOf": [ + { + "$ref": "#/definitions/Response.FieldAggregationBase" + }, + { + "type": "object", + "properties": { + "label": { + "description": "The facet label, that you can use to render your UI.", + "type": "string" + } + } + } + ], + "properties": { + "_type": { + "type": "string" + } + }, + "discriminator": "_type" + }, + "Response.NumberFacet": { + "description": "Defines a facet on a numeric field.", + "allOf": [ + { + "$ref": "#/definitions/Response.FacetBase" + }, + { + "type": "object" + } + ], + "properties": { + "refinements": { + "type": "array", + "items": { + "$ref": "#/definitions/Response.NumberRefinement" + } + } + }, + "x-ms-discriminator-value": "NumberFacet" + }, + "Response.StringFacet": { + "description": "Defines a facet with a string refinement.", + "allOf": [ + { + "$ref": "#/definitions/Response.FacetBase" + }, + { + "type": "object" + } + ], + "properties": { + "refinements": { + "type": "array", + "items": { + "$ref": "#/definitions/Response.StringRefinement" + } + } + }, + "x-ms-discriminator-value": "StringFacet" + }, + "Response.CategoryFacet": { + "description": "Defines a facet with a category refinement.", + "allOf": [ + { + "$ref": "#/definitions/Response.FacetBase" + }, + { + "type": "object" + } + ], + "properties": { + "refinements": { + "type": "array", + "items": { + "$ref": "#/definitions/Response.CategoryRefinement" + } + } + }, + "x-ms-discriminator-value": "CategoryFacet" + }, + "Response.BoolFacet": { + "description": "Defines a facet on a Boolean field.", + "allOf": [ + { + "$ref": "#/definitions/Response.FacetBase" + }, + { + "type": "object" + } + ], + "properties": { + "refinements": { + "type": "array", + "items": { + "$ref": "#/definitions/Response.BoolRefinement" + } + } + }, + "x-ms-discriminator-value": "BoolFacet" + }, + "Response.RangeFacet": { + "description": "Defines a facet with a range refinement.", + "allOf": [ + { + "$ref": "#/definitions/Response.FacetBase" + }, + { + "type": "object" + } + ], + "properties": { + "refinements": { + "type": "array", + "items": { + "$ref": "#/definitions/Response.RangeRefinement" + } + } + }, + "x-ms-discriminator-value": "RangeFacet" + }, + "Response.Min": { + "description": "Returns the minimum value of the field encountered within the match set.", + "allOf": [ + { + "$ref": "#/definitions/Response.FieldAggregationBase" + }, + { + "type": "object", + "properties": { + "value": { + "format": "double", + "description": "The minimum value of the field for the match set.", + "type": "number" + } + } + } + ], + "x-ms-discriminator-value": "Min" + }, + "Response.Max": { + "description": "Returns the maximum value of the field encountered within the match set.", + "allOf": [ + { + "$ref": "#/definitions/Response.FieldAggregationBase" + }, + { + "type": "object", + "properties": { + "value": { + "format": "double", + "description": "The maximum value of the field for the match set.", + "type": "number" + } + } + } + ], + "x-ms-discriminator-value": "Max" + } + }, + "securityDefinitions": { + "AppId": { + "type": "apiKey", + "name": "appid", + "in": "query" + }, + "PortalBearerToken": { + "type": "apiKey", + "name": "Authorization", + "in": "header" + } + }, + "security": [ + { + "AppId": [] + }, + { + "PortalBearerToken": [] + } + ], + "tags": [ + { + "name": "RetailSearchService", + "description": "Bing Commerce Platform Search Service." + } + ] +} \ No newline at end of file