Proposed Design

Resource URL: /logisticsLocations/{locationId}/orders

An Order is a resource associated with a Logistics Location resource. This resource was modeled in v2 and previous using a Facility object. The change of Facility to Logistics Location is proposed based on the confusion of Facility in OpenLMIS having a broader definition than what is normally considered a facility (health facility, etc.). The term Logistics Location is generic and sufficient enough to solve the ambiguity.

Note, this does NOT mean that Logistics Location replaces Facility in OpenLMIS v3, only that in Order/Fulfillment and Stock Management contexts, the term Logistics Location is used, rather than Facility. For other parts of OpenLMIS, the Facility model will remain intact. There would also be some relationship between Facility and Logistics Location in the model.

Order Creation (POST)

An Order object would be POSTed to this endpoint, with the following attributes:

Attributes of the Order Line Item object:

Attributes of the Global Product object:

Attributes of the Trade Item object:

Viewing Orders (GET)

The same URL is used. This shows all of the orders being fulfilled at this location. To view orders that have been requested at a location, a separate endpoint will provided.

Possible Design Changes

An alternate proposal to this design is to make the Global Product default pack size optional, and if it is not specified, the Order Line Item's quantity attribute would mean dispensing units, rather than packs. There are certain drawbacks to this design change.

Open Questions