.. index:: SavedSearches SavedSearch .. _savedsearch: Saved Search ============ SavedSearch resource. Representation of a search which user wants to save and to be notified when there are new items which match this search. .. _Fields: Fields ------ .. apifields:: .. apifield:: :name: savedSearchId :type: string :constraints: -- :required: false :updateable: false :writable: false Uniquely identifies a saved search .. apifield:: :name: userId :type: int :constraints: -- :required: false :updateable: false :writable: false Uniquely identifies a user .. apifield:: :name: searchRequest :type: object :constraints: -- :required: true :writable: true The search request object .. apifield:: :name: searchRequest.query :type: string :constraints: must be a non empty value when neither categoryId or sellerId is defined :required: false :writable: true .. apifield:: :name: searchRequest.categoryId :type: int :constraints: positive :required: false :writable: true .. apifield:: :name: searchRequest.sellerId :type: int :constraints: positive :required: false :writable: true .. apifield:: :name: searchRequest.filters :type: object :constraints: -- :required: false :writable: true Search request filters object. Used to declare detailed filtering .. apifield:: :name: searchRequest.filters.price.from :type: int :constraints: positive :required: false :writable: true .. apifield:: :name: searchRequest.filters.price.to :type: int :constraints: positive :required: false :writable: true .. apifield:: :name: searchRequest.filters.postCode :type: String :constraints: postcode :required: false :writable: true Postcode center of area search .. apifield:: :name: searchRequest.filters.distance :type: int :constraints: positive :required: false :writable: true Radius distance area of search from postcode in meters .. apifield:: :name: searchRequest.filters.{customAttributeKey} :type: array of strings :constraints: -- :required: false :writable: true Any custom attribute can be used for filtering by setting an array of custom attribute values in case of simple or multiple attributes Ex: "customAttributeA" : ["customValue1", "customValue2"] Reference --------- .. endpoint:: GET /v1/savedsearches/{savedSearchId} Get a savedSearch. Errors ------ .. errors:: .. error:: :http: 404 :code: savedsearch-not-found :description: There is no savedsearch for given id .. error:: :http: 400 :code: validation-failure :description: Validation of the savedsearch failed. There should be more information in the field errors .. error:: :http: 403 :code: unauthorized :description: User is not authorized to modify saved search for given id Examples -------- .. include:: examples/get-savedsearch-example.rst .. include:: examples/delete-savedsearch-example.rst