tripletex-api2 icon indicating copy to clipboard operation
tripletex-api2 copied to clipboard

Expose "Leveres" and "Plukket" in GET and PUT /order/orderline/{id}

Open chrisbbe opened this issue 1 year ago • 8 comments

As "Leveres" in the GUI maps to field "count" i the API for HTTP GET /order/orderline/{id}, we would also like to expose the actual quantity ordered aka "Bestilt", and the picked flag "Plukket" indicating if the orderline is picked.

Then when we can fetch these fields from the API, we would also like to update them with a HTTP PUT /order/orderline/{id} request.

Is that feasible?

Screenshot 2024-01-26 143932

chrisbbe avatar Jan 26 '24 14:01 chrisbbe

Hello :) Just so that we are on the same page, this are the functionality you are requesting:

  1. Expose “Ordered/Bestilt” field in the GET /order/orderline endpoint
  2. Expose if a line is picked or not in the order/orderline endpoint
  3. Pick and Unpick an orderline functionality in the API (preferably using PUT /order/orderline/{id} endpoint)

If this are the functionalities you requested, please know that we have created tasks for them and we will try to prioritise them as soon as possible but we can not promise any specific date. We will keep you informed on the progress.

andreeasondavisma avatar Feb 13 '24 10:02 andreeasondavisma

Yes, that's correct.

To add more context around point 3, when we are done picking the order, we typically update multiple lines on the order, so In most cases we would like to PUT /order/{id} with an array of "orderLines" to update multiple lines on that order in one request. Still, I guess the same OrderLine DTO is used on PUT /order/{id} and PUT /order/orderline/{id} ?

chrisbbe avatar Feb 13 '24 13:02 chrisbbe

Hello :) Yes, it's the same OrderLineDTO. If you want to update orderlines using PUT /order/{id} you will need to also add a query param called updateLinesAndGroups to the request. Also we deployed orderedQuantity. Please tells us if you encounter any issues with this field.

We have also created a task for point 2 and 3 and hope to prioritise it as soon as possible.

andreeasondavisma avatar Mar 14 '24 13:03 andreeasondavisma

Thanks, field orderedQuantity seems to behave as expected, unfortunately first when all these point 1-3 is solved, they will together provide value for us.

chrisbbe avatar Mar 15 '24 08:03 chrisbbe

Hello @chrisbbe We exposed the field isPicked in the OrderLineDTO and you can also use this status for picking and unpicking lines:

  • PICKED - will pick all of the lines
  • CANCELLED - will unpick all of the lines

This is what you mentioned to us: In most cases we would like to PUT /order/{id} with an array of "orderLines" to update multiple lines on that order in one request So my question is: are ALL the lines usually picked/unpicked from an order, or do you have cases where only SOME of the lines are picked?

andreeasondavisma avatar Apr 10 '24 12:04 andreeasondavisma

Thanks, I will check it out. It's pretty common that not all lines are picked, creating back order when the order is completed.

chrisbbe avatar Apr 10 '24 13:04 chrisbbe

Thank you :)
It's pretty common that not all lines are picked . I understand. In the next step, we most probably will create a separate endpoint for picking and unpicking order lines since this operation is more complex and it also creates an outgoing stock movements in the background.

andreeasondavisma avatar Apr 11 '24 06:04 andreeasondavisma

Hello @chrisbbe :) We added two new endpoints:

  • PUT /order/orderline/{id}/:pickLine
  • PUT /order/orderline/{id}/:unpickLine

Please let us know if you encounter any issues with them and also if there is anything else that is needed for your integration.

andreeasondavisma avatar Jun 17 '24 13:06 andreeasondavisma