> For the complete documentation index, see [llms.txt](https://docs.hotwax.co/documents/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hotwax.co/documents/integrate-with-hotwax/components/available-to-promise/facilities.md).

# Facilities

Deprecated (since maarg 4.4.0): Use admin/facilities

## GET /facilities

> list FacilityAndType

```json
{"openapi":"3.1.1","info":{"title":"Commerce Available to Promise REST API","version":"3.2.0"},"tags":[{"name":"facilities","description":"Deprecated (since maarg 4.4.0): Use admin/facilities"}],"servers":[{"url":"https://demo-maarg.hotwax.io/rest/s1/available-to-promise"}],"security":[{"basicAuth":[]},{"api_key":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"},"api_key":{"type":"apiKey","name":"api_key","in":"header","description":"HTTP Header api_key"}},"schemas":{"co.hotwax.facility.FacilityAndType":{"title":"Facility And Type","type":"object","properties":{"_entity":{"type":"string","default":"co.hotwax.facility.FacilityAndType"},"typeDescription":{"type":"string"},"facilityId":{"type":"string"},"facilityTypeId":{"type":"string"},"parentFacilityId":{"type":"string"},"ownerPartyId":{"type":"string"},"defaultInventoryItemTypeId":{"type":"string"},"facilityName":{"type":"string"},"primaryFacilityGroupId":{"type":"string"},"oldSquareFootage":{"type":"number","format":"int64"},"facilitySize":{"type":"number"},"facilitySizeUomId":{"type":"string"},"productStoreId":{"type":"string"},"defaultDaysToShip":{"type":"number","format":"int64"},"openedDate":{"type":"string","format":"date-time"},"closedDate":{"type":"string","format":"date-time"},"description":{"type":"string"},"defaultDimensionUomId":{"type":"string"},"defaultWeightUomId":{"type":"string"},"geoPointId":{"type":"string"},"externalId":{"type":"string"},"openTime":{"type":"string"},"closeTime":{"type":"string"},"facilityTimeZone":{"type":"string"},"maximumOrderLimit":{"type":"number","format":"int64"},"postalCode":{"type":"string"},"parentTypeId":{"type":"string"},"hasTable":{"type":"string"}}}}},"paths":{"/facilities":{"get":{"tags":["facilities"],"summary":"list FacilityAndType","description":null,"parameters":[{"schema":{"type":"number","format":"int32"},"name":"pageIndex","in":"query","required":false,"description":"Page number to return, starting with zero"},{"schema":{"type":"number","format":"int32"},"name":"pageSize","in":"query","required":false,"description":"Number of records per page (default 100)"},{"schema":{"type":"string"},"name":"orderByField","in":"query","required":false,"description":"Field name to order by (or comma separated names)"},{"schema":{"type":"string"},"name":"pageNoLimit","in":"query","required":false,"description":"If true don't limit page size (no pagination)"},{"schema":{"type":"number","format":"int32"},"name":"dependentLevels","in":"query","required":false,"description":"Levels of dependent child records to include"},{"schema":{"type":"string","format":""},"name":"typeDescription","in":"query","required":false,"description":null},{"schema":{"type":"string","format":""},"name":"facilityId","in":"query","required":false,"description":null},{"schema":{"type":"string","format":""},"name":"facilityTypeId","in":"query","required":false,"description":null},{"schema":{"type":"string","format":""},"name":"parentFacilityId","in":"query","required":false,"description":null},{"schema":{"type":"string","format":""},"name":"ownerPartyId","in":"query","required":false,"description":null},{"schema":{"type":"string","format":""},"name":"defaultInventoryItemTypeId","in":"query","required":false,"description":null},{"schema":{"type":"string","format":""},"name":"facilityName","in":"query","required":false,"description":null},{"schema":{"type":"string","format":""},"name":"primaryFacilityGroupId","in":"query","required":false,"description":null},{"schema":{"type":"number","format":"int64"},"name":"oldSquareFootage","in":"query","required":false,"description":null},{"schema":{"type":"number","format":""},"name":"facilitySize","in":"query","required":false,"description":null},{"schema":{"type":"string","format":""},"name":"facilitySizeUomId","in":"query","required":false,"description":null},{"schema":{"type":"string","format":""},"name":"productStoreId","in":"query","required":false,"description":null},{"schema":{"type":"number","format":"int64"},"name":"defaultDaysToShip","in":"query","required":false,"description":"In the absence of a product specific days to ship in ProductFacility, this will be used"},{"schema":{"type":"string","format":"date-time"},"name":"openedDate","in":"query","required":false,"description":null},{"schema":{"type":"string","format":"date-time"},"name":"closedDate","in":"query","required":false,"description":null},{"schema":{"type":"string","format":""},"name":"description","in":"query","required":false,"description":null},{"schema":{"type":"string","format":""},"name":"defaultDimensionUomId","in":"query","required":false,"description":"This field store the unit of measurement of dimension (length, width and height)"},{"schema":{"type":"string","format":""},"name":"defaultWeightUomId","in":"query","required":false,"description":null},{"schema":{"type":"string","format":""},"name":"geoPointId","in":"query","required":false,"description":null},{"schema":{"type":"string","format":""},"name":"externalId","in":"query","required":false,"description":"This field stores facility ID of the external system"},{"schema":{"type":"string","format":""},"name":"openTime","in":"query","required":false,"description":null},{"schema":{"type":"string","format":""},"name":"closeTime","in":"query","required":false,"description":null},{"schema":{"type":"string","format":""},"name":"facilityTimeZone","in":"query","required":false,"description":null},{"schema":{"type":"number","format":"int64"},"name":"maximumOrderLimit","in":"query","required":false,"description":null},{"schema":{"type":"string","format":""},"name":"postalCode","in":"query","required":false,"description":null},{"schema":{"type":"string","format":""},"name":"parentTypeId","in":"query","required":false,"description":null},{"schema":{"type":"string","format":""},"name":"hasTable","in":"query","required":false,"description":null}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/co.hotwax.facility.FacilityAndType"}}}}},"401":{"description":"Authentication required"},"403":{"description":"Access Forbidden (no authz)"},"404":{"description":"Value Not Found"},"429":{"description":"Too Many Requests (tarpit)"},"500":{"description":"General Error"}}}}}}
```

## POST /facilities

> create Facility

```json
{"openapi":"3.1.1","info":{"title":"Commerce Available to Promise REST API","version":"3.2.0"},"tags":[{"name":"facilities","description":"Deprecated (since maarg 4.4.0): Use admin/facilities"}],"servers":[{"url":"https://demo-maarg.hotwax.io/rest/s1/available-to-promise"}],"security":[{"basicAuth":[]},{"api_key":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"},"api_key":{"type":"apiKey","name":"api_key","in":"header","description":"HTTP Header api_key"}},"schemas":{"org.apache.ofbiz.product.facility.Facility.PK":{"title":"Facility","type":"object","properties":{"_entity":{"type":"string","default":"org.apache.ofbiz.product.facility.Facility.PK"},"facilityId":{"type":"string"}}},"org.apache.ofbiz.product.facility.Facility":{"title":"Facility","type":"object","properties":{"_entity":{"type":"string","default":"org.apache.ofbiz.product.facility.Facility"},"facilityId":{"type":"string"},"facilityTypeId":{"type":"string"},"parentFacilityId":{"type":"string"},"ownerPartyId":{"type":"string"},"defaultInventoryItemTypeId":{"type":"string"},"facilityName":{"type":"string"},"primaryFacilityGroupId":{"type":"string"},"oldSquareFootage":{"type":"number","format":"int64"},"facilitySize":{"type":"number"},"facilitySizeUomId":{"type":"string"},"productStoreId":{"type":"string"},"defaultDaysToShip":{"type":"number","format":"int64"},"openedDate":{"type":"string","format":"date-time"},"closedDate":{"type":"string","format":"date-time"},"description":{"type":"string"},"defaultDimensionUomId":{"type":"string"},"defaultWeightUomId":{"type":"string"},"geoPointId":{"type":"string"},"externalId":{"type":"string"},"openTime":{"type":"string"},"closeTime":{"type":"string"},"facilityTimeZone":{"type":"string"},"maximumOrderLimit":{"type":"number","format":"int64"},"postalCode":{"type":"string"},"lastUpdatedStamp":{"type":"string","format":"date-time"},"createdStamp":{"type":"string","format":"date-time"}}}}},"paths":{"/facilities":{"post":{"tags":["facilities"],"summary":"create Facility","description":null,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/org.apache.ofbiz.product.facility.Facility.PK"}}}},"401":{"description":"Authentication required"},"403":{"description":"Access Forbidden (no authz)"},"404":{"description":"Value Not Found"},"429":{"description":"Too Many Requests (tarpit)"},"500":{"description":"General Error"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/org.apache.ofbiz.product.facility.Facility"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/org.apache.ofbiz.product.facility.Facility"}}},"required":false}}}}}
```

## GET /facilities/{facilityId}

> one FacilityAndType

```json
{"openapi":"3.1.1","info":{"title":"Commerce Available to Promise REST API","version":"3.2.0"},"tags":[{"name":"facilities","description":"Deprecated (since maarg 4.4.0): Use admin/facilities"}],"servers":[{"url":"https://demo-maarg.hotwax.io/rest/s1/available-to-promise"}],"security":[{"basicAuth":[]},{"api_key":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"},"api_key":{"type":"apiKey","name":"api_key","in":"header","description":"HTTP Header api_key"}},"schemas":{"co.hotwax.facility.FacilityAndType":{"title":"Facility And Type","type":"object","properties":{"_entity":{"type":"string","default":"co.hotwax.facility.FacilityAndType"},"typeDescription":{"type":"string"},"facilityId":{"type":"string"},"facilityTypeId":{"type":"string"},"parentFacilityId":{"type":"string"},"ownerPartyId":{"type":"string"},"defaultInventoryItemTypeId":{"type":"string"},"facilityName":{"type":"string"},"primaryFacilityGroupId":{"type":"string"},"oldSquareFootage":{"type":"number","format":"int64"},"facilitySize":{"type":"number"},"facilitySizeUomId":{"type":"string"},"productStoreId":{"type":"string"},"defaultDaysToShip":{"type":"number","format":"int64"},"openedDate":{"type":"string","format":"date-time"},"closedDate":{"type":"string","format":"date-time"},"description":{"type":"string"},"defaultDimensionUomId":{"type":"string"},"defaultWeightUomId":{"type":"string"},"geoPointId":{"type":"string"},"externalId":{"type":"string"},"openTime":{"type":"string"},"closeTime":{"type":"string"},"facilityTimeZone":{"type":"string"},"maximumOrderLimit":{"type":"number","format":"int64"},"postalCode":{"type":"string"},"parentTypeId":{"type":"string"},"hasTable":{"type":"string"}}}}},"paths":{"/facilities/{facilityId}":{"get":{"tags":["facilities"],"summary":"one FacilityAndType","description":null,"parameters":[{"schema":{"type":"string"},"name":"facilityId","in":"path","required":true,"description":null}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/co.hotwax.facility.FacilityAndType"}}}},"401":{"description":"Authentication required"},"403":{"description":"Access Forbidden (no authz)"},"404":{"description":"Value Not Found"},"429":{"description":"Too Many Requests (tarpit)"},"500":{"description":"General Error"}}}}}}
```

## PUT /facilities/{facilityId}

> update Facility

```json
{"openapi":"3.1.1","info":{"title":"Commerce Available to Promise REST API","version":"3.2.0"},"tags":[{"name":"facilities","description":"Deprecated (since maarg 4.4.0): Use admin/facilities"}],"servers":[{"url":"https://demo-maarg.hotwax.io/rest/s1/available-to-promise"}],"security":[{"basicAuth":[]},{"api_key":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"},"api_key":{"type":"apiKey","name":"api_key","in":"header","description":"HTTP Header api_key"}},"schemas":{"org.apache.ofbiz.product.facility.Facility.PK":{"title":"Facility","type":"object","properties":{"_entity":{"type":"string","default":"org.apache.ofbiz.product.facility.Facility.PK"},"facilityId":{"type":"string"}}},"org.apache.ofbiz.product.facility.Facility":{"title":"Facility","type":"object","properties":{"_entity":{"type":"string","default":"org.apache.ofbiz.product.facility.Facility"},"facilityId":{"type":"string"},"facilityTypeId":{"type":"string"},"parentFacilityId":{"type":"string"},"ownerPartyId":{"type":"string"},"defaultInventoryItemTypeId":{"type":"string"},"facilityName":{"type":"string"},"primaryFacilityGroupId":{"type":"string"},"oldSquareFootage":{"type":"number","format":"int64"},"facilitySize":{"type":"number"},"facilitySizeUomId":{"type":"string"},"productStoreId":{"type":"string"},"defaultDaysToShip":{"type":"number","format":"int64"},"openedDate":{"type":"string","format":"date-time"},"closedDate":{"type":"string","format":"date-time"},"description":{"type":"string"},"defaultDimensionUomId":{"type":"string"},"defaultWeightUomId":{"type":"string"},"geoPointId":{"type":"string"},"externalId":{"type":"string"},"openTime":{"type":"string"},"closeTime":{"type":"string"},"facilityTimeZone":{"type":"string"},"maximumOrderLimit":{"type":"number","format":"int64"},"postalCode":{"type":"string"},"lastUpdatedStamp":{"type":"string","format":"date-time"},"createdStamp":{"type":"string","format":"date-time"}}}}},"paths":{"/facilities/{facilityId}":{"put":{"tags":["facilities"],"summary":"update Facility","description":null,"parameters":[{"schema":{"type":"string"},"name":"facilityId","in":"path","required":true,"description":null}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/org.apache.ofbiz.product.facility.Facility.PK"}}}},"401":{"description":"Authentication required"},"403":{"description":"Access Forbidden (no authz)"},"404":{"description":"Value Not Found"},"429":{"description":"Too Many Requests (tarpit)"},"500":{"description":"General Error"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/org.apache.ofbiz.product.facility.Facility"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/org.apache.ofbiz.product.facility.Facility"}}},"required":false}}}}}
```

## GET /facilities/orderCount

> list FacilityOrderCount

```json
{"openapi":"3.1.1","info":{"title":"Commerce Available to Promise REST API","version":"3.2.0"},"tags":[{"name":"facilities","description":"Deprecated (since maarg 4.4.0): Use admin/facilities"}],"servers":[{"url":"https://demo-maarg.hotwax.io/rest/s1/available-to-promise"}],"security":[{"basicAuth":[]},{"api_key":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"},"api_key":{"type":"apiKey","name":"api_key","in":"header","description":"HTTP Header api_key"}},"schemas":{"co.hotwax.facility.FacilityOrderCount":{"title":"Facility Order Count","type":"object","properties":{"_entity":{"type":"string","default":"co.hotwax.facility.FacilityOrderCount"},"facilityId":{"type":"string"},"lastOrderCount":{"type":"number","format":"int64"},"entryDate":{"type":"string","format":"date"},"lastUpdatedStamp":{"type":"string","format":"date-time"},"createdStamp":{"type":"string","format":"date-time"}}}}},"paths":{"/facilities/orderCount":{"get":{"tags":["facilities"],"summary":"list FacilityOrderCount","description":null,"parameters":[{"schema":{"type":"number","format":"int32"},"name":"pageIndex","in":"query","required":false,"description":"Page number to return, starting with zero"},{"schema":{"type":"number","format":"int32"},"name":"pageSize","in":"query","required":false,"description":"Number of records per page (default 100)"},{"schema":{"type":"string"},"name":"orderByField","in":"query","required":false,"description":"Field name to order by (or comma separated names)"},{"schema":{"type":"string"},"name":"pageNoLimit","in":"query","required":false,"description":"If true don't limit page size (no pagination)"},{"schema":{"type":"number","format":"int32"},"name":"dependentLevels","in":"query","required":false,"description":"Levels of dependent child records to include"},{"schema":{"type":"string","format":""},"name":"facilityId","in":"query","required":false,"description":null},{"schema":{"type":"number","format":"int64"},"name":"lastOrderCount","in":"query","required":false,"description":null},{"schema":{"type":"string","format":"date"},"name":"entryDate","in":"query","required":false,"description":null},{"schema":{"type":"string","format":"date-time"},"name":"lastUpdatedStamp","in":"query","required":false,"description":null},{"schema":{"type":"string","format":"date-time"},"name":"createdStamp","in":"query","required":false,"description":null}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/co.hotwax.facility.FacilityOrderCount"}}}}},"401":{"description":"Authentication required"},"403":{"description":"Access Forbidden (no authz)"},"404":{"description":"Value Not Found"},"429":{"description":"Too Many Requests (tarpit)"},"500":{"description":"General Error"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hotwax.co/documents/integrate-with-hotwax/components/available-to-promise/facilities.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
