Short Story :
I'm currently working on a custom shipping method and I don't know how to execute some code when the admin submits a shipment.
Long Story :
I'm working on a custom shipping method which uses an external API to check if the client shipping address and products dimension are eligibile for the company transport service. Moreover, this custom shipping method calculates the shipping price based on the distance from the pickup place and the delivery place.
This part is done.
Now, I have to send another API call in order to book the shipping when the admin submit a shipment to an order (of course, I need to do that only when the order uses my custom shipping method). How can I execute some code when the admin hit the button ? I suppose an event can help me but I don't know which one.
Thanks for the help.