> For the complete documentation index, see [llms.txt](https://docs.fulfillmenttools.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fulfillmenttools.com/documentation/apis/api-reference/stacks-operations.md).

# Stacks (Operations)

Endpoints to operate with stacks.

## Get all Stacks respecting the given filter

> This part of the API is in Beta status. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />Get all Stacks respecting the given filter

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to operate with stacks.","name":"Stacks (Operations)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"StackResponse":{"properties":{"stacks":{"description":"Array of Stacks matching the given filter","items":{"$ref":"#/components/schemas/Stack"},"type":"array"},"total":{"description":"Total number of stacks for the given filter","format":"int64","type":"integer"}},"required":["stacks","total"],"title":"StackResponse","type":"object","description":"StackResponse"},"Stack":{"properties":{"created":{"description":"The date this entity was created at the platform. This value is generated by the service.","format":"date-time","type":"string"},"facilityRefs":{"description":"Linked Facilities through reference","items":{"type":"string"},"maxItems":50,"type":"array"},"id":{"description":"Unique identifier of the Stack","type":"string"},"lastModified":{"description":"The date this entity was modified last. This value is generated by the service.","format":"date-time","type":"string"},"processRefs":{"description":"Linked Processes through reference","items":{"type":"string"},"maxItems":50,"type":"array"},"version":{"description":"The version of the document to be used in optimistic locking mechanisms.","format":"int64","type":"integer"}},"required":["created","lastModified","version","id","facilityRefs","processRefs"],"title":"Stack","type":"object","description":"Stack"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/stacks":{"get":{"deprecated":false,"description":"This part of the API is in Beta status. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />Get all Stacks respecting the given filter","operationId":"getStacks","parameters":[{"description":"entity to start after","in":"query","name":"startAfterId","required":false,"schema":{"type":"string"}},{"description":"number of entities to show","in":"query","name":"size","required":false,"schema":{"default":25,"type":"integer"}},{"description":"facilities to filter the results","explode":true,"in":"query","name":"facilityRefs","required":false,"schema":{"items":{"type":"string"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackResponse"}}},"description":"Entities were found & you were allowed to access it. The result is in the body."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this endpoint"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Get all Stacks respecting the given filter","tags":["Stacks (Operations)"]}}}}
```

## Create stack

> This part of the API is in Beta status. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />Create stack

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to operate with stacks.","name":"Stacks (Operations)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"StackForCreation":{"properties":{"facilityRefs":{"description":"Linked Facilities through reference","items":{"type":"string"},"maxItems":50,"type":"array"},"processRefs":{"description":"Linked Processes through reference","items":{"type":"string"},"maxItems":50,"type":"array"}},"required":["facilityRefs","processRefs"],"title":"StackForCreation","type":"object","description":"StackForCreation"},"Stack":{"properties":{"created":{"description":"The date this entity was created at the platform. This value is generated by the service.","format":"date-time","type":"string"},"facilityRefs":{"description":"Linked Facilities through reference","items":{"type":"string"},"maxItems":50,"type":"array"},"id":{"description":"Unique identifier of the Stack","type":"string"},"lastModified":{"description":"The date this entity was modified last. This value is generated by the service.","format":"date-time","type":"string"},"processRefs":{"description":"Linked Processes through reference","items":{"type":"string"},"maxItems":50,"type":"array"},"version":{"description":"The version of the document to be used in optimistic locking mechanisms.","format":"int64","type":"integer"}},"required":["created","lastModified","version","id","facilityRefs","processRefs"],"title":"Stack","type":"object","description":"Stack"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/stacks":{"post":{"deprecated":false,"description":"This part of the API is in Beta status. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />Create stack","operationId":"createStack","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackForCreation"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stack"}}},"description":"Stack created."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this endpoint"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Create stack","tags":["Stacks (Operations)"]}}}}
```

## Get stack

> This part of the API is in Beta status. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />Get Stack respecting the given id

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to operate with stacks.","name":"Stacks (Operations)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Stack":{"properties":{"created":{"description":"The date this entity was created at the platform. This value is generated by the service.","format":"date-time","type":"string"},"facilityRefs":{"description":"Linked Facilities through reference","items":{"type":"string"},"maxItems":50,"type":"array"},"id":{"description":"Unique identifier of the Stack","type":"string"},"lastModified":{"description":"The date this entity was modified last. This value is generated by the service.","format":"date-time","type":"string"},"processRefs":{"description":"Linked Processes through reference","items":{"type":"string"},"maxItems":50,"type":"array"},"version":{"description":"The version of the document to be used in optimistic locking mechanisms.","format":"int64","type":"integer"}},"required":["created","lastModified","version","id","facilityRefs","processRefs"],"title":"Stack","type":"object","description":"Stack"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/stacks/{stackId}":{"get":{"deprecated":false,"description":"This part of the API is in Beta status. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />Get Stack respecting the given id","operationId":"getStackById","parameters":[{"in":"path","name":"stackId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stack"}}},"description":"Entity was found & you were allowed to access it. The result is in the body."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this endpoint"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Get stack","tags":["Stacks (Operations)"]}}}}
```


---

# 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.fulfillmenttools.com/documentation/apis/api-reference/stacks-operations.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.
