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

Write access for customer downloads #41

Open
mikejolley opened this issue Sep 4, 2017 · 5 comments

Comments

@mikejolley
Copy link
Member

@mikejolley mikejolley commented Sep 4, 2017

/wp-json/wc/v2/customers/<id>/downloads

Requested here woocommerce/woocommerce#16691

@claudiosanches

This comment has been minimized.

Copy link
Member

@claudiosanches claudiosanches commented Sep 5, 2017

Not sure if we should, since all data from downloads are generated on orders.
This endpoint work with wc_get_customer_available_downloads(), so for me the correct endpoint to manipulate it is the /orders, like we do on the admin screen.

@mikejolley

This comment has been minimized.

Copy link
Member Author

@mikejolley mikejolley commented Sep 6, 2017

@claudiosanches I know they are edited on the order admin screen, but they are separate objects. Order notes are on the admin screen-they have own endpoints.

@databuzz

This comment has been minimized.

Copy link

@databuzz databuzz commented Sep 12, 2017

I was thinking about this today and agree that it should work with the /orders endpoint or separately like Order Notes, as not all orders will have an associated customer. I'm really only interested in viewing/editing downloads for an Order - the same details that appear at the bottom of the page in the admin when viewing an Order.

@claudiosanches

This comment has been minimized.

Copy link
Member

@claudiosanches claudiosanches commented Sep 25, 2017

@mikejolley so maybe we should not create /wp-json/wc/v2/customers/<id>/downloads, but create /wp-json/wc/v2/orders/<id>/downloads, as @databuzz said, downloads are based on orders and not on customers.

@claudiosanches claudiosanches transferred this issue from woocommerce/wc-api-dev Oct 4, 2019
@issue-label-bot

This comment has been minimized.

Copy link

@issue-label-bot issue-label-bot bot commented Oct 4, 2019

Issue-Label Bot is automatically applying the label type: feature request to this issue, with a confidence of 0.77. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.