# 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"},"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"},"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"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Get stack","tags":["Stacks (Operations)"]}}}}
```
