Site icon Hip-Hop Website Design and Development

Question String Filtering API

At the moment, I am engaged on a search software that searches/filters shops(Customized Put up Kind) based mostly on the store-feature(Customized Taxamonies) IDs. After I use the WordPress Fetch API, I can get the complete set of Customized Put up Kind information with none issues. The difficulty is the question string I have been making an attempt to construct. I am primarily making an attempt to make the question string filter by an AND as a substitute of an OR.

Instance:

The question string must solely return Retailer One because it accommodates each IDs(AND). It can not return Retailer Two or Retailer Three simply because it accommodates both of these IDs(OR). Beneath are some examples that I’ve tried to date.

http://localhost/my-site-name/wp-json/wp/v2/places/?store-features=55&store-features=96

http://localhost/my-site-name/wp-json/wp/v2/places/?store-features=55+96

Word: The question string is constructed by the 50 checkboxes on the front-end that correspond to the store-features.

[{
    "id": 1,
    "name": store 1,
    "store-features": [
        55,
        53,
        61,
        64,
        66,
        68,
        73,
        74,
        79,
        80,
        81,
        85,
        87,
        88,
        89,
        90,
        91,
        92,
        93,
        96,
        98
    ]
}, {
    "id": 2,
    "name": retailer 2,
    "store-features": [
        54,
        55,
        53,
        63,
        64,
        66,
        68,
        73,
        74,
        76,
        79,
        81,
        84,
        85,
        87,
        88,
        89,
        90,
        91,
        92,
        93,
        98
    ],
}, {
    "id": 3,
    "name": retailer 3,
    "store-features": [
        53,
        61,
        64,
        66,
        68,
        73,
        74,
        79,
        80,
        81,
        85,
        87,
        88,
        89,
        90,
        91,
        92,
        93,
        96,
        98
    ]
}]

Thanks,
Sean