Start Work Order Through Rest API

Greetings, i’m currently working on developing an external application that will create and process work orders. I managed to create and submit a work order through REST API CURD operations but im confused on how to start and finish the work order in order to complete the process. Your help and support is highly appreciated. Thanks.

Any one can help or point me somewhere where i might find some answers?

The more specific details you give the better - point to and outline what docs and q&a threads you have found, and what you have tried that confuse you?

Greetings clark. I currently figured it out and it turned out that my lack of understanding erpnext business processes was the root cause of the confusion. I will try to respond again with full explanation detailing how work order works and how to integrate it with external systems.

Hi Saad Al Moosa. Would it be possible to eloborate how you solved it?

I have created an external application to start stop word orders
first make sure stop (status =. completed) all job carts (if any),
second submit stock entry

I am also trying to do this. I’ve set up the complete sequence in Postman as a way to prototype it.

I cannot get past the error:

Not allowed to change Status after submission

I do make sure that Job Cards are all completed and submitted, as you suggest.

My questions are:

  1. Is there a special setting the Work Order needs to have so as to override the “docstatus”: 1 setting?
  2. In addition to ensuring Job Cards are finalized do you not also have to generate and finalize a “Manufacture” Stock Entry linked to the Work Order that moves produced items to their target location?
  1. Create a time log start for the job card
  2. create a time log stop for the job card (status : completed)
  3. submit job card (“docstatus”: 1)
  4. make sure all jobcards have been completed
  5. make stock entry and submit

Could you share more details over this application you created? Is the code on GitHub e.g.?