-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to associate products with categories #10
Comments
Hi @roelvan, No need for a separate call to get categories for a product or services for specific stores. By default, any product or store call will return the associated categories or services. For example, if you make the following product call: You'll see as part of the JSON response a {
"total": 1,
"limit": 10,
"skip": 0,
"data": [
{
"id": 43900,
"name": "Duracell - AAA Batteries (4-Pack)",
"type": "HardGood",
"price": 5.49,
"upc": "041333424019",
"shipping": 0,
"description": "Compatible with select electronic devices; AAA size; DURALOCK Power Preserve technology; 4-pack",
"manufacturer": "Duracell",
"model": "MN2400B4Z",
"url": "http://www.bestbuy.com/site/duracell-aaa-batteries-4-pack/43900.p?id=1051384074145&skuId=43900&cmp=RMXCC",
"image": "http://img.bbystatic.com/BestBuy_US/images/products/4390/43900_sa.jpg",
"createdAt": "2016-11-17T17:58:03.298Z",
"updatedAt": "2016-11-17T17:58:03.298Z",
"categories": [
{
"id": "abcat0208002",
"name": "Alkaline Batteries",
"createdAt": "2016-11-17T17:57:04.285Z",
"updatedAt": "2016-11-17T17:57:04.285Z"
},
{
"id": "pcmcat248700050021",
"name": "Housewares",
"createdAt": "2016-11-17T17:57:05.399Z",
"updatedAt": "2016-11-17T17:57:05.399Z"
},
{
"id": "pcmcat303600050001",
"name": "Household Batteries",
"createdAt": "2016-11-17T17:57:04.285Z",
"updatedAt": "2016-11-17T17:57:04.285Z"
},
{
"id": "pcmcat312300050015",
"name": "Connected Home & Housewares",
"createdAt": "2016-11-17T17:57:04.285Z",
"updatedAt": "2016-11-17T17:57:04.285Z"
}
]
}
]
} The same applies for store queries. Any query will return the services associated with that store under the For example, if you go to http://localhost:3030/stores You'll get a response that contains a list of stores, and for each store the list of services at that store: "total": 1561,
"limit": 10,
"skip": 0,
"data": [
{
"id": 4,
"name": "Minnetonka",
"type": "BigBox",
"address": "13513 Ridgedale Dr",
"address2": "",
"city": "Hopkins",
"state": "MN",
"zip": "55305",
"lat": 44.969658,
"lng": -93.449539,
"hours": "Mon: 10-9; Tue: 10-9; Wed: 10-9; Thurs: 10-9; Fri: 10-9; Sat: 10-9; Sun: 10-8",
"createdAt": "2016-11-17T17:57:05.708Z",
"updatedAt": "2016-11-17T17:57:05.708Z",
"services": [
{
"id": 1,
"name": "Geek Squad Services",
"createdAt": "2016-11-17T17:56:35.881Z",
"updatedAt": "2016-11-17T17:56:35.881Z",
"storeservices": {
"createdAt": "2016-11-17T17:57:09.213Z",
"updatedAt": "2016-11-17T17:57:09.213Z",
"storeId": 4,
"serviceId": 1
}
},
{
"id": 2,
"name": "Best Buy Mobile",
"createdAt": "2016-11-17T17:56:35.881Z",
"updatedAt": "2016-11-17T17:56:35.881Z",
"storeservices": {
"createdAt": "2016-11-17T17:57:09.213Z",
"updatedAt": "2016-11-17T17:57:09.213Z",
"storeId": 4,
"serviceId": 2
}
},
// truncated Does that sort of answer what you were looking for? |
Hi @BrandesEric thanks for the quick reply. Sorry next time I should explain my question in detail, my mistake. |
Ah yes! I see what you mean :) Unfortunately there is nothing exposed today that will link them for you. While you can currently create categories and products, there aren't any calls that modify the |
Would love to see that :) Thanks for your time and effort! |
@roelvan - I think its a great idea to add this functionality; do you mind if we keep this issue open for tracking? |
👌
…On Mon, Dec 12, 2016, 23:43 Dan Flettre ***@***.***> wrote:
@roelvan <https://github.com/roelvan> - I think its a great idea to add
this functionality; do you mind if we keep this issue open for tracking?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACdtHV3bbn9gtgnix8z1Q-rAawOrMyClks5rHXnNgaJpZM4LKX-->
.
|
How would the api call look like?
The text was updated successfully, but these errors were encountered: