Skip to content
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

JSAdm: Docs for adding products to categories #54

Open
nvdid opened this issue Feb 5, 2024 · 2 comments
Open

JSAdm: Docs for adding products to categories #54

nvdid opened this issue Feb 5, 2024 · 2 comments

Comments

@nvdid
Copy link
Contributor

nvdid commented Feb 5, 2024

First I want to thank you guys for the great project.

Couldn't find a documentation for the purpose and as a newbie here it took me quite some time to find the correct way of doing this:

curl -b cookies.txt -c cookies.txt \
-X PATCH 'http://localhost:8000/default/jsonadm/product/11?_token=...' \
-H 'Content-Type: application/json' \
-d '{"data": {
    "type": "product",
    "relationships": {
        "catalog": {
            "data": [{
                "id": "48",
                "type": "catalog"
            }]
        }
    }
}}'

It adds product 11 to category 48. Not sure but I think it can go under manage resources

@aimeos
Copy link
Owner

aimeos commented Feb 5, 2024

Thanks! It's already described in the "Create items" section but maybe it's good idea to add that to the "Update items" section too. Can you please create a pull request, please?

@nvdid
Copy link
Contributor Author

nvdid commented Feb 5, 2024

I did:)
#55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants