avoid hard-coding path of orders, stock locations + variants APIs

Fixes #3371
Fixes #3372
[api] Remove excessive do/end block from variants resources definition