CGSmith-LLC / shipwise-api

Shipwise API
Other
0 stars 0 forks source link

Add warehouse identifier to orders #98

Open cgsmith opened 1 year ago

cgsmith commented 1 year ago

Adding a warehouse_id on orders will be easier to assign warehouse users to customers to see orders.

cgsmith commented 1 year ago

@cebe This is to allow some changes to how users work.

  1. Having a warehouse_id on the order table will allow, in the future, for orders that changed or deleted to be updated or deleted upstream at the warehouse level.
  2. Users will have a type assigned to them "Warehouse" user or "Ecommerce" user. A warehouse user can be assigned to warehouse identifiers. This will control what orders they can see. (maybe this needs to be a role??)
  3. I'd like to have an API key that works for all orders associated with a user. For example, if a warehouse user requests for an order assigned to a different warehouse they should receive a 404 or other error. We are seeing more users that are using different warehouses. The different warehouses should not see orders that do not pertain to them.
  4. Orders that do not have a warehouse ID associated with it should not be visible to the warehouse.