Spree API V2-筛选选项

时间:2019-05-06 11:25:36

标签: ruby-on-rails fetch spree fetch-api

在docs API v2店面docs中指出,如果我想使用option_type

在特定的filter[options][myoption]=value上过滤我的API,

我目前在产品上附加了一个带有价值的选项tshirt-color  Red,但是当我运行https://mywebsite.io/api/v2/storefront/products?filter[options][tshirt-color]=Red

我的回答是空的,我在做什么错了?

data: [ ],
meta: {
count: { },
total_count: 0,
total_pages: 0
},
links: {
self: "https://stern-telecom-react-salman15.c9users.io/api/v2/storefront/products?filter[options][kleur]=Rood",
next: "https://stern-telecom-react-salman15.c9users.io/api/v2/storefront/products?filter%5Boptions%5D%5Bkleur%5D=Rood&page=0",
prev: "https://stern-telecom-react-salman15.c9users.io/api/v2/storefront/products?filter%5Boptions%5D%5Bkleur%5D=Rood&page=1",
last: "https://stern-telecom-react-salman15.c9users.io/api/v2/storefront/products?filter%5Boptions%5D%5Bkleur%5D=Rood&page=0",
first: "https://stern-telecom-react-salman15.c9users.io/api/v2/storefront/products?filter%5Boptions%5D%5Bkleur%5D=Rood&page=1"
}
}

0 个答案:

没有答案