Skip to content

Help with Stock merging via API #9486

Answered by SchrodingersGat
SebBorbely asked this question in Q&A
Discussion options

You must be logged in to vote

The following code worked fine for me:

from inventree.api import InvenTreeAPI


SERVER = "http://127.0.0.1:8000"
USER = "admin"
PASS = "inventree"

api = InvenTreeAPI(SERVER, username=USER, password=PASS)

response = api.post(
    "stock/merge/",
    {
        "items": [
            {
                "item": 330,
            },
            {
                "item": 1359
            }
        ],
        "location": 1,
    }
)

Replies: 4 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@SebBorbely
Comment options

@miggland
Comment options

@SebBorbely
Comment options

@miggland
Comment options

@SebBorbely
Comment options

Comment options

You must be logged in to vote
2 replies
@SchrodingersGat
Comment options

@SebBorbely
Comment options

Answer selected by SebBorbely
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants