-
-
Notifications
You must be signed in to change notification settings - Fork 401
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
Can not update stock movements from api #2698
Comments
Hmm that's odd. The request looks ok. Can you look at the logs to see what that 404 error is actually for? And can you show me your headers? In fact can you share your postman request / collection with me? Otherwise I'll try to replicate it on Monday. Also please share the OpenBoxes version you're testing against. |
One thing to try right off the bat is to add a “location” property to your
login request. In this case use the same ID that’s in origin.id of the
request to send in the login request
{ “username”:”myuser”, “password”:”password”,”location”:”<location id>” }
…On Sat, Oct 16, 2021 at 7:38 AM Justin Miranda ***@***.***> wrote:
Hmm that's odd. The request looks ok. Can you look at the logs to see what
that 404 error is actually for? And can you show me your headers?
In fact can you share your postman request / collection with me?
Otherwise I'll try to replicate it on Monday.
Also please share the OpenBoxes version you're testing against.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2698 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAI35N3PBTJPP7VYHGQQSJDUHFW2JANCNFSM5GDK7GZQ>
.
|
my request login api was include location |
Shoot. I'm seeing the same behavior. And I've looked at the code now and ... I'm stunned by this ... but I don't think we have an endpoint to update a stock movement through the API. I think we only needed to be able to create the stock movement. The following URL mapping shows that we're only supporting the GET method on the Stock Movement API
I'll add in the API to handle updating and deleting. But there are ways to do this with an explicit update endpoint. In fact, we created a bunch of REST and RPC-style endpoints to update different aspects of the stock movement (status, line items, picklist, etc). So it's possible one of these could work for you. Let me know what properties / associations you're looking to update and I can provide an alternative until the aforementioned API is ready. Note: I've always hated that we implemented RPC-style endpoints for some of these things, but they'll exist at least through 0.9.0 so you can be free to use them until then. Again, just let me know what you're looking to do and I'll point you in the right direction. URL Mappings
And then even more RPC-style endpoints were added for the Stock Movement Item API
|
Im using api to magerer order. inventoy .... Please update the document api. Thank you for support |
I want to create order from api. Add item to order. Then update status of order
|
All of those operations are supported by the current API. I'll either write up more explicit instructions or add some requests to your postman collection. One caveat: stock movement items do not currently support price. Stock movements are more like transfer / delivery orders. We haven't had a need to support Sales Orders yet but we could add that feature in the future. Basically that just means you can't associate a price with a line item. Almost everything else you need should be available. For now you can use the price associated with the product to calculate the total for the order but that might be less than ideal depending on your requirements. Justin |
Please add document api. I don't know the input param/body to using api. |
Sorry, what do you mean by "add document API"? Are you asking me to document the Stock Movement API? Or are you asking me to provide information about our Document API? |
https://docs.openboxes.com/en/latest/api-guide/reasonCode/ |
Please update and add new api doccument there |
Yes, will update the API docs as soon as I can, which might not be until later in the week. In the meantime, here's some sample React code showing how a stock movement is created / saved. Here's an example of how to save stock movement items And here's an example of how to update the status once all items have been added Valid statues are
|
Can not update stock movements. Not found. But get exist in system
The text was updated successfully, but these errors were encountered: