Partners and your own warehouses
Goods reach a store from one of two kinds of source:
- a business partner with the
SUPPLIERrole, an outside company you buy from; - one of your own warehouses, which is a business unit of type
WAREHOUSEin Business Unit Management.
🛑 Your own warehouse is never registered as a business partner. It already exists as a business unit, with its own id, GLN and addresses. Registering it again as a partner would give it a second identity that nothing connects to the first. Business Partner holds only its supply terms, keyed by the warehouse's business unit id.
The same split is how Goods Received records who shipped a delivery: shipperType is businessPartnerId
for a partner and businessUnitId for one of your own business units, with the id in shipperId. See
Goods Received external events.
Supplier terms​
The SUPPLIER role of a partner carries two optional values:
| Field | Meaning | Values |
|---|---|---|
defaultLeadTimeHours | how long the supplier takes from order to delivery, unless something more specific says otherwise | a whole number of calendar hours, 0 to 8760 (one year) |
reliabilityScore | how reliably the supplier delivers, as your ERP rates it | a number from 0.0 to 1.0, at most 9 decimals |
Both may be left out or sent as null, which means not set. Neither may appear on the MANUFACTURER
role.
âš The lead time is in hours, not days. An ERP that holds lead times in days multiplies by 24 before
sending: 7 days is 168, 2 days is 48. Calendar hours count weekends and holidays like any other hour.
Hii Retail does not calculate the reliability score. It stores and publishes the value your ERP sends, so its meaning is whatever your ERP's rating means.
Warehouse supply terms​
One of your own warehouses gets its lead time through its own endpoint, keyed by its business unit id:
PUT /api/v1/warehouse-supply-terms/DC-JKP
Content-Type: application/json
{ "defaultLeadTimeHours": 48 }
| Field | Meaning | Values |
|---|---|---|
defaultLeadTimeHours | how long the warehouse takes from order to delivery to a store | a whole number of calendar hours, 0 to 8760, or null for not set |
Before it accepts the request, the API asks Business Unit Management about the business unit:
| Business Unit Management says | Response |
|---|---|
the business unit is of type WAREHOUSE | 202 Accepted |
| the business unit exists but is another type, such as a store | 400 Bad Request |
| there is no such business unit | 404 Not Found |
| it cannot be reached, or answers with an error | 502 Bad Gateway. Nothing is queued; send the request again |
The same check runs on DELETE. GET does not ask Business Unit Management; it answers from what is
stored, with 404 when no terms are stored for the business unit or they have been deleted.
Warehouse supply terms are held per business unit, so the caller's permission must cover that business unit. See Permissions.
What is not held here​
The terms below are agreed per article, not per source, so they belong to Ordering Options, a separate service that says what is bought, from which source, in which pack, and for which stores.
Minimum order quantities. A minimum is agreed per article and per pack (at least 48 of this article, in packs of 24). One number for everything a supplier sells would mean nothing when the same supplier sells both screws and lawnmowers, so neither a partner nor a warehouse carries one.
Which source supplies which article to which store. A partner is registered once for the whole tenant. Choosing Fjord Garden for the Uppsala store and another supplier for a store in Norway is decided per article and per store, not on the partner.
Lead times per store or per article. defaultLeadTimeHours is a default: the value to use when
nothing more specific is known.