Add state machine to order status type
Fix all remaining TODOs in the endpoint cache