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

Rest API Milestone #1

Open
prionkor opened this issue Jan 9, 2021 · 2 comments
Open

Rest API Milestone #1

prionkor opened this issue Jan 9, 2021 · 2 comments

Comments

@prionkor
Copy link
Owner

prionkor commented Jan 9, 2021

See yithemes/yith-woocommerce-wishlist#9

Continue of the discussion from WP Support Forum

I am going to for this project and start the development. If you have any preferred guidelines on how you structure your code let me know. I am using a pattern like this.

Namespace

/yith/wishlist/v1

Proposed Endpoint for (CRUD)

GET {url}/wishlists
Users with credentials will be returned with an array of wishlists object.

POST {url}/wishlists

Add product/s to wishlist endpoint. Users with credentials will be returned with a wishlists object created from the POST data. if no wishlist id was provided a new wishlist is created otherwise the object with the given id returned.

Params:

wishlistId: id of the wishlist
productIds: an array of product ids. for a single product add send one element array.
userId (optional): In the case of client credentials or API key, admin user auth send userId. For a user auth userId isn't required because userId will be gathered from authentication. Defaults to the current user. (needs discussion)

DELETE {url}/wishlists/{id}

Clears the wishlist data.

DELETE {url}/wishlists/{id}/product/{product_id}

Removes the given product id from wishlist id

@prionkor
Copy link
Owner Author

prionkor commented Jan 9, 2021

Tasks

  • Get list of wishlist
  • Get single wishlist
  • Create Wishlist
  • Update Wishlist
  • Add product to wishlist
  • Remove product from wishlist
  • Delete wishlist
  • Clean wishlist (delete all products form wishlists
  • Create Documentations

@harishksoft
Copy link

image
getting error like this

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