> For the complete documentation index, see [llms.txt](https://doc.wearepatchworks.com/product-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.wearepatchworks.com/product-documentation/api-reference/caching/cache-step.md).

# Cache Step

## List Cache Step

> Retrieves a paginated list of \`Add to Cache\` steps associated with \`company\` caches, across all process flows. Specify a \`flow\_id\` query parameter for a list of \`Add to Cache\` steps associated with any cache type, for the given flow.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Cache Step"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"CacheStepListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CacheStep"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"},"links":{"$ref":"#/components/schemas/PaginationLinks"}}},"CacheStep":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"scope":{"type":"string"},"flow_id":{"type":"string"},"ttl_unit":{"type":"string"},"ttl_number":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"PaginationMeta":{"type":"object","properties":{"current_page":{"type":"integer"},"from":{"type":"integer","nullable":true},"last_page":{"type":"integer"},"path":{"type":"string"},"per_page":{"type":"integer"},"to":{"type":"integer","nullable":true},"total":{"type":"integer"}}},"PaginationLinks":{"type":"object","properties":{"first":{"type":"string","format":"uri"},"last":{"type":"string","format":"uri"},"prev":{"type":"string","format":"uri","nullable":true},"next":{"type":"string","format":"uri","nullable":true}}},"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/api/v1/cache-step":{"get":{"summary":"List Cache Step","description":"Retrieves a paginated list of `Add to Cache` steps associated with `company` caches, across all process flows. Specify a `flow_id` query parameter for a list of `Add to Cache` steps associated with any cache type, for the given flow.","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CacheStepListResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"429":{"description":"Too Many Requests. The rate limit for this user has been reached.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}},"tags":["Cache Step"],"parameters":[],"operationId":"cacheStepIndex"}}}}
```

## Create Cache Step

> Creates a new cache step.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Cache Step"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"CacheStepResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CacheStep"}}},"CacheStep":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"scope":{"type":"string"},"flow_id":{"type":"string"},"ttl_unit":{"type":"string"},"ttl_number":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}},"CacheStepStoreRequest":{"type":"object","properties":{"scope":{"type":"string"},"flow_id":{"type":"string"},"ttl_unit":{"type":"string"},"ttl_number":{"type":"string"}},"required":["scope"]}}},"paths":{"/api/v1/cache-step":{"post":{"summary":"Create Cache Step","description":"Creates a new cache step.","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CacheStepResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests. The rate limit for this user has been reached.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CacheStepStoreRequest"}}}},"tags":["Cache Step"],"parameters":[],"operationId":"cacheStepStore"}}}}
```

## Get Cache Step

> Retrieves the details of a specific cache step.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Cache Step"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/api/v1/cache-step/{cache_step}":{"get":{"summary":"Get Cache Step","description":"Retrieves the details of a specific cache step.","tags":["Cache Step"],"parameters":[{"name":"cache_step","in":"path","required":true,"schema":{"type":"string"},"description":"The cache step identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"404":{"description":"Not Found. The record does not exist.","content":{"application/json":{"schema":{"type":"string"}}}},"429":{"description":"Too Many Requests. The rate limit for this user has been reached.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}},"deprecated":true,"operationId":"cacheStepShow"}}}}
```
