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

Set stock_available for product_options via the API #33

Closed
30350n opened this issue Mar 8, 2024 · 2 comments
Closed

Set stock_available for product_options via the API #33

30350n opened this issue Mar 8, 2024 · 2 comments
Labels
Feature request Request or idea for a new feature

Comments

@30350n
Copy link

30350n commented Mar 8, 2024

Is your feature request related to a problem? Please describe.

I'm currently working on integrating Lectronz into InvenTree and would like to enable the user to link their stock levels to Lectronz (so that when new stock items get added, the stock level at Lectronz gets set accordingly).

This is already possible via the PATCH /api/v1/products/{id} API call, but only per product, not per product option.

Describe the solution you'd like

Enable the PATCH /api/v1/products/{id} API call to accept additional inputs like so:

  • product_options array of object
    List of options available for the product.
    • id integer
      Unique identifier for this product option.
    • choices array of object
      Available choices for the option.
      • id integer
        Unique identifier for this choice.
      • stock_available number
        Stock available for this choice.

To be able to set the stock_available for each product option / choice.

Describe alternatives you've considered
-

Additional context
-

@omzlo omzlo added the Feature request Request or idea for a new feature label Mar 24, 2024
@omzlo
Copy link
Owner

omzlo commented Apr 19, 2024

This is now available through a distinct API endpoint: see https://lectronz.com/api_docs/product_option_choices

@omzlo omzlo closed this as completed Apr 19, 2024
@30350n
Copy link
Author

30350n commented Apr 19, 2024

That's perfect, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request Request or idea for a new feature
Projects
None yet
Development

No branches or pull requests

2 participants