Skip to content
This repository was archived by the owner on Apr 23, 2024. It is now read-only.
This repository was archived by the owner on Apr 23, 2024. It is now read-only.

add_product method does not accpet location_id #258

@MCHellspawn

Description

@MCHellspawn

The add_product method of the grocy class doesn't allow for setting the location id. It looks like it's undocumented but the /stock/products/{productId}/add API method does take it:
{
"amount": 1,
"best_before_date": "2023-01-19",
"transaction_type": "purchase",
"location_id": 6
}

This does work in the API. It would be useful if this could be added to the add_product method in the class.

I have actually already completed the changes in a fork and I am ready to submit a pull request if you would accept it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions