Sync Search Parameter
Next step you must decide which field will be use as search field. This endpoint will help you to do that. Example: you have data with 'title'='school bag', and 'brand'='try'. If the user search 'try' and you just have 'title' as search field, that item will not show as search results. But if you also have 'brand' as search field, that item will be show as search results. So, this step is also important. So to add or remove search field, you can use this endpoint. We have attribute 'weight' to identify the priority, the highest weight will become the top priority.
note
The rules are like sync mapping, the concept is sync.
POST#
#
HeaderField | Type | Description |
---|---|---|
x-token | String | token Users unique token |
#
Request Header Example#
Request BodyField | Type | Description |
---|---|---|
fields | Object[] | Search fields object |
name | String | Name of fields |
weight | Number | Weight of fields (Float/Integer) |
#
Request Body Example#
Success 200Field | Type | Description |
---|---|---|
success | Boolean | Request was successful |
updated | Object[] | Updated field |
name | String | Updated field name |
weight | Number | Updated field weight |
notUpdated | Object[] | Not updated field |
name | String | Not Updated field name |
weight | Number | Not Updated field weight |